Flow direction completion method, device, system, model training method and electronic equipment

By acquiring the historical flow feature set of the target node and related nodes, calculating the cargo volume error, and using a neural network model to predict the outflow node, the problem of cargo traceability in the supply chain is solved, and the complete recording and accurate tracing of cargo flow is achieved.

CN115409446BActive Publication Date: 2025-12-19ALIBABA HEALTH TECH (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211048475.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-30
Publication Date
2025-12-19
Estimated Expiration
2042-08-30

AI Technical Summary

Technical Problem

In the supply chain, a lack of transparency makes it difficult to trace the origin of goods, difficult to hold people accountable, and impossible to effectively prevent cross-selling.

Method used

By obtaining the historical flow feature set of the target node and related nodes, calculating the cargo volume error, and using a neural network model to predict the outflow node, the missing cargo flow direction is filled in.

Benefits of technology

It enables complete recording and accurate tracking of cargo flow, improves the accuracy of flow prediction, and reduces prediction errors caused by information delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115409446B_ABST
    Figure CN115409446B_ABST
Patent Text Reader

Abstract

The embodiment of the specification provides a flow direction completion method, device, system, model training method and electronic equipment, wherein the flow direction completion method obtains a cargo quantity error of an associated node having a historical flow direction relationship with a target node within a preset time period based on a historical flow direction feature set, and determines an outflow node of a missing cargo flow direction according to the cargo quantity error of a plurality of associated nodes, so that the completion of the cargo flow direction is realized, and the integrity of the cargo flow direction is ensured. In addition, the historical flow direction feature set includes a plurality of features extracted from historical flow direction information uploading behaviors, avoiding the problem of inaccurate cargo quantity error based on a single feature, improving the accuracy of the cargo quantity error, and further improving the accuracy of the flow direction prediction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification relates to a traceability technology in the field of computer technology, more particularly, to a flow direction completion method, device, system, model training method and electronic equipment. BACKGROUND

[0002] The supply chain industry often involves many entities, including logistics, capital flow and information flow, and there is a large amount of complex cooperation and communication between these entities.

[0003] Under the traditional mode, different entities save their own supply chain information, which is seriously lack of transparency, leading to difficulty in tracing goods, and it is difficult to achieve accurate accountability once a problem (product quality problem, product counterfeiting problem, etc.) occurs. And for companies with control requirements, accurate goods flow records are also of great significance to "anti-channeling". SUMMARY

[0004] The embodiments of the present specification provide a flow direction completion method, device, system, model training method and electronic equipment, which realizes the completion of missing goods flow direction in the goods flow direction graph, and realizes the complete and accurate record of goods flow direction.

[0005] To achieve the above technical purpose, the embodiments of the present specification provide the following technical solutions:

[0006] In a first aspect, a flow direction completion method is provided, comprising:

[0007] According to the historical flow direction feature set corresponding to each of the target node and the plurality of associated nodes, the goods quantity error of the plurality of associated nodes in the preset time period is obtained; the target node includes a missing goods flow direction inflow node, the associated node includes a node having a historical flow direction relationship with the target node, the preset time period covers the predicted uploading time of the preset flow direction information, the preset flow direction information includes the inflow node and / or outflow node information of the missing goods flow direction, the historical flow direction feature set includes a plurality of features extracted from the historical flow direction information uploading behavior, and the goods quantity error includes the difference between the predicted outflow goods quantity and the actually uploaded outflow goods quantity of the associated node in the preset time period;

[0008] According to the goods quantity error of the plurality of associated nodes in the preset time period, the outflow node of the missing goods flow direction is obtained, and the missing goods flow direction is completed according to the outflow node.

[0009] In a second aspect, a model training method is provided, comprising:

[0010] obtain a historical flow direction feature set corresponding to the target node and the associated node, the target node including a missing flow-in node of goods flow direction, the associated node including a node having a historical flow direction relationship with the target node, the historical flow direction feature set including a plurality of features extracted from historical flow direction information uploading behaviors;

[0011] train a neural network model corresponding to the target node and the associated node with the historical flow direction feature set corresponding to the target node and the associated node as a training set, to obtain a flow direction prediction model corresponding to the target node and the associated node, the flow direction prediction model being used to predict a predicted outflow of goods of the associated node to the target node within a preset time period.

[0012] In a third aspect, a flow direction completion system is provided, comprising: a server, a target node and an associated node; wherein,

[0013] The target node and the associated node are both configured to upload flow direction information to the server, the flow direction information including inflow node and outflow node information of goods;

[0014] The server is configured to obtain and store the flow direction information, obtain a goods quantity error of a plurality of associated nodes within a preset time period according to a historical flow direction feature set corresponding to each of the target node and the plurality of associated nodes, and obtain an outflow node of the missing goods flow direction according to the goods quantity error of the plurality of associated nodes within the preset time period, and complete the missing goods flow direction according to the outflow node.

[0015] The target node includes a missing flow-in node of goods flow direction, the associated node includes a node having a historical flow direction relationship with the target node, the preset time period covers a predicted uploading time of preset flow direction information, the preset flow direction information includes inflow node and / or outflow node information of the missing goods flow direction, the historical flow direction feature set includes a plurality of features extracted from historical flow direction information uploading behaviors, and the goods quantity error includes a difference between a predicted outflow of goods of the associated node within the preset time period and an actually uploaded outflow of goods.

[0016] In a fourth aspect, a flow direction completion method is provided, comprising:

[0017] According to the historical flow direction feature set corresponding to each of the target node and the plurality of associated nodes, obtain the cargo quantity error of the plurality of associated nodes; the target node includes an inflow node of a missing cargo flow direction, the associated node includes a node having a historical flow direction relationship with the target node, the historical flow direction feature set includes a plurality of features extracted from a historical flow direction information upload behavior, and the cargo quantity error includes a difference between a predicted outflow cargo quantity and an actually uploaded outflow cargo quantity of the associated node at a predicted flow direction upload time.

[0018] According to the cargo quantity error of the plurality of associated nodes, obtain an outflow node of the missing cargo flow direction, and complete the missing cargo flow direction according to the outflow node.

[0019] In a fifth aspect, a flow direction completion device is provided, including:

[0020] A flow direction prediction module is configured to obtain, according to the historical flow direction feature set corresponding to each of the target node and the plurality of associated nodes, the cargo quantity error of the plurality of associated nodes within a preset time period; the target node includes an inflow node of a missing cargo flow direction, the associated node includes a node having a historical flow direction relationship with the target node, the preset time period covers a predicted upload time of preset flow direction information, the preset flow direction information includes inflow node and / or outflow node information of the missing cargo flow direction, the historical flow direction feature set includes a plurality of features extracted from a historical flow direction information upload behavior, and the cargo quantity error includes a difference between a predicted outflow cargo quantity and an actually uploaded outflow cargo quantity of the associated node within the preset time period.

[0021] A flow direction completion module is configured to obtain, according to the cargo quantity error of the plurality of associated nodes within the preset time period, an outflow node of the missing cargo flow direction, and complete the missing cargo flow direction according to the outflow node.

[0022] In a sixth aspect, an electronic device is provided, including a memory and a processor.

[0023] The memory is connected to the processor, and the memory is configured to store a program.

[0024] The processor is configured to implement the flow direction completion method or the model training method according to any one of the above aspects by running the program stored in the memory.

[0025] In a seventh aspect, a storage medium is provided, and the storage medium stores a computer program. When the computer program is run by a processor, the flow direction completion method or the model training method according to any one of the above aspects is implemented.

[0026] In an eighth aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium, the computer instructions being readable by a processor of a computer device, the processor implementing the steps of the flow direction completion method or the model training method described above when executing the computer instructions.

[0027] From the above technical solutions, it can be seen that the embodiments of the present specification provide a flow direction completion method, device, system, model training method and electronic device, wherein the flow direction completion method obtains the cargo quantity error of the associated node having a historical flow direction relationship with the target node within a preset time period based on a historical flow direction feature set, and determines the outflow node of the missing cargo flow direction according to the cargo quantity error of the plurality of associated nodes, thereby realizing the completion of the cargo flow direction and ensuring the integrity of the cargo flow direction. In addition, the historical flow direction feature set includes a plurality of features extracted from the historical flow direction information uploading behavior, thereby avoiding the problem of inaccurate cargo quantity error based on a single feature, improving the accuracy of the cargo quantity error, and further improving the accuracy of the flow direction prediction. At the same time, the flow direction completion method considers the uncertainty of the node flow direction information uploading time, and obtains the cargo quantity error in units of a preset time period, thereby reducing the flow direction prediction error caused by the delay of the associated node or the target node in uploading the flow direction information. BRIEF DESCRIPTION OF DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present specification, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor.

[0029] Figure 1 A flow direction graph provided for the embodiments of the present specification;

[0030] Figure 2 A scene instance provided for the embodiments of the present specification;

[0031] Figure 3 An implementation environment schematic diagram provided for the embodiments of the present specification;

[0032] Figure 4 A flow direction completion method flowchart provided for the embodiments of the present specification;

[0033] Figure 5 A fitting curve based on the time and cargo quantity (i.e. cargo quantity) information of the historical flow direction information uploaded in the past provided for the embodiments of the present specification;

[0034] Figure 6 FIG. 4 is a flowchart of another flow direction completion method according to an embodiment of the present specification;

[0035] Figure 7 FIG. 5 is a flowchart of another flow direction completion method according to an embodiment of the present specification;

[0036] Figure 8 FIG. 6 is a flowchart of a model training method according to an embodiment of the present specification;

[0037] Figure 9 FIG. 7 is a schematic diagram of flow direction completion based on a flow direction prediction model according to an embodiment of the present specification;

[0038] Figure 10 FIG. 8 is a structural schematic diagram of an electronic device according to an embodiment of the present specification. DETAILED DESCRIPTION

[0039] Unless otherwise defined, technical terms or scientific terms used in the embodiments of the present specification shall have the ordinary meaning understood by a person of ordinary skill in the art to which the embodiments of the present specification belong. The terms "first", "second", and the like used in the embodiments of the present specification do not denote any order, quantity, or importance, but are used to avoid confusion between the components.

[0040] Unless otherwise required by context, "a plurality" means "at least two" in the entire specification. "Include" is interpreted to be open, inclusive, meaning "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" are intended to mean that a particular feature, structure, material or characteristic included in at least one embodiment or example of the specification. The illustrative representation of the above terms does not necessarily mean the same embodiment or example.

[0041] The technical solutions in the embodiments of the present specification will be described clearly and completely in conjunction with the drawings in the embodiments of the present specification. Obviously, the described embodiments are only part of the embodiments of the present specification, not all. Based on the embodiments in the present specification, all other embodiments obtained by a person of ordinary skill in the art without creative labor are within the scope of protection of the present specification.

[0042] Some nouns that may be involved in the present specification are explained below.

[0043] Flow direction refers to the flow of personnel, funds, goods, etc. In this specification, it can refer to the flow of goods. In a flow direction of goods, it includes the flow-in node and the flow-out node of goods. The flow-in node refers to the transportation destination or the purchase and warehousing location of goods in the flow direction of goods. The flow-out node refers to the transportation starting point or the sale and warehousing location of goods in the flow direction of goods. It can be understood that the flow-in node in a flow direction of goods can be the flow-out node in another flow direction of goods, and the flow-out node in a flow direction of goods can also be the flow-in node in another flow direction of goods.

[0044] Flow diagram refers to a traffic diagram composed of multiple nodes and multiple flow directions, which indicates the flow direction of goods between different nodes. In some flow diagrams, the flow of goods between different nodes (i.e. the amount of goods flowing) can also be indicated. For example, Figure 1 , Figure 1 A feasible flow diagram is shown, which includes a total of six nodes A, B, C, D, E and F. The arrows indicate the flow direction of goods between different nodes. Taking nodes A and B in the dashed box K1 as an example, the flow direction in the dashed box indicates that the goods flow from node A to node B. At this time, node A is the flow-out node of the flow direction, and node B is the flow-in node of the flow direction. In the dashed box K2, the flow direction indicates that the goods flow from node B to node C. At this time, node B is the flow-out node of the flow direction, and node C is the flow-in node of the flow direction.

[0045] Missing flow direction refers to the missing flow direction caused by the fact that a node does not upload the sale and warehousing or purchase and warehousing documents. Still referring to Figure 1 , Figure 1 In the above, the dashed arrow between node C and node D indicates that the flow direction is missing due to the fact that node C and node D do not upload the goods documents, which will cause the flow diagram shown in Figure 1 to be incomplete, and it is impossible to realize complete traceability of goods.

[0046] Node refers to a participant in production and sales connected by flow direction in a flow diagram, which can be a manufacturer, a distributor, etc.

[0047] Target node refers to the flow-in node of the missing flow direction of goods, i.e. in Figure 1 , the dashed arrow indicates the missing flow direction of goods, so node D is the target node.

[0048] Time Windows refer to windows of a certain length of time period for statistics or calculation of data. The time windows can include tumbling time windows and sliding time windows. The tumbling time window is fixed, and if the length of the time window is set to 1 minute, the time window only calculates data in the current 1 minute. The sliding time window is sliding, and the size of the sliding time window needs to be defined in addition to the length of the sliding time window.

[0049] Internet of Things (IoT) refers to real-time collection of any objects or processes that need to be monitored, connected, and interacted through various information sensors, radio frequency identification technology, global positioning system, infrared sensor, laser scanner, and other devices and technologies, collection of sound, light, heat, electricity, mechanics, chemistry, biology, position, and other various needed information, access through various possible networks, and realization of ubiquitous connection of objects and people, and intelligent perception, identification, and management of objects and processes.

[0050] In one scenario example provided in the present specification, referring to Figure 2 , the goods produced by manufacturer A pass through distributors B, C and D in turn, and reach the respective outlets of distributor C (for example, distributor C outlets 1, 2 and 3) and distributor D (for example, distributor D outlets 1 and 2), and are finally sold to users. Specifically, when the goods are transferred between different manufacturers or distributors, the staff of the manufacturers or distributors can realize the warehousing and delivery operations of the goods by scanning the two-dimensional codes attached to the goods or transportation equipment, and the server can realize the traceability of the goods in the transfer process through the uploaded information related to the warehousing and delivery operations. For example, in Figure 1In the method, after manufacturer A completes production of goods, a two-dimensional code is attached to the goods or a transportation device of the goods. Manufacturer A uploads relevant information of manufacturer A and relevant information of the goods, such as batch, production date, and specification, by scanning the two-dimensional code. After the server receives the relevant information uploaded by manufacturer A, the relevant information of the batch of goods at manufacturer A is recorded. Subsequently, the goods are transported to distributor B, and distributor B uploads relevant information of distributor B and relevant information of the goods by scanning the same two-dimensional code. After the server receives the relevant information uploaded by distributor B, the relevant information of the batch of goods at distributor B is recorded. A similar process is performed between distributor B and distributor C, so as to realize the circulation of the goods between distributor B and distributor C, and finally the goods are circulated to a user through distributor C. When the user uses the batch of goods, if an accident occurs, the server can record the traceability information of the goods to trace the ultimate person responsible for the accident. In this way, participants in the circulation and production processes of the goods can be urged to try their best to ensure the safety of the goods in the circulation process, so as to avoid being ultimately held responsible for safety problems of the goods due to their own negligence. The traceability technology is of great significance to the safety management of food and medicine. In addition, complete traceability of the goods can also ensure that the regional sales strategy of manufacturer A is implemented, ensure that the sales control demand of manufacturer A is realized, and avoid the problem of "goods diversion". For example, goods that manufacturer A wants to send to distributor B are actually transported to distributor E, which is referred to as "goods diversion". In actual application scenarios, one or more flow directions in the flow direction diagram may be lost due to the failure of a distributor or a manufacturer to upload a document. In Figure 2 In the method, the flow directions between distributor B and distributor D and the flow directions between distributor C and distributor C network point 2 are in a missing state. When there is missing flow direction of goods in the flow direction diagram, it will have an adverse effect on the accurate and complete traceability of the goods. When there are too many missing flow directions of goods, the goods cannot be traced, and the sales control strategy of manufacturer A cannot be implemented.

[0051] In order to realize the completion of the missing flow direction of goods in the flow direction diagram, the flow direction completion method provided in the embodiments of the present specification realizes the prediction of the quantity error of goods according to the target node and the historical flow direction feature set of the plurality of associated nodes having a historical flow direction relationship with the target node, and then realizes the determination of the outflow node of the missing flow direction of goods according to the predicted quantity error of goods, and finally realizes the completion of the missing flow direction of goods.

[0052] The flow direction completion method provided by the embodiments of the present specification will be exemplarily described below with reference to the accompanying drawings.

[0053] Please refer to Figure 3 , Figure 3 The flow direction completion method provided by the embodiments of the present specification may involve an implementation environment as shown in the figure, Figure 3The Internet of Things system includes a server 10 and a plurality of nodes 20, the server 10 can establish a communication connection with the nodes 20, the nodes 20 can be manufacturers, distributors, cargo storage stations, distributor outlets, etc., and the server 10 and the nodes 20 can establish a communication connection, which can be a communication connection between the server 10 and the intelligent device (such as a computer) in the node 20, so that the node 20 can upload the document to the server 10, and the server 10 can send a request for the required document to the node 20. The nodes 20 can also establish a communication connection, but the communication connection between the nodes 20 is not a necessary condition for implementing the flow completion method.

[0054] For the server 10, it can be any server 10 device with certain computing and communication capabilities, which can respond to the request of the intelligent device and provide corresponding services or data support for the intelligent device, such as a conventional server 10, a cloud server 10, a cloud host, a virtual center or a server 10 array, etc. The composition of the server 10 mainly includes a processor, a hard disk, a memory and a system bus, etc.

[0055] Optionally, the server 10 can be deployed in the cloud, and the intelligent device can access the Internet (such as a wide area network or a metropolitan area network (Metropolitan Area Network)) through WiFi, Ethernet, optical fiber, 2 / 3 / 4 / 5G mobile network, and establish a communication connection with the server 10 through the Internet. Of course, in addition to this way of deploying in the cloud, the server 10 can also be deployed together with the intelligent device. This specification does not limit the deployment location of the server 10.

[0056] Please refer to Figure 4 to be applied to Figure 3 The server in the Internet of Things system shown in the specification provides a flow completion method, which includes:

[0057] S401: According to the historical flow characteristics set corresponding to each of the target node and a plurality of associated nodes, obtain the cargo quantity error of a plurality of associated nodes in a preset time period; the target node includes a flow-in node with missing cargo flow direction, the associated node includes a node with historical flow relationship with the target node, the preset time period covers the estimated upload time of the missing cargo flow information, the historical flow characteristic set includes a plurality of characteristics extracted from the historical flow information upload behavior, and the cargo quantity error includes the difference between the predicted outflow cargo quantity and the actual uploaded outflow cargo quantity of the associated node in the preset time period.

[0058] As described above, the target node refers to a flow-in node with missing cargo flow direction (for example Figure 1Node D in the context. Associated nodes are nodes that have a historical flow relationship with the target node. For example, suppose... Figure 1 If nodes A, B, and C have all transported goods to node D, then nodes A, B, and C are all associated nodes of node D. The flow direction completion method provided in this specification is mainly used to solve the flow direction completion problem when multiple associated nodes exist. When the target node has only one associated node, that associated node can be directly used as the outflow node for the missing goods flow. For example, assuming that node D's historical associated nodes are only node C, then when... Figure 1 When the flow direction indicated by the dashed arrow is missing, node C can be directly used as the outflow node of the missing cargo flow direction.

[0059] Historical flow information upload behavior refers to the behavior of nodes uploading information on the flow of goods between nodes that has already occurred, such as... Figure 1 In this scenario, there has been a goods transfer between node A and node D. Node A uploaded a sales outbound document to node D, indicating a certain amount of goods transferred from node A to node D. Node D also uploaded a purchase inbound document for goods from node A, similarly indicating a certain amount of goods transferred from node A to node D. The server can merge these two documents into a single goods flow information record between node A and node D. The actions of node A and node D uploading documents containing goods flow information are called flow information upload actions, and historical document upload actions are called historical flow information upload actions.

[0060] From historical flow information upload behavior, a series of features related to the upload behavior can be extracted. From these features, information such as the time and / or quantity of goods that a node may upload to the server can be inferred. Historical flow information upload behavior also yields the historical upload time of the node's flow information. From these historical upload times, a curve of the node's upload time can be fitted, for reference... Figure 5 , Figure 5 This displays the time and quantity of goods (i.e., cargo volume) of historical flow information uploaded by a certain node. Based on this information, a fitting curve for the node's uploaded flow information can be fitted. From this fitted curve, we can obtain information such as the estimated time for the node to upload flow information (estimated upload time) and the size of the outflow cargo volume of the outflowing nodes included in the uploaded flow information. For example, in... Figure 5 In the data, it can be seen that a node's upload of flow direction information was missing at the time when the node was expected to upload the flow direction information (X=7). According to... Figure 5The fitted curve can roughly predict the cargo volume of the node at that time point (X=7). After obtaining the predicted outflow cargo volume of the node at the time point X=7, the difference between the predicted outflow cargo volume and the actual outflow cargo volume is used as the cargo volume error, which can characterize the possibility that the node may have failed to upload flow direction information.

[0061] It is understandable that when a target node has multiple associated nodes, the historical flow feature sets between the target node and different associated nodes are different. Let's continue with... Figure 1 For example, suppose nodes A and B are both associated nodes of target node D, meaning that nodes A and B have historically had flow relationships with target node D. Then, the historical flow information between node A and target node D is generally different from the historical flow information between node B and target node D. Correspondingly, the historical flow information uploading behavior between node A and target node D is generally different from the historical flow information uploading behavior between node B and target node D. Therefore, it's easy to understand that the historical flow feature set corresponding to each associated node of the target node refers to a historical flow feature set corresponding to each associated node.

[0062] S402: Based on the cargo volume error of multiple associated nodes within the preset time period, obtain the outflow node of the missing cargo flow direction, and complete the missing cargo flow direction based on the outflow node.

[0063] After obtaining the cargo volume error of multiple associated nodes within a preset time period through S301, the associated node most likely to be the inflow node of the missing cargo flow can be determined by the magnitude of the cargo volume error of multiple associated nodes within the preset time period.

[0064] In this embodiment, the flow direction completion method, based on a historical flow direction feature set, obtains the cargo volume error of associated nodes with historical flow relationships to the target node within a preset time period. Based on the cargo volume errors of multiple associated nodes, it determines the outflow node for the missing cargo flow, thus completing the cargo flow and ensuring its integrity. Furthermore, the historical flow direction feature set includes multiple features extracted from historical flow direction information upload behavior, avoiding the inaccuracy of cargo volume errors based on a single feature, improving the accuracy of cargo volume errors, and consequently enhancing the accuracy of flow direction prediction.

[0065] Meanwhile, the flow direction completion method considers the uncertainty of uploading time of node flow direction information, and obtains the cargo quantity error in units of preset time periods, thereby reducing the flow direction prediction error caused by delayed uploading of flow direction information by the associated node or the target node. For example, a certain node should upload a document representing the flow direction information of the cargo sent on the same day on the same day, but due to network anomalies or other reasons of the node, the document is not uploaded on the same day, and the node uploads the document until the third day after the cargo is sent. Therefore, the cargo quantity error is obtained in units of preset time periods, which can avoid the error caused by delayed uploading of flow direction information by the node.

[0066] The length of the preset time period can be determined according to actual needs, and can be 3 days, 7 days, 10 days, 15 days, etc. The present specification does not limit this. In order to be more consistent with the behavior of uploading documents by the node, the preset time period can be the average of the historical uploading time periods of the flow direction information of the target node and the associated node. For example, the historical uploading time periods of the flow direction information of the target node are 6 days, 6 days, and 5 days, and the historical uploading time periods of the flow direction information of the associated node are 7 days, 9 days, and 9 days. The average of the historical uploading time periods of the flow direction information of the target node and the associated node can be (6+6+5+7+9+9) / 6=7 days. Of course, in some embodiments, the length of the preset time period can also be greater than the average of the historical uploading time periods of the flow direction information of the target node and the associated node.

[0067] Optionally, in an embodiment of the present specification, the historical flow direction feature set includes an uploading time feature of the historical flow direction information and a cargo quantity feature of the historical flow direction information.

[0068] The uploading time feature of the historical flow direction information refers to an associated feature representing the time point at which the node uploads the historical flow direction information, and the cargo quantity feature of the historical flow direction information refers to an associated feature representing the cargo quantity of the node uploading the historical flow direction information. When the historical flow direction feature set includes the uploading time feature and the cargo quantity feature of the historical flow direction information, the cargo quantity of the associated node in the preset time period and the cargo quantity error can be more accurately predicted based on the historical flow direction feature set, thereby ensuring the accuracy of the flow direction completion method.

[0069] Optionally, the upload time feature comprises an index of the upload time in a preset period, and the preset period comprises at least one of a week, a month, and a year. That is, the upload time feature can comprise at least one of an index of the upload time in a week, an index of the upload time in a month, and an index of the upload time in a year. For example, the upload time is August 17, 2022, Wednesday, and the index of the upload time in a week indicates that the upload time is the fourth day of the week (with Sunday as the first day of the week). For another example, the upload time is June 11, 2022, and the index of the upload time in a month indicates that the upload time is the 11th day of the month. For another example, the upload time is January 2, 2022, and the index of the upload time in a year indicates that the upload time is the 2nd day of the year.

[0070] The index of the upload time in the preset period can be obtained by Dayofweek, Dayofmonth, Dayofyear functions, and has the characteristics of easy acquisition.

[0071] Optionally, in one possible implementation of the present specification, with reference to Figure 6 , the flow direction completion method comprises:

[0072] S601: generating a flow direction prediction model corresponding to the target node and each of the associated nodes according to the historical flow direction feature set corresponding to the target node and each of the associated nodes. The flow direction prediction model can be a fitting curve as shown in Figure 5 , or a neural network model trained based on the training samples generated based on the historical flow direction feature set corresponding to the target node and each of the associated nodes.

[0073] S602: predicting the outflow cargo quantity of each of the associated nodes to the target node in a preset time period by using a sliding time window according to the flow direction prediction model corresponding to the target node and each of the associated nodes.

[0074] Based on the sliding time window, the outflow cargo quantity of the target node can be predicted, which can realize a lock-free design and improve the throughput of the method within a certain time, and can also eliminate the error caused by the centralized uploading of the documents of multiple time points by the node, thereby improving the accuracy of the method.

[0075] S603: calculating the difference between the predicted outflow cargo quantity of each of the associated nodes to the target node in the preset time period and the actually uploaded outflow cargo quantity of each of the associated nodes to the target node, to obtain the cargo quantity error of each of the associated nodes in the preset time period.

[0076] S604: Obtain the outflow node of the missing flow direction according to the cargo quantity errors of the plurality of associated nodes within the preset time period, and complete the missing flow direction according to the outflow node.

[0077] Ideally, if the associated node does not upload the flow direction information, the actual outflow cargo quantity of the associated node to the target node within the preset time period is zero, and the predicted outflow cargo quantity to the target node is also zero. However, due to the prediction accuracy of the flow direction prediction model generated in S601, the predicted outflow cargo quantity of the associated node to the target node within the preset time period may not be zero, resulting in that the cargo quantity error calculated in S603 is not zero. In order to more accurately predict the outflow node, in a possible implementation, the obtaining of the outflow node of the missing flow direction according to the cargo quantity errors of the plurality of associated nodes within the preset time period comprises:

[0078] The associated node with the largest cargo quantity error is determined as the outflow node of the missing flow direction.

[0079] In this way, the outflow node can be more accurately obtained when the cargo quantity errors of the plurality of associated nodes and the target node are all greater than zero, and the prediction accuracy of the method is improved.

[0080] Based on the same concept, the embodiments of the present specification also provide a flow direction completion method, as shown in Figure 7 The method comprises the following steps:

[0081] S701: Obtain the cargo quantity errors of a plurality of associated nodes according to a plurality of historical flow direction feature sets corresponding to a target node and the plurality of associated nodes respectively; the target node comprises an inflow node of a missing flow direction, the associated node comprises a node having a historical flow direction relationship with the target node, the historical flow direction feature set comprises a plurality of features extracted from a historical flow direction information uploading behavior, and the cargo quantity error comprises a difference between a predicted outflow cargo quantity and an actually uploaded outflow cargo quantity of the associated node within a predicted flow direction uploading time.

[0082] S702: Obtain the outflow node of the missing flow direction according to the cargo quantity errors of the plurality of associated nodes, and complete the missing flow direction according to the outflow node.

[0083] The main difference between the flow direction completion method provided by the embodiment and the flow direction completion method shown in Figure 3 is that the cargo quantity errors of the plurality of associated nodes obtained by the flow direction completion method provided by the embodiment are the differences between the predicted flow direction cargo quantities and the actually uploaded outflow cargo quantities of the associated nodes within the predicted flow direction uploading time, which reduces the amount of data required to be processed in S701, improves the processing speed of the method, and achieves the purpose of flow direction completion.

[0084] Correspondingly, based on the same concept, the embodiments of the present specification also provide a model training method, as shown in Figure 8 The method comprises the following steps:

[0085] S801: Obtain a historical flow direction feature set corresponding to a target node and an associated node, the target node comprising an inflow node with missing cargo flow direction, the associated node comprising a node having a historical flow direction relationship with the target node, and the historical flow direction feature set comprising a plurality of features extracted from historical flow direction information upload behaviors.

[0086] S802: Use the historical flow direction feature set corresponding to the target node and the associated node as a training set to train a neural network model corresponding to the target node and the associated node, to obtain a flow direction prediction model corresponding to the target node and the associated node, the flow direction prediction model being used to predict the predicted outflow cargo quantity of the associated node to the target node within a preset time period.

[0087] The flow direction prediction model obtained by training can obtain the cargo quantity error of the target node and a plurality of associated nodes within a preset time period, and then the missing cargo flow direction outflow node can be obtained according to the cargo quantity error of a plurality of associated nodes within the preset time period, and the missing cargo flow direction can be completed according to the outflow node, so as to realize the flow direction completion method of any one of the above embodiments.

[0088] Reference Figure 9 , Figure 9 A feasible use method of the flow direction prediction model is shown. A corresponding flow direction prediction model is obtained between nodes A, B, C and node D, and a corresponding historical flow direction feature set is input into the corresponding flow direction prediction model, so as to obtain the cargo quantity error of nodes A, B, C to node D respectively, and the outflow node is determined by comparing the maximum value of the cargo quantity error, so as to complete the missing cargo flow direction.

[0089] Optionally, the historical flow direction feature set comprises upload time features of the historical flow direction information and cargo quantity features of the historical flow direction information.

[0090] The upload time feature comprises an index of upload time within a preset period, and the preset period comprises at least one of week, month and year.

[0091] The cargo quantity feature comprises a total cargo quantity, an average cargo quantity and a daily cargo quantity within a nearest time period covering the upload time.

[0092] Exemplary Apparatus and System

[0093] In an example embodiment of the present specification, a flow direction completion system is also provided, comprising: a server, a target node and an associated node; wherein

[0094] The target node and the associated node are both configured to upload flow direction information to the server, the flow direction information comprising inflow node and outflow node information of goods.

[0095] The server is configured to acquire and store the flow direction information, acquire a goods quantity error of the plurality of associated nodes within a preset time period according to a historical flow direction feature set corresponding to each of the target node and the plurality of associated nodes, acquire an outflow node of the missing goods flow direction according to the goods quantity error of the plurality of associated nodes within the preset time period, and complete the missing goods flow direction according to the outflow node.

[0096] The target node comprises an inflow node of a missing goods flow direction, the associated node comprises a node having a historical flow direction relationship with the target node, the preset time period covers a predicted uploading time of the missing goods flow direction, the historical flow direction feature set comprises a plurality of features extracted from historical flow direction information uploading behavior, and the goods quantity error comprises a difference between a predicted outflow goods quantity and an actually uploaded outflow goods quantity of the associated node within the preset time period.

[0097] In an example embodiment of the present specification, a flow direction completion device is also provided, comprising:

[0098] A flow direction prediction module is configured to acquire a goods quantity error of a plurality of associated nodes within a preset time period according to a historical flow direction feature set corresponding to each of a target node and the plurality of associated nodes; the target node comprises an inflow node of a missing goods flow direction, the associated node comprises a node having a historical flow direction relationship with the target node, the preset time period covers a predicted uploading time of the missing goods flow direction, the historical flow direction feature set comprises a plurality of features extracted from historical flow direction information uploading behavior, and the goods quantity error comprises a difference between a predicted outflow goods quantity and an actually uploaded outflow goods quantity of the associated node within the preset time period.

[0099] A flow direction completion module is configured to acquire an outflow node of the missing goods flow direction according to the goods quantity error of the plurality of associated nodes within the preset time period, and complete the missing goods flow direction according to the outflow node.

[0100] Each module in the flow direction completion device described above can be realized by software, hardware and combinations thereof, in whole or in part. Each module described above can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.

[0101] The flow direction completion device and the flow direction completion system provided by the embodiments of the present application belong to the same application concept as the flow direction completion method provided by the above embodiments of the present application, can execute the flow direction completion method provided by any of the above embodiments of the present application, and have the corresponding beneficial effects of executing the flow direction completion method. The technical details not described in detail in the embodiments of the present application can refer to the specific processing content of the flow direction completion method provided by the above embodiments of the present application, which will not be described here.

[0102] Exemplary Electronic Device

[0103] Another embodiment of the present application also provides an electronic device, as shown in Figure 10 An example embodiment of the present application also provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to execute the steps of the flow direction completion method or the model training method according to various embodiments of the present application described in the above embodiments of the present application.

[0104] The internal structure of the electronic device can be as shown in Figure 10 The electronic device includes a processor, a memory, a network interface and an input device connected through a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the central control device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the electronic device is used to communicate with external terminals through network connection. The computer program is executed by the processor to execute the steps of the flow direction completion method or the model training method according to various embodiments of the present application described in the above embodiments of the present application.

[0105] Those skilled in the art can understand, Figure 10 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0106] Exemplary Computer Program Product and Storage Medium

[0107] In addition to the method and device described above, the flow direction completion method or model training method provided by the embodiments of the present specification can also be a computer program product, which includes computer program instructions that, when executed by a processor, cause the processor to perform the steps of the flow direction completion method or model training method according to various embodiments of the present specification described in the “Exemplary Method” section of the present specification.

[0108] The computer program product can be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, C++, and the like, and conventional procedural programming languages, such as the “C” programming language, or the like. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.

[0109] In addition, the embodiments of the present specification also provide a computer readable storage medium, which stores a computer program, and the computer program causes a processor to execute the steps of the flow direction completion method or model training method according to various embodiments of the present specification described in the “Exemplary Method” section of the present specification.

[0110] It can be understood that the specific examples herein are only to help those skilled in the art better understand the embodiments of the present specification, and not to limit the scope of the present application.

[0111] It can be understood that in various embodiments of the present specification, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present specification.

[0112] It can be understood that the various embodiments described in the present specification can be implemented alone or in combination, and the embodiments of the present specification do not limit this.

[0113] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present specification have the same meaning as commonly understood by one of ordinary skill in the art of the present specification. The terms used in the present specification are only for the purpose of describing the specific embodiments, and are not intended to limit the scope of the present specification. The term “and / or” used in the present specification includes any and all combinations of one or more of the listed terms. The singular forms “a”, “an” and “the” used in the embodiments of the present specification and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0114] It can be understood that the processor of the embodiments of the present specification can be an integrated circuit chip with processing capability. In the implementation process, each step of the method embodiments described above can be completed by integrated logic circuits in hardware or instructions in software form in the processor. The processor described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block disclosed in the embodiments of the present specification can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor or the like. The steps of the method disclosed in combination with the embodiments of the present specification can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the storage, and the processor reads the information in the storage, and combines the hardware to complete the steps of the above method.

