Tare weight deduction method and system based on complex accommodation model

By adopting tare deduction methods and systems with complex accommodating models in industrial weighing systems, the problem of difficulty in dealing with multi-level accommodating relationships in complex industrial environments is solved, and efficient and accurate net weight calculations are achieved.

CN119691615APending Publication Date: 2025-03-25至控(湖州)智能系统有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411758764.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Existing computer weighing systems are difficult to deal with multi-stage storage relationships in complex industrial environments, and cannot accurately deduct the weight of all relevant containers, resulting in inaccurate weighing results.

Method used

Using tare deduction methods and systems based on complex accommodation models, by constructing a data relationship model of item type table and item single-piece table, identifying and recording the item single-piece code set that directly or indirectly contains item single-piece codes, calculating the total weight of the container and deducting it from the item group gross weight to obtain accurate net weight.

Benefits of technology

It realizes the accurate processing of multi-level accommodating relationships in complex industrial environments, improves data processing efficiency and accuracy, and is suitable for a wider range of application scenarios, especially in environments where precise measurement and efficient data management are required.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691615A_ABST
    Figure CN119691615A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial production, in particular to a tare weight deduction method and system based on a complex accommodation model, and the method comprises the steps: S1, obtaining the gross weight of an article group and the single code of an article; s2, constructing a data relation model comprising an article type table and an article single piece table, and carrying out association binding on article single piece codes and entity single pieces or type types; s3, according to the article single-piece codes, identifying an article single-piece code set directly or indirectly containing the article single-piece codes; s4, according to the article single-piece code set, obtaining a single-piece code set and a type code set of all article single pieces; and S5, deducting the total weight of the container from the gross weight of the article group to obtain the net weight of the article group. According to the method, one field is added in the article single piece table, the article single pieces are directly associated with the container types or entities, the complex containing model is effectively expressed, all directly or indirectly bound containers and articles are rapidly recognized from any managed article, and the data processing efficiency and accuracy are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial production, and in particular to a tare weight deduction method and system based on a complex containment model. Background Art

[0002] In process industries such as fine chemicals, medicine, food, steel, and petrochemicals, accurate quality control is a key link in ensuring product quality and effective cost management. These industries rely extensively on accurate weight measurement, usually using the net weight of raw materials, semi-finished products, and products as the basic measurement unit. In each link of production, when taking inventory and reviewing materials, it is generally necessary to weigh them together with the container to obtain the gross weight of the material, and then calculate the net weight of the material by deducting the measured tare weight or nominal tare weight (standard tare weight) of the container. In the actual production process, it is often not feasible to directly weigh the net weight of the material.

[0003] However, most existing computer weighing systems are designed to handle simple scenarios, that is, a single material is placed in a single container. These systems usually use basic mass deduction logic, that is, directly deducting the container weight from the total mass to calculate the net weight of the material. However, in more complex industrial environments, these traditional systems often have difficulty coping. For example, in industrial production processes, common weighing objects include not only materials and their direct containers, but may also involve pallets, carriers (such as forklifts, trucks), reactors, etc. This multi-level containment relationship requires the weight of all related containers to be automatically deducted during weighing.

[0004] In this case, a more complex and flexible data processing method and system is needed to accurately process and calculate the weight of each component in the multi-level containment relationship. Traditional linear data processing methods or simple relational database structures are often unable to effectively handle this complexity, so a complex containment modeling technology with applicability and versatility in various scenarios and a tare weight deduction method based on this are needed. Summary of the invention

