A material availability tracing method, device and storage medium in an MRP system

By constructing a material availability traceability method in the MRP system, lightweight available data snapshots are generated and stored in multiple snapshot areas, the problems of material availability traceability and data timeliness in the prior art are solved, and efficient availability query and optimized storage solutions are realized.

CN119477354BActive Publication Date: 2025-04-04CHANJET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510067896.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-04-04
Estimated Expiration
2045-01-16

AI Technical Summary

Technical Problem

The existing MRP system has limitations when tracing the source of material available volume, and cannot dynamically specify multiple dimensions that affect the available volume, and it is difficult to deal with the timeliness of available volume data caused by real-time changes in business documents.

Method used

By constructing a material availability traceability method in the MRP system, obtaining all material documents, generating a lightweight available data snapshot, and saving it to the first-level snapshot area and the second-level snapshot area, the traceability of multiple dimensions of available data and optimized storage of data.

Benefits of technology

It realizes efficient traceability of the source of material available quantity, improves the accuracy of available quantity query and the efficiency of traceability query, reduces storage costs, and improves the migration performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477354B_ABST
    Figure CN119477354B_ABST
Patent Text Reader

Abstract

The present invention proposes a material availability traceability method, device and storage medium in an MRP system, and relates to the technical field of data processing. The method comprises: obtaining all material documents in the MRP system, extracting material availability data from all obtained material documents, and generating lightweight availability data snapshots and generation times; saving the lightweight availability data snapshots and generation times of all generated material documents to a first-level snapshot area, and serializing the lightweight availability data snapshots and generation times of some material documents in the first-level snapshot area based on the generation time of the availability data snapshot, and then migrating them to a second-level snapshot area, receiving the material availability traceability time and material identification input by the user, obtaining the corresponding availability data snapshot in the first-level snapshot area and / or the second-level snapshot area to generate the material availability corresponding to the material identification, and feeding back to the user interface. The present invention improves the accuracy of availability query and the efficiency of traceability query, and improves the hardware performance of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing in a database, and in particular to a material availability tracing method, device and storage medium in an MRP system. Background Art

[0002] In the core process of Material Requirements Planning (MRP) system, it is crucial to accurately calculate and manage material requirements. Although traditional MRP system can use the bill of materials (BOM) and business document system data to calculate material recommendations, the specific calculation process is: calculate the gross requirements of each layer of materials according to the BOM structure, then calculate the available quantity according to the business document, and finally calculate the net requirements and recommended quantity through the gross requirements and available quantity.

[0003] However, there are obvious limitations in tracing the source of available quantity: First, although the general available quantity system can trace the source of available quantity, it is the available quantity under fixed dimensions (document type, document effective status, warehouse), and the MRP system needs to calculate the available quantity under these multiple dimensions by dynamically specifying the dimensions that affect the available quantity, such as document type, document effective status, warehouse, supply and demand date, based on different business needs and scenarios. It is not the fixed available quantity of the material in the system, and it is impossible to use the available quantity system to track the specific source document information of the available quantity; secondly, the available quantity system is also difficult to deal with the timeliness of the available quantity data caused by the real-time changes of business documents, that is, after the MRP operation is completed, due to changes in the document, it is impossible to trace the source of the available quantity at the time of the operation.

[0004] That is to say, the existing MRP system only focuses on the available quantity value and its classification value (such as sales order occupancy, production waiting quantity, etc.), and lacks an effective mechanism to record and trace the specific source document data of the available quantity at the time of operation. This directly affects the accuracy and timeliness of material allocation. However, if all document data is simply stored as a snapshot, as business documents continue to be generated and updated, this approach is not only inefficient, but also greatly increases the storage burden, affecting the overall performance of the system, and the storage cost is greatly increased. Because the document snapshot data has a small single data volume but a huge number of data, and the existing first and second level cache migration strategies are not suitable for the migration of document snapshot data. Summary of the invention

[0005] The present invention proposes the following technical solutions to address one or more technical deficiencies in the above-mentioned prior art.

[0006] A method for tracing the source of material availability in an MRP system, the method comprising:

[0007] Conversion step: obtain all material documents in the MRP system, extract material availability data from all obtained material documents, and generate lightweight availability data snapshots and generation time;

[0008] A storage step, saving the lightweight availability data snapshots and generation times of all generated material documents to a primary snapshot area, and serializing the lightweight availability data snapshots and generation times of some material documents in the primary snapshot area and migrating them to a secondary snapshot area based on the generation time of the availability data snapshot, wherein the primary snapshot area is in the MRP system, and the secondary snapshot area is in the MRP system;

[0009] The tracing step receives the material availability tracing time and material identification input by the user, obtains the corresponding availability data snapshot in the first-level snapshot area and / or the second-level snapshot area based on the tracing time and material identification, generates the material availability corresponding to the material identification based on the availability data snapshot, and feeds back the material availability to the user interface through the user interface.

