Transaction document processing method, device, electronic device, medium and program product
By decomposing and grouping transaction document data, the problem of product logistics code flow errors in parallel computing is solved, and more efficient and accurate transaction document processing is achieved.
Patent Information
- Application Number
- CN202410882018.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-07-03
AI Technical Summary
When processing multiple transaction documents, since different transaction documents may have the same product logistics code, the flow of product logistics codes in parallel calculations is prone to errors.
By decomposing and grouping transaction document data, it is ensured that all information of the same product logistics code is located in the same data group and processed by one thread, preventing different threads from processing the same product information at the same time.
It reduces the risk of product logistics code flow errors and improves processing efficiency and accuracy.
Smart Images

Figure CN118411101B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer systems based on specific computing models in the field of new generation information technology, and specifically to a method, device, electronic device, medium and program product for processing transaction documents. Background Art
[0002] A transaction document usually includes multiple product logistics codes, and different transaction documents may have the same product logistics code. In the related art, after obtaining the transaction document, it is usually necessary to process the transaction document, for example, to supplement the logistics code transaction data or filter duplicate transaction data. In the process of processing the transaction document, the transaction data corresponding to all product logistics codes in each transaction document are usually processed one by one. When the number of transaction documents is large, in order to improve processing efficiency, multiple transaction documents may be processed synchronously based on multiple threads. However, since different transaction documents may have the same product logistics code, when different threads process the transaction data of the same product logistics code at the same time, the flow of the product logistics code is prone to errors. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method, device, electronic device, medium and program product for processing transaction documents, which are conducive to reducing the risk of errors in the flow direction of product logistics codes.
[0004] In a first aspect, an embodiment of the present application provides a method for processing a transaction document, including:
[0005] Acquire a transaction document data set to be processed, wherein the transaction document data set includes at least two transaction documents, and the transaction documents include at least two product logistics codes;
[0006] Decomposing the at least two transaction documents according to the product logistics code to obtain a plurality of product information, wherein one piece of product information corresponds to one product logistics code;
[0007] Grouping the plurality of product information to obtain at least two first data groups, wherein all product information corresponding to the same product logistics code is in the same first data group;
[0008] Based on at least two threads corresponding one-to-one to the at least two first data groups, the product information in the at least two first data groups is processed in parallel to obtain a plurality of processed data corresponding one-to-one to the plurality of product information;
[0009] Processing information is generated based on the multiple pieces of processing data, wherein the processing information includes at least two pieces of document information corresponding to the at least two transaction documents, and the document information includes information obtained by merging all processing data corresponding to the same transaction document.
[0010] In a second aspect, an embodiment of the present application provides a transaction document processing device, including:
[0011] An acquisition module, configured to acquire a transaction document data set to be processed, wherein the transaction document data set includes at least two transaction documents, and the transaction documents include at least two product logistics codes;
[0012] a decomposition module, configured to decompose the at least two transaction documents according to the product logistics code to obtain a plurality of product information, wherein one piece of product information corresponds to one product logistics code;
[0013] A grouping module, used for grouping the plurality of product information to obtain at least two first data groups, wherein all product information corresponding to the same product logistics code is located in the same first data group;
[0014] a processing module, configured to perform parallel processing on the product information in the at least two first data groups based on at least two threads corresponding one-to-one to the at least two first data groups, to obtain a plurality of processed data corresponding one-to-one to the plurality of product information;
[0015] A generation module is used to generate processing information based on the multiple processing data, wherein the processing information includes at least two document information corresponding to the at least two transaction documents one by one, and the document information includes information obtained by merging all processing data corresponding to the same transaction document.
[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method described in the first aspect.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0018] In a fifth aspect, an embodiment of the present application further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0019] In an embodiment of the present application, at least two first data groups are obtained by decomposing and grouping transaction documents. Since all product information corresponding to the same product logistics code is located in the same first data group, and the product information in the same first data group is processed by one thread, it is possible to avoid the phenomenon that different product information corresponding to the same product logistics code is processed by different threads at the same time, thereby helping to reduce the risk of errors in the flow direction of the product logistics code. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 A flowchart of a method for processing transaction documents provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of the structure of a transaction document processing system provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of the structure of a transaction document processing device provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0026] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0027] In the embodiment of the present application, the problem of incorrect flow direction of the logistics code may refer to: the preset operation flow direction of the logistics of a certain product is: manufacturer purchase warehousing> manufacturer warehouse transfer> manufacturer sales outbound> dealer distribution outbound> store receipt. If in parallel computing, priority is given to manufacturer purchase warehousing and store receipt. This will result in other outbound operations, because the outbound warehouse does not have the logistics code, resulting in the inability to ship out, and the final flow record will be: manufacturer purchase warehousing> store receipt. Since the generated flow record is inconsistent with the preset operation flow, the problem of incorrect flow direction of the logistics code will occur.
[0028] The method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0029] See also Figure 1 , Figure 1 : is a flow chart of a method for processing a transaction document provided in an embodiment of the present application, the method for processing a transaction document comprising:
[0030] Step 101: Acquire a transaction document dataset to be processed, wherein the transaction document dataset includes at least two transaction documents, and the transaction documents correspond to at least two transactions;
[0031] Step 102: Decompose the at least two transaction documents to obtain multiple pieces of product information, wherein one piece of product information corresponds to one transaction;
[0032] Step 103: group the multiple pieces of product information to obtain at least two first data groups, wherein all product information corresponding to the same product logistics code is in the same first data group;
[0033] Step 104: Based on at least two threads corresponding one-to-one to the at least two first data groups, the product information in the at least two first data groups is processed in parallel to obtain a plurality of processed data corresponding one-to-one to the plurality of product information;
[0034] Step 105: Generate processing information based on the multiple processing data, wherein the processing information includes at least two document information corresponding to the at least two transaction documents one by one, and the document information includes information obtained by merging all processing data corresponding to the same transaction document.
[0035] The transaction documents may specifically include: various documents generated during the transaction process, and various documents generated during the product circulation process. For example, the transaction documents may include: purchase warehouse receipt, transfer warehouse delivery, transfer warehouse receipt, sales warehouse delivery, distribution warehouse delivery, receipt warehouse receipt, etc. Accordingly, the transaction document dataset may include at least one type of transaction documents.
[0036] Specifically, since each product has a unique product logistics code, and one transaction document records two or more product logistics codes, that is, one transaction document records the transaction status or circulation status of two or more products (i.e., a batch of products). In some embodiments of the present application, the transaction document also includes at least the following information: transaction time, document number, and transaction type.
[0037] It can be understood that the "transaction time, document number, and transaction type" in the transaction document is the common information of all product logistics codes included in the transaction document. Based on this, when the transaction document is decomposed according to the product logistics code, each product information can retain its unique product logistics code and other common information in the document to which it belongs. For example, in some embodiments of the present application, the product information includes: product logistics code, transaction time, document number of the transaction document to which it belongs, and transaction type.
[0038] The above transaction time is the transaction time of all products corresponding to the transaction document. For example, when the transaction document is a "warehouse entry form", the transaction time is the warehouse entry time of all products corresponding to the transaction document. When the transaction document is a "purchase warehouse entry form", the transaction time is the purchase time of all products corresponding to the transaction document. The above document number is used to uniquely identify the corresponding transaction document, that is, different transaction documents have different document numbers. Transaction types may include: purchase transactions, sales transactions, transfer transactions, distribution and outbound transactions, warehouse inventory transactions, store receipt transactions, etc.
[0039] Since each product usually includes: purchase transactions, sales transactions, transfer transactions, distribution and outbound transactions, warehouse inventory transactions, store receipt transactions and other links, each product has its corresponding purchase receipt, transfer outbound order, transfer inbound order, sales outbound order, distribution outbound order, receipt inbound order and other transaction documents, and the product logistics code is the unique identity of the product. Therefore, the purchase receipt, transfer outbound order, transfer inbound order, sales outbound order, distribution outbound order, receipt inbound order corresponding to the same product all include the product logistics code of the product, that is, the same product logistics code may exist in different transaction documents.
[0040] The transaction document dataset may include all transaction documents generated by the relevant enterprise in the past period of time. For example, it may include all transaction documents generated by the relevant enterprise in the past month. For another example, it may include all transaction documents generated by the relevant enterprise in the past two months.
[0041] The above-mentioned grouping of the multiple product information may specifically refer to: storing the product information with the same product logistics code into the same first data group. It can be understood that one first data group may include product information with multiple product logistics codes.
[0042] The above-mentioned thread refers to the smallest unit that the operating system can perform operation scheduling. The above-mentioned parallel processing of the product information in the at least two first data groups based on the at least two threads corresponding to the at least two first data groups may specifically refer to: each thread processes the product information in the corresponding first data group. In the process of processing the product information in the corresponding first data group, each thread can only process one piece of product information at the same time.
[0043] Since the number of transaction documents is usually large, it is usually necessary to enter the relevant transaction information in the transaction documents into the relevant management system so as to intuitively reflect the transaction data of the enterprise. Therefore, the above-mentioned processing of the product information in the corresponding first data group by each thread may specifically include: each thread pre-processes the product information in the corresponding first data group, and then enters the pre-processed data into the relevant management system. Among them, the pre-processing may include de-duplication processing and processing of supplementing logistics transaction data. For example, since the shipping action and the receiving action are two corresponding actions, in the relevant management system, only one of the "shipping action and the receiving action" needs to be stored to determine that the transaction has been completed. If a certain product information includes both the information corresponding to the shipping action and the information corresponding to the receiving action, the "information corresponding to the shipping action" or the "information corresponding to the receiving action" can be deleted in the product information. The above-mentioned processing information may refer to: information obtained after pre-processing the product information, and the processing information is entered into the relevant management system.
[0044] The above-mentioned generating processing information based on the multiple processing data may include: based on the document number, merging the multiple product information, that is, merging the processing information with the same document number to obtain the document information corresponding to each transaction document.
[0045] In this implementation, at least two first data groups are obtained by decomposing and grouping the transaction documents. Since all product information corresponding to the same product logistics code is located in the same first data group, and the product information in the same first data group is processed by one thread, it is possible to avoid the phenomenon that different product information corresponding to the same product logistics code is processed by different threads at the same time, thereby helping to reduce the risk of errors in the flow direction of the product logistics code.
[0046] Optionally, the grouping of the plurality of product information to obtain at least two first data groups includes:
[0047] Grouping the plurality of product information according to the product logistics code to obtain at least two initial data groups corresponding one-to-one to the at least two first data groups;
[0048] The product information in each initial data group is sorted to obtain the at least two first data groups, wherein in the first data group, all product information corresponding to the same product logistics code is located in the same data segment, and different product information in the same data segment is sorted according to the transaction time.
[0049] Specifically, the multiple pieces of product information may be grouped according to the product logistics code, and the product information with the same product logistics code may be grouped into the same initial data group. The initial data group may include product information corresponding to more than two product logistics codes. Then, the transaction data in the initial data group is sorted according to the transaction time information to obtain an intermediate data group, ensuring that the product information with an earlier transaction time is sorted higher in the intermediate data group, and then the product data in the intermediate data group is sorted according to the product logistics code to obtain the first data group. In this way, it can be ensured that the product information with the same product logistics code is located in the same continuous data segment.
[0050] Optionally, the target data group includes a first data segment and a second data segment, the first data segment includes product information corresponding to a first product logistics code, and the second data segment includes product information corresponding to a second product logistics code, wherein the target data group is any one of the at least two first data groups, the customer level corresponding to the first product logistics code is higher than the customer level corresponding to the second product logistics code, and in the target data group, the first data segment is sorted before the second data segment.
[0051] The above customer level may refer to the level of the dealer who purchases the product. The dealer level may be determined by factors such as the dealer's cooperation time, the dealer's purchase volume, and the dealer's credit level. For example, the longer the dealer's cooperation time, the higher the corresponding customer level; the more the dealer's purchase volume, the higher the corresponding customer level. The higher the dealer's credit level, the higher the corresponding customer level.
[0052] The above document data set may include transaction documents generated in the process of purchasing products from different dealers.
[0053] In this implementation, by sorting the data segments in the target data group according to the dealer's customer level, it is advantageous to preferentially process the data segments with high customer levels.
[0054] Optionally, the processing information further includes at least one of the following:
[0055] At least two pieces of product flow information corresponding to the at least two transaction documents, wherein the product flow information is used to represent the flow direction of the product indicated by the corresponding transaction document;
[0056] Warehousing information, wherein the warehousing information includes warehousing information of warehouses used to store the products indicated by the at least two transaction documents.
[0057] The flow direction of the above products refers to the flow direction of the products corresponding to the transaction documents at different time points. For example, the flow information such as when a product enters the warehouse and when it leaves the warehouse.
[0058] Since it is possible to determine how many products enter and leave each warehouse at a certain time based on all the generated processing information, the types and quantities of products currently stored in each warehouse can be determined by counting the warehouse entry and exit information of each warehouse. The warehouse information may include the types and quantities of products currently stored in the warehouse, as well as historical warehouse entry and exit status information.
[0059] In this implementation, the product flow information and storage information are generated to facilitate relevant personnel to query the flow of relevant products and the storage information of each warehouse.
[0060] Optionally, the grouping of the plurality of product information to obtain at least two first data groups includes:
[0061] Determine the number of groups according to the number of the plurality of product information, wherein the number of groups is used to indicate the number of groups of the first data group;
[0062] The plurality of product information are grouped according to the grouping number to obtain at least two first data groups.
[0063] The grouping number is used to indicate the number of the first data groups, and accordingly, the grouping number is also used to indicate the number of threads started, that is, the grouping number is the number of first data groups obtained in the process of "grouping the multiple product information to obtain at least two first data groups".
[0064] Specifically, the threshold value of the number of product information that each thread can process in one task can be predetermined, and then the number of product information obtained after the decomposition action can be divided by the threshold value, and then rounded up to obtain the number of groups. For example, when the number of product information obtained after the decomposition action is 1050, and the threshold value is 100, the number of groups can be expressed as: (1050 / 100) rounded up, and the result after rounding up is 11, that is, the number of groups calculated at this time is 11. For another example, when the number of product information obtained after the decomposition action is 2000, and the threshold value is 100, the number of groups can be expressed as: (2000 / 100) rounded up, and the result after rounding up is 20, that is, the number of groups calculated at this time is 20.
[0065] Optionally, the multiple pieces of product information are grouped according to the grouping number to obtain at least two first data groups, including:
[0066] According to the grouping number, the plurality of product information are grouped according to the product logistics code to obtain at least two initial data groups corresponding to the at least two first data groups, wherein the number of the at least two initial data groups is the grouping number;
[0067] The product information in each initial data group is sorted to obtain the at least two first data groups, wherein in the first data group, all product information corresponding to the same product logistics code is located in the same data segment, and different product information in the same data segment is sorted according to the transaction time.
[0068] See also Figure 2 , Figure 2 The present application provides a transaction document processing system for implementing the transaction document processing method. Figure 2 The system shown implements each process of the above transaction document processing method. The transaction document processing system has an independent database, and the transaction document processing system can realize dynamic expansion and contraction of threads.
[0069] See also Figure 3 , Figure 3 : is a schematic diagram of the structure of a transaction document processing device 300 provided in an embodiment of the present application, the transaction document processing device 300 includes:
[0070] An acquisition module 301 is used to acquire a transaction document data set to be processed, wherein the transaction document data set includes at least two transaction documents, and the transaction documents include at least two product logistics codes;
[0071] A decomposition module 302, configured to decompose the at least two transaction documents according to the product logistics code to obtain a plurality of product information, wherein one piece of product information corresponds to one product logistics code;
[0072] A grouping module 303 is used to group the multiple pieces of product information to obtain at least two first data groups, wherein all product information corresponding to the same product logistics code is in the same first data group;
[0073] A processing module 304 is used to process the product information in the at least two first data groups in parallel based on at least two threads corresponding one-to-one to the at least two first data groups, so as to obtain a plurality of processed data corresponding one-to-one to the plurality of product information;
[0074] The generating module 305 is used to generate processing information based on the multiple processing data, wherein the processing information includes at least two document information corresponding to the at least two transaction documents one by one, and the document information includes information obtained by merging all processing data corresponding to the same transaction document.
[0075] Optionally, the product information includes: product logistics code, transaction time, document number of the transaction document, and transaction type.
[0076] Optionally, the grouping module 303 includes:
[0077] A grouping submodule, configured to group the plurality of product information according to the product logistics code to obtain at least two initial data groups corresponding one-to-one to the at least two first data groups;
[0078] The sorting submodule is used to sort the product information in each initial data group to obtain the at least two first data groups, wherein in the first data group, all product information corresponding to the same product logistics code is located in the same data segment, and different product information in the same data segment is sorted according to the transaction time.
[0079] Optionally, the target data group includes a first data segment and a second data segment, the first data segment includes product information corresponding to a first product logistics code, and the second data segment includes product information corresponding to a second product logistics code, wherein the target data group is any one of the at least two first data groups, the customer level corresponding to the first product logistics code is higher than the customer level corresponding to the second product logistics code, and in the target data group, the first data segment is sorted before the second data segment.
[0080] Optionally, the grouping module 303 is specifically configured to determine the number of groups according to the number of the plurality of product information, wherein the number of groups is used to indicate the number of groups of the first data group;
[0081] The grouping module 303 is further used to group the multiple pieces of product information according to the grouping number to obtain at least two first data groups.
[0082] Optionally, the processing information further includes at least one of the following:
[0083] At least two pieces of product flow information corresponding to the at least two transaction documents, wherein the product flow information is used to represent the flow direction of the product indicated by the corresponding transaction document;
[0084] Warehousing information, wherein the warehousing information includes warehousing information of warehouses used to store the products indicated by the at least two transaction documents.
[0085] It should be noted that the transaction document processing device 300 provided in the embodiment of the present application can achieve the following Figure 1 The entire technical process of the transaction document processing method shown in the embodiment achieves the same technical effect and will not be described again here to avoid repetition.
[0086] The embodiment of the present application also provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program is executed by the processor to implement the above Figure 1 The various processes of the embodiment of the transaction document processing method shown can achieve the same technical effect, and will not be repeated here to avoid repetition.
[0087] For details, see Figure 4 As shown, an embodiment of the present application further provides an electronic device, including a bus 401 , a transceiver 402 , an antenna 403 , a bus interface 404 , a processor 405 and a memory 406 .
[0088] In this embodiment, the electronic device further includes: a computer program stored in the memory 406 and executable on the processor 405. When the computer program is executed by the processor 405, the following can be achieved: Figure 1 The various processes of the transaction document processing method shown in the embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition.
[0089] exist Figure 4 In the embodiment, the bus architecture (represented by bus 401) may include any number of interconnected buses and bridges, and bus 401 links various circuits including one or more processors represented by processor 405 and memory represented by memory 406. Bus 401 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 404 provides an interface between bus 401 and transceiver 402. Transceiver 402 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 405 is transmitted on a wireless medium via antenna 403, and further, antenna 403 also receives data and transmits the data to processor 405.
[0090] Processor 405 is responsible for managing bus 401 and general processing, and may also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 406 may be used to store data used by processor 405 when performing operations.
[0091] Optionally, the processor 405 may be a CPU, an ASIC, an FPGA or a CPLD.
[0092] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and are not described here in detail to avoid repetition. The computer-readable storage medium is, for example, a ROM, RAM, a magnetic disk or an optical disk.
[0093] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0094] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0095] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0096] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for processing transaction documents. It is characterized in that include: Acquire a transaction document data set to be processed, wherein the transaction document data set includes at least two transaction documents, and the transaction documents include at least two product logistics codes; Decomposing the at least two transaction documents according to the product logistics code to obtain a plurality of product information, wherein one piece of product information corresponds to one product logistics code; Grouping the plurality of product information to obtain at least two first data groups, wherein all product information corresponding to the same product logistics code is in the same first data group; Based on at least two threads corresponding one-to-one to the at least two first data groups, the product information in the at least two first data groups is processed in parallel to obtain a plurality of processed data corresponding one-to-one to the plurality of product information; Generate processing information based on the multiple pieces of processing data, wherein the processing information includes at least two pieces of document information corresponding to the at least two transaction documents, and the document information includes information obtained by merging all processing data corresponding to the same transaction document; The product information includes: product logistics code, transaction time, document number of the transaction document, and transaction type; The grouping of the plurality of product information to obtain at least two first data groups includes: Grouping the plurality of product information according to the product logistics code to obtain at least two initial data groups corresponding one-to-one to the at least two first data groups; The product information in each initial data group is sorted to obtain the at least two first data groups, wherein in the first data group, all product information corresponding to the same product logistics code is located in the same data segment, and different product information in the same data segment is sorted according to the transaction time.
2. The method according to claim 1, It is characterized in that The target data group includes a first data segment and a second data segment, the first data segment includes product information corresponding to a first product logistics code, and the second data segment includes product information corresponding to a second product logistics code, wherein the target data group is any one of the at least two first data groups, the customer level corresponding to the first product logistics code is higher than the customer level corresponding to the second product logistics code, and in the target data group, the first data segment is sorted before the second data segment.
3. The method according to claim 1, It is characterized in that The grouping of the plurality of product information to obtain at least two first data groups includes: Determine the number of groups according to the number of the plurality of product information, wherein the number of groups is used to indicate the number of groups of the first data group; The plurality of product information are grouped according to the grouping number to obtain at least two first data groups.
4. The method according to any one of claims 1 to 3, It is characterized in that The processing information also includes at least one of the following: At least two pieces of product flow information corresponding to the at least two transaction documents, wherein the product flow information is used to represent the flow direction of the product indicated by the corresponding transaction document; Warehousing information, wherein the warehousing information includes warehousing information of warehouses used to store the products indicated by the at least two transaction documents.
5. A transaction document processing device, It is characterized in that include: An acquisition module, configured to acquire a transaction document data set to be processed, wherein the transaction document data set includes at least two transaction documents, and the transaction documents include at least two product logistics codes; a decomposition module, configured to decompose the at least two transaction documents according to the product logistics code to obtain a plurality of product information, wherein one piece of product information corresponds to one product logistics code; A grouping module, used for grouping the plurality of product information to obtain at least two first data groups, wherein all product information corresponding to the same product logistics code is located in the same first data group; a processing module, configured to perform parallel processing on the product information in the at least two first data groups based on at least two threads corresponding one-to-one to the at least two first data groups, to obtain a plurality of processed data corresponding one-to-one to the plurality of product information; a generating module, configured to generate processing information based on the plurality of processing data, wherein the processing information includes at least two pieces of document information corresponding one-to-one to the at least two transaction documents, and the document information includes information obtained by merging all processing data corresponding to the same transaction document; The product information includes: product logistics code, transaction time, document number of the transaction document, and transaction type; The grouping module comprises: A grouping submodule, configured to group the plurality of product information according to the product logistics code to obtain at least two initial data groups corresponding one-to-one to the at least two first data groups; The sorting submodule is used to sort the product information in each initial data group to obtain the at least two first data groups, wherein in the first data group, all product information corresponding to the same product logistics code is located in the same data segment, and different product information in the same data segment is sorted according to the transaction time.
6. An electronic device, It is characterized in that include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the method according to any one of claims 1 to 4 when executed by the processor.
7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer program product, It is characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Order processing method, system and device
CN105931003A
Storage production scheduling method and device, storage medium and electronic equipment
CN110390450A
Customized real-time data efficient pushing method and system
CN111311142A
Transaction processing method, system and equipment based on multiple threads
CN116630046A
Waybill data processing method and device, electronic equipment and storage medium
CN117033006A