[0005] The purpose of the present invention is to solve the above technical problems. Based on this situation, the present invention provides a tare weight deduction method and system based on a complex containment model. The purpose of the present invention can be achieved through the following technical solutions: The present invention provides a tare weight deduction method based on a complex containment model, comprising: Step S1: construct a data relationship model including an item category table and an item item table, wherein the container item code in the item category table is the item item code of the entity item or the item category code corresponding to the entity item in the item category table; the item item code is associated and bound with the entity item or the category type; Step S2, obtaining the gross weight of the item group and the single item code of at least one item in the item group; Step S3: Based on the constructed data relationship model, according to the acquired item code, identify and record the item code set that directly or indirectly contains the item code; Step S4: According to the item code set, the item code set and the category code set of all items in the item group are obtained through the data relationship model; Step S5, enumerate and accumulate the weights of the container units in the unit code set and the container types in the type code set in step S4 to obtain the total weight of the containers of the item group, and then deduct the total weight of the containers from the gross weight of the item group in step S1 to obtain the net weight of the item group.

[0006] Furthermore, in step S1, constructing a data relationship model including an item category table and an item item table includes: Define an item type table, which includes at least three fields, namely, item type code, item type, and nominal weight. The item type code is the unique identifier of the item type, and the item type is an enumeration, which limits the item type to materials or containers. For an item type code limited to containers, its nominal weight field records the standard tare weight of the item type. Define an item item table, including item item code, item type code and container item code fields; wherein the item item code is a unique identifier for each item.

[0007] Further, in step S3, according to the acquired item code, a set of item codes that directly or indirectly contain the item code is identified and recorded, including: Step S301, initializing a deduplicated single item set, the single item set including a to-be-processed single item set, a processed single item set, and a processed container type set; Step S302, adding the acquired item code to the set of items to be processed; Step S303, extracting an item code from the set of items to be processed; Step S304: determine whether the extracted item code is empty. If the item code is empty, jump to step S4; otherwise, add the item code to the processed item set, find the container code where the item code is located in the item table, and add it to the to-be-processed item set; Step S305, repeatedly executing step S303 until the item code taken out from the to-be-processed item set is a null value, and the processed item set is the item code set.

[0008] Further, in step S4, according to the item code set, the item code set and the category code set of all items in the item group are obtained through the data relationship model, including: Step S401, moving the container item code in the processed item set to the to-be-processed item set; Step S402, extracting a container item code from the set of items to be processed; Step S403, determine whether the extracted container single item code is empty. When the container single item code is empty, jump to step S5. Otherwise, determine whether it is a physical single item or a container type according to the container single item code. When the container single item code is an item type code, add it to the processed container type set, otherwise add it to the processed single item set; at the same time, add the item single item code directly included in the container single item code to the to-be-processed single item set; the processed container type set is the type code set, and the processed single item set is the single item code set; Step S404, repeating step S402 until the code of the container item taken out from the to-be-processed item set is a null value.

[0009] Further, in step S5, the weights of the containers in the single-item code set and the container types in the type code set in step S4 are enumerated and accumulated to obtain the total weight of the containers in the item group, including: Step S501, initializing the total weight of the containers in the item group; Step S502, enumerate the container single item codes in the single item code set, when the item type of the container single item code is container, add the corresponding nominal weight to the container weight, continue to enumerate the item type codes in the type code set, when the item type of the item type code is container, add the nominal weight to the total weight of the container; and obtain the total weight of the container of the item group.

[0010] Based on the same inventive concept, the present invention also provides a tare weight deduction system based on a complex containment model, which executes the above-mentioned tare weight deduction method, including: The user interface module includes an input unit and an output unit, and is used to input or select a single item code in an item group as an input in the user interface, and the output unit outputs the net weight result of the item group after performing net weight calculation; The data management module includes a management unit and an update unit. The management unit is used to construct and manage a data relationship model including an item category table and an item item table, and to modify and update the information in the data relationship model through the update unit. In the data relationship model, the container item code in the item category table is the item item code of the entity item or the item category code corresponding to the entity item in the item category table; the item item code is associated and bound with the entity item or the category type. The data processing module, the relationship determination unit, the relationship tracking unit and the calculation processing unit are used to calculate the total weight of the container according to the known single item code, and to obtain the net weight of the item group by deducting the total weight of the container from the total gross weight of the item group.