[0010] Furthermore, in the conversion step, a general document available quantity conversion model device is constructed, including a document header unit, a document body unit, a supply and demand date unit, and an available quantity extraction unit. After a material document is input into the general document available quantity conversion model device, the document header unit is used to extract the document identification and document date, the document body unit is used to extract all material identifications in the material document, the supply and demand date unit is used to extract the supply and demand time of each material, and the available quantity extraction unit is used to extract the available quantity of each material, and a lightweight available quantity data snapshot is generated based on the document identification, document date, material identification, supply and demand time and available quantity.

[0011] Furthermore, the operation of serializing the lightweight available data snapshot and the generation time and migrating them to the secondary snapshot area is as follows: the lightweight available data snapshots to be migrated that belong to the same document identifier are grouped into a migration data set, and each lightweight available data snapshot to be migrated in the migration data set is checked to determine whether it has been migrated or is in a migration state. If not, the lightweight available data snapshot and the generation time to be migrated are converted into serialized data and locked, and the migration data block size is determined according to the size limit of the secondary snapshot area and the file system performance, the locked serialized data is compressed and divided into blocks based on the migration data block size, and the divided serialized data is uploaded and migrated to the secondary snapshot area. After the migration is successful, the corresponding lightweight available data snapshot and the generation time are deleted from the primary snapshot area.

[0012] Furthermore, if the migration fails, error handling is performed, and the lightweight available data snapshot and generation time are rolled back to the original state in the first-level snapshot area, waiting for the next migration, and the success, failure and exception information during the migration recovery process are recorded as log data.

[0013] Furthermore, in the traceability step, it is determined whether there is a corresponding lightweight availability data snapshot in the first-level snapshot area based on the traceability time and material identification. If not, the traceability time and material identification are sent to the second-level snapshot area for query. If there is a corresponding lightweight availability data snapshot, the corresponding lightweight availability data snapshot is restored to the first-level snapshot area.

[0014] Furthermore, based on the last access time of the lightweight available data snapshot in the first-level snapshot area, the remaining storage space size of the first-level snapshot area, the total storage space size of the first-level snapshot area, and the total storage space size of the second-level snapshot area, it is determined whether to start migrating the lightweight available data snapshot and the generation time in the first-level snapshot area to the second-level snapshot area.

[0015] Furthermore, the method for determining whether to start migrating the lightweight available data snapshot and the generation time in the primary snapshot area to the secondary snapshot area is as follows: calculating the migration decision value ,if If the value is greater than the first threshold, the lightweight available data snapshot and the generation time in the first-level snapshot area are migrated to the second-level snapshot area, where:

[0016] ;

[0017] Indicates the last access time of the lightweight available data snapshot with the document ID in the first-level snapshot area. Indicates the current time, Indicates the remaining storage space size of the first-level snapshot area. Indicates the total storage space size of the first-level snapshot area. Indicates the total storage space size of the secondary snapshot area.

[0018] The present invention also proposes a material availability tracing device in an MRP system, the device comprising:

[0019] The conversion unit obtains all material documents in the MRP system, extracts the material availability data from all the obtained material documents, and generates a lightweight availability data snapshot and the generation time;

[0020] A storage unit saves the lightweight availability data snapshots and generation times of all generated material documents to a primary snapshot area, and serializes the lightweight availability data snapshots and generation times of some material documents in the primary snapshot area and migrates them to a secondary snapshot area based on the generation time of the availability data snapshot, wherein the primary snapshot area is in the MRP system, and the secondary snapshot area is in the MRP system;

[0021] The traceability unit receives the material availability traceability time and material identification input by the user, obtains the corresponding availability data snapshot in the first-level snapshot area and / or the second-level snapshot area based on the traceability time and material identification, generates the material availability corresponding to the material identification based on the availability data snapshot, and feeds back the material availability to the user interface through the user interface.

[0022] Furthermore, in the conversion unit, a general document available quantity conversion model device is constructed, which includes a document header unit, a document body unit, a supply and demand date unit, and an available quantity extraction unit. After a material document is input into the general document available quantity conversion model device, the document header unit is used to extract the document identification and document date, the document body unit is used to extract all material identifications in the material document, the supply and demand date unit is used to extract the supply and demand time of each material, and the available quantity extraction unit is used to extract the available quantity of each material, and a lightweight available quantity data snapshot is generated based on the document identification, document date, material identification, supply and demand time and available quantity.

[0023] Furthermore, the operation of serializing the lightweight available data snapshot and the generation time and migrating them to the secondary snapshot area is as follows: the lightweight available data snapshots to be migrated that belong to the same document identifier are grouped into a migration data set, and each lightweight available data snapshot to be migrated in the migration data set is checked to determine whether it has been migrated or is in a migration state. If not, the lightweight available data snapshot and the generation time to be migrated are converted into serialized data and locked, and the migration data block size is determined according to the size limit of the secondary snapshot area and the file system performance, the locked serialized data is compressed and divided into blocks based on the migration data block size, and the divided serialized data is uploaded and migrated to the secondary snapshot area. After the migration is successful, the corresponding lightweight available data snapshot and the generation time are deleted from the primary snapshot area.