[0115] It can be understood that the memory in the embodiments of the present specification can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read only memory (ROM), a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM). It should be noted that the memory of the system and method described herein is intended to include but not limited to these and any other suitable type of memory.

[0116] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present specification.

[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0118] In several embodiments provided in the specification, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, and the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0119] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0120] In addition, each functional unit in each embodiment of the specification can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.

[0121] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the specification or the essential part of the prior art or the part of the technical solutions can be embodied in the form of a software product, and the computer software product stored in a storage medium includes a plurality of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the specification. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and various program code storage media.

[0122] The above is only a specific embodiment of the specification, but the protection scope of the specification is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the specification, which should be covered within the protection scope of the specification. Therefore, the protection scope of the specification should be limited by the protection scope of the claims.

Claims

1. A flow direction completion method, characterized in that, include: Based on the historical flow feature sets corresponding to the target node and multiple associated nodes, the cargo volume error of the multiple associated nodes within a preset time period is obtained; the target node includes inflow nodes with missing cargo flow, the associated nodes include nodes with historical flow relationships with the target node, the preset time period covers the expected upload time of the missing cargo flow information, the historical flow feature set includes multiple features extracted from the historical flow information upload behavior, and the cargo volume error includes the difference between the predicted outflow cargo volume and the actual uploaded outflow cargo volume of the associated node within the preset time period; Based on the cargo volume error of multiple associated nodes within the preset time period, obtain the outflow node of the missing cargo flow direction, and complete the missing cargo flow direction based on the outflow node; The historical flow feature set includes the upload time feature of the historical flow information and the cargo volume feature of the historical flow information; The step of obtaining the outflow node of the missing cargo flow direction based on the cargo volume error of multiple associated nodes within the preset time period includes: The associated node with the largest error in cargo quantity is determined as the outflow node of the missing cargo flow direction.