[0011] Furthermore, in the management unit of the data management module, the item type table includes at least three fields, namely, the item type code, the item type, and the nominal dead weight; wherein the item type code is a unique identifier of the item type, the item type is an enumeration, and the item type is limited to materials or containers; for the item type code limited to containers, its nominal dead weight field records the standard empty weight of the item type.

[0012] Furthermore, in the management unit of the data management module, the item item table includes the following fields: item item code, item type code and container item code; wherein the item item code is a unique identifier for each item, and the item type code corresponds to the item type table in the item type table.

[0013] Furthermore, in the data processing module, A relationship determination unit, for taking a known item piece code as a starting point, identifying and recording a set of container piece codes that directly or indirectly contain the item piece code; In the relationship tracking unit, all the items contained are determined according to the container unit code set and classified into the processed unit set and the processed container type set.

[0014] Further, in the data processing module, in the calculation processing unit, the container single piece code in the single piece code set is enumerated, when the item type of the container single piece code is a container, the corresponding nominal weight is added to the container weight, and the item type code in the type code set is continued to be enumerated. When the item type of the item type code is a container, the nominal weight is added to the total weight of the container; the total weight of the container of the item group is obtained.

[0015] Compared with the prior art, the present invention has at least one of the following technical effects: The present invention provides a tare weight deduction method and system based on a complex containment model. The present invention adds a field to the item table to directly associate the item with the container type or entity, effectively expresses the complex containment model, and quickly identifies all directly or indirectly bound containers and items from any managed item, greatly improving data processing efficiency and accuracy.

[0016] Efficient resource utilization: By adding only one container item or container type field to the item data, we are able to express complex containment models with high resource efficiency. This approach not only saves storage space, but also improves the efficiency of data processing. In industrial weighing systems, it is crucial to be able to handle large amounts of item and container data, and with this streamlined but efficient data structure, we are able to implement this capability in existing relational database systems without relying on more complex and resource-intensive memory storage structures.

[0017] Efficient query algorithm: It can quickly find all directly or indirectly bound containers and contained items from any item managed in the system. This is crucial for the accuracy and efficiency of the real-time weighing process. This algorithm fully utilizes the powerful query capabilities of the relational database, optimizes the data retrieval and processing process, and thus significantly improves the performance of the weighing system in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for describing the embodiment: Figure 1 A flowchart of the steps of a tare weight deduction method based on a complex containment model of the present invention; Figure 2 A flowchart of the steps of data processing in a tare weight deduction method based on a complex containment model of the present invention; Figure 3 The system structure diagram of a tare weight deduction system based on a complex containment model of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be understood that the specific implementation methods described herein are only used to explain the present invention and are not used to limit the present invention.

[0020] Unlike laboratory weighing, in the production process, the gross weight of the material can usually only be weighed together with the container, and then the tare weight of the container is deducted to get the net weight. In many cases, the weighing object includes not only a single material and its direct container, but may also involve multi-level complex containment relationships. For example, multiple items can be placed in a container at the same time, such as 4 barrels placed on a pallet, and these barrels can be of different types; the containment relationship can also be multi-level, such as 2 materials are placed in 4 barrels, 4 barrels are placed on a pallet, and then 20 such pallets are placed on a truck, forming a three-level container of material-barrel-pallet-truck. In this case, when the whole vehicle is weighed on the scale, the dead weight of all containers needs to be deducted.

[0021] Current computer weighing systems can usually only handle simple weighing scenarios, such as a material placed in a container. The system directly deducts the weight of the container from the total weight to calculate the net weight of the material. These systems are often unable to handle multi-level complex containment relationships. For weighing systems used to handle complex containment scenarios, the traditional method may use a tree structure to represent the hierarchical relationship of items. Each node represents an item or container, and the connection between nodes is represented as a containment relationship. In order to calculate the net weight, the system needs to traverse the entire tree, starting from the leaf node (the innermost item), and go up level by level, accumulating the weight of each container. And this method relies on a relational database to store information about each item and container, such as weight, type, etc., and in scenarios with a large number of levels and nodes, recursive traversal may lead to reduced computing efficiency.