[0024] Furthermore, if the migration fails, error handling is performed, and the lightweight available data snapshot and generation time are rolled back to the original state in the first-level snapshot area, waiting for the next migration, and the success, failure and exception information during the migration recovery process are recorded as log data.

[0025] Furthermore, based on the last access time of the lightweight available data snapshot in the first-level snapshot area, the remaining storage space size of the first-level snapshot area, the total storage space size of the first-level snapshot area, and the total storage space size of the second-level snapshot area, it is determined whether to start migrating the lightweight available data snapshot and the generation time in the first-level snapshot area to the second-level snapshot area.

[0026] Furthermore, the method for determining whether to start migrating the lightweight available data snapshot and the generation time in the primary snapshot area to the secondary snapshot area is as follows: calculating the migration decision value ,if If the value is greater than the first threshold, the lightweight available data snapshot and the generation time in the first-level snapshot area are migrated to the second-level snapshot area, where:

[0027] ;

[0028] Indicates the last access time of the lightweight available data snapshot with the document ID in the first-level snapshot area. Indicates the current time, Indicates the remaining storage space size of the first-level snapshot area. Indicates the total storage space size of the first-level snapshot area. Indicates the total storage space size of the secondary snapshot area.

[0029] The present invention further provides a computer-readable storage medium, wherein the storage medium stores computer program code, and when the computer program code is executed by a computer, any of the above methods is executed.

[0030] The technical effect of the present invention is as follows: a material availability traceability method, device and storage medium in an MRP system of the present invention, the method comprising: a conversion step S101, obtaining all material documents in the MRP system, extracting material availability data from all obtained material documents, and generating lightweight availability data snapshots and generation times; a storage step S102, saving the lightweight availability data snapshots and generation times of all generated material documents to a first-level snapshot area, and serializing the lightweight availability data snapshots and generation times of some material documents in the first-level snapshot area based on the generation time of the availability data snapshot Migrate to the secondary snapshot area, wherein the primary snapshot area is in the MRP system, and the secondary snapshot area is in the MRP system; in the tracing step S103, extract the material availability data of all acquired material documents to generate a lightweight availability data snapshot and generation time, receive the material availability tracing time and material ID input by the user, obtain the corresponding availability data snapshot in the primary snapshot area and / or the secondary snapshot area based on the tracing time and material ID, generate the material availability corresponding to the material ID based on the availability data snapshot, and feed back the material availability to the user interface through the user interface. In the present invention, after extracting the material availability data from all acquired material documents, a lightweight availability data snapshot and a generation time are generated, and the lightweight availability data snapshots and generation time of all generated material documents are saved in the first-level snapshot area, and based on the generation time of the availability data snapshot, the lightweight availability data snapshots and generation time of some material documents in the first-level snapshot area are serialized and migrated to the second-level snapshot area, and after extracting the material availability data from all acquired material documents, a lightweight availability data snapshot and a generation time are generated, and the material availability traceability time and material identification input by the user are received, and the corresponding availability data snapshot is obtained in the first-level snapshot area and / or the second-level snapshot area based on the traceability time and material identification. That is, the present invention constructs a recording mechanism for lightweight snapshot data by abstracting the key availability information in the business document, and stores the availability snapshot, that is, the first-level snapshot hot data area, so as to realize the tracing of the availability source; and in combination with the migration service strategy, the snapshot data is migrated from the business system to the second-level snapshot cold data area to realize the optimized storage of the snapshot data.When it is necessary to trace the historical available quantity snapshot, it is loaded from the secondary snapshot area to the primary snapshot area on demand to achieve fast access to the snapshot data, and ultimately achieve efficient tracing of the available quantity source, and propose a migration service strategy suitable for data document application scenarios, which improves the accuracy of available quantity query and the efficiency of traceability query, and improves the system migration performance; the general document available quantity conversion model device proposed in the present invention is a device for implementing a data processing flow, which can be implemented by software and / or hardware. Generally, it is implemented by software, aiming to integrate multi-source, heterogeneous business document data into unified and standardized available quantity snapshot data. The core function of the model device is to identify and accurately extract key fields that directly affect the available quantity in various business documents (such as production processing orders, material delivery orders, sales orders, purchase orders, etc.), which include but are not limited to material numbers, quantities, warehouses, supply and demand dates, etc. And through the data conversion logic, the original business document data is mapped to the model to generate standardized available snapshot data, realizing the efficient conversion from complex and heavyweight business documents to standardized and lightweight available data. Since there is no need to store a large number of original documents, the storage space can be greatly reduced, thereby reducing the storage cost. In the present invention, according to the size limit of the secondary snapshot area and the performance of the file system, the migration data block size is determined, the locked serialized data is compressed and divided into blocks based on the migration data block size, and the divided serialized data is uploaded and migrated to the secondary snapshot area. After the migration is successful, the corresponding lightweight available data snapshot and the generation time are deleted from the primary snapshot area, ensuring the migration efficiency and The uniqueness of the data source ensures that the snapshot of available data can only be stored in one of the primary and secondary snapshot areas, thereby ensuring the accuracy of the available data traced back. In the present invention, a snapshot migration strategy is constructed based on the characteristics of the documents stored in the database, that is, based on the last access time of the lightweight available data snapshot in the primary snapshot area, the remaining storage space size of the primary snapshot area, the total storage space size of the primary snapshot area, and the total storage space size of the secondary snapshot area, it is determined whether to start migrating the data in the primary snapshot area to the secondary snapshot area, and a specific migration strategy judgment calculation method is proposed, which can balance the remaining space of the primary and secondary snapshot areas, realize the optimization of the storage system, and thus improve the hardware performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Other features, objects and advantages of the present application will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings.