2. The method according to claim 1, characterized in that, The upload time feature includes an index of the upload time within a preset period, wherein the preset period includes at least one of week, month, and year.

3. The method according to claim 1, characterized in that, The cargo volume characteristics include the total cargo volume within the most recent time period covering the upload time, the average cargo volume, and the daily cargo volume.

4. The method according to any one of claims 1-3, characterized in that, The preset time period is longer than or equal to the periodic average of the historical upload flow information of the target node and the associated node.

5. The method according to any one of claims 1-3, characterized in that, The step of obtaining the cargo volume error of multiple associated nodes within a preset time period based on the historical flow feature sets corresponding to the target node and multiple associated nodes includes: Based on the historical flow feature sets corresponding to the target node and each of the associated nodes, a flow prediction model corresponding to the target node and each of the associated nodes is generated. Based on the flow prediction model corresponding to the target node and each of the associated nodes, a sliding time window is used to predict the outflow volume of goods from each of the associated nodes to the target node within a preset time period. The difference between the predicted outflow of goods to the target node and the actual outflow of goods to the target node for each of the associated nodes within a preset time period is calculated to obtain the goods volume error of each of the associated nodes within the preset time period.

6. A flow direction completion method, characterized in that, include: Based on the historical flow feature sets corresponding to the target node and multiple associated nodes, the cargo volume error of the multiple associated nodes is obtained; the target node includes inflow nodes with missing cargo flow direction, the associated nodes include nodes with historical flow direction relationship with the target node, the historical flow feature set includes multiple features extracted from historical flow direction information upload behavior, and the cargo volume error includes the difference between the predicted outflow cargo volume and the actual uploaded outflow cargo volume of the associated node at the expected flow direction upload time. Based on the cargo quantity errors of multiple associated nodes, obtain the outflow node of the missing cargo flow direction, and complete the missing cargo flow direction based on the outflow node; The historical flow feature set includes the upload time feature of the historical flow information and the cargo volume feature of the historical flow information; The step of obtaining the outflow node of the missing cargo flow direction based on the cargo quantity error of multiple associated nodes includes: The associated node with the largest error in cargo quantity is determined as the outflow node of the missing cargo flow direction.