[0022] At the same time, the peeling model must be able to be placed in the database and quickly queried because it needs to manage and configure a large number of items; it does not have to be stored in the memory. Since relational databases have the strongest performance and the highest resource utilization efficiency in current databases, data structures such as trees cannot be directly used in relational databases. In view of these limitations, the present invention proposes a new method to implement this function in the existing relational database system without relying on more complex and resource-intensive memory storage structures, making it possible to process multi-level complex containment relationships.

[0023] The present invention adds a new field to the item table, allowing each item to be associated and bound not only to the container item it is in, but also to the container type. This method allows the weight of each level of container to be effectively and automatically calculated even in the above complex scenarios, as long as the item code of any item in the item group is provided, and deducted from the total gross weight to obtain an accurate net weight. This not only improves the efficiency and accuracy of data processing, but is also applicable to a wider range of application scenarios, especially in environments that require precise measurement and efficient data management.

[0024] See also Figure 1 , Figure 1 The present invention provides a flowchart of the steps of a tare weight deduction method based on a complex containment model, including: Step S1: construct a data relationship model including an item category table and an item item table, wherein the container item code in the item category table is the item item code of the entity item or the item category code corresponding to the entity item in the item category table; the item item code is associated and bound with the entity item or the category type; Step S2, obtaining the gross weight of the item group and the single item code of at least one item in the item group; Step S3: Based on the constructed data relationship model, according to the acquired item code, identify and record the item code set that directly or indirectly contains the item code; Step S4: According to the item code set, the item code set and the category code set of all items in the item group are obtained through the data relationship model; Step S5, enumerate and accumulate the weights of the container units in the unit code set and the container types in the type code set in step S4 to obtain the total weight of the containers of the item group, and then deduct the total weight of the containers from the gross weight of the item group in step S1 to obtain the net weight of the item group.

[0025] The following are detailed descriptions of each step: (1) Step S1 is to construct a data relationship model including an item category table and an item item table. In step S1, the item category table and the item item table specifically involve the following: Item type table, which includes at least three fields, namely, item type code, item type, and nominal weight; the item type code is the unique identifier of the item type, the item type is an enumeration, and the item type is limited to materials or containers; for the item type code limited to containers, its nominal weight field records the standard tare weight of the item type; The item item table includes the item item code, item type code and container item code fields; wherein the item item code is a unique identifier for each item.

[0026] See also Figure 2 , Figure 2 The present invention is a flowchart of the steps of data processing in a tare weight deduction method based on a complex containment model, which is a flowchart of the steps of obtaining the net weight of an item group according to the gross weight of the item group and the input item single piece code.

[0027] (2) Step S3 is to determine the container that directly or indirectly contains the item according to the input item code. The specific operation steps are as follows: Step S301, initializing a deduplicated single item set, the single item set including a to-be-processed single item set, a processed single item set, and a processed container type set; Step S302, adding the acquired item code to the set of items to be processed; Step S303, extracting an item code from the set of items to be processed; Step S304: determine whether the extracted item code is empty. If the item code is empty, jump to step S4; otherwise, add the item code to the processed item set, find the container code where the item code is located in the item table, and add it to the to-be-processed item set; Step S305, repeatedly executing step S303 until the item code taken out from the to-be-processed item set is a null value, and the processed item set is the item code set.