[0032] Figure 1 The present invention is a flowchart of a method for tracing the material availability in an MRP system according to an embodiment of the present invention.

[0033] Figure 2It is a structural diagram of a material availability tracing device in an MRP system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0035] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0036] Figure 1 A method for tracing the source of material availability in an MRP system of the present invention is shown, and the method comprises:

[0037] Conversion step S101, obtaining all material documents in the MRP system, extracting material availability data from all obtained material documents, and generating a lightweight availability data snapshot and generation time;

[0038] The storage step S102 saves the lightweight availability data snapshots and generation time of all the generated material documents to the first-level snapshot area, and serializes the lightweight availability data snapshots and generation time of some material documents in the first-level snapshot area and migrates them to the second-level snapshot area based on the generation time of the availability data snapshot, wherein the first-level snapshot area is in the MRP system, and the second-level snapshot area is in the MRP system;

[0039] In the traceability step S103, material availability data is extracted from all acquired material documents to generate a lightweight availability data snapshot and a generation time, the material availability traceability time and material ID input by the user are received, and the corresponding availability data snapshot is obtained in the first-level snapshot area and / or the second-level snapshot area based on the traceability time and material ID, and the material availability corresponding to the material ID is generated based on the availability data snapshot, and the material availability is fed back to the user interface through the user interface.

[0040] In the present invention, after extracting the material availability data from all acquired material documents, a lightweight availability data snapshot and a generation time are generated, and the lightweight availability data snapshots and generation time of all generated material documents are saved in the first-level snapshot area, and based on the generation time of the availability data snapshot, the lightweight availability data snapshots and generation time of some material documents in the first-level snapshot area are serialized and migrated to the second-level snapshot area, and after extracting the material availability data from all acquired material documents, a lightweight availability data snapshot and a generation time are generated, and the material availability traceability time and material identification input by the user are received, and the corresponding availability data snapshot is obtained in the first-level snapshot area and / or the second-level snapshot area based on the traceability time and material identification. That is, the present invention constructs a recording mechanism for lightweight snapshot data by abstracting the key availability information in the business document, and stores the availability snapshot, that is, the first-level snapshot hot data area, so as to realize the tracing of the availability source; and in combination with the migration service strategy, the snapshot data is migrated from the business system to the second-level snapshot cold data area to realize the optimized storage of the snapshot data. When it is necessary to trace back the historical available quantity snapshot, it is loaded from the secondary snapshot area to the primary snapshot area on demand to achieve fast access to the snapshot data, and ultimately achieve efficient tracing of the available quantity source. A migration service strategy suitable for data document application scenarios is proposed, which improves the accuracy of available quantity queries and the efficiency of traceability queries, and enhances the system migration performance. This is a manifestation of the important inventive concept of the present invention.

[0041] In one implementation, in the conversion step S101, a general document available quantity conversion model device is constructed, including a document header unit, a document body unit, a supply and demand date unit, and an available quantity extraction unit. After a material document is input into the general document available quantity conversion model device, the document header unit is used to extract the document identification and document date, the document body unit is used to extract all material identifications in the material document, the supply and demand date unit is used to extract the supply and demand time of each material, and the available quantity extraction unit is used to extract the available quantity of each material, and a lightweight available quantity data snapshot is generated based on the document identification, document date, material identification, supply and demand time and available quantity.

[0042] The general document available quantity conversion model device proposed in the present invention is a device for realizing data processing flow, which can be realized by software and / or hardware. Generally, it is realized by software, and aims to integrate multi-source and heterogeneous business document data into unified and standardized available quantity snapshot data. The core function of the model device is to identify and accurately extract the key fields that directly affect the available quantity in various business documents (such as production processing orders, material delivery orders, sales orders, purchase orders, etc.), which include but are not limited to material numbers, quantities, warehouses, supply and demand dates, etc. And through data conversion logic, the original business document data is mapped to the model to generate standardized available quantity snapshot data, realizing efficient conversion from complex and heavyweight business documents to standardized and lightweight available quantity data. Since there is no need to store a large number of original documents, the storage space can be greatly reduced, thereby reducing the storage cost. This is another important inventive concept of the present invention.