7. A model training method, characterized in that, include: Obtain the historical flow feature set corresponding to the target node and associated nodes. The target node includes inflow nodes with missing cargo flow direction, and the associated nodes include nodes with historical flow relationship with the target node. The historical flow feature set includes multiple features extracted from the historical flow information upload behavior. The multiple features include: the upload time feature of the historical flow information and the cargo quantity feature of the historical flow information. Using the historical flow feature set corresponding to the target node and the associated node as the training set, the neural network model corresponding to the target node and the associated node is trained to obtain the flow prediction model corresponding to the target node and the associated node. The flow prediction model is used to predict the outflow volume of goods predicted by the associated node to the target node within a preset time period.

8. The model training method according to claim 7, characterized in that, The historical flow feature set includes the upload time feature of the historical flow information and the cargo volume feature of the historical flow information; The upload time feature includes an index of the upload time within a preset period, wherein the preset period includes at least one of week, month, and year. The cargo volume characteristics include the total cargo volume within the most recent time period covering the upload time, the average cargo volume, and the daily cargo volume.

9. A flow direction completion system, characterized in that, include: Server, target node, and associated nodes; among which, Both the target node and the associated node are used to upload flow information to the server, and the flow information includes the inflow node and outflow node information of the goods. The server is used to acquire and store the flow direction information, acquire the cargo volume error of multiple associated nodes within a preset time period based on the historical flow direction feature set corresponding to the target node and multiple associated nodes, acquire the outflow node of the missing cargo flow direction based on the cargo volume error of multiple associated nodes within the preset time period, and complete the missing cargo flow direction based on the outflow node. The target node includes inflow nodes with missing cargo flow directions, the associated nodes include nodes with historical flow relationships to the target node, the preset time period covers the expected upload time of the missing cargo flow direction, the historical flow feature set includes multiple features extracted from historical flow information upload behavior, and the cargo volume error includes the difference between the predicted outflow cargo volume and the actual uploaded outflow cargo volume of the associated node within the preset time period. The historical flow feature set includes the upload time feature of the historical flow information and the cargo volume feature of the historical flow information; The server obtains the outflow node of the missing goods flow direction based on the cargo volume error of multiple associated nodes within the preset time period, specifically for the following purposes: The associated node with the largest error in cargo quantity is determined as the outflow node of the missing cargo flow direction.