[0028] (3) In step S4, based on the item code set, the item code set and category code set of all items in the item group are obtained through the data relationship model. The specific operation steps are as follows: Step S401, moving the container item code in the processed item set to the to-be-processed item set; Step S402, extracting a container item code from the set of items to be processed; Step S403, determine whether the extracted container single item code is empty. When the container single item code is empty, jump to step S5. Otherwise, determine whether it is a physical single item or a container type according to the container single item code. When the container single item code is an item type code, add it to the processed container type set, otherwise add it to the processed single item set; at the same time, add the item single item code directly included in the container single item code to the to-be-processed single item set; the processed container type set is the type code set, and the processed single item set is the single item code set; Step S404, repeating step S402 until the code of the container item taken out from the to-be-processed item set is a null value.

[0029] (5) Step S5 is used to calculate the total weight of the containers in the item group, wherein the total weight of the containers includes the weight of the physical single container of the associated container type and the weight of the container of the associated container type. The specific operation steps are as follows: Step S501, initializing the total weight of the containers in the item group; Step S502, enumerate the container single item codes in the single item code set, when the item type of the container single item code is container, add the corresponding nominal weight to the container weight, continue to enumerate the item type codes in the type code set, when the item type of the item type code is container, add the nominal weight to the total weight of the container; and obtain the total weight of the container of the item group.

[0030] Based on the same inventive concept, please refer to Figure 2 The present invention also provides a tare weight deduction system based on a complex containment model, which executes the above-mentioned tare weight deduction method, including: The user interface module includes an input unit and an output unit, allowing the user to input or select a single item code in the item group as input in the user interface, and the output unit outputs the net weight result of the item group after the net weight calculation; The data management module includes a management unit and an update unit. The management unit is used to construct and manage a data relationship model including an item category table and an item item table, and to modify and update the information in the data relationship model through the update unit. In the data relationship model, the container item code in the item category table is the item item code of the entity item or the item category code corresponding to the entity item in the item category table; the item item code is associated and bound with the entity item or the category type. The data processing module, the relationship determination unit, the relationship tracking unit and the calculation processing unit are used to calculate the total weight of the container according to the known single item code, and to obtain the net weight of the item group by deducting the total weight of the container from the total gross weight of the item group.

[0031] Furthermore, in the management unit of the data management module, the item type table includes at least three fields, namely, the item type code, the item type, and the nominal dead weight; wherein the item type code is a unique identifier of the item type, the item type is an enumeration, and the item type is limited to materials or containers; for the item type code limited to containers, its nominal dead weight field records the standard empty weight of the item type.

[0032] Furthermore, in the management unit of the data management module, the item item table includes the following fields: item item code, item type code and container item code; wherein the item item code is a unique identifier for each item, and the item type code corresponds to the item type table in the item type table.

[0033] Furthermore, in the data processing module, A relationship determination unit, for taking a known item piece code as a starting point, identifying and recording a set of container piece codes that directly or indirectly contain the item piece code; In the relationship tracking unit, all the items contained are determined according to the container unit code set and classified into the processed unit set and the processed container type set.

[0034] Further, in the data processing module, in the calculation processing unit, the container single piece code in the single piece code set is enumerated, when the item type of the container single piece code is a container, the corresponding nominal weight is added to the container weight, and the item type code in the type code set is continued to be enumerated. When the item type of the item type code is a container, the nominal weight is added to the total weight of the container; the total weight of the container of the item group is obtained.

[0035] The data relationship model of the present invention demonstrates its efficiency and flexibility in representing complex containment relationships. Although its structural design is relatively simple, it can accurately capture and process multi-level containment dynamics, proving its innovative ability and practical value in modeling complex scenarios. In addition, since there is no difference between materials and containers in the system, not only can containers hold materials, but materials can also hold materials, and even containers.

[0036] We use the relational data model to describe the data structure to represent complex containment relationships. In the database, the following tables are designed: Item type table, which includes at least three fields, namely, item type code, item type, and nominal deadweight. Each item (such as material, container) has a record with a globally unique code. The item type is an enumeration, and the item type is limited to material or container. For the item type code limited to container, its nominal deadweight field records the standard tare weight of the item type (the tare weight that needs to be deducted when weighing). The item table contains the following fields: item item code, item type code, container type code, and container item code. Each item (such as a material in a barrel) has a record with a globally unique code and its own item type code. If the item is placed in a container (the container itself is also an item), there is also a container type code or a container item code.