[0043] In one embodiment, the operation of migrating the lightweight availability data snapshot and the generation time after serialization to the secondary snapshot area is as follows: the lightweight availability data snapshots to be migrated belonging to the same document identifier are formed into a migration data set, and each lightweight availability data snapshot to be migrated in the migration data set is checked to determine whether it has been migrated or is in a migration state. If not, the lightweight availability data snapshot and the generation time to be migrated are converted into serialized data and locked, and the migration data block size is determined according to the size limit of the secondary snapshot area and the file system performance, and the locked serialized data is compressed and divided into blocks based on the migration data block size, and the divided serialized data is uploaded and migrated to the secondary snapshot area. After the migration is successful, the corresponding lightweight availability data snapshot and the generation time are deleted from the primary snapshot area. If the migration fails, error processing is performed, and the lightweight availability data snapshot and the generation time are rolled back to the original state in the primary snapshot area, waiting for the next migration, and the success, failure and abnormal information in the migration recovery process are recorded as log data.

[0044] In the present invention, the migration data block size is determined according to the size limit of the secondary snapshot area and the file system performance, the locked serialized data is compressed and divided into blocks based on the migration data block size, and the divided serialized data is uploaded and migrated to the secondary snapshot area. After the migration is successful, the corresponding lightweight available data snapshot and the generation time are deleted from the primary snapshot area, thereby ensuring the migration efficiency and the uniqueness of the data source, that is, ensuring that the available data snapshot can only be stored in one of the primary and secondary snapshot areas, thereby ensuring the accuracy of the available data traced back, which is another inventive point of the present invention.

[0045] In a certain embodiment, the secondary snapshot area can also be separated from the MRP system, so as to avoid the large amount of snapshot data in the secondary snapshot area affecting the access performance of the MRP system. The data structure of the primary snapshot area is structured data, which is stored in a relational database; the data structure of the secondary snapshot area is serialized data, which can be stored in any object-based service, which can also reduce costs. The secondary snapshot area can therefore store massive amounts of data, reducing the overall cost of the MRP system without affecting the MRP access performance. Based on the migration decision value, snapshot data with low timeliness and low access frequency can be migrated to the secondary snapshot area.

[0046] In one embodiment, in the traceability step 203, it is determined whether there is a corresponding lightweight availability data snapshot in the first-level snapshot area based on the traceability time and material identification. If not, the traceability time and material identification are sent to the second-level snapshot area for query. If there is a corresponding lightweight availability data snapshot, the corresponding lightweight availability data snapshot is restored to the first-level snapshot area.

[0047] In the present invention, the historical available quantity snapshot can be queried through the calculation process of the material requirement planning (MRP) system. Before the query, a snapshot recovery judgment will be made. If recovery is required, the snapshot migration service is called, and the data is restored to the first-level snapshot area as needed, so that the snapshot of the available quantity can be queried. For example, when it is necessary to query the historical snapshot, first determine whether there is data in the first-level snapshot area. If not, call the snapshot migration service to restore from the second-level snapshot system to the first-level snapshot area for users to view or further analyze. When restoring, take the second-level snapshot according to the operation order (that is, in units of one document), and restore the complete snapshot data of one operation order at a time, which ensures the accuracy of the data recovery process. This is an important inventive concept of the present invention.

[0048] In one embodiment, whether to initiate migration of the lightweight available data snapshot and the generation time in the first-level snapshot area to the second-level snapshot area is determined based on the last access time of the lightweight available data snapshot in the first-level snapshot area, the remaining storage space size of the first-level snapshot area, the total storage space size of the first-level snapshot area, and the total storage space size of the second-level snapshot area.

[0049] In one embodiment, the method for determining whether to start migrating the lightweight available data snapshot and the generation time in the primary snapshot area to the secondary snapshot area is as follows: calculating the migration decision value ,if If the value is greater than the first threshold, the lightweight available data snapshot and the generation time in the first-level snapshot area are migrated to the second-level snapshot area, where:

[0050] ;

[0051] Indicates the last access time of the lightweight available data snapshot with the document ID in the first-level snapshot area. Indicates the current time, Indicates the remaining storage space size of the first-level snapshot area. Indicates the total storage space size of the first-level snapshot area. Indicates the total storage space size of the secondary snapshot area.

[0052] In the present invention, a snapshot migration strategy is constructed based on the characteristics of the documents stored in the database, that is, whether to start migrating the data in the first-level snapshot area to the second-level snapshot area is determined based on the last access time of the lightweight available data snapshot in the first-level snapshot area, the remaining storage space size of the first-level snapshot area, the total storage space size of the first-level snapshot area, and the total storage space size of the second-level snapshot area, and a specific migration strategy judgment calculation method is proposed. It has been proved through actual use in the MRP actually used by the applicant that the judgment method is practical and effective, and can balance the remaining space of the first and second-level snapshot areas, realize the optimization of the storage system, and thus improve the hardware performance of the system. This is another important invention of the present invention.