10. A flow direction completion device, characterized in that, include: The flow prediction module is used to obtain the cargo volume error of multiple associated nodes within a preset time period based on the historical flow feature sets corresponding to the target node and multiple associated nodes respectively. The target node includes inflow nodes with missing cargo flow directions, the associated nodes include nodes with historical flow relationships with the target node, the preset time period covers the expected upload time of the missing cargo flow direction, the historical flow feature set includes multiple features extracted from historical flow information upload behavior, and the cargo volume error includes the difference between the predicted outflow cargo volume and the actual uploaded outflow cargo volume of the associated node within the preset time period. The flow direction completion module is used to obtain the outflow node of the missing goods flow direction based on the goods volume error of multiple associated nodes within the preset time period, and to complete the missing goods flow direction based on the outflow node. The historical flow feature set includes the upload time feature of the historical flow information and the cargo volume feature of the historical flow information; The flow direction completion module, based on the cargo volume error of multiple associated nodes within the preset time period, obtains the outflow node of the missing cargo flow direction, specifically for: The associated node with the largest error in cargo quantity is determined as the outflow node of the missing cargo flow direction.

11. An electronic device, characterized in that, include: Memory and processor; The memory is connected to the processor and is used to store programs; The processor is configured to implement the flow completion method as described in any one of claims 1-6 or the model training method as described in any one of claims 7-8 by running the program stored in the storage.

12. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the flow completion method as described in any one of claims 1-6 or the model training method as described in any one of claims 7-8.

Citation Information

Patent Citations

  • Knowledge map completion method, device and storage medium

    CN109241290A

  • Data quality monitoring method and device, computing equipment and computer storage medium

    CN112241443A