[0037] It should be noted that a container for a single item can be represented by a single container item or by a container type identifier. If a container type appears multiple times in a weighing item group, the system defaults to having only one corresponding physical object. For example, in the example of Embodiment 1, 20 pallets can all be bound to a container type "truck", so the system defaults to having only one truck in this weighing item group, not 20. In addition, if one of the pallets is bound to a single truck item and the other pallets are bound to a type of truck, the system considers that there are two trucks in this weighing item group. Using container types, instead of single container items, to represent the containment relationship can avoid creating and managing a large number of container items that users do not want to manage in the system, and can also save a lot of system overhead.

[0038] The specific tare weight deduction algorithm of the present invention is as follows (wherein the set operations are all deduplication): 1. Given an item code x, the item corresponding to the item code may be a material or a container, or it may contain or be loaded with some other materials or containers; 2. Create an empty set S of items to be processed, an empty set T of processed items, and an empty set U of processed container types.

[0039] 3. Put the item x into the set of items to be processed S; 4. Take out an item y from the set S of items to be processed.

[0040] 5. If the item y is empty, jump to 9, otherwise put the item y into the processed item set T; 6. Find the set A of all items in the item list whose item code field is equal to y; 7. Put set A into the set of single items to be processed S; 8. Go to step 4. 9. Move the processed item set T to the item set S to be processed, where the processed set T is the set of all items that directly or indirectly contain the item x.

[0041] 10. Take out an item z from the set S of items to be processed.

[0042] 11. If the item item z is empty, then jump to 13. Otherwise, when the item item z is an item type code, put the item item z into the processed container type set U. Otherwise, put the item item z into the processed item set T. 12. Jump to 10; 13. Set the total weight w of the container to 0; 14. Enumerate each item in the processed item set T. If the item type is a container, add its own weight to w; 15. Enumerate each container type in the processed container type set U and add its own weight to w; 16. The net weight can be obtained by deducting the weight of all containers, that is, the total weight of the containers, from the gross weight of the item group.

[0043] In order to help those skilled in the art understand the present invention, several examples are designed for a tare weight deduction method based on a complex containment model of the present invention, and the beneficial effects, innovative points and application scenarios of the present invention are specifically described through specific calculations and explanations: 1. Establish a data relationship model; a. Item Type List: Item Type Code Item Type (enum) Nominal deadweight (kg) P0001 materials 0 P0002 container 0.02 P0003 container 5 P0004 container 12 P0005 container 2000 Among them, P0001 is material a, P0002 is material b or container a, P0003 is a barrel, P0004 is a pallet, and P0005 is a truck. b. Item list: Item code Item Type Code Container unit code M0001 P0001 M0002, M0003, M0004, M0005, M0002 P0002 M0006 M0003 P0002 M0006 M0004 P0002 M0007 M0005 P0002 M0007 M0006 P0003 P0004 M0007 P0003 P0004 P0004 P0004 P0005 M0008 P0004 None M0009 P0004 P0005 P0005 P0005 None Among them, M0001 is material a, M0002~M0005 are containers a for packaging material a, M0006 is barrel 1, M0007 is barrel 2, M0008 is pallet a, and M0009 is pallet b.

[0044] 2. The truck is weighed to obtain the total gross weight of the entire cargo group, and at least one item code is obtained as input to calculate the net weight of the item group.