[0053] Figure 2 The present invention shows a material availability tracing device in an MRP system, the device comprising:

[0054] The conversion unit 201 obtains all material documents in the MRP system, extracts material availability data from all the obtained material documents, and generates a lightweight availability data snapshot and a generation time;

[0055] The storage unit 202 saves the lightweight availability data snapshots and generation times of all generated material documents to the primary snapshot area, and serializes the lightweight availability data snapshots and generation times of some material documents in the primary snapshot area and migrates them to the secondary snapshot area based on the generation time of the availability data snapshot, wherein the primary snapshot area is in the MRP system, and the secondary snapshot area is in the MRP system;

[0056] The traceability unit 203 extracts the material availability data from all the acquired material documents and generates a lightweight availability data snapshot and a generation time, receives the material availability traceability time and material identification input by the user, obtains the corresponding availability data snapshot in the first-level snapshot area and / or the second-level snapshot area based on the traceability time and material identification, generates the material availability corresponding to the material identification based on the availability data snapshot, and feeds back the material availability to the user interface through the user interface.

[0057] In the present invention, after extracting the material availability data from all acquired material documents, a lightweight availability data snapshot and a generation time are generated, and the lightweight availability data snapshots and generation time of all generated material documents are saved in the first-level snapshot area, and based on the generation time of the availability data snapshot, the lightweight availability data snapshots and generation time of some material documents in the first-level snapshot area are serialized and migrated to the second-level snapshot area, and after extracting the material availability data from all acquired material documents, a lightweight availability data snapshot and a generation time are generated, and the material availability traceability time and material identification input by the user are received, and the corresponding availability data snapshot is obtained in the first-level snapshot area and / or the second-level snapshot area based on the traceability time and material identification. That is, the present invention constructs a recording mechanism for lightweight snapshot data by abstracting the key availability information in the business document, and stores the availability snapshot, that is, the first-level snapshot hot data area, so as to realize the tracing of the availability source; and in combination with the migration service strategy, the snapshot data is migrated from the business system to the second-level snapshot cold data area to realize the optimized storage of the snapshot data. When it is necessary to trace back the historical available quantity snapshot, it is loaded from the secondary snapshot area to the primary snapshot area on demand to achieve fast access to the snapshot data, and ultimately achieve efficient tracing of the available quantity source. A migration service strategy suitable for data document application scenarios is proposed, which improves the accuracy and efficiency of available quantity queries and enhances the system migration performance. This is a manifestation of the important inventive concept of the present invention.

[0058] In one implementation, in the conversion unit 201, a general document available quantity conversion model device is constructed, including a document header unit, a document body unit, a supply and demand date unit, and an available quantity extraction unit. After a material document is input into the general document available quantity conversion model device, the document header unit is used to extract the document identification and document date, the document body unit is used to extract all material identifications in the material document, the supply and demand date unit is used to extract the supply and demand time of each material, and the available quantity extraction unit is used to extract the available quantity of each material, and a lightweight available quantity data snapshot is generated based on the document identification, document date, material identification, supply and demand time and available quantity.

[0059] The general document available quantity conversion model device proposed in the present invention is a device for realizing data processing flow, which can be realized by software and / or hardware. Generally, it is realized by software, and aims to integrate multi-source and heterogeneous business document data into unified and standardized available quantity snapshot data. The core function of the model device is to identify and accurately extract the key fields that directly affect the available quantity in various business documents (such as production processing orders, material delivery orders, sales orders, purchase orders, etc.), which include but are not limited to material numbers, quantities, warehouses, supply and demand dates, etc. And through data conversion logic, the original business document data is mapped to the model to generate standardized available quantity snapshot data, realizing efficient conversion from complex and heavyweight business documents to standardized and lightweight available quantity data. Since there is no need to store a large number of original documents, the storage space can be greatly reduced, thereby reducing the storage cost. This is another important inventive concept of the present invention.

[0060] In one embodiment, the operation of migrating the lightweight availability data snapshot and the generation time after serialization to the secondary snapshot area is as follows: the lightweight availability data snapshots to be migrated belonging to the same document identifier are formed into a migration data set, and each lightweight availability data snapshot to be migrated in the migration data set is checked to determine whether it has been migrated or is in a migration state. If not, the lightweight availability data snapshot and the generation time to be migrated are converted into serialized data and locked, and the migration data block size is determined according to the size limit of the secondary snapshot area and the file system performance, and the locked serialized data is compressed and divided into blocks based on the migration data block size, and the divided serialized data is uploaded and migrated to the secondary snapshot area. After the migration is successful, the corresponding lightweight availability data snapshot and the generation time are deleted from the primary snapshot area. If the migration fails, error processing is performed, and the lightweight availability data snapshot and the generation time are rolled back to the original state in the primary snapshot area, waiting for the next migration, and the success, failure and abnormal information in the migration recovery process are recorded as log data.

