The present invention relates to computer data handling applications, where unlimited implementations in hardware, software or both are possible. More particularly, the present invention relates to efficiently saving and retrieving the Boolean values of a large number of resource variables, when most of the large number of resource variables are expected to have the same value at any point in time.
Known methods and systems for recording large numbers of Boolean state values and their resource variable identifiers require large memory allocations, which increase costs and decrease performance of data handling solutions.
Therefore, the need exists for a data handling solution that can track the Boolean values of a large number of resource variables, reduce memory allocations and associated costs, while increasing overall performance of the data handling solution.
A method and system are disclosed herein for efficiently saving and retrieving Boolean values of each one of a plurality of resource variables using a small repository (i.e., having a small physical size), for use in associated computer data handling systems and/or networks to monitor resource events. The method and system are most efficient when most resource variables have the same known ‘normal’ value, at any point in time. The method of saving Boolean values is accomplished by obtaining a resource variable identifier (RVID) and its associated Boolean value, determining whether the Boolean value is normal or non-normal, adding a RVID entry in memory if the RVID entry for the non-normal Boolean value does not exist and proceeding to a save operation return; or, if the RVID entry does exist, then the method of saving proceeds to the save operation return. In the alternative, if it is determined that the Boolean value is normal, then the RVID entry is removed from memory and the operation proceeds to the save operation return, if the RVID entry exists in memory for a normal Boolean value. Or, if the RVID does not exist in memory for the normal Boolean value, then the operation proceeds to the save operation return.
Next, the method of retrieving Boolean values is accomplished by obtaining a RVID, then determining whether an entry for the RVID exists in memory. If the entry for the RVID does not exist, then a set return value is set to the normal Boolean value and the operation proceeds to a retrieve operation return. In the alternative, if the entry for the RVID does exist in memory, then the set return value is set to the non-normal Boolean value and the operation proceeds to the retrieve operation return.
Thus, the useful, practical and concrete result of reducing the required memory allocation in the associated computer data handling systems and/or networks in which the efficient saving and retrieving method and system are implemented is accomplished because by inventive design the algorithms conducting the operations of the efficient saving and retrieving method and system cause the memory capacity of the small repository to be only as large as the sum of RVIDs with non-normal Boolean values. Also, memory capacity can be reduced further because the algorithms by design know that any RVIDs recorded each have the non-normal Boolean value of one and each of the rest have the normal Boolean value of zero; therefore, once it is determined by the algorithms whether the values are either normal or non-normal, it is not required to record any of the non-normal values and it is not required to record any of the normal values. In addition, the size of the small repository is kept small by pruning RVIDs with normal Boolean values, where the size of the small repository is measured in terms of memory capacity of repository entry locations.
The above-described and other features will be appreciated and understood by those skilled in the art from the following detailed description, drawings, and appended claims.
The subject matter that is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The foregoing and other objects, features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings, which are meant to be exemplary, and not limiting, wherein:
A preferred embodiment of the invention is described below in detail. The disclosed embodiment is intended to be illustrative only, since numerous modifications and variations therein will be apparent to those of ordinary skill in the art. In reference to the drawings, like numbers will indicate like parts continuously throughout the view. Further, the terms “a”, “an”, “first”, “second” and “third” herein do not denote a limitation of quantity, but rather denote the presence of one or more of the referenced item. In addition, the terms “Boolean state values” and “Boolean values” are used interchangeably throughout the disclosure to describe a Boolean value representing an operational state of a resource.
The preferred Boolean embodiment will be understood by referring to
Referring to
Memory 103 contains small repository 105, having a small relative size and illustrated in
n=(SUM Number of Known RVIDs with BV Nonnorm); thus
n=(SUM of K+A+D+Q); thus
n=4; thus, in this example at a given point in time, the small repository is expandable to
Rn=R4, (i.e., 4 entry locations accommodating 4 known entries).
Memory 103 also contains algorithm unit 106, where first, second and third algorithms SVE algorithm 107, RTV algorithm 108 and third algorithm 110 respectively reside and are executed by processor 101 and cause processor 101 to perform various operations. SVE algorithm 107 is programmed to perform saving operation SVE 10. RTV algorithm 108 is programmed to perform retrieving operation RTV 20 and third algorithm 110 is programmed to perform other operations including display and network control operations.
Referring to
First determining sub operation SVE 13 determines whether the Boolean value of the first RVIDK is normal or non-normal, i.e., zero or one. Second determining sub operation SVE 14 determines whether an entry exists for the first RVIDK in small repository 105, when the Boolean state value of the first RVIDK is non-normal. A third determining sub operation SVE 15 determines whether an entry exists for the first RVIDK in small repository 105, when the Boolean state value of the first RVIDK is normal.
If it is determined in the second determining sub operation SVE 14 that the entry does exist for the first RVIDK in small repository 105, when the Boolean state value is non-normal, then saving operation SVE 10 proceeds to saving operation (save op) return SVE 18. Or, if the entry does not exist for the first RVIDK in small repository 105, when the Boolean state value of the first RVIDK is non-normal, then first performing sub operation SVE 16 adds the first RVIDK to small repository 105. After the entry is added, saving operation SVE 10 proceeds to save op return SVE 18.
If it is determined in third determining sub operation SVE 15 that the entry does not exist for the first RVIDK in small repository 105, when the Boolean state value is normal, then saving operation SVE 10 proceeds to save op return SVE 18. Or, if it is determined that the entry does exist for the first RVIDK in small repository 105, when the Boolean state value of RVIDK is normal, then second performing sub operation SVE 17 removes the first RVIDK from small repository 105, where removing the repository entry of the first RVIDK keeps the repository small by eliminating RVIDs that have the normal Boolean value. After the entry is removed, saving operation SVE 10 proceeds to save op return SVE 19. Thus, by literally recording in small repository 105 only the RVIDs that have non-normal Boolean values, the method and system of saving also distinguish and virtually record the RVIDs that have normal Boolean state values; thereby, recording by not recording the distinguished RVIDs with normal Boolean values. Therefore, by design, SVE algorithm 107 keeps track of all of the RVIDs and their Boolean state values, even though only the RVIDs associated with non-normal values need to be recorded in small repository 105 and by design, SVE 17 keeps the repository as small as possible by pruning RVIDs with normal Boolean values. SVE algorithm 107 also knows that the remaining RVIDs, i.e., RVIDs B−C, E−J, L−P and R−Z each have a normal Boolean state value of zero.
Referring to
If it is determined in fourth determining sub operation RTV 23 that an entry does not exist in small repository 105 RVIDK, then third performing sub operation RTV 24 sets a return value to a normal Boolean value and after the set return value is set then, retrieving operation RTV 20 proceeds to retrieving operation (retrieve op) return RTV 26. In the alternative, if it is determined that an entry does exist in small repository 105 for RVIDK, then fourth performing sub operation RTV 25 sets a return value to a non-normal Boolean value and after the set return value is set, then retrieving operation RTV 20 proceeds to retrieve op return RTV 26.
After the above described save op return SVE 18 and retrieve op return RTV 26 values have been set, values from saving operation SVE 10 and retrieving operation RTV 20 can be used in third algorithm 110 called to perform additional operations and/or sub operations. For example, third algorithm 110 can cause any of the above operations and sub operations to be repeated or cause set values to be streamed to display device 102 (as illustrated in
Thus, the useful, practical and concrete result of reducing the required memory allocation of small repository 105 is accomplished because by inventive design SVE algorithm 107, RTV algorithm 108 and third algorithm 110 conducting the operations of the efficient saving and retrieving method and system by design cause the memory capacity of small repository 105 to be only as large as the sum of RVIDs with non-normal Boolean values. Also, the memory capacity of small repository 105 is decreased further because SVE algorithm 107, RTV algorithm 108 and third algorithm 110 by design know by default that any RVIDs recorded (i.e., RVIDs K, A, D and Q) each have the non-normal Boolean value of one and each of the remaining RVIDs (i.e., RVIDs B−C, E−J, L−P and R−Z) in the universe of known RVIDs A-Z 119 have the normal Boolean value of zero; therefore, once it is determined by the algorithms whether the Boolean values are either normal or non-normal, it is not required to record any of the Boolean values in small repository 105. In addition, the size of the small repository is kept small by pruning RVIDs with normal Boolean values.
While the disclosure has been described with reference to a preferred Boolean embodiment, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the disclosure. For example, in a generic sense, a resource variable identifier and its value can be represented by any name or any value. Thus, a resource variable identifier can identify people. “Marty” and “John” and the RVIDs for each person can be characterized as “RVIDM” and “RVIDJ” respectively. If it is known that “John” spends a dollar amount of $18 dollars a month for a certain item and Marty spends $24 dollars a month for the same item, then the value associated with RVID “John” is a value of “$18” and the value associated with RVID “Marty” is “24”.
In addition, many modifications may be made to adapt a particular situation or material to the teachings of the disclosure without departing from the essential scope thereof. For example, the method of saving and retrieving can be carried out by at least polling and/or interrupt operations. Therefore, it is intended that the disclosure not be limited to any one particular embodiment disclosed as the best mode contemplated for carrying out this disclosure, but that the disclosure will include all embodiments falling within the scope of the appended claims.