[0045] When one of the item code M0003 (container a) is input, the set of container codes that directly or indirectly include the item code M0003 (container a) according to the algorithm includes M0006 (barrel 1), M0007 (barrel 2), P0004 (pallet) and P0005 (truck); And according to the item single code in the container code set, they are put into the code single set and the container type set respectively, and the item single code is regarded as the container single code, the directly contained item single code is obtained, and put into the container code set for further identification operation, and the codes in the code single set include M0006 (barrel 1), M0007 (barrel 2), M0009 (pallet b), M0005 (container a), M0004 (container a), M0003 (container a), M0002 (container a), M0001 (material a), and the type codes of container types include P0004 (pallet) and P0005 (truck). Since the item types corresponding to the single code except M0001 are all containers, the total weight of the container is 2034.08kg. The total net weight of this batch of materials can be obtained by subtracting the total gross weight obtained when weighing the truck from the total weight of the container.

[0046] In this scenario, the following points can be specifically explained: (1) This method allows all directly or indirectly bound containers and contents to be quickly identified based on any one or more items managed in the system. There is no need to rely on the lowest or outermost item code as a starting point to traverse the entire container chain, obtain all related containers, and then accurately calculate the total net weight. (2) The outer packaging P0002 of material a, as the direct container of material a, is also included in the net weight calculation. If P0002 has a corresponding record in the system and is bound to a specific material or other container, its weight will also be considered in the net weight calculation. This method allows the weight of containers at all levels to be fully considered, including outer packaging, inner packaging and any form of container, to ensure that the final calculated net weight is accurate and practical. (3) If the outer packaging P0002 of material a is changed to a material, the algorithm can still calculate the accurate net weight. This flexibility means that the system can adjust the item type according to the specific situation to adapt to different calculation needs. (4) Flexibility of level adjustment: Users can adjust the item type as needed to calculate the total weight at a specific level. This flexibility enables users to adjust calculation parameters according to specific needs, thereby obtaining the required accurate weight information. Through the above characteristics, the method of the present invention not only improves weighing accuracy, but also provides a high degree of flexibility and adaptability, ensuring efficient net weight calculation under various complex containment relationships.

[0047] Although the present invention has been disclosed as above in the form of a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art may make possible changes and modifications to the technical solution of the present invention by using the methods and technical contents disclosed above without departing from the spirit and scope of the present invention. Therefore, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope of the technical solution of the present invention.

Claims

1. A tare weight deduction method based on a complex containment model, characterized in that: include, Step S1: construct a data relationship model including an item category table and an item item table, wherein the container item code in the item category table is the item item code of the entity item or the item category code corresponding to the entity item in the item category table; the item item code is associated and bound with the entity item or category type; Step S2, obtaining the gross weight of the item group and the single item code of at least one item in the item group; Step S3: Based on the constructed data relationship model and according to the acquired item code, identifying and recording the item code set that directly or indirectly contains the item code; Step S4, obtaining the item code set and the category code set of all the items in the item group according to the item code set and through the data relationship model; Step S5, enumerate and accumulate the weights of the individual containers in the individual code set and the types of containers in the type code set in step S4 to obtain the total weight of the containers of the item group, and then deduct the total weight of the containers from the gross weight of the item group in step S1 to obtain the net weight of the item group.

2. The tare weight deduction method according to claim 1, characterized in that: In step S1, constructing a data relationship model including an item category table and an item item table further includes: The article type table is defined, and the article type table includes at least three fields, namely, the article type code, the article type, and the nominal dead weight; wherein the article type code is a unique identifier of the article type, and the article type is an enumeration quantity, which limits the article type to materials or containers; for the article type code limited to the container, the nominal dead weight field records the standard tare weight of the article type; The item item table is defined, including the item item code, the item type code and the container item code fields; wherein the item item code is a unique identifier for each item.

3. The tare weight deduction method according to claim 2, characterized in that: In step S3, according to the acquired item code, identifying and recording the item code set that directly or indirectly contains the item code, further comprising: Step S301, initializing a deduplicated single item set, wherein the single item set includes a to-be-processed single item set, a processed single item set, and a processed container type set; Step S302: adding the acquired item code to the to-be-processed item set; Step S303, extracting a code of the item from the set of items to be processed; Step S304, judging whether the extracted item code is empty, if the item code is empty, jumping to step S4, otherwise, adding the item code to the processed item set, finding the container code where the item code is located in the item table, and adding it to the to-be-processed item set; Step S305, repeatedly executing step S303 until the item code taken out from the to-be-processed item set is a null value, and the processed item set is the item code set.