[0061] In the present invention, the migration data block size is determined according to the size limit of the secondary snapshot area and the file system performance, the locked serialized data is compressed and divided into blocks based on the migration data block size, and the divided serialized data is uploaded and migrated to the secondary snapshot area. After the migration is successful, the corresponding lightweight available data snapshot and the generation time are deleted from the primary snapshot area, thereby ensuring the migration efficiency and the uniqueness of the data source, that is, ensuring that the available data snapshot can only be stored in one of the primary and secondary snapshot areas, thereby ensuring the accuracy of the available data traced back, which is another inventive point of the present invention.

[0062] In one embodiment, in the traceability unit 203, it is determined whether there is a corresponding lightweight availability data snapshot in the first-level snapshot area based on the traceability time and material identification. If not, the traceability time and material identification are sent to the second-level snapshot area for query. If there is a corresponding lightweight availability data snapshot, the corresponding lightweight availability data snapshot is restored to the first-level snapshot area.

[0063] In the present invention, the historical available quantity snapshot can be queried through the calculation process of the material requirement planning (MRP) system. Before the query, a snapshot recovery judgment will be made. If recovery is required, the snapshot migration service is called, and the data is restored to the first-level snapshot area as needed, so that the snapshot of the available quantity can be queried. For example, when it is necessary to query the historical snapshot, first determine whether there is data in the first-level snapshot area. If not, call the snapshot migration service to restore from the second-level snapshot system to the first-level snapshot area for users to view or further analyze. When restoring, take the second-level snapshot according to the operation order (that is, in units of one document), and restore the complete snapshot data of one operation order at a time, which ensures the accuracy of the data recovery process. This is an important inventive concept of the present invention.

[0064] In one embodiment, whether to initiate migration of the lightweight available data snapshot and the generation time in the first-level snapshot area to the second-level snapshot area is determined based on the last access time of the lightweight available data snapshot in the first-level snapshot area, the remaining storage space size of the first-level snapshot area, the total storage space size of the first-level snapshot area, and the total storage space size of the second-level snapshot area.

[0065] In one embodiment, the method for determining whether to start migrating the lightweight available data snapshot and the generation time in the primary snapshot area to the secondary snapshot area is as follows: calculating the migration decision value ,if If the value is greater than the first threshold, the lightweight available data snapshot and the generation time in the first-level snapshot area are migrated to the second-level snapshot area, where:

[0066] ;

[0067] Indicates the last access time of the lightweight available data snapshot with the document ID in the first-level snapshot area. Indicates the current time, Indicates the remaining storage space size of the first-level snapshot area. Indicates the total storage space size of the first-level snapshot area. Indicates the total storage space size of the secondary snapshot area.

[0068] In the present invention, a snapshot migration strategy is constructed based on the characteristics of the documents stored in the database, that is, whether to start migrating the data in the first-level snapshot area to the second-level snapshot area is determined based on the last access time of the lightweight available data snapshot in the first-level snapshot area, the remaining storage space size of the first-level snapshot area, the total storage space size of the first-level snapshot area, and the total storage space size of the second-level snapshot area, and a specific migration strategy judgment calculation method is proposed. It has been proved through actual use in the MRP actually used by the applicant that the judgment method is practical and effective, and can balance the remaining space of the first and second-level snapshot areas, realize the optimization of the storage system, and thus improve the hardware performance of the system. This is another important invention of the present invention.

[0069] In one embodiment of the present invention, a computer storage medium is provided, on which a computer program is stored. When the computer program on the computer storage medium is executed by a processor, the above method is implemented. The computer storage medium can be a hard disk, DVD, CD, flash memory or other memory.

[0070] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0071] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the devices described in each embodiment of the present application or some parts of the embodiments.

[0072] Finally, it should be noted that the above embodiments are only intended to illustrate rather than limit the technical solutions of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the present invention can still be modified or replaced by equivalents. Any modification or partial replacement that does not depart from the spirit and scope of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A method for tracing the availability of materials in an MRP system, characterized in that: The method includes: Conversion step: obtain all material documents in the MRP system, extract material availability data from all obtained material documents, and generate lightweight availability data snapshots and generation time; A storage step, saving the lightweight availability data snapshots and generation times of all generated material documents to a primary snapshot area, and serializing the lightweight availability data snapshots and generation times of some material documents in the primary snapshot area and migrating them to a secondary snapshot area based on the generation time of the availability data snapshot, wherein the primary snapshot area is in the MRP system, and the secondary snapshot area is in the MRP system; A tracing step, receiving a material availability tracing time and a material ID input by a user, acquiring a corresponding availability data snapshot in the primary snapshot area and / or the secondary snapshot area based on the tracing time and the material ID, generating a material availability corresponding to the material ID based on the availability data snapshot, and feeding back the corresponding material availability to the user interface through a user interface; Among them, the operation of migrating the lightweight available data snapshot and the generation time after serialization to the secondary snapshot area is as follows: the lightweight available data snapshots to be migrated belonging to the same document identifier are grouped into a migration data set, and each lightweight available data snapshot to be migrated in the migration data set is checked to determine whether it has been migrated or is in a migration state. If not, the lightweight available data snapshot and the generation time to be migrated are converted into serialized data and locked, and the migration data block size is determined according to the size limit of the secondary snapshot area and the file system performance, the locked serialized data is compressed and divided into blocks based on the migration data block size, and the divided serialized data is uploaded and migrated to the secondary snapshot area. After the migration is successful, the corresponding lightweight available data snapshot and the generation time are deleted from the primary snapshot area; Among them, whether to start migrating the lightweight available data snapshot and the generation time in the first-level snapshot area to the second-level snapshot area is determined based on the last access time of the lightweight available data snapshot in the first-level snapshot area, the remaining storage space size of the first-level snapshot area, the total storage space size of the first-level snapshot area, and the total storage space size of the second-level snapshot area.

