Link completion method and device, computer readable storage medium and electronic device
By determining the message passing path based on object feature similarity during the link completion process, the amount of message passing is reduced, the problem of excessive memory consumption is solved, and more efficient link completion and information retrieval are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies consume excessive memory during link completion, resulting in poor completion performance.
By obtaining the feature similarity between objects, the message passing path is determined based on the feature similarity between nodes in the first graph network. The message to be processed is passed to identify missing links and link completion is performed to reduce the amount of message passing and avoid passing to all neighboring nodes, thus realizing message/edge pruning.
It effectively reduces memory usage and time consumption, improves link completion, and can recall longer missing links, ensuring the normal operation of product traceability and risk discovery.
Smart Images

Figure CN115269924B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more specifically, to a link completion method, apparatus, computer-readable storage medium, and electronic device. Background Technology
[0002] With the continuous development of technology, the entire supply chain of products (such as food and electronic products) can be recorded from production / manufacturing to distribution to facilitate information traceability. However, during the recording process, various situations often lead to missing records, resulting in information gaps in the traceability process. This, in turn, affects actual business operations such as product traceability and risk discovery. Therefore, it is necessary to adopt relevant methods to complete the missing links.
[0003] Currently, existing methods suffer from excessive memory consumption during link completion, resulting in poor link completion performance.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This application provides a link completion method, apparatus, computer-readable storage medium, and electronic device to at least solve the technical problem of excessive memory consumption in the link completion process of related methods in the prior art.
[0006] According to one aspect of the embodiments of this application, a link completion method is provided, comprising: obtaining feature similarity between objects, and determining at least one message transmission path based on feature similarity between nodes in a first graph network, wherein the objects and target products have an association relationship, the first graph network consists of nodes and edges for connecting nodes, the nodes correspond one-to-one with the objects, the edges correspond to the association relationship between the objects, and the at least one message transmission path corresponds to the target neighbor node of the node; transmitting unprocessed messages in the first graph network based on the at least one message transmission path to determine missing links between objects; and completing the broken links between objects based on the missing links to obtain complete links, wherein the complete links are used to represent the flow information of the target product between objects.
[0007] Optionally, the link completion method further includes: determining the point pair information corresponding to at least one point pair to be predicted, wherein the point pair to be predicted corresponds to at least one broken link, and the point pair to be predicted corresponds to objects set in two different sub-chains in the same broken link. The point pair information includes: the point pair to be predicted, the point pair identifier corresponding to the point pair to be predicted, and the correspondence between the point pair to be predicted and the broken link; and constructing a first graph network based on the objects, the association between the objects, and the point pair information corresponding to at least one point pair to be predicted.
[0008] Optionally, the link completion method further includes: obtaining the feature vectors corresponding to different neighbor nodes of the current node and the feature vector corresponding to the target node through the current node in the first graph network, wherein the target node and the current node correspond to the same pair of points to be predicted; determining the feature similarity between different neighbor nodes and the target node based on the feature vectors corresponding to different neighbor nodes and the feature vector corresponding to the target node through the current node; determining the target neighbor node from at least one neighbor node of the current node based on the feature similarity between different neighbor nodes and the target node through the current node, so as to determine at least one message transmission path, wherein the target neighbor node is the node to receive and process the message.
[0009] Optionally, the link completion method further includes: determining the link to which the current node belongs before obtaining the feature vectors corresponding to different neighbor nodes of the current node and the feature vector corresponding to the target node through the current node in the first graph network; if the current node belongs to a broken link, generating a message to be processed through the current node and saving the message to be processed, wherein the message to be processed includes at least one point pair identifier corresponding to the current node and a first target path, the first target path representing the path already transmitted by the message to be processed.
[0010] Optionally, the link completion method further includes: sending the message to be processed to the target neighbor node through the current node; determining whether a second target path exists in the messages already obtained by the target neighbor node through the target neighbor node, wherein the point pair identifier corresponding to the second target path is the same as the point pair identifier in the message to be processed; if a second target path exists, determining the path status of the second target path through the target neighbor node; if the second target path is in an incomplete state, and the starting point of the second target path is different from the starting point of the first target path, then concatenating the second target path and the first target path through the target neighbor node to obtain the completed path, wherein the completed path represents the missing link between objects.
[0011] Optionally, the link completion method further includes: after determining whether a second target path exists in the messages already obtained by the target neighbor node through the target neighbor node, if no second target path exists, updating the first target path through the target neighbor node to obtain a third target path; saving the target point pair identifier and the third target path through the target neighbor node, wherein the target point pair identifier is the identifier of a point pair in the message to be processed that has not been deleted from the set of point pairs to be predicted; if the set of point pairs to be predicted is not empty, determining the next target neighbor node from at least one of the target neighbor node's neighbor nodes based on the feature similarity between nodes through the target neighbor node, wherein the set of point pairs to be predicted consists of the point pair identifiers of at least one point pair to be predicted; and sending the target point pair identifier and the third target path to the next target neighbor node through the target neighbor node.
[0012] Optionally, the link completion method further includes: after obtaining the completed path by concatenating the second target path and the first target path through the target neighbor nodes, obtaining the completed path and the point pair identifiers corresponding to the completed path; based on the correspondence between the point pairs to be predicted and the broken links, selecting the point pair identifiers to be removed from the set of point pairs to be predicted according to the point pair identifiers corresponding to the completed path; deleting the point pair identifiers to be removed from the set of point pairs to be predicted, and updating the set of point pairs to be predicted to obtain the target set of point pairs to be predicted.
[0013] Optionally, the link completion method further includes: before obtaining the feature similarity between objects, constructing a second graph network based on the objects and their corresponding association information, wherein the second graph network has the same structure as the first graph network; performing a random walk in the second graph network to obtain at least one node sequence, wherein the node sequence is used to characterize the connection relationship of some nodes in the second graph network; and determining the feature vector of at least one object based on the at least one node sequence.
[0014] According to another aspect of the embodiments of this application, a link completion method is also provided, comprising: obtaining feature similarity between enterprises that are related to a target product; determining at least one message passing path from a first graph network based on the feature similarity between enterprises, wherein the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with enterprises, edges correspond to transaction relationships between enterprises, and at least one message passing path corresponds to the target neighbor node of a node; transmitting unprocessed messages in the first graph network based on at least one message passing path to determine missing transaction links between enterprises; and completing the broken transaction links between enterprises based on the missing transaction links to obtain complete transaction links, wherein the complete transaction links are used to represent the transaction flow information of the target product between enterprises.
[0015] According to another aspect of the embodiments of this application, a link completion method is also provided, comprising: a cloud server acquiring feature similarity between objects, and determining at least one message transmission path based on feature similarity between nodes in a first graph network, wherein the objects and target products have an association relationship, the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with objects, edges correspond to the association relationship between objects, and at least one message transmission path corresponds to the target neighbor node of a node; the cloud server transmitting messages to be processed in the first graph network based on at least one message transmission path to determine missing links between objects; the cloud server performing link completion on the broken links between objects based on the missing links to obtain a complete link, wherein the complete link is used to represent the flow information of the target product between objects.
[0016] According to another aspect of the embodiments of this application, a link completion method is also provided, comprising: displaying a broken link between objects on a graphical user interface; receiving a link completion instruction to complete the broken link; responding to the link completion instruction and completing the broken link between objects based on the missing link to obtain a complete link, wherein the missing link is determined based on transmitting a message to be processed in a first graph network through at least one message passing path, the at least one message passing path is determined based on the feature similarity between nodes in the first graph network, the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with objects, edges correspond to the association relationship between objects, objects have an association relationship with target products, and at least one message passing path corresponds to the target neighbor node of a node; and displaying the complete link on the graphical user interface, wherein the complete link is used to represent the flow information of the target product between objects.
[0017] According to another aspect of the embodiments of this application, a link completion device is also provided, comprising: an acquisition module, configured to acquire feature similarity between objects and determine at least one message transmission path based on feature similarity between nodes in a first graph network, wherein the objects and target products have an association relationship, the first graph network consists of nodes and edges for connecting nodes, the nodes correspond one-to-one with the objects, the edges correspond to the association relationship between the objects, and the at least one message transmission path corresponds to the target neighbor node of the node; a first processing module, configured to transmit messages to be processed in the first graph network based on at least one message transmission path to determine missing links between objects; and a second processing module, configured to complete the broken links between objects based on the missing links to obtain complete links, wherein the complete links are used to represent the flow information of the target product between the objects.
[0018] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, comprising: a computer program stored in the computer-readable storage medium, wherein the computer program is configured to execute the above-described link completion method at runtime.
[0019] According to another aspect of the embodiments of this application, an electronic device is also provided, the electronic device including one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are configured to run the programs, wherein the programs are configured to execute the above-described link completion method at runtime.
[0020] In this embodiment, a message passing path is determined based on the feature similarity between objects corresponding to nodes, and missing links for completing the link are determined based on the message passing path. By obtaining the feature similarity between objects and based on the feature similarity between nodes in the first graph network, at least one message passing path is determined. Then, messages to be processed in the first graph network are passed based on at least one message passing path to determine missing links between objects. This allows for link completion of broken links between objects, resulting in a complete link. Here, objects and target products have an association relationship. The first graph network consists of nodes and edges connecting nodes. Nodes correspond one-to-one with objects, edges correspond to the association relationships between objects, at least one message passing path corresponds to a node's target neighbor node, and the complete link represents the flow information of the target product between objects.
[0021] In the above process, based on the feature similarity between objects, the probability of association between objects and the relative degree of association can be determined. Therefore, by determining at least one message passing path to deliver the message to be processed to the target neighbor node based on the feature similarity between the nodes corresponding to each object, the message to be processed is not delivered to all neighbor nodes corresponding to the node, thus realizing message / edge pruning in the message passing process. Furthermore, by delivering the message to be processed in the first graph network based on at least one message passing path, the number of messages sent during the link completion process is effectively reduced, thereby reducing memory consumption and time consumption, which in turn facilitates the retrieval of missing links with longer paths and improves the link completion effect.
[0022] Therefore, the solution provided in this application achieves the goal of determining the message passing path based on the feature similarity between the objects corresponding to the nodes, and determining the missing link for link completion based on the message passing path, thereby reducing memory consumption and solving the technical problem of excessive memory consumption in the link completion process of related methods in the prior art. Attached Figure Description
[0023] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0024] Figure 1 This is a schematic diagram of an optional electronic device according to an embodiment of this application;
[0025] Figure 2 This is a flowchart of an optional link completion method according to an embodiment of this application;
[0026] Figure 3 This is a schematic diagram of an optional link completion method according to an embodiment of this application;
[0027] Figure 4 This is a schematic diagram of an optional vectorization model according to an embodiment of this application;
[0028] Figure 5 This is a schematic diagram of an optional graph loading according to an embodiment of this application;
[0029] Figure 6 This is a schematic diagram of an optional missing link determination mechanism according to an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of an optional complete link according to an embodiment of this application;
[0031] Figure 8 This is a schematic diagram of an optional link completion method according to an embodiment of this application;
[0032] Figure 9 This is a schematic diagram of an optional link completion method according to an embodiment of this application;
[0033] Figure 10 This is a schematic diagram of an optional link completion method according to an embodiment of this application;
[0034] Figure 11 This is a schematic diagram of an optional link completion device according to an embodiment of this application;
[0035] Figure 12 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0036] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0037] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0038] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0039] Graph embedding, also known as network representation learning, is a method for mapping graph data (usually high-dimensional dense matrices) to low-dimensional dense vectors.
[0040] Depth walking: a graph embedding method.
[0041] Random walk: a way to move from one node to another on a graph network.
[0042] Example 1
[0043] According to an embodiment of this application, an embodiment of a link completion method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0044] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a link completion method is shown. Figure 1As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0045] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0046] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the link completion method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-mentioned application vulnerability detection method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0047] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0048] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0049] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer device (or mobile device) shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance and is intended to illustrate the types of components that may exist in the aforementioned computer device (or mobile device).
[0050] Under the aforementioned operating environment, this application provides the following: Figure 2 The link completion method shown can be a circulation link of a product between different objects. The circulation link can include the production or manufacturing process of the product and the circulation process of the product in the market. For example, the circulation link of food can include the food processing process and the sales process of food in the market (such as selling from wholesale market A to store B, and then from store B to consumer C).
[0051] Optional, Figure 2 This is a flowchart of an optional link completion method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0052] Step S202: Obtain the feature similarity between objects, and determine at least one message passing path based on the feature similarity between nodes in the first graph network. The objects and target products are associated with each other. The first graph network consists of nodes and edges used to connect the nodes. Nodes correspond one-to-one with objects, and edges correspond to the association between objects. At least one message passing path corresponds to the target neighbor node of the node.
[0053] In step S202, the feature similarity between objects can be obtained through devices such as electronic devices, servers, and application systems. In this embodiment, the aforementioned feature similarity is obtained through a link completion system. The objects mentioned above are associated with the target product. The objects can be individuals (e.g., people who produce, manufacture, or purchase the target product), enterprises (e.g., companies that produce, manufacture, or purchase the target product), or they can represent a group or organization. The target product can be food, electronic products, clothing, virtual items, or other items that have the potential to circulate among multiple objects. The target product can be used to represent all or some products under a certain product type (e.g., milk, short skirts), or it can be used to represent all or some products corresponding to a certain model or batch.
[0054] Furthermore, the relationship between an object and a target product can be determined by the object's involvement in the production or distribution processes of the target product (e.g., distribution, transit, processing, inspection). It can also be determined by the object's involvement in the production / distribution processes of other product types within the target product's corresponding field (e.g., food, clothing), or by the object's involvement in the production / distribution processes of other models or batches of products within the target product's corresponding product type. Feature similarity between objects can characterize the degree of association between them. Higher feature similarity indicates a stronger association, while lower feature similarity indicates a weaker association. Feature similarity between objects can be determined based on their corresponding feature vectors.
[0055] Optionally, the first graph network can be as follows: Figure 7 The tree-like network links shown are provided in this application. The link structure of the first network can be adjusted according to actual needs and is not limited to... Figure 7 The structure shown. Additionally, by... Figure 7 As can be seen, the first graph network consists of nodes and edges. Nodes correspond one-to-one with the aforementioned objects, and edges are used to connect the nodes corresponding to objects with related relationships. The relationship between objects can represent the circulation of the target product, related items used to produce / make the target product, or processed target products between two objects.
[0056] Furthermore, the link completion system can determine at least one message passing path in the first graph network based on the feature similarity between nodes. This message passing path is used by nodes in the first graph network to pass messages to be processed to target neighbor nodes. Target neighbor nodes can then find missing links between objects based on the acquired messages. Since there is a one-to-one correspondence between nodes and objects, the feature similarity between nodes is equivalent to the feature similarity between objects. A missing link is the missing part of a complete link that records the flow information of the target product between objects; that is, a missing link represents part of the flow information of the target product between objects. The aforementioned flow information can include at least one of the flow information of the target product in the production / manufacturing stage or the distribution stage. Preferably, the aforementioned flow information includes the flow information of the target product in both the production / manufacturing stage and the distribution stage.
[0057] It should be noted that, based on the feature similarity between objects, the probability of an association between objects and the relative degree of the association can be determined. Therefore, by determining at least one message passing path to pass the message to be processed to the target neighbor node based on the feature similarity between the nodes corresponding to the objects, the message to be processed is not passed to all the neighbor nodes corresponding to the node, thus realizing message / edge pruning in the process of passing the message to be processed.
[0058] Step S204: Transmit the messages to be processed in the first graph network based on at least one message passing path to determine the missing links between objects.
[0059] In step S204, the link completion system can transmit the message to be processed in the first graph network to the target neighbor node corresponding to the node based on at least one message transmission path through the node in the first graph network. After the target neighbor node processes the message to be processed, it can send the processed message to some of its corresponding neighbor nodes, that is, the next target neighbor node, thereby realizing the transmission of the message to be processed in the first graph network.
[0060] Furthermore, during message transmission, nodes in the first graph network can determine missing links between objects based on the content recorded in at least one message to be processed. The message to be processed can record information such as the broken links to be completed, the objects and related information in the broken links, and the path of the message transmission.
[0061] It should be noted that by transmitting messages to be processed in the first graph network based on at least one message passing path, the number of messages sent during the link completion process is effectively reduced, thus reducing memory consumption and time consumption. This facilitates the retrieval of missing links with longer paths, improving the link completion effect. This avoids the large memory and time consumption caused by sending messages to all neighbor nodes during message passing, which could easily lead to memory overflow when processing graph networks of tens of millions of nodes, resulting in a limited length of retrievable paths for missing links.
[0062] Step S206: Based on the missing links, complete the broken links between objects to obtain complete links, whereby the complete links are used to represent the flow information of the target product between objects.
[0063] In step S206, the link completion system can complete the missing links by supplementing the corresponding broken links, thereby obtaining a complete link. Here, a broken link indicates a link where some flow information is missing.
[0064] It should be noted that by completing the broken links between objects based on missing links, the flow information of the target product between objects can be determined, thereby ensuring the normal operation of business such as product traceability and risk discovery.
[0065] Based on the scheme defined in steps S202 to S206 above, it can be understood that in this embodiment, a method is adopted to determine the message transmission path based on the feature similarity between the objects corresponding to the nodes, and to determine the missing links for completing the link based on the message transmission path. By obtaining the feature similarity between objects and based on the feature similarity between nodes in the first graph network, at least one message transmission path is determined. Then, the message to be processed in the first graph network is transmitted based on at least one message transmission path to determine the missing links between objects. Thus, the broken links between objects are completed based on the missing links to obtain a complete link. Here, the objects and target products have an association relationship. The first graph network consists of nodes and edges for connecting nodes. Nodes correspond one-to-one with objects, edges correspond to the association relationship between objects, at least one message transmission path corresponds to the target neighbor node of a node, and the complete link is used to represent the flow information of the target product between objects.
[0066] It is noteworthy that in the above process, based on the feature similarity between objects, the probability of a relationship between objects and the relative magnitude of that relationship can be determined. Therefore, by determining at least one message passing path to deliver the message to be processed to the target neighbor node based on the feature similarity between the nodes corresponding to each object, the process avoids delivering the message to be processed to all neighbor nodes corresponding to the node, thus achieving message / edge pruning in the message passing process. Furthermore, by passing the message to be processed in the first graph network based on at least one message passing path, the number of messages sent during the link completion process is effectively reduced, thereby reducing memory usage and time consumption, which in turn facilitates the retrieval of missing links with longer paths and improves the link completion effect.
[0067] Therefore, the solution provided in this application achieves the goal of determining the message passing path based on the feature similarity between the objects corresponding to the nodes, and determining the missing link for link completion based on the message passing path, thereby reducing memory consumption and solving the technical problem of excessive memory consumption in the link completion process of related methods in the prior art.
[0068] In one optional embodiment, before obtaining the feature similarity between objects, the link completion system can vectorize the objects based on a deep walk graph embedding technique to obtain feature vectors corresponding to at least one object for calculating the feature similarity between objects. Specifically, the link completion system can construct a second graph network based on the objects and their corresponding association information, and then perform a random walk in the second graph network to obtain at least one node sequence, thereby determining the feature vector of at least one object based on the at least one node sequence. The second graph network has the same structure as the first graph network, and the node sequence is used to represent the connection relationships of some nodes in the second graph network.
[0069] The link completion system can crawl information about the relationships between objects from relevant information platforms, or it can obtain information about the relationships between each object and other objects from each object, which is equivalent to executing... Figure 3 The data aggregation in the process allows the acquired relationship information between objects to be within a preset time range. Furthermore, the second graph network has the same structure as the first graph network, meaning it also includes nodes that correspond one-to-one with the aforementioned objects, and edges connect the nodes corresponding to the related objects.
[0070] Optionally, taking food products as the target product and enterprises as the object, the construction method of the second graph network will be explained. Since goods generate inbound and outbound data at each enterprise they pass through during circulation, the relationship information between enterprises can be determined based on each enterprise's historical inbound and outbound data, i.e., historical transaction information. For example, the link completion system can aggregate transaction data of food enterprises in a target province over the past year to obtain the enterprises' historical transaction information, and determine the relationship information between enterprises based on this information. For example: Enterprise A identification number: **, Enterprise B identification number: **, number of transactions: 5. Then, the link completion system can construct a second graph network based on the aforementioned information. In the second graph network, the edges are generated by product transaction behavior. For example, if Enterprise A sells a product to Enterprise B, a directed edge will be generated from the node corresponding to Enterprise A to the node corresponding to Enterprise B. If the number of transactions between Enterprise A and Enterprise B is multiple, the weight of the edge between the node corresponding to Enterprise A and the node corresponding to Enterprise B is strengthened. Thus, after determining all edges in the graph based on the enterprises' historical transaction information, the construction of the second graph network can be achieved.
[0071] Furthermore, such as Figure 3 As shown, after obtaining the second graph network, a random walk can be used to determine a node in the second graph network as the starting point, and then a neighboring node corresponding to the starting point can be randomly selected. Move to the neighboring node, and then take the moved node as the starting point and continue to move. Repeat the above process until the number of random walk steps meets the preset condition. Thus, the sequence of randomly selected nodes constitutes a random walk process on the graph, and a local commodity circulation sequence, that is, a node sequence, is obtained on the second graph network.
[0072] In this approach, multiple nodes in the second graph network can be used as starting points for random walks, resulting in multiple node sequences. Preferably, each node in the second graph network can be used as a starting point for a random walk, resulting in a node sequence with the same number of nodes as the second graph network. For example, the node sequence could be "11, 22, 33, 44, 55, 66, 77, 88, 99", where each number represents the identification number of each object, i.e., the object identifier.
[0073] Furthermore, such as Figure 3 As shown, after determining the node sequence, word vectorization techniques can be used to vectorize the objects corresponding to the nodes flowing through the sequence. Specifically, the link completion system can employ word vectorization techniques such as... Figure 4The computational language model skip-gram shown learns the vector representation of nodes. By simulating the nodes in the second graph network as words in a language model and the node sequence as a sentence in a language, all node sequences are then used as input to the computational language model skip-gram to obtain the feature vector of at least one object, preferably, the feature vector of each object. For example, the vector corresponding to "Company A Identification Number: **" is "0.89, 0.93, 0.91 - 0.21, 1.21, -0.45, 0.03, -0.89, -0.66, 0.33".
[0074] It should be noted that by using graph embedding technology based on depth walks, and employing random walk algorithms and word vectorization algorithms, objects in the second graph network are vectorized. This allows the network's hidden information to be learned, and nodes in the graph are represented as vectors containing potential information. As a result, the high-dimensional vectors of enterprises corresponding to nodes that are highly correlated (e.g., have high transaction frequency) and close to each other on the same graph network are similar, which facilitates the quantitative assessment of the possibility of correlation between objects.
[0075] In an optional embodiment, before determining at least one message passing path based on the feature similarity between nodes in the first graph network, the link completion system can construct the first graph network using an offline graph computation engine. Specifically, the link completion system can determine the point pair information corresponding to at least one point pair to be predicted, thereby constructing the first graph network based on objects, the relationships between objects, and the point pair information corresponding to at least one point pair to be predicted. Here, the point pair to be predicted corresponds to at least one broken link, and the point pair to be predicted corresponds to objects located in two different sub-chains within the same broken link. The point pair information includes: the point pair to be predicted, the point pair identifier corresponding to the point pair to be predicted, and the correspondence between the point pair to be predicted and the broken link.
[0076] Optional, such as Figure 3 As shown, the link completion system can use a custom aggregation function (UDAF) to detect broken links, filter out broken links, objects within broken links, and the relationships between objects, and determine the predicted point pairs and point pair information corresponding to the missing links to be found based on the broken links, objects within broken links, and the relationships between objects. Preferably, in this embodiment, the target product is used to represent all products corresponding to a certain batch, that is, the circulation information of products in the same batch between objects corresponding to each link.
[0077] Specifically, taking food products as the target product and enterprises as the object, the method for determining the predicted point pairs and their information will be explained. First, a custom aggregation function UDAF is used to detect broken links, filtering out batches and enterprises with broken links and their transaction information. Then, if the broken link corresponding to a certain batch is divided into two sub-links, one sub-link is "Enterprise A - Enterprise B - Enterprise C", and the other sub-link is "Enterprise E - Enterprise F", since the missing part of the broken link is unknown (i.e., the endpoint corresponding to the missing link is unknown), the enterprises in the two sub-links can be paired to obtain multiple predicted point pairs, such as: "Enterprise A - Enterprise E", "Enterprise A - Enterprise F", "Enterprise B - Enterprise E", "Enterprise B - Enterprise F", "Enterprise C - Enterprise E", and "Enterprise C - Enterprise F".
[0078] Furthermore, the link completion system can determine the point pair identifier and point pair affiliation corresponding to each point pair to be predicted. The point pair affiliation characterizes the correspondence between the point pair to be predicted and the broken link, thereby obtaining the point pair information corresponding to the point pair to be predicted, for example:
[0079] Point-to-point identifier: 1;
[0080] Company A Identification Number: ***;
[0081] Enterprise E-identification number: ***;
[0082] Point pair affiliation: aa:1, bb:2, cc:3, dd:4, ee:5
[0083] In this context, "aa", "bb", "cc", "dd", and "ee" in the point pair attribution indicate the link identifier of the broken link corresponding to the point pair to be predicted. Since the same enterprise may exist in the links corresponding to different batches of goods, the same point pair to be predicted may exist in the broken links corresponding to different batches of broken links. Furthermore, the "1", "2", "3", "4", and "5" in the point pair attribution are used to indicate the correspondence between the point pair to be predicted and the sub-chains in the broken link. For example, when there are more than two sub-chains in the same broken link, and sub-chain 1 is "Company A-Company B-Company C", sub-chain 2 is "Company E-Company F", and sub-chain 3 is "Company H-Company I", then the combination of sub-chain 1 and sub-chain 2 can be regarded as combination 1 in the broken link, the combination of sub-chain 1 and sub-chain 3 can be regarded as combination 2 in the broken link, and the combination of sub-chain 2 and sub-chain 3 can be regarded as combination 3 in the broken link. When the enterprise in the point pair to be predicted comes from the two sub-chains in combination 1, "1" is displayed after the corresponding link identifier in the point pair attribution, thereby realizing the determination of the correspondence between the point pair to be predicted and the broken link, as well as the correspondence between the point pair to be predicted and the sub-chains in the broken link.
[0084] Optional, such as Figure 5 As shown, after determining the point pair information corresponding to at least one point pair to be predicted, the link completion system can use an offline graph computation engine (e.g., ODPS GRAPH) to construct nodes and edges in the first graph network based on objects, the relationships between objects, and the point pair information corresponding to at least one point pair to be predicted, and determine the attributes corresponding to the nodes and edges. Specifically, the offline graph computation engine uses a graph network for modeling. The points and edges in the first graph network contain weights. During the graph loading process for the first graph network, a graph loading (GraphLoader) class, a node creation (Vertex) class, and a node reduction (LoadingVertexResolver) class need to be implemented to realize the creation of nodes and edges and resolve the conflict of repeated loading of points and edges, thereby completing the loading of the first graph network.
[0085] It should be noted that by constructing a first graph network based on objects, the relationships between objects, and the point pair information corresponding to at least one point pair to be predicted, the relevant information of the missing link to be found can be embedded in the first graph network, thereby improving the efficiency and accuracy of missing link retrieval.
[0086] In one alternative embodiment, such as Figure 3 As shown, once the first graph network is determined, the link completion system can iteratively edit and evolve the first graph network to identify missing links. During the graph iteration process, to find missing links more quickly, the two nodes in the predicted point pair simultaneously send messages to their target neighbor nodes until the paths originating from each node meet at a node between them. At this point, message sending stops, and the point pair ID and corresponding path are saved as the corresponding missing link. Specifically, the iterative process of the first graph network is explained in detail.
[0087] Before the graph iteration begins, the link completion system can also implement an Aggregator class. This class takes the previously obtained feature vectors corresponding to the objects and the correspondence between the sub-chains in the broken links and the points to be predicted as external resource inputs, which can be called as global variables during the iteration process. The Aggregator is used at least to aggregate and process global information.
[0088] Optionally, during graph iteration, such as Figure 6As shown, when the superstep is 0, i.e., at the beginning of the iteration, nodes belonging to broken links in the first graph network are processed first. Specifically, the link completion system can determine the link to which the current node belongs. If the current node belongs to a broken link, a message to be processed is generated and saved through the current node. The message to be processed includes at least one point pair identifier corresponding to the current node and a first target path, which represents the path already passed by the message to be processed. The superstep number represents the number of iterations.
[0089] Specifically, when the superstep is 0, all nodes in the first graph network are traversed. The link completion system can determine whether the object corresponding to the current node belongs to a broken link based on the attributes of the current node. If the object corresponding to the current node belongs to a broken link, the system can save the first target path starting from the current node. The first target path represents the already transmitted path of the message to be processed. The system then generates the message to be processed based on the first target path and at least one point pair identifier corresponding to the current node. The at least one point pair identifier corresponding to the current node indicates that the current node is a node in the point pair to be predicted corresponding to that point pair identifier.
[0090] Optionally, when the superstep is greater than 0, such as Figure 6 As shown, the link completion system can traverse all nodes in the first graph network and determine the halt value of each node and whether the node has received a pending message sent to it in the previous superstep based on the node's attributes. The halt value indicates whether the current node is in a terminated or non-terminated state. When the halt value is false, the node is determined to be in a non-terminated state; when the halt value is true, the node is determined to be in a terminated state. If a node is in a non-terminated state or has received a pending message sent to it in the previous superstep, the link completion system can execute a compute method on that node to enable it to process the received pending message.
[0091] It should be noted that by generating pending messages through the current node belonging to the broken link, the two nodes in the pair of points to be predicted can simultaneously send pending messages to their surroundings in the first round of iteration, thereby improving the efficiency of finding missing links.
[0092] In one optional embodiment, after generating the message to be processed, the link completion system can determine at least one message transmission path for transmitting the message to be processed through the nodes in the first graph network. Specifically, the link completion system can obtain the feature vectors corresponding to the different neighbor nodes of the current node and the feature vector corresponding to the target node through the current node in the first graph network. Then, based on the feature vectors corresponding to the different neighbor nodes and the feature vector corresponding to the target node, the system determines the feature similarity between the different neighbor nodes and the target node. Thus, based on the feature similarity between the different neighbor nodes and the target node, the system determines the target neighbor node from at least one of the current node's neighbor nodes to determine at least one message transmission path. The target node and the current node correspond to the same pair of points to be predicted, and the target neighbor node is the node that is to receive the message to be processed.
[0093] Optionally, when the superstep is 0, if a message to be processed is generated in the current node, the current node obtains the feature vectors corresponding to all its neighboring nodes, as well as the feature vector of the other node in all the pairs of points to be predicted corresponding to the current node, which is also the feature vector of the target node.
[0094] Optionally, when the superstep is greater than 0, if the current node receives a message to be processed sent to it by the previous superstep, the current node obtains the feature vectors corresponding to all its neighboring nodes, as well as the feature vector of the other node in all pairs of points to be predicted corresponding to the current node. Specifically, the superstep can be incremented by 1 after all messages to be processed have been passed once in the first graph network.
[0095] Then, the current node can calculate the cosine of the angle between the feature vector corresponding to each neighbor node and the feature vector corresponding to each target node. The larger the cosine of the angle, the higher the feature similarity between the neighbor node and the target node.
[0096] Furthermore, the current node can sort multiple feature similarities corresponding to each target node from high to low, and select the top N neighbor nodes with the highest feature similarity to each target node as target neighbor nodes, thereby determining the message transmission path. In this embodiment, the top 10 neighbor nodes with the highest feature similarity to each target node can be selected as target neighbor nodes.
[0097] It should be noted that since the enterprises corresponding to nodes that are highly correlated (e.g., have high transaction frequency) and close to each other on the same graph network also have similar high-dimensional vectors after vectorization, the feature similarity between nodes can be determined based on the feature vectors of the nodes, thus realizing a quantitative assessment of the possibility of correlation between objects. This facilitates the accurate prediction of the path of the broken link, thereby effectively pruning messages / edges while ensuring the recall effect of missing links. As a result, this application can effectively improve the scale of the graph network that can be processed and the length of the recalled path, and can recall missing paths of more than 5 hops in batches on tens of millions of data, covering most broken link situations.
[0098] In one optional embodiment, after determining the message transmission path, the link completion system can determine whether a missing link has been found through the target neighbor node. Specifically, the link completion system can send the message to be processed to the target neighbor node through the current node, and then determine whether a second target path exists in the messages already obtained by the target neighbor node. If a second target path exists, the path status of the second target path is determined through the target neighbor node. If the second target path is in an incomplete state, and the starting point of the second target path is different from the starting point of the first target path, the second target path and the first target path are concatenated through the target neighbor node to obtain the completed path. Here, the completed path represents the missing link between objects, and the point pair identifier corresponding to the second target path is the same as the point pair identifier in the message to be processed.
[0099] Optional, such as Figure 6 As shown, the current node can send the message to be processed to the target neighbor node, and set the halt value of the current node to the end state after sending the message.
[0100] Optionally, after the target neighbor node receives the message to be processed, it can first determine whether the point pair identifiers in the message to be processed are in the set of point pairs to be predicted. The set of point pairs to be predicted consists of the point pair identifiers of at least one point pair to be predicted. It should be noted that when the message to be processed is transmitted for the first time, the set of point pairs to be predicted consists of the point pair identifiers of all point pairs to be predicted. Subsequently, if a point pair to be predicted with a missing link is found, the point pair identifiers corresponding to the point pair to be predicted with the missing link will be removed from the set of point pairs to be predicted. Therefore, the correctness of the point pair identifiers in the message to be processed can be determined based on the set of point pairs to be predicted.
[0101] Furthermore, the target neighbor node can determine whether the point pair identifier in the message to be processed exists in the path stored by the target neighbor node. Specifically, when the target neighbor node has obtained a second target path in the message, that is, when there is a path corresponding to the point pair identifier in the message to be processed, it determines that the point pair identifier in the message to be processed exists in the path stored by the target neighbor node.
[0102] Furthermore, if the point pair identifiers in the message to be processed exist in the path stored by the target neighbor node, that is, if a second target path exists, the target neighbor node can determine whether the second target path is a confirmed missing link. For example, when both nodes corresponding to the point pair identifiers in the message to be processed exist in the second target path, it can be determined that the second target path is a confirmed missing link, that is, the second target path is in a completed state. Conversely, if neither of the two nodes corresponding to the point pair identifiers in the message to be processed exists in the second target path, it can be determined that the second target path has not been determined to be a missing link, that is, the second target path is in an incomplete state.
[0103] Furthermore, if the second target path is incomplete, it is determined whether the starting point of the second target path is the same as the starting point of the first target path. The starting point of a path represents the first sending node of the message to be processed corresponding to that path. If the starting point of the second target path is different from the starting point of the first target path, it is determined that the messages to be processed corresponding to the second target path and the messages to be processed corresponding to the first target path originate from different nodes in the same pair of points to be predicted, thus confirming that a missing link has been found. Then, the target neighbor node can concatenate the second target path and the first target path to obtain the completed path. For example, if the target neighbor node corresponds to enterprise O, the first target path is "enterprise A-enterprise P", the second target path is "enterprise E-enterprise Q", and both the first and second target paths correspond to the pair of points to be predicted, "enterprise A-enterprise E", since the two paths meet at the node corresponding to enterprise O, the completed path obtained by the target neighbor node concatenating the second target path and the first target path is "enterprise A-enterprise P-enterprise O-enterprise Q-enterprise E", thereby confirming the missing link.
[0104] Optionally, after the completed path is obtained by splicing, the point pair identifiers corresponding to the second target path can be removed from the set of point pairs to be predicted by using the target neighbor nodes, and the relevant aggregation function context.aggregate() can be called to collect the completed path and the corresponding point pair identifiers.
[0105] It should be noted that by determining whether a second target path exists among the target neighbor nodes, and judging the path and starting point of the second target path, the missing link can be effectively found and determined, thereby improving the accuracy of missing links.
[0106] In one optional embodiment, the link completion system can save the identifiers of point pairs for which no corresponding missing link is found, so as to facilitate the next message transmission. Specifically, if no second target path exists, the link completion system can update the first target path through the target neighbor node to obtain the third target path. Then, through the target neighbor node, it saves the target point pair identifier and the third target path. Subsequently, if the set of point pairs to be predicted is not empty, it determines the next target neighbor node from at least one of the target neighbor node's neighbor nodes based on the feature similarity between nodes, and then sends the target point pair identifier and the third target path to the next target neighbor node. Here, the target point pair identifier is the identifier of a point pair in the message to be processed that has not been deleted from the set of point pairs to be predicted, and the set of point pairs to be predicted consists of the identifiers of at least one point pair to be predicted.
[0107] Optionally, if the target neighbor node determines that a certain point pair identifier in the message to be processed does not exist in the path stored by the target neighbor node, that is, there is no second target path corresponding to the point pair identifier, the target neighbor node can save the point pair identifier, update the first target path corresponding to the point pair identifier to obtain a third target path, and save the third target path. Specifically, if the target neighbor node corresponds to enterprise O, and the first target path is "enterprise A-enterprise P", then the updated third target path is "enterprise A-enterprise P-enterprise O".
[0108] Furthermore, the determination can be made by checking whether the set of point pairs to be predicted is empty. If the set of point pairs to be predicted is not empty, then the next target neighbor node to be received is determined from at least one of the target neighbor nodes based on the feature similarity between at least one of the target neighbor nodes and the target node corresponding to the target neighbor node. The method for determining feature similarity and the method for selecting at least one of the target neighbor nodes are the same as those described above, so they will not be repeated here. Conversely, if the set of point pairs to be predicted is empty, it means that all missing links corresponding to the point pairs to be predicted have been retrieved.
[0109] Furthermore, the target neighbor node can send the point pair identifiers and updated paths that are still retained in the previously received pending messages to the next target neighbor node, that is, send the aforementioned target point pair identifiers and third target paths to the next target neighbor node to achieve the next round of iteration.
[0110] Furthermore, when the next target neighbor node receives a new message to be processed, it can obtain the aggregated result value based on the Aggregator mechanism from the previous iteration of its current iteration, and determine the missing links in its current iteration based on the result value. The aforementioned result value includes at least the feature vector corresponding to the object and the set of point pairs to be predicted.
[0111] It should be noted that by updating the path when no missing link corresponding to the point pair identifier is found, and sending the point pair identifier and the updated path to the next target neighbor node, the message is continuously transmitted. During the transmission process, the association direction is predicted by the feature similarity between nodes, and message / edge pruning is performed, thereby achieving a better recall effect for missing links.
[0112] In one optional embodiment, the process by which the link completion system, after determining the completion path, implements path recall and updates the set of points to be predicted based on the Aggregator mechanism in the first graph network is described. Specifically, as follows... Figure 6 As shown, the link completion system can obtain the completion path (equivalent to...). Figure 6 The missing links in the path and the point pair identifiers corresponding to the completion path are then used. Based on the correspondence between the point pairs to be predicted and the broken links, the point pair identifiers to be removed are selected from the set of point pairs to be predicted according to the point pair identifiers corresponding to the completion path. Thus, the point pair identifiers to be removed are deleted from the set of point pairs to be predicted, and the set of point pairs to be predicted is updated to obtain the target set of point pairs to be predicted.
[0113] Optionally, the link completion system can be based on the Aggregator mechanism in the first graph network, using the aggregate function to collect the recalled completion paths and corresponding point pair identifiers. For example, the recalled completion paths are: point pair identifier: 1, completion path: 11, 22, 33, 44, 55, 66, where "11", "22", "33", "44", and "55" represent the identification number corresponding to each object.
[0114] Furthermore, the link completion system can, based on the Aggregator mechanism in the first graph network, identify the point pairs to be removed from the set of point pairs to be predicted by using the correspondence between the point pairs to be predicted and the broken links, according to the point pair identifiers corresponding to the completion path. For example, if the predicted point pairs corresponding to the first broken link are "Company A-Company E" and "Company B-Company C", the predicted point pairs corresponding to the second broken link are "Company A-Company E", and the predicted point pairs corresponding to the third broken link are "Company B-Company C", then when the completion path corresponding to the predicted point pair "Company A-Company E" is determined, that is, when the broken link corresponding to the predicted point pair "Company A-Company E" is found, the first and second broken links corresponding to the predicted point pair "Company A-Company E" can be determined to be completed based on the point pair identifiers corresponding to the completion path of the predicted point pair "Company A-Company E". In the first broken link, other predicted point pairs besides the predicted point pair "Company A-Company E" do not need to find corresponding completion paths to complete the first broken link. That is, the predicted point pair "Company B-Company C" does not need to find corresponding completion paths to complete the first broken link. Meanwhile, since the third broken link also corresponds to the point pair "Enterprise B-Enterprise C" to be predicted, if the third broken link is also completed by the completion path corresponding to other point pairs with predictions, then the point pair "Enterprise B-Enterprise C" to be predicted is determined to be a point pair to be removed, and its point pair identifier can be deleted from the set of point pairs to be predicted.
[0115] Furthermore, the link completion system can identify the pairs of points to be removed from the set of points to be predicted based on the correspondence between sub-chains in a broken link and the pairs of points to be predicted. Specifically, taking the first, second, and third broken links as examples, if the point pair to be predicted, "Company A - Company E," corresponds to sub-chain number 1 in the first broken link, then when the completion path corresponding to the point pair to be predicted, "Company A - Company E," is determined, it can be determined that sub-chain number 1 in the first broken link corresponding to "Company A - Company E" has been completed, while other sub-chain numbers have not yet been completed. Therefore, other point pairs to be predicted, except for the point pair to be predicted, corresponding to sub-chain number 1 in the first broken link, do not need to find corresponding completion paths to complete sub-chain number 1, and the other point pairs to be predicted, corresponding to other sub-chain numbers in the first broken link, cannot be considered as point pairs to be removed.
[0116] Optional, such as Figure 6As shown, the link completion system can, based on the Aggregator mechanism in the first graph network, use the completion path recalled in each round to filter out the identifiers of the point pairs to be removed from the set of point pairs to be predicted. Furthermore, after all nodes in the current round have completed processing the messages to be processed, the system can aggregate the result values determined from multiple worker modules (i.e., the Aggregator mechanism) through the merge function. Figure 6 The system performs a global aggregation (in the graph), and then executes the termination function to check for convergence. If the `terminate` function returns true after execution, convergence is considered achieved, and the iteration stops. Otherwise, if the iteration continues, the link completion system can distribute the aggregated results to all workers using the offline graph computation engine for relevant nodes in the next iteration. The aforementioned workers are job modules created by the link completion system through the offline graph computation engine, used to perform relevant calculations in the first graph network, at least to execute the Aggregator mechanism.
[0117] Optional, such as Figure 6 As shown, if the maximum number of iterations is reached, or if all nodes in the first graph network are in the terminated state, the iteration will also stop. At this time, the link completion system can use the terminate method of the Aggregator mechanism to write the saved path into the output table for relevant users to obtain.
[0118] It should be noted that by based on the correspondence between the predicted point pairs and the broken links, and according to the point pair identifiers corresponding to the completion path, the point pair identifiers to be removed are selected from the set of predicted point pairs. This effectively reduces the content of the message to be processed in the message to be processed, thereby further reducing the memory and time consumption, and thus effectively improving the scale of the graph network that can be processed and the length of the recalled completion path.
[0119] In one alternative embodiment, such as Figure 3 As shown, relevant users can select the category code and batch number corresponding to the target product to query the broken link and the complete link after repair for the target product, in order to verify the results. The query results can be displayed as follows: Figure 7 As shown, in Figure 7 In the diagram, the thick edges represent the original data, i.e., broken links, and the thin edges represent the supplementary data, i.e., missing links. Figure 7 As can be seen, the missing link in the recall connects the first sub-link and the second sub-link in the broken link, thus completing the link.
[0120] It should be noted that this application extracts feature vectors from objects based on the large-scale relationships between objects, and constructs deep learning and neural network models. Using graph embedding technology, each object is vectorized, thereby predicting the direction of missing paths based on the feature similarity between the nodes corresponding to the objects, pruning edges, and thus being able to recall missing links in batches on large-scale graph data and complete broken links.
[0121] Therefore, the solution provided in this application achieves the goal of determining the message passing path based on the feature similarity between the objects corresponding to the nodes, and determining the missing link for link completion based on the message passing path, thereby reducing memory consumption and solving the technical problem of excessive memory consumption in the link completion process of related methods in the prior art.
[0122] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that the link completion method according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0124] Example 2
[0125] This application also provides, as follows: Figure 8 The link completion method shown includes the following steps:
[0126] Step S802: Obtain the feature similarity between companies that are related to the target product.
[0127] In step S802, the feature similarity between enterprises can be obtained through devices such as electronic devices, servers, and application systems. In this embodiment, the aforementioned feature similarity is obtained through a link completion system. The target product can be an item that has the potential to circulate among multiple enterprises, such as food, electronic products, clothing, or virtual items. The target product can be used to represent all or some products under a certain product type (e.g., milk, short skirts), or it can be used to represent all or some products corresponding to a certain model or batch. The criteria for determining the association between an enterprise and the target product can be that the enterprise participated in the production process of the target product, the enterprise participated in the circulation process of the target product (e.g., distribution, transit, processing, inspection), or the enterprise participated in the production / circulation process of other product types in the field corresponding to the target product (e.g., food field, clothing field), or the enterprise participated in the production / circulation process of other models or batches of products in the product type corresponding to the target product. The similarity of features between firms can characterize the likelihood of transactions between them. Higher feature similarity indicates a higher probability of transactions involving the same target product, while lower feature similarity indicates a lower probability. The similarity of features between firms can be determined based on the transaction feature vectors corresponding to each firm.
[0128] Step S804: Based on the feature similarity between enterprises, determine at least one message passing path from the first graph network, wherein the first graph network consists of nodes and edges for connecting nodes, each node corresponds to an enterprise, the edges correspond to the transaction relationship between enterprises, and at least one message passing path corresponds to the target neighbor node of the node.
[0129] In step S804, the first graph network includes nodes that correspond one-to-one with the aforementioned enterprises, and the nodes corresponding to the enterprises with related relationships are connected by edges. The relationship between enterprises can represent that the two enterprises have traded the target product, traded related items used to produce / manufacture the target product, or traded the processed target product.
[0130] Furthermore, the link completion system can determine at least one message passing path in the first graph network based on the feature similarity between nodes. This message passing path is used by nodes in the first graph network to pass messages to be processed to target neighbor nodes. Target neighbor nodes can then search for missing links between objects based on the acquired messages. Here, a missing link is a missing portion of a complete link recording transaction and circulation information of the target product between enterprises; that is, a missing link represents a portion of the transaction and circulation information of the target product between enterprises. The aforementioned transaction and circulation information can include at least one of the transaction and circulation information of the target product in the production / manufacturing stage or the circulation stage. Preferably, the aforementioned circulation information includes transaction and circulation information of the target product in both the production / manufacturing stage and the circulation stage.
[0131] It should be noted that, based on the feature similarity between enterprises, the probability of transactions between enterprises corresponding to the same target product can be determined. Therefore, by determining at least one message passing path to pass the message to be processed to the target neighbor node according to the feature similarity between the nodes corresponding to each enterprise, the message to be processed is not passed to all the neighbor nodes corresponding to the node, thus realizing the pruning of upstream and downstream enterprises (neighbor nodes).
[0132] Step S806: Transmit the messages to be processed in the first graph network based on at least one message passing path to determine the missing transaction links between enterprises.
[0133] In step S806, the link completion system can transmit the message to be processed in the first graph network to the target neighbor node corresponding to the node based on at least one message transmission path through the node in the first graph network. After the target neighbor node processes the message to be processed, it can send the processed message to some of its corresponding neighbor nodes, i.e., the next target neighbor node, thereby realizing the transmission of the message to be processed in the first graph network and thus determining the missing link between objects.
[0134] Step S808: Based on the missing transaction links, complete the broken transaction links between enterprises to obtain complete transaction links, whereby the complete transaction links are used to represent the transaction flow information of the target product between enterprises.
[0135] In step S808, the link completion system can complete the missing links by supplementing the corresponding broken links, thereby obtaining a complete link. Here, a broken link indicates a link where some transaction flow information is missing.
[0136] Based on the scheme defined in steps S802 to S808 above, it can be understood that in this embodiment, a method is adopted to determine the message transmission path based on the feature similarity between the enterprises corresponding to the nodes, and to determine the missing links for completing the link based on the message transmission path. By obtaining the feature similarity between enterprises that are related to the target product, and then determining at least one message transmission path from the first graph network based on the feature similarity between enterprises, and transmitting the message to be processed in the first graph network based on the at least one message transmission path, the missing transaction links between enterprises are determined, and the broken transaction links between enterprises are completed based on the missing transaction links to obtain a complete transaction link. The first graph network consists of nodes and edges for connecting nodes. Nodes correspond one-to-one with enterprises, edges correspond to the transaction relationships between enterprises, at least one message transmission path corresponds to the target neighbor node of a node, and the complete transaction link is used to represent the transaction flow information of the target product between enterprises.
[0137] It is noteworthy that in the above process, based on the feature similarity between enterprises, the probability of transactions between enterprises corresponding to the same target product can be determined. Therefore, by determining at least one message passing path to deliver the message to be processed to the target neighbor node based on the feature similarity between the nodes corresponding to each enterprise, the process avoids delivering the message to all neighbor nodes corresponding to the node, thus achieving pruning of upstream and downstream enterprises (neighbor nodes). Furthermore, by delivering the message to be processed in the first graph network based on at least one message passing path, the amount of messages sent during the link completion process is effectively reduced, thereby reducing memory usage and time consumption, which in turn facilitates the recall of missing links with longer paths and improves the link completion effect.
[0138] Therefore, the solution provided in this application achieves the goal of determining the message transmission path based on the feature similarity between the enterprises corresponding to the nodes, and determining the missing link for link completion based on the message transmission path, thereby reducing memory consumption and solving the technical problem of excessive memory consumption in the link completion process of related methods in the prior art.
[0139] Furthermore, it should be noted that in this embodiment, the process of determining the missing link by the link completion system has been described in Embodiment 1, and will not be repeated here.
[0140] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that the link completion method according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0142] Example 3
[0143] This application also provides, as follows: Figure 9 The link completion method shown in this embodiment can be implemented by a cloud server using the solution provided in this embodiment. Figure 9 This is a schematic diagram of an optional link completion method according to an embodiment of this application, such as... Figure 9 As shown, the method includes the following steps:
[0144] Step S902: The cloud server obtains the feature similarity between objects and determines at least one message passing path based on the feature similarity between nodes in the first graph network. The objects and target products are associated with each other. The first graph network consists of nodes and edges used to connect the nodes. Nodes correspond one-to-one with objects, and edges correspond to the association between objects. At least one message passing path corresponds to the target neighbor node of the node.
[0145] Optionally, when a local system has a link completion requirement, it can send a link completion command to the cloud server, which will then determine the feature similarity between the objects based on their corresponding feature vectors. Feature similarity between objects characterizes the degree of association between them; higher feature similarity indicates a stronger association, while lower feature similarity indicates a weaker association.
[0146] Furthermore, the cloud server constructs the first graph network. The first graph network includes nodes that correspond one-to-one with the aforementioned objects, and the nodes corresponding to objects with relationships are connected by edges. The relationships between objects can represent the circulation of the target product between two objects, the circulation of related items used to produce / manufacture the target product, or the circulation of the processed target product.
[0147] Furthermore, the cloud server can determine at least one message passing path in the first graph network based on the feature similarity between nodes. This message passing path is used by nodes in the first graph network to pass messages to be processed to target neighbor nodes among their neighboring nodes. Target neighbor nodes can then use the obtained messages to find missing links between objects. Since there is a one-to-one correspondence between nodes and objects, the feature similarity between nodes is equivalent to the feature similarity between objects. A missing link is a missing portion of a complete link that records the flow information of the target product between objects; that is, a missing link represents part of the flow information of the target product between objects. The aforementioned flow information can include at least one of the flow information of the target product in the production / manufacturing stage or the distribution stage. Preferably, the aforementioned flow information includes the flow information of the target product in both the production / manufacturing stage and the distribution stage.
[0148] It should be noted that based on the feature similarity between objects, the probability of a relationship between objects and the relative degree of that relationship can be determined. Therefore, by determining at least one message passing path to deliver the message to be processed to the target neighbor node based on the feature similarity between the nodes corresponding to each object, the process avoids delivering the message to all neighbor nodes corresponding to the node, thus achieving message / edge pruning in the message passing process. Furthermore, performing the above process on a cloud server can effectively avoid resource consumption on the local system.
[0149] Step S904: The cloud server transmits the messages to be processed in the first graph network based on at least one message passing path to determine the missing links between objects.
[0150] In step S904, the cloud server can use nodes in the first graph network to transmit messages to be processed in the first graph network to the target neighbor nodes corresponding to the nodes based on at least one message transmission path. After the target neighbor nodes process the messages to be processed, they can send the processed messages to some of their corresponding neighbor nodes, i.e., the next target neighbor nodes, thereby realizing the transmission of messages to be processed in the first graph network and thus determining the missing links between objects.
[0151] It should be noted that by transmitting messages to be processed in the first graph network based on at least one message passing path, the number of messages sent during the link completion process is effectively reduced, thus reducing memory consumption and time consumption. This facilitates the retrieval of missing links with longer paths, improving the link completion effect. This avoids the large memory and time consumption caused by sending messages to all neighbor nodes during message passing, which could easily lead to memory overflow when processing graph networks of tens of millions of nodes, resulting in a limited length of retrievable paths for missing links. Furthermore, performing the above process on a cloud server effectively avoids resource consumption on the local system.
[0152] Step S906: The cloud server completes the broken links between objects based on the missing links to obtain complete links, where the complete links are used to represent the flow information of the target product between objects.
[0153] In step S906, the cloud server can complete the missing links by filling in the gaps, thus obtaining a complete link. A missing link indicates a link where some flow information is missing. After obtaining the complete link, the cloud server can send it back to the relevant local systems for them to access.
[0154] Based on the scheme defined in steps S902 to S906 above, it can be understood that in this embodiment, a message transmission path is determined based on the feature similarity between objects corresponding to nodes, and a missing link for completing the link is determined based on the message transmission path. The feature similarity between objects is obtained through a cloud server, and at least one message transmission path is determined based on the feature similarity between nodes in the first graph network. Then, the cloud server transmits the messages to be processed in the first graph network based on at least one message transmission path to determine the missing links between objects. The cloud server then completes the broken links between objects based on the missing links to obtain a complete link. Here, objects and target products have an association relationship. The first graph network consists of nodes and edges connecting nodes. Nodes and objects correspond one-to-one, edges correspond to the association relationship between objects, at least one message transmission path corresponds to the target neighbor node of a node, and the complete link is used to represent the flow information of the target product between objects.
[0155] It is noteworthy that implementing the above steps using a cloud server effectively avoids consuming local system resources. Furthermore, based on the feature similarity between objects, the probability of association between objects and the relative strength of that association can be determined. Therefore, by determining at least one message passing path to deliver the message to be processed to the target neighbor node based on the feature similarity between the nodes corresponding to each object, it avoids delivering the message to all neighbor nodes corresponding to the node, thus achieving message / edge pruning during the message passing process. Further, by transmitting the message to be processed in the first graph network based on at least one message passing path, the number of messages sent during link completion is effectively reduced, thereby reducing memory consumption and time consumption, facilitating the retrieval of longer missing links, and improving the link completion effect.
[0156] Therefore, the solution provided in this application achieves the goal of determining the message passing path based on the feature similarity between the objects corresponding to the nodes, and determining the missing link for link completion based on the message passing path, thereby reducing memory consumption and solving the technical problem of excessive memory consumption in the link completion process of related methods in the prior art.
[0157] Furthermore, it should be noted that the process of determining the missing link by the cloud server in this embodiment has been described in Embodiment 1 and will not be repeated here.
[0158] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0159] Through the above description of the embodiments, those skilled in the art can clearly understand that the link completion method according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0160] Example 4
[0161] This application also provides, as follows: Figure 10 The link completion method shown includes the following steps:
[0162] Step S1002: Display the broken links between objects on the graphical user interface.
[0163] In step S1002, the client is the execution subject of the method provided in this embodiment. In the client's graphical user interface, the broken links between objects can be displayed in the form of pictures or text.
[0164] Step S1004: Receive a link completion command to complete the broken link.
[0165] In step S1004, the client can receive a link completion instruction from the relevant user to complete the broken link, so as to start the search for the missing link.
[0166] Step S1006: Respond to the link completion instruction, complete the broken links between objects based on the missing links to obtain complete links. The missing links are determined based on the transmission of messages to be processed in the first graph network through at least one message passing path. The at least one message passing path is determined based on the feature similarity between nodes in the first graph network. The first graph network consists of nodes and edges used to connect nodes. Nodes correspond one-to-one with objects, and edges correspond to the association relationships between objects. Objects have an association relationship with target products. At least one message passing path corresponds to the target neighbor node of a node.
[0167] In step S1006, the client can respond to the link completion command, determine the missing link through the link completion system, and then complete the broken links between objects based on the missing link to obtain a complete link. The link completion system can determine the feature similarity between objects based on the feature vectors corresponding to the objects. The feature similarity between objects can characterize the degree of association between them; a higher feature similarity indicates a higher degree of association, and a lower feature similarity indicates a lower degree of association.
[0168] Furthermore, the link completion system can construct the first graph network. The first graph network includes nodes that correspond one-to-one with the aforementioned objects, and the nodes corresponding to objects with relationships are connected by edges. The relationships between objects can represent the circulation of the target product, the circulation of related items used to produce / manufacture the target product, or the circulation of the processed target product between the two objects.
[0169] Furthermore, the link completion system can determine at least one message passing path in the first graph network based on the feature similarity between nodes. This message passing path is used by nodes in the first graph network to pass messages to be processed to target neighbor nodes. Target neighbor nodes can then find missing links between objects based on the acquired messages. Since there is a one-to-one correspondence between nodes and objects, the feature similarity between nodes is equivalent to the feature similarity between objects. A missing link is the missing part of a complete link that records the flow information of the target product between objects; that is, a missing link represents part of the flow information of the target product between objects. The aforementioned flow information can include at least one of the flow information of the target product in the production / manufacturing stage or the distribution stage. Preferably, the aforementioned flow information includes the flow information of the target product in both the production / manufacturing stage and the distribution stage.
[0170] Furthermore, the link completion system can transmit messages to be processed in the first graph network based on at least one message passing path, thereby determining the missing links between objects, sending the missing links to the client, and having the client complete the broken links.
[0171] Step S1008: Display the complete link on the graphical user interface, wherein the complete link is used to represent the flow information of the target product between objects.
[0172] In step S1008, the client can display the complete link on the graphical user interface, and use different display methods for broken links and missing links in the complete link, such as... Figure 7 As shown, the thickness of the edges can be set separately, making it easier for relevant users to obtain.
[0173] Based on the scheme defined in steps S1002 to S1008 above, it can be understood that in this embodiment of the application, a method is adopted to determine the message transmission path based on the feature similarity between the objects corresponding to the nodes, and to determine the missing links for completing the link based on the message transmission path. By displaying the broken links between objects on the graphical user interface, and then receiving and responding to the link completion instruction to complete the broken links, the broken links between objects are completed based on the missing links to obtain the complete links, thereby displaying the complete links on the graphical user interface. Here, the missing links are determined based on the transmission of the message to be processed in the first graph network based on at least one message transmission path. At least one message transmission path is determined based on the feature similarity between the nodes in the first graph network. The first graph network consists of nodes and edges for connecting nodes. Nodes correspond one-to-one with objects, and edges correspond to the association relationships between objects. Objects have an association relationship with target products. At least one message transmission path corresponds to the target neighbor node of the node. The complete link is used to represent the flow information of the target product between objects.
[0174] It is noteworthy that in the above process, since the probability of a relationship between objects and the relative degree of that relationship can be determined based on the feature similarity between objects, at least one message passing path is determined to pass the message to be processed to the target neighbor node based on the feature similarity between the nodes corresponding to each object. This avoids passing the message to be processed to all neighbor nodes corresponding to the node, thus achieving message / edge pruning in the process of passing the message to be processed. Furthermore, by passing the message to be processed in the first graph network based on at least one message passing path, the number of messages sent during the link completion process is effectively reduced, thereby reducing memory usage and time consumption. This facilitates the retrieval of missing links with longer paths and improves the link completion effect.
[0175] Therefore, the solution provided in this application achieves the goal of determining the message passing path based on the feature similarity between the objects corresponding to the nodes, and determining the missing link for link completion based on the message passing path, thereby reducing memory consumption and solving the technical problem of excessive memory consumption in the link completion process of related methods in the prior art.
[0176] Furthermore, it should be noted that in this embodiment, the process of determining the missing link by the link completion system has been described in Embodiment 1, and will not be repeated here.
[0177] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0178] Through the above description of the embodiments, those skilled in the art can clearly understand that the link completion method according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0179] Example 5
[0180] According to an embodiment of this application, an apparatus for implementing the above-described link completion method is also provided, such as... Figure 11 As shown, the device includes: an acquisition module 1102, a first processing module 1104, and a second processing module 1106.
[0181] The acquisition module 1102 is used to acquire the feature similarity between objects and determine at least one message passing path based on the feature similarity between nodes in the first graph network. The objects and target products have an association relationship. The first graph network consists of nodes and edges used to connect nodes. Nodes correspond one-to-one with objects, and edges correspond to the association relationship between objects. At least one message passing path corresponds to the target neighbor node of the node.
[0182] The first processing module 1104 is used to transmit messages to be processed in the first graph network based on at least one message passing path in order to determine missing links between objects.
[0183] The second processing module 1106 is used to complete the broken links between objects based on the missing links to obtain complete links, wherein the complete links are used to represent the flow information of the target product between objects.
[0184] It should be noted that the acquisition module 1102, the first processing module 1104, and the second processing module 1106 mentioned above correspond to steps S202 to S206 in Embodiment 1. The three modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should also be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0185] Example 6
[0186] Embodiments of this application may provide an electronic device, which may be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the aforementioned electronic device may also be replaced with a mobile terminal or other terminal device.
[0187] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.
[0188] In this embodiment, the aforementioned electronic device can execute the following steps of the link completion method: obtaining feature similarity between objects, and determining at least one message transmission path based on feature similarity between nodes in a first graph network, wherein the objects and target products have an association relationship, the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with objects, edges correspond to the association relationship between objects, and at least one message transmission path corresponds to the target neighbor node of the node; transmitting the message to be processed in the first graph network based on at least one message transmission path to determine the missing link between objects; and completing the broken link between objects based on the missing link to obtain a complete link, wherein the complete link is used to represent the flow information of the target product between objects.
[0189] Optional, Figure 12 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 12 As shown, the electronic device 10 may include one or more (only one is shown in the figure) processors 1202, memory 1204, and peripheral interfaces 1206.
[0190] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the link completion method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the above-mentioned system vulnerability attack detection method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to electronic device A via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0191] The processor can invoke information and application programs stored in the memory via a transmission device to perform the following steps: obtaining feature similarity between objects, and determining at least one message passing path based on feature similarity between nodes in a first graph network, wherein objects and target products have an association relationship, the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with objects, edges correspond to the association relationship between objects, and at least one message passing path corresponds to the target neighbor node of a node; transmitting messages to be processed in the first graph network based on at least one message passing path to determine missing links between objects; and completing broken links between objects based on missing links to obtain complete links, wherein the complete links are used to represent the flow information of target products between objects.
[0192] Optionally, the processor may also execute program code for the following steps: before determining at least one message passing path based on the feature similarity between nodes in the first graph network, determining the point pair information corresponding to at least one point pair to be predicted, wherein the point pair to be predicted corresponds to at least one broken link, and the point pair to be predicted corresponds to objects set in two different sub-chains in the same broken link, the point pair information includes: the point pair to be predicted, the point pair identifier corresponding to the point pair to be predicted, and the correspondence between the point pair to be predicted and the broken link; constructing the first graph network based on the objects, the association between objects, and the point pair information corresponding to at least one point pair to be predicted.
[0193] Optionally, the processor may also execute program code for the following steps: using the current node in the first graph network, obtain the feature vectors corresponding to different neighbor nodes of the current node and the feature vector corresponding to the target node, wherein the target node and the current node correspond to the same pair of points to be predicted; using the current node, determine the feature similarity between different neighbor nodes and the target node based on the feature vectors corresponding to different neighbor nodes and the feature vector corresponding to the target node; using the current node, determine the target neighbor node from at least one of the current node's neighbor nodes based on the feature similarity between different neighbor nodes and the target node, so as to determine at least one message transmission path, wherein the target neighbor node is the node to receive and process the message.
[0194] Optionally, the processor may also execute program code for the following steps: before obtaining the feature vectors corresponding to different neighboring nodes of the current node and the feature vector corresponding to the target node through the current node in the first graph network, determine the link to which the current node belongs; if the current node belongs to a broken link, generate a message to be processed through the current node and save the message to be processed, wherein the message to be processed includes at least one point pair identifier corresponding to the current node and a first target path, the first target path representing the path that the message to be processed has been transmitted.
[0195] Optionally, the processor may also execute program code for the following steps: sending the message to be processed to the target neighbor node through the current node; determining, through the target neighbor node, whether a second target path exists in the messages already acquired by the target neighbor node, wherein the point pair identifier corresponding to the second target path is the same as the point pair identifier in the message to be processed; if a second target path exists, determining the path status of the second target path through the target neighbor node; if the second target path is in an incomplete state, and the starting point of the second target path is different from the starting point of the first target path, then concatenating the second target path and the first target path through the target neighbor node to obtain a complete path, wherein the complete path represents the missing link between objects.
[0196] Optionally, the processor may also execute program code for the following steps: after determining whether a second target path exists in the messages acquired by the target neighbor node through the target neighbor node, if no second target path exists, the first target path is updated through the target neighbor node to obtain a third target path; the target point pair identifier and the third target path are saved through the target neighbor node, wherein the target point pair identifier is the identifier of a point pair in the message to be processed that has not been deleted from the set of point pairs to be predicted; if the set of point pairs to be predicted is not empty, the next target neighbor node is determined from at least one of the target neighbor node's neighbor nodes based on the feature similarity between nodes through the target neighbor node, wherein the set of point pairs to be predicted consists of the point pair identifiers of at least one point pair to be predicted; the target point pair identifier and the third target path are sent to the next target neighbor node through the target neighbor node.
[0197] Optionally, the processor may also execute program code with the following steps: after concatenating the second target path and the first target path through the target neighbor nodes to obtain the completed path, obtain the completed path and the point pair identifiers corresponding to the completed path; based on the correspondence between the point pairs to be predicted and the broken links, select the point pair identifiers to be removed from the set of point pairs to be predicted according to the point pair identifiers corresponding to the completed path; delete the point pair identifiers to be removed from the set of point pairs to be predicted, and update the set of point pairs to be predicted to obtain the target set of point pairs to be predicted.
[0198] Optionally, the processor may also execute program code for the following steps: before obtaining the feature similarity between objects, constructing a second graph network based on the objects and their corresponding association information, wherein the second graph network has the same structure as the first graph network; performing a random walk in the second graph network to obtain at least one node sequence, wherein the node sequence is used to characterize the connection relationship of some nodes in the second graph network; and determining the feature vector of at least one object based on the at least one node sequence.
[0199] Optionally, the processor may also execute program code for the following steps: obtaining feature similarity between enterprises related to the target product; determining at least one message passing path from a first graph network based on the feature similarity between enterprises, wherein the first graph network consists of nodes and edges connecting the nodes, each node corresponds to an enterprise, the edges correspond to the transaction relationship between enterprises, and the at least one message passing path corresponds to the target neighbor node of the node; transmitting the message to be processed in the first graph network based on the at least one message passing path to determine the missing transaction links between enterprises; and completing the broken transaction links between enterprises based on the missing transaction links to obtain a complete transaction link, wherein the complete transaction link is used to represent the transaction flow information of the target product between enterprises.
[0200] Optionally, the processor may also execute program code for the following steps: the cloud server obtains the feature similarity between objects and determines at least one message passing path based on the feature similarity between nodes in the first graph network, wherein the objects and the target product have an association relationship, the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with objects, edges correspond to the association relationship between objects, and at least one message passing path corresponds to the target neighbor node of the node; the cloud server passes the message to be processed in the first graph network based on at least one message passing path to determine the missing links between objects; the cloud server completes the broken links between objects based on the missing links to obtain a complete link, wherein the complete link is used to represent the flow information of the target product between objects.
[0201] Optionally, the processor may also execute program code that performs the following steps: displaying broken links between objects on a graphical user interface; receiving a link completion instruction to complete the broken links; responding to the link completion instruction and completing the broken links between objects based on the missing links to obtain complete links, wherein the missing links are determined based on the transmission of messages to be processed in a first graph network through at least one message passing path, and the at least one message passing path is determined based on the feature similarity between nodes in the first graph network, the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with objects, edges correspond to the association relationships between objects, objects have an association relationship with target products, and at least one message passing path corresponds to the target neighbor node of a node; displaying the complete links on the graphical user interface, wherein the complete links are used to represent the flow information of target products between objects.
[0202] Those skilled in the art will understand that Figure 12 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, mobile computers, and mobile internet devices (MIDs), PADs, and other terminal devices. Figure 12 This does not limit the structure of the aforementioned electronic device. For example, electronic device 10 may also include components that are more... Figure 12 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 12 The different configurations shown.
[0203] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0204] Example 7
[0205] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the link completion method provided in the above embodiments.
[0206] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0207] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining feature similarity between objects, and determining at least one message passing path based on feature similarity between nodes in a first graph network, wherein the objects and target products have an association relationship, the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with objects, edges correspond to the association relationship between objects, and at least one message passing path corresponds to the target neighbor node of a node; passing messages to be processed in the first graph network based on at least one message passing path to determine missing links between objects; and completing broken links between objects based on missing links to obtain complete links, wherein the complete links are used to represent the flow information of target products between objects.
[0208] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: before determining at least one message passing path based on the feature similarity between nodes in the first graph network, determining point pair information corresponding to at least one point pair to be predicted, wherein the point pair to be predicted corresponds to at least one broken link, the point pair to be predicted corresponds to objects set in two different sub-chains in the same broken link, and the point pair information includes: the point pair to be predicted, the point pair identifier corresponding to the point pair to be predicted, and the correspondence between the point pair to be predicted and the broken link; constructing the first graph network based on objects, the association relationships between objects, and the point pair information corresponding to at least one point pair to be predicted.
[0209] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining feature vectors corresponding to different neighboring nodes of the current node and feature vectors corresponding to the target node through the current node in the first graph network, wherein the target node and the current node correspond to the same pair of points to be predicted; determining the feature similarity between different neighboring nodes and the target node based on the feature vectors corresponding to different neighboring nodes and feature vectors corresponding to the target node through the current node; determining the target neighboring node from at least one neighboring node of the current node based on the feature similarity between different neighboring nodes and the target node through the current node, so as to determine at least one message transmission path, wherein the target neighboring node is a node to receive and process a message.
[0210] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: before obtaining the feature vectors corresponding to different neighboring nodes of the current node and the feature vector corresponding to the target node through the current node in the first graph network, determining the link to which the current node belongs; if the current node belongs to a broken link, generating a message to be processed through the current node and saving the message to be processed, wherein the message to be processed includes at least one point pair identifier corresponding to the current node and a first target path, the first target path representing the path already transmitted by the message to be processed.
[0211] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: sending the message to be processed to the target neighbor node through the current node; determining, through the target neighbor node, whether there is a second target path in the messages already obtained by the target neighbor node, wherein the point pair identifier corresponding to the second target path is the same as the point pair identifier in the message to be processed; if there is a second target path, determining the path status of the second target path through the target neighbor node; if the second target path is in an incomplete state, and the starting point of the second target path is different from the starting point of the first target path, concatenating the second target path and the first target path through the target neighbor node to obtain a completed path, wherein the completed path represents the missing link between objects.
[0212] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: after determining whether a second target path exists in the messages obtained by the target neighbor node through the target neighbor node, if no second target path exists, the first target path is updated through the target neighbor node to obtain a third target path; the target point pair identifier and the third target path are saved through the target neighbor node, wherein the target point pair identifier is the identifier of a point pair in the message to be processed that has not been deleted from the set of point pairs to be predicted; if the set of point pairs to be predicted is not empty, the next target neighbor node is determined from at least one neighbor node of the target neighbor node based on the feature similarity between nodes through the target neighbor node, wherein the set of point pairs to be predicted consists of the point pair identifiers of at least one point pair to be predicted; the target point pair identifier and the third target path are sent to the next target neighbor node through the target neighbor node.
[0213] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: after obtaining a complete path by concatenating the second target path and the first target path through the target neighbor nodes, the complete path and the point pair identifiers corresponding to the complete path are obtained; based on the correspondence between the point pairs to be predicted and the broken links, the point pair identifiers to be removed are selected from the set of point pairs to be predicted according to the point pair identifiers corresponding to the complete path; the point pair identifiers to be removed are deleted from the set of point pairs to be predicted, and the set of point pairs to be predicted is updated to obtain the target set of point pairs to be predicted.
[0214] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: before obtaining the feature similarity between objects, constructing a second graph network based on the objects and their corresponding association information, wherein the second graph network has the same structure as the first graph network; performing a random walk in the second graph network to obtain at least one node sequence, wherein the node sequence is used to characterize the connection relationship of some nodes in the second graph network; and determining the feature vector of at least one object based on the at least one node sequence.
[0215] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining feature similarity between enterprises that are associated with the target product; determining at least one message passing path from a first graph network based on the feature similarity between enterprises, wherein the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with enterprises, edges correspond to transaction relationships between enterprises, and at least one message passing path corresponds to the target neighbor node of a node; transmitting messages to be processed in the first graph network based on at least one message passing path to determine missing transaction links between enterprises; and completing the broken transaction links between enterprises based on the missing transaction links to obtain complete transaction links, wherein the complete transaction links are used to represent the transaction flow information of the target product between enterprises.
[0216] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: the cloud server obtains feature similarity between objects and determines at least one message passing path based on feature similarity between nodes in a first graph network, wherein the objects and target products have an association relationship, the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with objects, edges correspond to the association relationship between objects, and at least one message passing path corresponds to the target neighbor node of a node; the cloud server transmits the message to be processed in the first graph network based on at least one message passing path to determine the missing links between objects; the cloud server completes the broken links between objects based on the missing links to obtain a complete link, wherein the complete link is used to represent the flow information of the target product between objects.
[0217] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: displaying broken links between objects on a graphical user interface; receiving a link completion instruction to complete the broken links; responding to the link completion instruction, completing the broken links between objects based on the missing links to obtain complete links, wherein the missing links are determined based on the transmission of messages to be processed in a first graph network through at least one message passing path, and the at least one message passing path is determined based on the feature similarity between nodes in the first graph network, the first graph network consists of nodes and edges for connecting nodes, nodes correspond one-to-one with objects, edges correspond to the association relationships between objects, objects have an association relationship with target products, and at least one message passing path corresponds to the target neighbor node of a node; displaying the complete links on the graphical user interface, wherein the complete links are used to represent the flow information of target products between objects.
[0218] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0219] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0220] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of units or modules may be electrical or other forms.
[0221] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0222] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0223] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0224] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A link completion method, characterized by, The method comprises the following steps: obtaining feature similarities between objects, and determining at least one message passing path based on the feature similarities between nodes in a first graph network, wherein the objects have an association relationship with a target product, the first graph network is composed of nodes and edges for connecting the nodes, the nodes correspond to the objects one by one, and the edges correspond to the association relationship between the objects, and the at least one message passing path corresponds to a target neighbor node of the nodes; passing a to-be-processed message in the first graph network based on the at least one message passing path to determine a missing link between the objects, wherein the missing link is represented by a completed path, the completed path is obtained by splicing a first target path and a second target path, the first target path is used to represent a passed path of the to-be-processed message, the point pair identifier corresponding to the second target path is the same as the point pair identifier in the to-be-processed message, the point pair identifier corresponds to a to-be-predicted point pair, and the to-be-predicted point pair corresponds to objects arranged in two different sub-chains of the same broken chain link; performing link completion on a broken chain link between the objects based on the missing link to obtain a complete link, wherein the complete link is used to represent flow information of the target product between the objects.
2. The method of claim 1, wherein, Before determining the at least one message passing path based on the feature similarities between nodes in the first graph network, the method further comprises: determining point pair information corresponding to at least one to-be-predicted point pair, wherein the to-be-predicted point pair corresponds to at least one broken chain link, and the point pair information comprises the to-be-predicted point pair, the point pair identifier corresponding to the to-be-predicted point pair, and the correspondence between the to-be-predicted point pair and the broken chain link; constructing the first graph network based on the objects, the association relationship between the objects, and the point pair information corresponding to the at least one to-be-predicted point pair.
3. The method of claim 2, wherein, Obtaining feature similarities between objects, and determining at least one message passing path based on the feature similarities between nodes in a first graph network, comprises: obtaining, by a current node in the first graph network, feature vectors corresponding to different neighbor nodes of the current node and a feature vector corresponding to a target node, wherein the target node and the current node correspond to a same to-be-predicted point pair; determining, by the current node, feature similarities between the different neighbor nodes and the target node based on the feature vectors corresponding to the different neighbor nodes and the feature vector corresponding to the target node; determining, by the current node, a target neighbor node from at least one neighbor node of the current node based on the feature similarities between the different neighbor nodes and the target node to determine the at least one message passing path, wherein the target neighbor node is a node to be received by the to-be-processed message.
4. The method of claim 3, wherein, Before obtaining, by a current node in the first graph network, feature vectors corresponding to different neighbor nodes of the current node and a feature vector corresponding to a target node, the method further comprises: determining a link to which the current node belongs; If the current node belongs to the broken link, generating and saving the to-be-processed message through the current node, wherein the to-be-processed message comprises at least one point pair identifier corresponding to the current node and the first target path.
5. The method of claim 4, wherein, Based on the at least one message passing path, passing the to-be-processed message in the first graph network to determine the missing link between the objects, comprising: sending the to-be-processed message to the target neighbor node through the current node; determining whether the second target path exists in the messages acquired by the target neighbor node through the target neighbor node; if the second target path exists, determining the path state of the second target path through the target neighbor node; if the second target path is in an incomplete state and the starting point of the second target path is different from the starting point of the first target path, splicing the second target path and the first target path through the target neighbor node to obtain the completed path.
6. The method of claim 5, wherein, After determining whether the second target path exists in the messages acquired by the target neighbor node through the target neighbor node, the method further comprises: if the second target path does not exist, updating the first target path through the target neighbor node to obtain a third target path; saving the target point pair identifier and the third target path through the target neighbor node, wherein the target point pair identifier is the point pair identifier in the to-be-processed message that is not deleted from the to-be-predicted point pair set; if the to-be-predicted point pair set is not empty, determining a next target neighbor node from at least one neighbor node of the target neighbor node based on the feature similarity between the nodes through the target neighbor node, wherein the to-be-predicted point pair set is composed of the point pair identifier of at least one to-be-predicted point pair; sending the target point pair identifier and the third target path to the next target neighbor node through the target neighbor node.
7. The method of claim 6, wherein, After splicing the second target path and the first target path through the target neighbor node to obtain the completed path, the method further comprises: obtaining the completed path and the point pair identifier corresponding to the completed path; based on the correspondence between the to-be-predicted point pair and the broken link, filtering out a to-be-eliminated point pair identifier from the to-be-predicted point pair set according to the point pair identifier corresponding to the completed path; deleting the to-be-eliminated point pair identifier from the to-be-predicted point pair set and updating the to-be-predicted point pair set to obtain a target to-be-predicted point pair set.
8. The method of claim 1, wherein, Before obtaining the feature similarity between the objects, the method further comprises: constructing a second graph network based on the objects and the associated information corresponding to the objects, wherein the structure of the second graph network is the same as that of the first graph network; performing random walk in the second graph network to obtain at least one node sequence, wherein the node sequence is used to represent the connection relationship of part of the nodes in the second graph network; determining the feature vector of at least one object based on at least one node sequence.
9. A link completion method, characterized by, comprising: obtaining the feature similarity between the enterprises having an association relationship with the target product; determine at least one message passing path from the first graph network based on the feature similarity between the enterprises, wherein the first graph network is composed of nodes and edges for connecting the nodes, the nodes correspond to the enterprises one by one, the edges correspond to transaction relationships between the enterprises, and the at least one message passing path corresponds to target neighbor nodes of the nodes; pass a to-be-processed message in the first graph network based on the at least one message passing path, to determine a missing transaction link between the enterprises, wherein the missing transaction link is represented by a completed path, the completed path is obtained by splicing a first target path and a second target path, the first target path is used to represent a passed path of the to-be-processed message, the second target path corresponds to a same point pair identifier as a point pair identifier in the to-be-processed message, the point pair identifier corresponds to a to-be-predicted point pair, and the to-be-predicted point pair corresponds to objects in two different sub-chains arranged in a same broken link; perform link completion on a broken transaction link between the enterprises based on the missing transaction link, to obtain a complete transaction link, wherein the complete transaction link is used to represent transaction circulation information of the target product between the enterprises.
10. A link completion method, characterized by, The method comprises the following steps: a cloud server acquires feature similarity between objects, and determines at least one message passing path based on feature similarity between nodes in a first graph network, wherein the objects have an association relationship with a target product, the first graph network is composed of the nodes and edges for connecting the nodes, the nodes correspond to the objects one by one, the edges correspond to association relationships between the objects, and the at least one message passing path corresponds to target neighbor nodes of the nodes; the cloud server passes a to-be-processed message in the first graph network based on the at least one message passing path, to determine a missing link between the objects, wherein the missing link is represented by a completed path, the completed path is obtained by splicing a first target path and a second target path, the first target path is used to represent a passed path of the to-be-processed message, the second target path corresponds to a same point pair identifier as a point pair identifier in the to-be-processed message, the point pair identifier corresponds to a to-be-predicted point pair, and the to-be-predicted point pair corresponds to objects in two different sub-chains arranged in a same broken link; the cloud server performs link completion on a broken link between the objects based on the missing link, to obtain a complete link, wherein the complete link is used to represent circulation information of the target product between the objects.
11. A link completion method, characterized by, The method comprises the following steps: display a broken link between objects on a graphical user interface; receive a link completion instruction for completing the broken link; In response to the link completion instruction, link completion is performed on a broken link between the objects based on a missing link, to obtain a complete link, wherein the missing link is determined based on at least one message transmission path for transmitting a to-be-processed message in a first graph network, the at least one message transmission path is determined based on feature similarity between nodes in the first graph network, the first graph network is composed of the nodes and edges for connecting the nodes, the nodes correspond to the objects one by one, the edges correspond to association relationships between the objects, the objects have an association relationship with a target product, the at least one message transmission path corresponds to a target neighbor node of the nodes, the missing link is represented by a completion path, the completion path is obtained by splicing a first target path and a second target path, the first target path is used to represent a transmitted path of the to-be-processed message, a point pair identifier corresponding to the second target path is the same as a point pair identifier in the to-be-processed message, the point pair identifier corresponds to a to-be-predicted point pair, and the to-be-predicted point pair corresponds to objects in two different sub-chains arranged in the same broken link; The complete link is displayed on the graphical user interface, and the complete link is used to represent flow information of the target product between the objects.
12. A link completion apparatus, characterized by comprising: Comprise: An acquisition module is configured to acquire feature similarity between objects, and determine at least one message transmission path based on feature similarity between nodes in a first graph network, wherein the objects have an association relationship with a target product, the first graph network is composed of the nodes and edges for connecting the nodes, the nodes correspond to the objects one by one, the edges correspond to association relationships between the objects, and the at least one message transmission path corresponds to a target neighbor node of the nodes. A first processing module is configured to transmit a to-be-processed message in the first graph network based on the at least one message transmission path, to determine a missing link between the objects, wherein the missing link is represented by a completion path, the completion path is obtained by splicing a first target path and a second target path, the first target path is used to represent a transmitted path of the to-be-processed message, a point pair identifier corresponding to the second target path is the same as a point pair identifier in the to-be-processed message, the point pair identifier corresponds to a to-be-predicted point pair, and the to-be-predicted point pair corresponds to objects in two different sub-chains arranged in the same broken link. A second processing module is configured to perform link completion on a broken link between the objects based on the missing link, to obtain a complete link, wherein the complete link is used to represent flow information of the target product between the objects.
13. A computer-readable storage medium, characterized in that, A computer program is stored in a computer-readable storage medium, wherein the computer program is configured to execute the link completion method in any one of claims 1 to 11 when running.
14. An electronic device, comprising: An electronic device comprises one or more processors. A memory for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement a program for running, wherein the program is configured to perform the link completion method of any one of claims 1 to 11 when running.
Citation Information
Patent Citations
Complex network link prediction method and device, electronic equipment and medium
CN112700056A
Industrial knowledge graph completion method and device, electronic equipment and storage medium
CN114610883A