4. The tare weight deduction method according to claim 3, characterized in that: In step S4, according to the item code set, the item code set and the type code set of all the items in the item group are obtained through the data relationship model, further comprising: Step S401, moving the container item code in the processed item set to the to-be-processed item set; Step S402, extracting a container unit code from the set of units to be processed; Step S403, judging whether the extracted container single item code is empty, when the container single item code is empty, jumping to step S5, otherwise, determining whether it belongs to the physical single item or the container type according to the container single item code, when the container single item code is the item type code, adding it to the processed container type set, otherwise adding it to the processed single item set; at the same time, adding the item single item code directly contained in the container single item code to the to-be-processed single item set; the processed container type set is the type code set, and the processed single item set is the single item code set; Step S404, repeatedly executing step S402 until the code of the container item taken out from the to-be-processed item set is a null value.

5. The tare deduction system according to claim 4, characterized in that: In step S5, the weights of the containers in the single-piece code set and the container types in the type code set in step S4 are enumerated and accumulated to obtain the total weight of the containers in the group of items, further comprising: Step S501, initializing the total weight of the containers in the item group; Step S502, enumerate the container single item codes in the single item code set, when the item type of the container single item code is the container, add the corresponding nominal weight to the container weight, continue to enumerate the item type codes in the type code set, when the item type of the item type code is the container, add the nominal weight to the total weight of the container; and obtain the total weight of the container of the item group.

6. A tare weight deduction system based on a complex containment model, executing the tare weight deduction method according to claims 1 to 5, characterized in that: include, The user interface module includes an input unit and an output unit, and is used to input or select a single item code in an item group as an input in the user interface, and the output unit outputs the net weight result of the item group after performing net weight calculation; The data management module includes a management unit and an updating unit, wherein the management unit is used to construct and manage a data relationship model including an item category table and an item item table, and the updating unit is used to modify and update the information in the data relationship model; in the data relationship model, the container item code in the item category table is the item item code of the entity item or the item category code corresponding to the entity item in the item category table; Associating and binding the item code with the entity item or category type; The data processing module, the relationship determination unit, the relationship tracking unit and the calculation processing unit are used to calculate the total weight of the container according to the known single item code, and to obtain the net weight of the item group by deducting the total weight of the container from the total gross weight of the item group.

7. The tare deduction system according to claim 6, characterized in that: In the management unit of the data management module, the item type table includes at least three fields, namely, the item type code, item type, and nominal dead weight; wherein the item type code is a unique identifier of the item type, and the item type is an enumeration that limits the item type to a material or a container; for the item type code limited to the container, its nominal dead weight field records the standard empty weight of the item type.

8. The tare deduction system according to claim 6, characterized in that: In the management unit of the data management module, the item item table includes the following fields: the item item code, the item type code and the container item code; wherein the item item code is a unique identifier for each item, and the item type code corresponds to the item type table in the item type table.

9. The tare deduction system according to claim 6, characterized in that: In the data processing module, the relationship determination unit is used to take a known item piece code as a starting point, identify and record the container piece code set that directly or indirectly contains the item piece code; the relationship tracking unit determines all item pieces contained in the container piece code set according to the container piece code set, and classifies them into a processed piece set and a processed container type set.

10. The tare deduction system according to claim 9, characterized in that: In the data processing module, in the calculation processing unit, the container single item code in the single item code set is enumerated, when the item type of the container single item code is the container, the corresponding nominal weight is added to the container weight, and the item type code in the type code set is continued to be enumerated, when the item type of the item type code is the container, the nominal weight is added to the total weight of the container; and the total weight of the container of the item group is obtained.