INVENTORY MANAGING METHOD FOR AUTOMATIC INVENTORY RETRIEVAL AND APPARATUS THEREOF
Individual attributes are designated to individual hierarchical levels of an inventory information tree stored in an inventory information tree on-memory structure storing unit. Each node that structures the inventory information tree defines at least the type of an attribute of a commodity, the value thereof, the inventory quantity of the commodity that satisfies a classification condition corresponding to the position on the tree, and the relation with another node. While an inventory retrieving unit is searching each node on the inventory information tree corresponding to a retrieving condition designated with a combination of the attribute of the commodity and the value thereof, the unit executes an inventory retrieving process for updating the inventory quantity of each node. The unit searches nodes with priority corresponding to their positions in hierarchical levels with attributes that are not included in a retrieving condition.
Latest Fujitsu Limited Patents:
- DEVICE IDENTIFICATION METHOD AND APPARATUS
- RADIO COMMUNICATION APPARATUS, COMMUNICATION METHOD, AND NON-TRANSITORY COMPUTER-READABLE RECORDING MEDIUM
- INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM STORING INFORMATION PROCESSING PROGRAM
- COMMUNICATION MAINTAINING METHOD AND DEVICE
- NETWORK INTEGRATION METHOD AND APPARATUS FOR NODE
[0001] 1. Field of the Invention
[0002] The present invention relates to an inventory retrieving process in a sales circulation business.
[0003] 2. Description of the Related Art
[0004] An inventory managing technology using a database system is becoming common in sales circulation businesses.
[0005] In a table of an inventory management database, each commodity item is registered as one record entry. Each record is composed of a plurality of fields of attributes such as color and size.
[0006] When an inventory retrieving process is performed for extracting a desired commodity item that satisfies a particular condition from the database table, inquiry conditions are designated for individual attributes (fields) of the table.
[0007] In such a conventional inventory retrieving process, designated attributes affect the result of the inventory retrieving process. In other words, attributes that have not been designated do not affect the result.
[0008] Thus, all conditions for an inventory retrieving process should be defined as conditions of particular attributes. Consequently, some experience is required to designate such conditions. In other words, the inventory retrieving process cannot be always flexibly performed.
[0009] In reality, to perform an inventory retrieving process in such a manner that commodity items of M size are retrieved with higher priority than commodity items of L size, a condition “M size” is designated to a “size” attribute. Thereafter, a condition “L size” is designated to the “size” attribute. In this case, two steps of the inventory retrieving process are required. Thus, conventionally, it is difficult to designate to the database an automatic inventory retrieving rule such as “unless a size is designated, commodity items of M size are allocated with higher priority than commodity items of L size”.
SUMMARY OF THE INVENTION[0010] The prevent invention is made from the above-described point of view. An object of the present invention is to accomplish an automatic inventory retrieving process corresponding to a predetermined rule even if a designated condition of the inventory retrieving process is ambiguous.
[0011] The present invention is based on an inventory managing apparatus for performing an inventory management for a management object.
[0012] The inventory managing apparatus has a database table (inventory information tree DB) composed of records to which nodes that structure binary tree data are assigned, each of the nodes being defined with at least the type of an attribute of the management object, the value thereof, an inventory quantity of the management object that satisfies a classification condition represented by the position of the node on the binary tree data, and the relation of a link to another node.
[0013] In addition, the inventory managing apparatus has an inventory retrieving unit (104) for searching each node on the binary tree data through the database table corresponding to a retrieving condition defined with a combination of the attribute and value of the management object, executing an inventory retrieving process for updating the inventory quantity of each node, and searching each node with priority corresponding to the position of each node in hierarchical levels with attributes that are not included in the retrieving condition.
[0014] In the structure of the present invention, even if a condition of the inventory retrieving process is ambiguous, the inventory retrieving process can be automatically performed corresponding to an inventory retrieving rule based on the searching priority in a binary tree data structure.
[0015] The apparatus may have an inventory stocking unit (105) for executing an inventory stocking process for updating the inventory quantity of each node while searching each node on the binary tree data through the data base corresponding to a stocking condition defined with a combination of the attribute and value of the management object.
[0016] The apparatus may have a binary tree data on-memory structure creating unit for developing the binary tree data from the database table to a memory unit, wherein the inventory retrieving unit or the inventory stocking unit executes the inventory retrieving process or the inventory stocking process for the binary tree data developed in the memory unit.
[0017] In the structure of the present invention, binary tree data can be accessed at high speed.
[0018] Each record may have an identification information field for storing identification information having a value corresponding to the position of the node on the binary tree data. The binary tree data on-memory structure creating unit develops the binary tree data from the database table to the memory unit corresponding to the content of the identification information field.
[0019] In the structure of the present invention, with a simple inquiry statement to a database table, binary tree data can be developed from the database table to the memory unit.
[0020] Each record may have a management object type field for storing the type of the management object. The binary tree data on-memory structure creating unit develops the binary tree data for each management object type from the database table to the memory unit corresponding to the content of the management object type field.
[0021] In the structure of the present invention, with a simple inquiry statement to the database table, binary tree data can be developed from the database table to the memory unit.
[0022] Each node that structures the binary tree data developed to the memory unit may have node update information that represents whether or not the inventory quantity corresponding to each node has been updated by the inventory retrieving unit or the inventory stocking unit. The apparatus may have a database updating unit for affecting the update state of the binary tree data developed in the memory unit to the database table corresponding to the node update information.
[0023] In the structure of the present invention, binary tree data in the memory unit can be effectively matched with the database table.
[0024] In addition, the present invention can be accomplished by a storage medium from which a computer reads a program that causes the computer to perform the function accomplished by the structure of the first aspect of the present invention.
BRIEF DESCRIPTION OF DRAWINGS[0025] The above and other objects, features and advantages of the present invention will become more apparent in light of the following detailed description of a best mode embodiment thereof, as illustrated in the accompanying drawings, wherein
[0026] FIG. 1 is a block diagram showing the structure of a system according to an embodiment of the present invention;
[0027] FIG. 2 is a table showing an example of the data structure of an inventory information tree database (DB) (No. 1);
[0028] FIGS. 3(A) and 3(B) are examples of inventory information trees;
[0029] FIG. 4 is a schematic diagram showing the data structure of an inventory information tree on-memory (No. 1);
[0030] FIG. 5 is a schematic diagram showing the data structure of the inventory information tree on-memory (No. 2);
[0031] FIGS. 6(A) and 6(B) are schematic diagrams showing examples of an inventory retrieving process (No. 1);
[0032] FIGS. 7(C) and 7(D) are schematic diagrams showing examples of the inventory retrieving process (No. 2);
[0033] FIG. 8 is a flowchart showing a process of inventory information tree on-memory structure creating unit;
[0034] FIG. 9 is a table showing an example of the data structure of the inventory information tree DB (No. 2);
[0035] FIGS. 10(A) and 10(B) are respectively a table and a schematic diagram for explaining an inventory information tree on-memory structure creating process;
[0036] FIG. 11 is a flowchart showing a main flow of an inventory retrieving process;
[0037] FIG. 12 is a flowchart showing an inventory retrieving request process;
[0038] FIG. 13 is a flowchart showing a process for an intermediate node in the inventory retrieving process;
[0039] FIG. 14 is a flowchart showing a process for a terminal node in the inventory retrieving process;
[0040] FIG. 15 is a flowchart showing the inventory retrieving request process that can be distributed;
[0041] FIG. 16 is a flowchart showing a process for a terminal node with a lower limit of an inventory quantity in the inventory retrieving process;
[0042] FIG. 17 is a flowchart showing a main flow of an inventory stocking process;
[0043] FIG. 18 is a flowchart showing an inventory stocking request process;
[0044] FIG. 19 is a flowchart showing a process for an intermediate node in the inventory stocking process;
[0045] FIG. 20 is a flowchart showing a main flow of an inventory updating process;
[0046] FIG. 21 is a flowchart showing an inventory updating request process;
[0047] FIG. 22 is a flowchart showing a process for an intermediate node in the inventory updating process;
[0048] FIG. 23 is a flowchart showing a process for a terminal node in the inventory updating process;
[0049] FIG. 24 is a schematic diagram for explaining the inventory updating process;
[0050] FIGS. 25(A) and 25(B) are respectively a table and a schematic diagram showing an example of the structure of an inventory information tree DB according to a second embodiment of the present invention;
[0051] FIG. 26 is a table for explaining the structure of the inventory information tree DB according to the second embodiment of the present invention; and
[0052] FIG. 27 is a schematic diagram for explaining a storage medium for recording a program that allows an embodiment of the present invention to be accomplished.
DESCRIPTION OF PREFERRED EMBODIMENTS[0053] Next, with reference to the accompanying drawings, preferred embodiments of the present invention will be described.
[0054] Structure and Theory of the Preferred Embodiments of the Present Invention
[0055] FIG. 1 is a block diagram showing the structure of a system according to an embodiment of the present invention.
[0056] In the embodiment of the present invention, inventory information is managed with a database having a tree (binary tree) structure. The tree structure of all inventory information is stored in an inventory information tree database (inventory information tree DB) storing unit 101 shown in FIG. 1. The storing unit 101 is an auxiliary storing unit such as a hard disk.
[0057] In this example, one hierarchical level of the inventory information tree is designated to one attribute of a commodity item. Nodes corresponding to individual values of the attribute are disposed in the hierarchical level.
[0058] As shown in FIG. 2, on the inventory information tree DB table stored in the inventory information tree DB storing unit 101, one node structures one record. Each record has a node ID field, an attribute type (color, size, etc.) field, an attribute value (red, blue, M size, L size, etc.) field, an inventory quantity field, a parent ID field, and so forth. The parent ID field represents the node ID of the parent node linked to the current node.
[0059] With the inventory information tree DB having the data structure shown in FIG. 2, inventory information tree structures shown in FIGS. 3(A) and 3(B) can be represented for individual commodity items. In FIGS. 3(A) and 3(B), each box corresponds to a node. Straight lines drawn between boxes denote links between nodes represented with information stored in the parent ID field of the inventory information tree DB. In addition, “commodity”, “color”, “size”, and so forth correspond to information stored in the attribute field of the inventory information tree DB. “commodity A”, “commodity B”, “red”, “blue”, “yellow”, “M”, “L”, “S”, and so forth correspond to information stored in the value field of the inventory information tree DB. “800”, “600”, and so forth correspond to information stored in the inventory quantity field.
[0060] In the embodiment of the present invention, to allow the inventory information tree for each commodity item to be accessed at high speed, an inventory information tree on-memory structure creating unit 102 develops the on-memory structure of the inventory information tree for each commodity item shown in FIGS. 3(A) and 3(B) from the inventory information tree DB storing unit 101, which is an auxiliary storing unit, to an inventory information tree information tree on-memory structure storing unit 103 that is a semiconductor storing unit.
[0061] FIGS. 4 and 5 are schematic diagrams showing the data structure of the inventory information tree on-memory structure developed to the inventory information tree-on memory structure storing unit 103.
[0062] As shown in FIG. 4, the inventory information tree on-memory structure has a data structure (or object instance) composed of a node ID, a node update flag, an attribute, a value, an inventory quantity, a parent node ID, and a child node pointer list for each node.
[0063] Moreover, as shown in FIG. 5, the inventory information tree on-memory structure has a map table that stores pointers to addresses of data structures for individual node IDs.
[0064] In the data structure for each node shown in FIG. 4, the node ID, the attribute, the value, the inventory quantity, and the parent node ID correspond to the ID field, the attribute field, the value field, the inventory quantity field, and the parent ID field of the inventory information tree DB shown in FIG. 2, respectively.
[0065] When the inventory quantity of the current node is updated by an inventory retrieving unit 104 and an inventory stocking unit 105, a node update flag is set to “1”. Only for a node whose node update flag has been set to “1” in the inventory information tree on-memory structure, an inventory information tree DB updating unit 106 shown in FIG. 1 updates the inventory quantity field of the record corresponding to the current node on the inventory information tree DB stored in the inventory information tree DB storing unit 101. Thus, the inventory information tree DB and the inventory information tree on-memory structure can be effectively matched.
[0066] The child node pointer list is a list of pointers to addresses of data structures of nodes. In this case, the node that has the list is a parent node of these nodes. The child node pointer list is data that allows the inventory retrieving unit 104 to effectively navigate from a node in higher hierarchical level to a node in a lower hierarchical level in the inventory information tree on-memory structure.
[0067] On the other hand, the map table shown in FIG. 5 is created and used by the inventory information tree on-memory structure creating unit 102 (that will be described later).
[0068] The inventory retrieving unit 104 shown in FIG. 1 performs an automatic inventory retrieving process for the inventory information tree on-memory structure having the data structure (shown in FIG. 4) stored in the inventory information tree on-memory structure storing unit 103 corresponding to an inventory retrieving rule expressed by the inventory information tree as shown in FIGS. 6 and 7.
[0069] Now, assume that a retrieving condition “retrieve 250 commodities A of size L” is designated to the inventory retrieving unit 104.
[0070] In this case, the inventory information tree on-memory structure shown in FIG. 6(A) is accessed in the inventory information tree on-memory structure storing unit 103.
[0071] First, the inventory retrieving unit 104 executes a navigation from a node in the highest hierarchical level to terminal nodes in the lowest hierarchical level in the inventory information tree on-memory structure corresponding to the following navigation algorithm.
[0072] (1) When lower hierarchical layers corresponding to an attribute designated with a retrieving condition are navigated, nodes with the same attribute designated with the retrieving condition are navigated.
[0073] (2) When lower hierarchical layers corresponding to an attribute that is not designated with the retrieving condition are navigated, nodes are recursively navigated from the left end to the right end of the tree until the retrieving condition is satisfied.
[0074] When the retrieving condition “retrieve 250 commodities A of size L” is input, in the example shown in FIG. 6(A), since a “color” attribute has not been designated in the retrieving condition, an intermediate node with a “color=red” attribute is searched from the left end of the just lower hierarchical level.
[0075] Next, terminal nodes with a “size” attribute are searched from the left end of the lowest hierarchical level. Thus, the commodities A with the inventory quantity “200” are retrieved from the terminal node with a “size=L” attribute. Thus, as shown in FIG. 6(B), the inventory quantity of the node becomes “0”.
[0076] Since the retrieving condition is “250”, as shown in FIG. 7(C), an insufficient quantity “50” is returned to an intermediate node with the “color=red” attribute in the just higher hierarchical level. Thus, in the intermediate node, the retrieving condition is varied to “supply 50 commodities A of size L”.
[0077] Since the child nodes of the intermediate node do not have terminal nodes that have not been navigated and that satisfy the new retrieving condition, the insufficient quantity “50” is returned to the node with the “commodity A” attribute in the highest hierarchical level.
[0078] As a result, since the retrieving condition does not have a “color” attribute, as shown in FIG. 7(C), an intermediate node with a “color=blue” attribute is searched in the just lower hierarchical level.
[0079] Next, terminal nodes with a “size” attribute are successively searched from the left end of the just lowest hierarchical level. Thus, the commodities A with the inventory quantity “100” are retrieved from a terminal node with a “size=L” attribute. Consequently, as shown in FIG. 7(D), the inventory quantity of the terminal node becomes “50”.
[0080] As shown in FIG. 7(C), the insufficient quantity “0” is returned from the terminal node to the intermediate node with the “color=blue” attribute in the just higher hierarchical level. In addition, the insufficient quantity “0” is returned from the intermediate node to the node with the “commodity A” attribute in the highest hierarchical level.
[0081] Since the insufficient quantity “0” is determined with the node in the highest hierarchical level, the inventory retrieving process is completed.
[0082] The inventory retrieving process may be directly performed for the inventory information tree DB in the inventory information tree DB storing unit 101 rather than the inventory information tree on-memory structure in the inventory information tree on-memory structure storing unit 103. However, when the inventory retrieving process can be more quickly performed with the inventory information tree on-memory structure than the inventory information tree DB.
[0083] Since the navigation of the inventory retrieving process is executed for the inventory information tree corresponding to the above-described navigation algorithm, even if a condition of the inventory retrieving process is ambiguous, the inventory retrieving process can be automatically performed corresponding to an inventory retrieving rule based on the searching priority of a tree structure.
[0084] Detailed Description of Process of Inventory Information Tree On-Memory Structure Creating Unit 102
[0085] FIG. 8 is a flowchart showing the process of the inventory information tree on-memory structure creating unit 102.
[0086] To create an inventory information tree on-memory structure corresponding to a particular value of the “commodity” attribute (for example, commodity A), an SQL (Structural Query Language) statement is executed for extracting a record group corresponding to the particular commodity value from the table of the inventory information tree DB stored in the inventory information tree DB storing unit 101 (at step 801 shown in FIG. 8).
[0087] In this embodiment, the inventory information tree DB is provided as an SQL database.
[0088] In this embodiment, in addition to the structure shown in FIG. 2 as shown in FIG. 9, a “commodity code” field is added to the table structure of the inventory information tree DB so that a record group corresponding to a particular commodity value can be extracted with one SQL statement.
[0089] In this embodiment, a smaller value of node ID is set to an ID field of a record corresponding to a node included in a higher hierarchical level of the inventory tree. In addition, a smaller value of node ID is set to an ID field of a record corresponding to a node at a leftmost portion in the same hierarchical level. Thus, a node with a small value of node ID has higher priority of the navigation on the inventory information tree in the inventory retrieving process.
[0090] Moreover, by setting values in the ID field with non-continuous skipped numbers, nodes can be easily added.
[0091] An SQL statement executed at step 801 shown in FIG. 8 has the following format.
select from TABLE NAME where COMMODITY CODE=COMMODITY A order by ID
[0092] In the record group that has been extracted, nodes are arranged in the order of node IDs having smaller values corresponding to the inventory information tree structure. The nodes of the record group are scanned from the top as shown in FIG. 10(A) by a loop of steps 802 to 806 shown in FIG. 8. Thus, the inventory information tree on-memory structure can be created from the highest hierarchical level to the lower hierarchical level of the inventory information tree as shown in FIG. 10(B).
[0093] First, one record is obtained from the extracted record group (at step 802).
[0094] Next, it is determined whether or not a record has been obtained (at step 803).
[0095] When the determined result at step 803 is Yes, a node is created with the data of the obtained record (at step 804).
[0096] In reality, a data structure (or object instance) of one node with the data structure shown in FIG. 4 is allocated in the inventory information tree on-memory structure storing unit 103. Various values stored in the ID field, the attribute field, the value field, the inventory quantity field, and the parent ID field of the record obtained from the inventory information tree DB table are copied to the variable members of the node ID, the attribute, the value, the inventory quantity, and the parent node ID of the data structure. In addition, the node update flag of the data structure is set to “0”.
[0097] In addition, at step 804, the node ID of the created node and the pointer to the data structure of the node are registered to the map table shown in FIG. 5.
[0098] Next, the data structure of a node corresponding to the parent node ID designated to the data structure of the node created at step 804 is searched from the map table shown in FIG. 5 (at step 805).
[0099] The pointer of the data structure of the node created at step 804 is registered to the child node pointer list of the data structure searched at step 805 (at step 806). Actually, the list is allocated in a record area that is different from the data structure. In the data structure, a pointer to the record area is stored.
[0100] Thereafter, the flow returns to step 802. At step 802, the next record is obtained from the record group obtained at step 801. Next, steps 802 to 806 are executed.
[0101] When a record is not obtained (namely, the determined result at step 803 is No), the process for creating the inventory information table on-memory structure corresponding to one commodity (for example, commodity A) is completed.
[0102] Detailed Description of Process of Inventory Retrieving unit 104
[0103] FIGS. 11 to 14 are flowcharts showing the process of the inventory retrieving unit 104. FIG. 11 is a flowchart showing a main flow of the process.
[0104] First, an inventory retrieving request is issued to a node in the highest hierarchical level (at step 1101 shown in FIG. 11). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 6(A), the retrieving condition and the retrieving quantity are as follows.
[0105] Retrieving condition: “Commodity A of size L”
[0106] Retrieving quantity: “250”
[0107] FIG. 12 is a flowchart showing an inventory retrieving request process called at step 1101 shown in FIG. 11.
[0108] First, it is determined whether or not the attribute of the data structure of the current node (see FIG. 4) is included in the retrieving condition (at step 1201 shown in FIG. 12). In the example shown in FIG. 6(A), the “commodity” attribute of the data structure of the node in the highest hierarchical level is included in the above-described retrieving condition, the determined result at step 1201 is Yes.
[0109] When the determined result at step 1201 is Yes, it is determined whether or not the value of the data structure of the current node matches the retrieving condition (at step 1201 shown in FIG. 12). In the example shown in FIG. 6(A), since the “commodity A” value of the data structure of the node in the highest hierarchical level matches the retrieving condition, the determined result at step 1202 is Yes.
[0110] When the determined result at step 1202 is Yes, it is determined whether or not the current node is a terminal node (at step 1203). In the example shown in FIG. 6(A), since the node in the highest hierarchical level is not a terminal node, the determined result at step 1203 is No.
[0111] When the determined result at step 1203 is No, a process for an intermediate node is executed (at step 1204 shown in FIG. 12). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 6(A), the retrieving condition and the retrieving quantity are as follows.
[0112] Retrieving condition: “Commodity A of size L”
[0113] Retrieving quantity: “250”
[0114] FIG. 13 is a flowchart showing a process for an intermediate node called at step 1204 shown in FIG. 12.
[0115] First, a child node is searched (at step 1301 shown in FIG. 13). In the example shown in FIG. 6(A), since the child pointer list of the data structure of the node in the highest hierarchical level stores at the top a pointer to a node with a “color=red” attribute value, the determined result at step 1301 is Yes.
[0116] When the determined result at step 1301 is Yes, an inventory retrieving request is issued to a relevant node (at step 1302 shown in FIG. 12). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 6(A), the retrieving condition and the retrieving quantity are as follows.
[0117] Retrieving condition: “Commodity A of size L”
[0118] Retrieving quantity: “250”
[0119] The inventory retrieving request process called at step 1302 shown in FIG. 13 is executed corresponding to the flowchart shown in FIG. 12.
[0120] First, it is determined whether or not the attribute of the data structure of the current node is included in the retrieving condition (at step 1201 shown in FIG. 12). In the example shown in FIG. 6(A), since the “color=red” attribute of the data structure of the node is not included in the retrieving condition, the determined result at step 1201 is No.
[0121] When the determined result at step 1201 is No, it is determined whether or not the current node is a terminal node (at step 1203). In the example shown in FIG. 6(A), since the current node with the “color=red” attribute value is not a terminal node, the determined result at step 1203 is No.
[0122] When the determined result at step 1203 is No, a process for an intermediate node is executed (at step 1204 shown in FIG. 12). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 6(A), the retrieving condition and the retrieving quantity are as follows.
[0123] Retrieving condition: “Commodity A of size L”
[0124] Retrieving quantity: “250”
[0125] Thus, the process for the intermediate node corresponding to the flowchart shown in FIG. 13 is called again at step 1204 shown in FIG. 12.
[0126] First, a child node is searched (at step 1301 shown in FIG. 13). In the example shown in FIG. 6(A), since the child node pointer list of the data structure of the node with the “color=red” attribute stores at the top a pointer to a node with a “size=M” attribute, the determined result at step 1301 is Yes.
[0127] When the determined result at step 1301 is Yes, as described above, an inventory retrieving request is issued to a relevant child node (at step 1302 shown in FIG. 13). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 6(A), the retrieving condition and the retrieving quantity are as follows.
[0128] Retrieving condition: “Commodity A of size L”
[0129] Retrieving quantity: “250”
[0130] Thus, the inventory retrieving request process corresponding to the flowchart shown in FIG. 12 is called at step 1302 shown in FIG. 13.
[0131] It is determined whether or not the attribute of the data structure of the current node is included in the retrieving condition (at step 1201 shown in FIG. 12). In the example shown in FIG. 6(A), since a “size” attribute of the data structure of a node with a “size=M” attribute value in a lower hierarchical level of a node with the “color=red” attribute is included in the retrieving condition, the determined result at step 1201 is Yes.
[0132] When the determined result at step 1201 is Yes, it is determined whether or not the value of the data structure of the current node matches the retrieving condition (at step 1202 shown in FIG. 12). In the example shown in FIG. 6(A), since the “size=M” attribute value does not match the retrieving condition, the determined result at step 1202 is No.
[0133] When the determined result at step 1202 is No, the retrieving quantity is set to the insufficient quantity (at step 1206). Thus, the inventory retrieving request process at step 1302 shown in FIG. 13 is completed. In the example shown in FIG. 6(A), the insufficient quantity is “250”.
[0134] In FIG. 13, at step 1303, it is determined whether or not the insufficient quantity matches the retrieving quantity. In the example shown in FIG. 6(A), when the flow is returned from the inventory retrieving request process for the child node with the “size=M” attribute value in a lower hierarchical level of the node with the “color=red” attribute, since the insufficient quantity (=250) matches the retrieving quantity (=250), the determined result at step 1303 is Yes.
[0135] When the determined result at step 1303 is Yes, the next child node is searched (at step 1301 shown in FIG. 13). In the example shown in FIG. 6(A), since the child pointer list of the data structure of the node with the “color=red” attribute stores at the second position a pointer to a node with a “size=L” attribute, the determined result at step 1301 is Yes.
[0136] When the determined result at step 1301 is Yes, the inventory retrieving request is issued to the relevant child node (at step 1302 shown in FIG. 13). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 6(A), the retrieving condition and the retrieving quantity are as follows.
[0137] Retrieving condition: “Commodity A of size L”
[0138] Retrieving quantity: “250”
[0139] Thus, the inventory retrieving request process corresponding to the flowchart shown in FIG. 12 is called again at step 1302 shown in FIG. 13.
[0140] First, it is determined whether or not the attribute of the data structure of the current node is included in the attributing condition (at step 1201 shown in FIG. 12). In the example shown in FIG. 6(A), since the “size” attribute of the data structure of the node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=red” attribute value is included in the attributing condition, the determined result at step 1201 is Yes.
[0141] When the determined result at step 1201 is Yes, it is determined whether or not the value of the data structure of the current node matches the retrieving condition (at step 1202 shown in FIG. 12). In the example shown in FIG. 6(A), since the “size=L” attribute matches the retrieving condition, the determined result at step 1203 is Yes.
[0142] When the determined result at step 1202 is Yes, it is determined whether or not the current node is a terminal node (at step 1203). In the example shown in FIG. 6(A), since the node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=red” attribute value is a terminal node, the determined result at step 1203 is No.
[0143] When the determined result at step 1203 is Yes, a process for a terminal node is executed (at step 1205 shown in FIG. 12). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 6(A), the retrieving condition and the retrieving quantity are as follows.
[0144] Retrieving condition: “Commodity A of size L”
[0145] Retrieving quantity: “250”
[0146] FIG. 14 is a flowchart showing the process for the terminal node called at step 1205 shown in FIG. 12.
[0147] First, it is determined whether or not the inventory quantity of the data structure of the terminal node is larger than the retrieving quantity (at step 1401 shown in FIG. 14). In the example shown in FIG. 6(A), since the inventory quantity (=200) of the data structure of the terminal node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=red” attribute value is smaller than the retrieving quantity (=250), the determined result at step 1401 is No.
[0148] When the determined result at step 1401 is No, the value of which the current inventory quantity is subtracted from the retrieving quantity is set to the insufficient quantity. The new inventory quantity is set to “0” (at step 1403 shown in FIG. 14). In the example shown in FIG. 6(A)→FIG.6(B)→FIG. 7(C), in the process for the terminal node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=red” attribute value, the insufficient quantity is given as follows.
Insufficient quantity=retrieving quantity−inventory quantity=250−200=50
[0149] A new inventory quantity (=50) is set to the data structure as follows.
[0150] Inventory quantity=0
[0151] Thereafter, the node update flag of the data structure of the terminal node is set to “1” (at step 1404 shown in FIG. 14). The process for the terminal node at step 1205 shown in FIG. 12 is completed. In addition, the inventory retrieving request process at step 1302 shown in FIG. 13 is completed.
[0152] In FIG. 13, at step 1303, it is determined whether or not the insufficient quantity matches the retrieving quantity. In the example shown in FIG. 6(A), when the flow is returned from the inventory retrieving request process for the child node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=red” attribute value, as described above, the insufficient quantity (=50) does not match the retrieving quantity (=25). Thus, the determined result at step 1303 is No.
[0153] When the determined result at step 1303 is No, the node update flag of the data structure of the current intermediate node is set to “1” (at step 1304 shown in FIG. 13). In other words, the inventory quantity of the relevant node is updated. In addition, the inventory quantity of the parent node is updated as follows. Thus, the node update flag is set. In the example shown in FIG. 7(C), the node update flag of the data structure of the node with the “color=red” attribute value is set to “1”.
[0154] Next, the value of which the insufficient quantity is subtracted from the retrieving quantity is subtracted from the inventory quantity of the data structure of the current intermediate node. The resultant is set as a new inventory quantity. In addition, the insufficient quantity is set as a new retrieving quantity (at step 1305 shown in FIG. 13). In the example shown in FIG. 6(B)→FIG. 7(C), the inventory quantity of the data structure of the node with the “color=red” attribute value is given as follows.
Inventory quantity=inventory quantity−(retrieving quantity−insufficient quantity)=600−(250−50)=400
[0155] Thus, the new retrieving quantity is given as follows.
Retrieving quantity=insufficient quantity=50
[0156] Thereafter, it is determined whether or not the insufficient quantity is “0” (at step 1306 shown in FIG. 13). In the above example, since the insufficient quantity is 50 (not 0), the determined result at step 1306 is No.
[0157] When the determined result at step 1306 is No, the next child node is searched (at step 1301 shown in FIG. 13). In the example shown in FIG. 6(A), since the child pointer list of the data structure of the node with the “color=red” attribute value stores at the third position a pointer to a node with a “size=S” attribute value, the determined result at step 1301 is Yes.
[0158] When the determined result at step 1301 is Yes, as described above, an inventory retrieving request is issued to the relevant child node (at step 1302 shown in FIG. 13). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 7(C), the retrieving condition and the retrieving quantity are as follows.
[0159] Retrieving condition: “Commodity A of size L”
[0160] Retrieving quantity: “50”
[0161] Thus, the inventory retrieving request process corresponding to the flowchart shown in FIG. 12 is called at step 1302 shown in FIG. 13.
[0162] First, it is determined whether or not the attribute of the data structure of the current node is included in the retrieving condition (at step 1201 shown in FIG. 12). In the example shown in FIG. 7(C), since the “size” attribute of the data structure of a node with a “size=S” attribute in a lower hierarchical level of the node with the “color=red” attribute value is included in the retrieving condition, the determined result at step 1201 is Yes.
[0163] When the determined result at step 1201 is Yes, it is determined whether or not the value of the data structure of the current node matches the retrieving condition (at step 1202 shown in FIG. 12). In the example shown in FIG. 7(C), since the “size=S” attribute value does not match the retrieving condition, the determined result at step 1202 is No.
[0164] When the determined result at step 1202 is No, the retrieving quantity is set to the insufficient quantity (at step 1206). Thus, the inventory retrieving request process at step 1302 shown in FIG. 13 is completed. In the example shown in FIG. 7(C), the insufficient quantity is 50.
[0165] In FIG. 13, at step 1303, it is determined whether or not the insufficient quantity matches the retrieving quantity. In the example shown in FIG. 7(C), when the flow is returned from the inventory retrieving request process for the child node with the “size=S” attribute value in a lower hierarchical level of the nose with the “color=red” attribute value, as described above, since the insufficient quantity (=50) is the retrieving quantity (=50), the determined result at step 1303 is Yes.
[0166] When the determined result at step 1303 is Yes, the next child node is searched (at step 1301 shown in FIG. 13). In the example shown in FIG. 7(C), since the child node pointer list of the data structure of the node with the “color=red” attribute value does not store at the third or later position a pointer to a child node, the determined result at step 1301 is No.
[0167] When the determined result at step 1301 is No, the process for the intermediate node at step 1204 shown in FIG. 12 is completed. In addition, the inventory retrieving request process at step 1302 shown in FIG. 13 is completed. In the example shown in FIG. 7(C), the inventory retrieving request process for the intermediate node with the “color=red” attribute value is completed. Thereafter, the flow returns to the next step of the process for the intermediate node at step 1302 corresponding to the flowchart for the node in the highest hierarchical level shown in FIG. 12.
[0168] In FIG. 13, at step 1303, it is determined whether or not the insufficient quantity matches the retrieving quantity. In the example shown in FIG. 7(C), when the flow is returned from the inventory retrieving request process for the child node with the=“color=red” attribute value to the node in the highest hierarchical level, the insufficient quantity is 50. In addition, the retrieving quantity is 250 as shown in FIG. 6(A). Thus, the determined result at step 1303 is No.
[0169] When the determined result at step 1303 is No, as described above, the node update flag of the data structure of the current intermediate node is set to “1” (at step 1304 shown in FIG. 13). In the example shown in FIG. 7(C), the node update flag of the data structure of the node in the highest hierarchical level is set to “1”.
[0170] Next, the value of which the insufficient quantity is subtracted from the retrieving quantity is subtracted from the inventory quantity of the data structure of the current intermediate node. The result is set as a new inventory quantity. The insufficient quantity is set as a new retrieving quantity (at step 1305 shown in FIG. 13). In the example shown in FIG. 6(B)→FIG. 7(C), the inventory quantity of the data structure of the node in the highest hierarchical level is given as follows.
Inventory quantity=inventory quantity−(retrieving quantity−insufficient quantity)=800−(250−50)=600
[0171] The new retrieving quantity is given as follows.
Retrieving quantity=insufficient quantity=50
[0172] Thereafter, it is determined whether or not the insufficient quantity is 0 (at step 1306 shown in FIG. 13). In the example, since the insufficient quantity is 50 (not 0), the determined result at step 1306 is No.
[0173] When the determined result at step 1306 is No, the next child node is searched (at step 1301 shown in FIG. 13). In the example shown in FIG. 7(C), since the child node pointer list of the data structure of the node in the highest hierarchical level stores at the second position a pointer to a node with a “color=blue” attribute value, the determined result at step 1301 is Yes.
[0174] When the determined result at step 1301 is Yes, as described above, an inventory retrieving request is issued to the relevant child node (at step 1302 shown in FIG. 13). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 7(C), the retrieving condition and the retrieving quantity are as follows.
[0175] Retrieving condition: “Commodity A of size L”
[0176] Retrieving quantity: “50”
[0177] Thus, the inventory retrieving request process corresponding to the flowchart shown in FIG. 12 is called again at step 1302 shown in FIG. 13.
[0178] First, it is determined whether or not the attribute of the data structure of the current node is included in the retrieving condition (at step 1201 shown in FIG. 12). In the example shown in FIG. 7(C), since the “color” attribute of the data structure of the node with the “color=blue” attribute value is not included in the retrieving condition, the determined result at step 1201 is No.
[0179] When the determined result at step 1201 is No, it is determined whether or not the current node is a terminal node (at step 1203). In the example shown in FIG. 7(C), since the node with the “color=blue” attribute value is not a terminal node, the determined result at step 1203 is No.
[0180] When the determined result at step 1203 is No, the process for the intermediate node is executed (at step 1204 shown in FIG. 12). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 6(A), the retrieving condition and the retrieving quantity are as follows.
[0181] Retrieving condition: “Commodity A of size L”
[0182] Retrieving quantity: “50”
[0183] Thus, the process for the intermediate node corresponding to the flowchart shown in FIG. 13 is called again at step 1204 shown in FIG. 12.
[0184] First, a child node is searched (at step 1301 shown in FIG. 13). In the example shown in FIG. 7(C), since the child node pointer list of the data structure of the node with the “color=blue” attribute value stores at the top a pointer to a node with a “size=L” attribute value, the determined result at step 1301 is Yes.
[0185] When the determined result at step 1301 is Yes, as described above, an inventory retrieving request is issued to the relevant child node (at step 1302 shown in FIG. 13). In this case, a retrieving condition and a retrieving quantity are input. A retrieving quantity is returned. In the example shown in FIG. 6(A), the retrieving condition and the retrieving quantity are as follows.
[0186] Retrieving condition: “Commodity A of size L”
[0187] Retrieving quantity: “50”
[0188] Thus, the inventory retrieving request process corresponding to the flowchart shown in FIG. 12 is called again at step 1302 shown in FIG. 13.
[0189] First, it is determined whether or not the attribute of the data structure of the current node is included in the retrieving condition (at step 1201 shown in FIG. 12). In the example shown in FIG. 7(C), since the “size” attribute of the data structure of the node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=blue” attribute value is included in the retrieving condition, the determined result at step 1201 is Yes.
[0190] When the determined result at step 1201 is Yes, it is determined whether or not the value of the data structure of the current node matches the retrieving condition (at step 1202 shown in FIG. 12). In the example shown in FIG. 7(C), since the “size=L” attribute matches the retrieving condition, the determined result at step 1202 is Yes.
[0191] When the determined result at step 1202 is Yes, it is determined whether or not the current node is a terminal node (at step 1203). In the example shown in FIG. 7(C), since the node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=blue” attribute value is a terminal node, the determined result at step 1203 is No.
[0192] When the determined result at step 1203 is Yes, the process for the terminal node is executed (at step 1205 shown in FIG. 12). In this case, a retrieving condition and a retrieving quantity are input. An insufficient quantity is returned. In the example shown in FIG. 7(C), the retrieving condition and the retrieving quantity are as follows.
[0193] Retrieving condition: “Commodity A of size L”
[0194] Retrieving quantity: “50”
[0195] The process for the terminal node is executed corresponding to a flowchart shown in FIG. 14.
[0196] First, it is determined whether or not the inventory quantity of the data structure of the terminal node is larger than the retrieving quantity (at step 1401 shown in FIG. 14). In the example shown in FIG. 7(C), since the inventory quantity (=100) of the data structure of the terminal node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=blue” attribute value is larger than the attributing quantity (=50), the determined result at step 1401 is Yes.
[0197] When the determined result at step 1401 is Yes, the value of which the retrieving quantity is subtracted from the inventory quantity is set as a new inventory quantity. In addition, the insufficient quantity is set to “0” (at step 1402 shown in FIG. 14). In the example shown in FIG. 7(C)→FIG. 7(D), in the process for the terminal node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=blue” attribute value, the inventory quantity and the insufficient quantity are given as follows.
Inventory quantity=inventory quantity−retrieving quantity=100−50=50
[0198] Insufficient quantity=0
[0199] Thereafter, the node update flag of the data structure of the terminal node is set to “1” (at step 1401 shown in FIG. 14). Thus, the process for the terminal node at step 1205 shown in FIG. 12 is completed. In addition, the inventory retrieving request process at step 1302 shown in FIG. 13 is completed.
[0200] In FIG. 13, at step 1303, it is determined whether or not the insufficient quantity matches the retrieving quantity. In the example shown in FIG. 7(D), when the flow is returned from the inventory retrieving request process for the child node with the “size=L” attribute value in a lower hierarchical level of the node with the “color=blue” attribute value, as described above, since the insufficient quantity (=0) does not match the retrieving quantity (=50), the determined result at step 1303 is No.
[0201] When the determined result at step 1303 is No, the node update flag of the data structure of the current intermediate node is set to “1” (at step 1304 shown in FIG. 13). In the example shown in FIG. 7(D), the node update flag of the data structure of the node with the “color=blue” attribute value is set to “1”.
[0202] Next, the value of which the insufficient quantity is subtracted from the retrieving quantity is subtracted from the inventory quantity of the data structure of the current intermediate node. The result is set as a new inventory quantity. In addition, the insufficient quantity is set as a new retrieving quantity (at step 1305 shown in FIG. 13). In the example shown in FIG. 7(C)→FIG. 7(D), the inventory quantity of the data structure of the node with the “color=blue” attribute value is given as follows.
Inventory quantity=inventory quantity−(retrieving quantity−insufficient quantity)=200−(50−0)=150
[0203] Thus, the new retrieving quantity is given as follows.
Retrieving quantity=insufficient quantity=0
[0204] Thereafter, it is determined whether or not the insufficient quantity is 0 (at step 1306 shown in FIG. 13). In the example, since the insufficient quantity is 0, the determined result at step 1306 is Yes.
[0205] When the determined result at step 1306 is Yes, the process for the intermediate node at step 1204 shown in FIG. 12 is completed. In addition, the inventory retrieving request process at step 1302 shown in FIG. 13 is completed. In the example shown in FIG. 7(D), the inventory retrieving request process for the intermediate node with the “color=blue” attribute value is completed. Thereafter, the flow returns to the next step of the process for the intermediate node at step 1302 corresponding to the flowchart for the node in the highest hierarchical level shown in FIG. 12.
[0206] In FIG. 13, at step 1303, it is determined whether or not the insufficient quantity matches the retrieving quantity. In the example shown in FIG. 7(D), when the flow is returned from the inventory retrieving request process for the child node with the “color=blue” attribute value in a lower hierarchical level of the node in the highest hierarchical level, the insufficient quantity is 0 and the retrieving quantity is 50 as shown in FIG. 7(C). Thus, the determined result at step 1303 is Yes.
[0207] When the determined result at step 1303 is No, as described above, the node update flag of the data structure of the current intermediate node is set to “1” (at step 1304 shown in FIG. 13). In the example shown in FIG. 7(D), the node update flag of the data structure of the node in the highest hierarchical level is set to “1” again.
[0208] Next, the value of which the insufficient quantity is subtracted from the retrieving quantity is subtracted from the inventory quantity of the data structure of the current intermediate node. The result is set as a new inventory quantity. In addition, the insufficient quantity is set as a new retrieving quantity (at step 1305 shown in FIG. 13). In the example shown in FIG. 7(C)→FIG. 7(D), the inventory quantity of the data structure of the node in the highest hierarchical level is given as follows.
Inventory quantity=inventory quantity−(retrieving quantity−insufficient quantity)=600−(50−0)=550
[0209] The new retrieving quantity is given as follows.
Retrieving quantity=insufficient quantity=0
[0210] Thereafter, it is determined whether or not the insufficient quantity is 0 (at step 1306 shown in FIG. 13). In the example, since the insufficient quantity is 0, the determined result at step 1306 is Yes.
[0211] When the determined result at step 1306 is Yes, the process for the intermediate node at step 1204 shown in FIG. 12 is completed. In addition, the inventory retrieving request process at step 1302 shown in FIG. 13 is completed. In the example shown in FIG. 7(D), the inventory retrieving request process for the node in the highest hierarchical level is completed. The flow returns to the next step of the inventory retrieving process corresponding to the flowchart shown in FIG. 11.
[0212] In FIG. 11, it is determined whether or not the insufficient quantity is 0 (at step 1102 shown in FIG. 11). In the example shown in FIG. 7(D), since the insufficient quantity is 0, the determined result at step 1102 is Yes.
[0213] When the determined result at step 1102 is Yes, a message that represents that the inventory retrieving process has been successfully completed is sent. Thus, the inventory retrieving process of the inventory retrieving unit 104 is completed.
[0214] On the other hand, when the determined result at step 1102 is No, all node updates are discarded (at step 1103 shown in FIG. 11). The content of the inventory information tree on-memory structure storing unit 103 is not varied.
[0215] Thereafter, a message that represents that the inventory retrieving process has been unsuccessfully terminated is sent. Thus, the inventory retrieving process of the inventory retrieving unit 104 is terminated.
[0216] In the case that the attribute of the data structure of the current intermediate node matches the retrieving condition (namely, the determined result at step 1201 shown in FIG. 12 is Yes→the determined result at step 1202 is Yes→the determined result at step 1203 is No→step 1204), in an inventory retrieving request process for a child node of an intermediate node (at step 1302 shown in FIG. 12 and in the flowchart shown in FIG. 12), if the child node is a terminal node, even if the attribute of the data structure of the terminal node is not included in the retrieving condition, the inventory retrieving process is executed for the terminal node (at step 1205 shown in FIG. 12 and the flowchart shown in FIG. 14).
[0217] Inventory Retrieving Process that can be Distributed
[0218] The above-described inventory retrieving process for a terminal node is executed until the inventory quantity thereof becomes 0.
[0219] In the case that the attribute and value of the data structure of an intermediate node match a retrieving condition, when an inventory retrieving request process for a terminal node that is a child node of the intermediate node is executed, if the attribute of the data structure of the terminal node is not included in the retrieving condition, the system may be structured in such a manner that the inventory retrieving process is performed up to the lower limit of a predetermined inventory quantity.
[0220] FIG. 15 is a flowchart showing an inventory retrieving request process that can be distributed. The flowchart shown in FIG. 15 is similar to that shown in FIG. 12. In FIG. 15, similar steps to those in FIG. 12 are denoted by similar reference numerals.
[0221] In FIG. 15, in the case that the attribute and value of the data structure of an intermediate node match a retrieving condition (the determined result at step 1501 shown in FIG. 15 is Yes→the determine result at step 1502 is Yes→the determined result at step 1503 is No→step 1504), when an inventory retrieving request process for a child node of the intermediate node is performed (at step 1302 shown in FIG. 13 and in the flowchart shown in FIG. 15), if the attribute of the data structure of the child node is not included in the attributing condition (the determined result at step 1201 shown in FIG. 15 is No) and the current node is a terminal node (at step 1501 shown in FIG. 15), the process for the terminal node is performed up to the lower limit of the inventory quantity unlike with step 1205 (at step 1502 shown in FIG. 15).
[0222] FIG. 16 is a flowchart showing the process for the terminal node at step 1502 shown in FIG. 15.
[0223] First, it is determined whether or not the value of which a predetermined value of the lower limit is subtracted from the inventory quantity of the data structure of the terminal node is larger than the retrieving quantity (at step 1601 shown in FIG. 16).
[0224] When the determined result at step 1601 is Yes, as with the case at step 1402, the value of which the retrieving quantity is subtracted from the inventory quantity is set as a new inventory quantity. In addition, the insufficient quantity is set to 0 (at step 1602 shown in FIG. 16).
[0225] When the determined result at step 1601 is No, the value of which the lower limit of the inventory quantity is subtracted from the inventory quantity is subtracted from the retrieving quantity. The result is set as an insufficient quantity. The new inventory quantity is set as a lower limit of the inventory quantity (at step 1603 shown in FIG. 16).
[0226] The process at step 1604 is the same as the process at step 1404 shown in FIG. 14.
[0227] As described above, since the process for the terminal node is executed up to the lower limit of the inventory quantity, the inventory retrieving process is prevented from being performed only for a particular node. Thus, the inventory retrieving process can be distributed.
[0228] Detailed Description of the Process of the Inventory Stocking Unit 105
[0229] The inventory stocking process is executed by the inventory stocking unit 105 for the inventory information tree on-memory structure stored in the inventory information tree on-memory structure storing unit 103.
[0230] In the inventory stocking process, nodes that satisfy a stocking condition are one terminal node and intermediate nodes in higher hierarchical levels thereof.
[0231] FIGS. 17 to 19 are flowcharts showing the process of the inventory stocking unit 105. FIG. 17 is a flowchart showing a main flow of the process.
[0232] First, an inventory stocking request is issued to a node in the highest hierarchical level (at step 1701 shown in FIG. 17). In this case, a stocking condition and a stocking quantity are input. OK or NG is returned.
[0233] FIG. 18 is a flowchart showing an inventory stocking request process called at step 1701 shown in FIG. 17.
[0234] In the inventory stocking request process, when the attribute and value of the data structure of the current node do not match the stocking condition, a message NG is immediately returned (the determined result at step 1801 shown in FIG. 18 is No→step 1811; the determined result at step 1801 is Yes→the determined result at step 1802 is No→step 1811).
[0235] In contrast, when the attribute and value of the data structure of the current node match the stocking condition and the current node is an intermediate node, a process for an intermediate node is executed (the determined result at step 1801 shown in FIG. 18 is Yes→the determined result at step 1802 is Yes the determined result at step 1803 is No→step 1804). In this case, a stocking condition and a stocking quantity are input. OK or NG is returned.
[0236] FIG. 19 is a flowchart showing a process for an intermediate node called at step 1804 shown in FIG. 18.
[0237] In the process for the intermediate node, a child node is searched from the child node pointer list of the data structure of the intermediate node. In addition, the inventory stocking request process is executed for a relevant child node (the determined result at step 1901 shown in FIG. 19 is Yes→step 1902→step 1903→step 1901).
[0238] The inventory stocking request process for the relevant child node is executed again corresponding to the flowchart shown in FIG. 18. When the relevant child node is an intermediate node, the process for the intermediate node is recursively executed (the determined result at step 1801 shown in FIG. 18 is Yes→the determined result at step 1802 is Yes→the determined result at step 1803 is No→step 1804).
[0239] On the other hand, when the child node is a terminal node and the attribute and value of the data structure thereof match the stocking condition (the determined result at step 1801 shown in FIG. 18 is Yes→the determined result at step 1802 is Yes→the determined result at step 1803 is Yes), the stocking quantity is added to the inventory quantity of the data structure of the terminal node (at step 1808 shown in FIG. 18). The node update flag of the data structure is set to “1” (at step 1809 shown in FIG. 18). A message OK is returned to the parent node (at step 1810 shown in FIG. 18).
[0240] When the message OK is returned from the terminal node, in the process for the intermediate node shown in FIG. 19, the determined result at step 1903 is Yes. The node update flag of the data structure of the intermediate node is set to “1” (at step 1904 shown in FIG. 19). The stocking quantity is added to the inventory quantity of the data structure (at step 1905 shown in FIG. 19). Thus, a message OK is returned (at step 1906 shown in FIG. 19).
[0241] In the process for the intermediate node, when a message OK is not returned from any child node and thereby the determined result at step 1901 is No, a message NG is returned (at step 1907 shown in FIG. 19).
[0242] When the message OK is returned in the process for the intermediate node, a message OK is returned to the parent node that causes the intermediate node to execute the inventory stocking request process (step 1804 shown in FIG. 18→the determined result at step 1805 is Yes (OK)→step 1806). In contrast, when a message NG is returned, a message NG is returned to the parent node that causes the intermediate node to executes the inventory stocking request process (step 1804 shown in FIG. 18 the determined result at step 1805 is No (NG)→step 1807).
[0243] As described above, when the result of the inventory stocking process is returned to the node in the highest hierarchical level of the inventory information tree on-memory structure, the inventory stocking request process at step 1701 shown in FIG. 17 is completed. Next, it is determined whether or not the message OK is returned (at step 1702 shown in FIG. 17).
[0244] When the determined result at step 1702 is Yes (OK), a message that represents that the inventory stocking process has been successfully completed is sent. Thus, the inventory stocking process of the inventory stocking unit 105 is completed.
[0245] On the other hand, when the determined result at step 1702 is No (NG), all node updates are discarded (at step 1703 shown in FIG. 17). Thus, the content of the inventory information tree-on memory structure storing unit 103 is not varied.
[0246] Thereafter, a message that represents that the inventory stocking process has been unsuccessfully terminated is sent. Thus, the inventory stocking process of the inventory stocking unit 105 is terminated.
[0247] Detailed Description of the Process of the Inventory Information Tree DB Updating Unit 106
[0248] The updated content of the inventory information tree on-memory structure stored in the inventory information tree on-memory structure storing unit 103 is reflected to the inventory information tree DB stored in the inventory information tree DB storing unit 101 by the inventory information tree DB updating unit 106 at predetermined intervals.
[0249] As described above, the node update flag stored in the data structure of each node in the inventory information tree on-memory structure is set to “1” when the inventory quantity of the relevant node is updated by the inventory retrieving unit 104 and the inventory stocking unit 105. The inventory information tree DB updating unit 106 executes the SQL statement for updating the data to the inventory information tree DB table for a node with node update flag=1 in the inventory information tree on-memory structure shown in FIG. 24. Thus, the inventory information tree DB and the inventory information tree on-memory structure can be effectively matched.
[0250] FIGS. 20 to 23 are flowcharts showing a process of the inventory information tree DB updating unit 106. FIG. 20 is a flowchart showing a main flow of the process.
[0251] First, an inventory updating request is issued to a node in the highest hierarchical level (at step 2001 shown in FIG. 20).
[0252] FIG. 21 is a flowchart showing the inventory updating request process called at step 2001 shown in FIG. 20.
[0253] In the inventory updating request process, when the current node is an intermediate node, the inventory updating process for the intermediate node is executed (the determined result at step 2101 shown in FIG. 21 is No→step 2102). When the current node is a terminal node, the inventory updating process for the terminal node is executed (the determined result at step 2101 is Yes→step 2103).
[0254] FIG. 22 is a flowchart showing the inventory updating process for the intermediate node called at step 2102 shown in FIG. 21.
[0255] In the inventory updating process for the intermediate node, when the node update flag of the data structure of the current node is “1”, the following SQL statement for the node is issued (determined result at step 2201 shown in FIG. 22 is Yes→step 2202).
update TABLE NAME set INVENTORY QUANTITY=<INVENTORY QUANTITY> where ID=<NODE ID>
[0256] In the SQL statement, <INVENTORY QUANTITY> and <NODE ID> are the inventory quantity and node ID stored in the data structure.
[0257] Thereafter, the node update flag stored in the data structure of the current node is set to “0” (at step 2203).
[0258] Next, a child node is searched from the child node pointer list of the data structure of the current node. The inventory updating request process is executed for a relevant child node (the determined result at step 2204 shown in FIG. 22 is Yes→step 2205→step 2204).
[0259] The inventory updating request process for the relevant child node corresponding to the flowchart shown in FIG. 21 is executed again. When the relevant child node is an intermediate node, the inventory updating process for the intermediate node is recursively executed (the determined result at step 2101 shown in FIG. 21 is No→step 2202).
[0260] On the other hand, in the inventory updating request process, when the current node is a terminal node, the inventory updating process for the terminal node is executed (the determined result at step 2101 is Yes→step 2103).
[0261] FIG. 23 is a flowchart showing the inventory updating process for the terminal node called at step 2103 shown in FIG. 21.
[0262] In the inventory updating process for the terminal node, no operation is performed unless the node update flag stored in the data structure of the current node is “1”. When the node update flag is “1”, as with the case of an intermediate node, the following SQL statement is executed (the determined result at step 2301 shown in FIG. 23 is Yes→step 2302).
update TABLE NAME set INVENTORY QUANTITY=<INVENTORY QUANTITY> where ID=<NODE ID>
[0263] Thereafter, the node update flag stored in the data structure of the current node is set to “0” (at step 2303).
[0264] After the inventory updating process has been recursively completed and the flow returns to the inventory updating request process for the node in the highest hierarchical level, the inventory updating process at step 2001 shown in FIG. 20 is completed. Thus, the inventory updating process of the inventory information tree DB updating unit 106 is completed.
[0265] Inventory Information Tree DB according to Second Embodiment
[0266] FIG. 25(A) is a table showing an inventory information tree DB stored in the inventory information tree DB storing unit 101 according to a second embodiment of the present invention.
[0267] In the inventory information tree DB according to the first embodiment of the present invention shown in FIG. 2 or 9, a smaller value of node ID is designated to a node in a higher hierarchical level of the inventory information tree. In addition, a smaller node ID is designated to a node at a leftmost position in the same hierarchical level. Thus, a navigation of the inventory retrieving process based on the inventory information tree is configured so that the node ID which has a smaller value will be higher in the order of priority.
[0268] On the other hand, in the second embodiment shown in FIG. 25(A), the priority between different hierarchical levels is defined with the relation of settings in a parent ID field. Moreover, the priority in the same hierarchical level is defined with the relation of settings in a preceding node ID field.
[0269] Thus, corresponding to the settings in the preceding node ID field, the priority of the navigation can be defined as shown in FIG. 25(B).
[0270] With such a structure, as shown in FIG. 26, a node with any priority can be easily added to any hierarchical level.
[0271] Supplementary Description of Storage Medium on Which Program for Accomplishing Embodiment of Present Invention is Recorded
[0272] The present invention can be applied for a storage medium from which a computer reads a program that causes the computer to perform the same function as that accomplished by each structural unit of the embodiment.
[0273] In this case, as shown in FIG. 27, a program that accomplishes each function of each embodiment of the present invention is loaded to a memory (RAM, hard disk, or the like) of a main unit 2704 of an NMS server 2701 with a portable storage medium 2402 such as a floppy disk, a CD-R disc, an optical disc, a removable disc, or the like or through a network line 2703. Thereafter, the program is executed.
Claims
1. An inventory managing method for automatically performing an inventory managing process for a management object, comprising the steps of:
- defining to a node that structures binary tree data to which attributes of the management object are designated to individual hierarchical levels at least the type of an attribute of the management object, the value thereof, an inventory quantity of the management object that satisfies a classification condition represented by the position of the node on the binary tree data, and the relation of a link to another node;
- designating the attribute and the value of the management object as a retrieving condition when the inventory retrieving process is performed;
- executing the inventory retrieving process for updating the inventory quantity of each node while searching each node on the binary tree data corresponding to the retrieving condition; and
- searching each node with priority corresponding to the position of each node in hierarchical layers with attributes that are not included in the retrieving condition.
2. An inventory managing apparatus for automatically performing an inventory retrieving process for a management object, comprising:
- a database table composed of records to which nodes that structure binary tree data are assigned, each of the nodes being defined with at least the type of an attribute of the management object, the value thereof, an inventory quantity of the management object that satisfies a classification condition represented by the position of the node on the binary tree data, and the relation of a link to another node; and
- an inventory retrieving unit for searching each node on the binary tree data through said database table corresponding to a retrieving condition defined with a combination of the attribute and value of the management object, executing an inventory retrieving process for updating the inventory quantity of each node, and searching each node with priority corresponding to the position of each node in hierarchical levels with attributes that are not included in the retrieving condition.
3. The apparatus as set forth in
- claim 2, further comprising:
- an inventory stocking unit for executing an inventory stocking process for updating the inventory quantity of each node while searching each node on the binary tree data through said data base corresponding to a stocking condition defined with a combination of the attribute and value of the management object.
4. The apparatus as set forth in
- claim 2 or
- 3, further comprising:
- a binary tree data on-memory structure creating unit for developing the binary tree data from said database table to a memory unit,
- wherein said inventory retrieving unit or said inventory stocking unit executes the inventory retrieving process or the inventory stocking process for the binary tree data developed in the memory unit.
5. The apparatus as set forth in
- claim 4,
- wherein each record further comprises:
- an identification information field for storing identification information having a value corresponding to the position of the node on the binary tree data, and
- wherein said binary tree data on-memory structure creating unit develops the binary tree data from said database table to the memory unit corresponding to the content of the identification information field.
6. The apparatus as set forth in
- claim 4,
- wherein each record further comprises:
- a management object type field for storing the type of the management object, and
- wherein said binary tree data on-memory structure creating unit develops the binary tree data for each management object type from said database table to the memory unit corresponding to the content of the management object type field.
7. The apparatus as set forth in
- claim 4,
- wherein each node that structures the binary tree data developed to the memory unit has node update information that represents whether or not the inventory quantity corresponding to each node has been updated by said inventory retrieving unit or said inventory stocking unit, and
- wherein the apparatus further comprises:
- a database updating unit for affecting the update state of the binary tree data developed in the memory unit to said database table corresponding to the node update information.
8. A storage medium from which a computer reads a program that causes the computer to perform the functions of:
- defining to a node that structures binary tree data to which attributes of the management object are designated to individual hierarchical levels at least the type of an attribute of the management object, the value thereof, an inventory quantity of the management object that satisfies a classification condition represented by the position of the node on the binary tree data, and the relation of a link to another node;
- designating the attribute and the value of the management object as a retrieving condition when the inventory retrieving process is performed;
- executing the inventory retrieving process for updating the inventory quantity of each node while searching each node on the binary tree data corresponding to the retrieving condition; and
- searching each node with priority corresponding to the position of each node in hierarchical layers with attributes that are not included in the retrieving condition.
Type: Application
Filed: Jul 14, 1998
Publication Date: Nov 15, 2001
Applicant: Fujitsu Limited (Kawasaki)
Inventors: TADAHIRO UEHARA (KANAGAWA), HIROYUKI YOSHIDA (KANAGAWA), RIEKO YAMAMOTO (KANAGAWA), HIROSHI SAKURAI (KANAGAWA)
Application Number: 09114517
International Classification: G06F017/30;