2. The method according to claim 1, characterized in that In the conversion step, a general document available quantity conversion model device is constructed, including a document header unit, a document body unit, a supply and demand date unit, and an available quantity extraction unit. After a material document is input into the general document available quantity conversion model device, the document header unit is used to extract the document identification and document date, the document body unit is used to extract all material identifications in the material document, the supply and demand date unit is used to extract the supply and demand time of each material, and the available quantity extraction unit is used to extract the available quantity of each material. A lightweight available quantity data snapshot is generated based on the document identification, document date, material identification, supply and demand time and available quantity.

3. The method according to claim 2, characterized in that If the migration fails, error handling is performed, and the lightweight available data snapshot and generation time are rolled back to the original state in the first-level snapshot area, waiting for the next migration, and the success, failure and exception information during the migration recovery process are recorded as log data.

4. The method according to claim 3, characterized in that In the tracing step, it is determined whether there is a corresponding lightweight availability data snapshot in the first-level snapshot area based on the tracing time and material identification. If not, the tracing time and material identification are sent to the second-level snapshot area for query. If there is a corresponding lightweight availability data snapshot, the corresponding lightweight availability data snapshot is restored to the first-level snapshot area.

5. A material availability traceability device in an MRP system, characterized in that: The device includes: The conversion unit obtains all material documents in the MRP system, extracts the material availability data from all the obtained material documents, and generates a lightweight availability data snapshot and the generation time; A storage unit saves the lightweight availability data snapshots and generation times of all generated material documents to a primary snapshot area, and serializes the lightweight availability data snapshots and generation times of some material documents in the primary snapshot area and migrates them to a secondary snapshot area based on the generation time of the availability data snapshot, wherein the primary snapshot area is in the MRP system, and the secondary snapshot area is in the MRP system; a tracing unit, receiving a material availability tracing time and a material ID input by a user, acquiring a corresponding availability data snapshot in the primary snapshot area and / or the secondary snapshot area based on the tracing time and the material ID, generating a material availability corresponding to the material ID based on the availability data snapshot, and feeding back the corresponding material availability to the user interface through the user interface; Among them, the operation of migrating the lightweight available data snapshot and the generation time after serialization to the secondary snapshot area is as follows: the lightweight available data snapshots to be migrated belonging to the same document identifier are grouped into a migration data set, and each lightweight available data snapshot to be migrated in the migration data set is checked to determine whether it has been migrated or is in a migration state. If not, the lightweight available data snapshot and the generation time to be migrated are converted into serialized data and locked, and the migration data block size is determined according to the size limit of the secondary snapshot area and the file system performance, the locked serialized data is compressed and divided into blocks based on the migration data block size, and the divided serialized data is uploaded and migrated to the secondary snapshot area. After the migration is successful, the corresponding lightweight available data snapshot and the generation time are deleted from the primary snapshot area; Among them, whether to start migrating the lightweight available data snapshot and the generation time in the first-level snapshot area to the second-level snapshot area is determined based on the last access time of the lightweight available data snapshot in the first-level snapshot area, the remaining storage space size of the first-level snapshot area, the total storage space size of the first-level snapshot area, and the total storage space size of the second-level snapshot area.

6. The device according to claim 5, characterized in that In the conversion unit, a general document available quantity conversion model device is constructed, which includes a document header unit, a document body unit, a supply and demand date unit, and an available quantity extraction unit. After a material document is input into the general document available quantity conversion model device, the document header unit is used to extract the document identification and document date, the document body unit is used to extract all material identifications in the material document, the supply and demand date unit is used to extract the supply and demand time of each material, and the available quantity extraction unit is used to extract the available quantity of each material. A lightweight available quantity data snapshot is generated based on the document identification, document date, material identification, supply and demand time and available quantity.

7. The device according to claim 6, characterized in that If the migration fails, error handling is performed, and the lightweight available data snapshot and generation time are rolled back to the original state in the first-level snapshot area, waiting for the next migration, and the success, failure and exception information during the migration recovery process are recorded as log data.

8. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program on the computer storage medium is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Scheduling result evaluation device for inventory dimension

    CN112053107A

  • Storage device, method and system for realizing disaster recovery backup

    CN117950915A