Resource anomaly prediction method, device and equipment
By abstracting historical delivery orders into a heterogeneous graph and using graph neural networks for prediction, the problem of insufficient propagation of high-order risks in existing technologies is solved, thereby improving the accuracy of resource anomaly prediction and risk control capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
- Filing Date
- 2022-12-27
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies lack the ability to infer the dissemination and accumulation of information on second-order and higher-order risks among various participants in resource anomaly prediction, resulting in inaccurate prediction results.
Historical delivery orders are abstracted into heterogeneous graphs with service meanings. Graph neural networks are used to describe the vector representations of multi-party nodes on different edge types. Resource anomaly prediction is performed through heterogeneous graph neural networks, and information propagation and accumulation of higher-order risks (second order and above) are incorporated.
It improves the accuracy of resource anomaly prediction, makes fuller use of historical risk information, achieves early risk prevention and control, and avoids losses for service providers, distributors and suppliers.
Smart Images

Figure CN116384533B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of delivery technology, and in particular to a method, apparatus and equipment for predicting resource anomalies. Background Technology
[0002] With the continuous upgrading of internet technology, the food delivery industry has also seen the rise of online service delivery. While bringing about industrial innovation and resource optimization, it inevitably leads to resource anomalies. Therefore, the governance and prevention of resource anomalies are crucial measures to protect the interests of participants within the ecosystem. For the delivery sector, it is essential to maintain the efficient operation of the ecosystem while safeguarding the interests of riders, users, and merchants, and to reasonably resolve and avoid conflicts among participants.
[0003] In related technologies, multi-tower residual neural networks are mainly used to predict resource anomalies. The core logic of this prediction method is first-order propagation. Specifically, it can be assumed that the risk of a waybill is only affected by the users, riders, and merchants directly associated with the waybill. However, the important information that the risk of participants is not only determined by their own nature, but also affected by surrounding riders, merchants, and even users is seriously lacking. Therefore, this assumption is not reasonable. For example, riders serving the same merchant may have some degree of common risk. This limits the prediction results to the accumulation of rider risk behavior or the first-order risk analysis of users, riders, and merchants. It lacks the ability to infer the information propagation and accumulation of second-order and higher-order risks of all participants, making the prediction results of resource anomalies inaccurate. Summary of the Invention
[0004] In view of this, this application provides a method, apparatus and equipment for predicting resource anomalies, the main purpose of which is to solve the problem that the existing technology lacks the ability to infer the information dissemination and accumulation of higher-order risks of the parties involved in the prediction of resource anomalies, which makes the prediction results of resource anomalies inaccurate.
[0005] According to a first aspect of this application, a method for predicting resource anomalies is provided, the method comprising:
[0006] The service fulfillment process is set up in conjunction with the delivery scenario. Based on the service fulfillment process, historical delivery orders are abstracted into a heterogeneous graph with service meaning. The heterogeneous graph includes multiple nodes involved in the delivery scenario and different edge types formed by the nodes. The edge type is used to describe the service relationship between the multiple nodes.
[0007] For the different edge types formed by the nodes, a graph neural network is used to describe the vector representations of the multi-party nodes in the heterogeneous graph on different edge types;
[0008] In response to a prediction instruction indicating a resource anomaly in an order to be delivered, the resource prediction for the order to be delivered is performed using the vector representations of the multi-party nodes in the heterogeneous graph with service meaning on different edge types, thus obtaining the prediction result of the resource anomaly in the order to be delivered.
[0009] Furthermore, the process of setting up a service fulfillment process in conjunction with the delivery scenario, and abstracting historical delivery orders into a heterogeneous graph with service meaning based on the service fulfillment process, specifically includes:
[0010] The system acquires information about the suppliers, service providers, and delivery providers involved in the delivery scenario, and uses the service agreements between these suppliers, service providers, and delivery providers to set up a service fulfillment process.
[0011] Based on the service fulfillment process, the supplier, service provider, and delivery provider are represented as multi-party nodes, and the service flow between the supplier, service provider, and delivery provider is represented as different edge types describing the service relationship between the multi-party nodes;
[0012] By combining the multi-party nodes and the different edge types describing the service relationships between the multi-party nodes, a heterogeneous graph with service meaning is abstracted.
[0013] Furthermore, the step of using a graph neural network to describe the vector representations of multi-party nodes in the heterogeneous graph for different edge types formed by the nodes specifically includes:
[0014] The heterogeneous graph with service meaning is input into a graph neural network, and the multi-layer structure in the graph neural network is used to calculate the representation parameters involved in the description of the multi-party node. The representation parameters include the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types.
[0015] By utilizing the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types, the supervised learning structure in the graph neural network is used to obtain the intrinsic relationship between the target node and its context node, and output the vector representation of the multi-party node on different edge types in the heterogeneous graph.
[0016] Furthermore, the step of inputting the heterogeneous graph with service meaning into a graph neural network, and using the multi-layer structure of the graph neural network to calculate the representation parameters involved in the description process of the multi-party nodes, specifically includes:
[0017] The heterogeneous graph with service meaning is input into a graph neural network. The initialization layer in the graph neural network is used to randomly initialize and assign values to the representation of the multi-party node and the edge representation of the multi-party node on different edge types, so as to obtain the basic representation of the multi-party node and the initial edge representation of the multi-party node on different edge types.
[0018] The aggregation layer in the graph neural network samples the neighboring nodes for each node, and uses the sampled edge representations of the neighboring nodes in different edge types to update the initial edge representations of the current node in different edge types, thus obtaining the intermediate edge representations of the multi-party nodes in different edge types.
[0019] The influence weights of the multi-party nodes on different edge types are calculated using the edge attention layer in the graph neural network, and the middle edge representations of the multi-party nodes on different edge types are updated using the influence weights to obtain the edge representations of the multi-party nodes on different edge types.
[0020] Furthermore, the step of using the aggregation layer in the graph neural network to sample neighboring nodes for each node, and using the sampled edge representations of neighboring nodes on different edge types to update the initial edge representations of the current node on different edge types, thereby obtaining the intermediate edge representations of the multi-party nodes on different edge types, specifically includes:
[0021] The aggregation layer in the graph neural network is used to perform a preset number of random walks to sample neighboring nodes along different edge types for each node, forming a multi-party node sampling under different edge types to obtain the edge representation of neighboring nodes on the corresponding edge types.
[0022] The edge representations of neighboring nodes on the corresponding edge types are sampled from the multi-party nodes under different edge types and then aggregated to obtain the aggregated edge representations. The aggregation process uses at least one of minimum pooling aggregation, maximum pooling aggregation, and average pooling aggregation.
[0023] The aggregated edge representation is used to update the initial edge representation of the current node under the corresponding type, so as to obtain the intermediate edge representation of the multi-party node under different edge types.
[0024] Further, the step of using the edge attention layer in the graph neural network to calculate the influence weights of the multi-party nodes on different edge types, and using the influence weights to update the intermediate edge representations of the multi-party nodes on different edge types, to obtain the edge representations of the multi-party nodes on different edge types, specifically includes:
[0025] The edge attention layer in the graph neural network is used to input the intermediate edge representations of the multi-party nodes on different edge types into the edge attention framework, and the logical similarity between the intermediate edge representations on different edge types is calculated using the edge attention framework.
[0026] The influence weights of multi-party nodes on different edge types are determined based on the logical similarity between the intermediate edge representations on the different edge types.
[0027] The influence weights are used to perform a weighted summation of the intermediate edge representations of the multi-party nodes on different edge types to obtain the edge representations of the multi-party nodes on different edge types.
[0028] Furthermore, the step of utilizing the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types, and using the supervised learning structure in the graph neural network to obtain the intrinsic relationship between the target node and its context nodes, and outputting the vector representation of the multi-party node in the heterogeneous graph on different edge types, specifically includes:
[0029] The basic representation of the multi-party node and the edge representation of the multi-party node on different edge types are input into the supervised learning structure in the graph neural network, and the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types are learned by negative sampling.
[0030] During the learning process, a pre-set loss function is used to compare the intrinsic relationship between the learning target node and its context nodes. When the loss function is determined to meet the iteration termination condition, the probability distribution of the similarity between the multi-party node in the heterogeneous graph and the target node and its context nodes under different edge type constraints is determined.
[0031] Based on the probability distribution of similarity between the multi-party node and the target node and its context nodes in the heterogeneous graph under different edge type constraints, the vector representation of the multi-party node in the heterogeneous graph under different edge types is output.
[0032] Furthermore, in response to the prediction instruction that a resource anomaly has occurred in a pending order, the resource prediction for the pending order is performed using the vector representations of the multi-party nodes in the heterogeneous graph with service meaning on different edge types, to obtain the prediction result of the resource anomaly in the pending order, specifically including:
[0033] In response to a prediction instruction that a resource anomaly occurs in an order to be delivered, the vector representations of the multi-party nodes involved in the order to be delivered in a preset type are determined by using the vector representations of the multi-party nodes in the heterogeneous graph with service meaning in different types.
[0034] From the vector representations of multiple nodes involved in the order to be delivered in a preset type, select the vector representations of two nodes with a service relationship in the same type;
[0035] Calculate the cosine similarity between the vector representations of the two nodes with the service relationship of the same type, and use the cosine similarity as the prediction result of the resource anomaly of the order to be delivered.
[0036] Furthermore, the prediction result is characterized as the probability value of resource anomalies occurring in the orders to be delivered, and the method further includes:
[0037] If the probability value is greater than a preset value, the probability value is sent to the resource platform so that the resource platform can intervene in the order to be delivered based on the probability value.
[0038] According to a second aspect of this application, a resource anomaly prediction apparatus is provided, the apparatus comprising:
[0039] Abstraction unit is used to set up service fulfillment process in combination with delivery scenario. Based on the service fulfillment process, historical delivery orders are abstracted into a heterogeneous graph with service meaning. The heterogeneous graph includes multiple nodes involved in the delivery scenario and different edge types formed by the nodes. The edge type is used to describe the service relationship between the multiple nodes.
[0040] The description unit is used to describe the vector representation of the multi-party nodes in the heterogeneous graph on different edge types for different edge types formed by the nodes using a graph neural network.
[0041] The prediction unit 0 is used to predict the resource anomaly of the pending order in response to the prediction instruction. It uses the vector representations of the multi-party nodes in the heterogeneous graph with service meaning on different edge types to predict the resource anomaly of the pending order and obtain the prediction result.
[0042] Furthermore, the abstract unit includes:
[0043] The configuration module is used to obtain the suppliers, service providers, and delivery providers involved in the delivery scenario, and to configure the service fulfillment process using the service agreements between the suppliers, service providers, and delivery providers.
[0044] The representation module is used to represent the supplier, service provider, and delivery provider as multi-party nodes according to the service fulfillment process, and the service flow between the supplier, service provider, and delivery provider is represented as different edge types describing the service relationship between the multi-party nodes;
[0045] The abstract module is used to abstract a heterogeneous graph with service meaning by combining the multi-party nodes and the different edge types that describe the service relationship between the multi-party nodes.
[0046] Furthermore, the description unit includes:
[0047] The first calculation module is used to input the heterogeneous graph with service meaning into a graph neural network, and use the multi-layer structure of the graph neural network to calculate the table involved in the description process of the multi-party nodes.
[0048] Characterization parameters, which include the basic characterization of the multi-party node and the edge characterization of the multi-party node on different edge types 5;
[0049] The acquisition module is used to acquire the intrinsic relationship between the target node and its context nodes by utilizing the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types, and using the supervised learning structure in the graph neural network, and output the vector representation of the multi-party node on different edge types in the heterogeneous graph.
[0050] Furthermore, the computing module includes:
[0051] An initialization submodule is used to input the heterogeneous graph with service meaning into a graph neural network, and to use the initialization layer in the graph neural network to randomly initialize and assign values to the representation of the multi-party node and the edge representation of the multi-party node on different edge types, so as to obtain the basic representation of the multi-party node and the initial edge representation of the multi-party node on different edge types.
[0052] The sampling submodule is used to sample the neighboring nodes for each node using the aggregation layer in the graph neural network, and use the edge representations of the neighboring nodes in different edge types obtained by sampling to update the initial edge representations of the current node in different edge types, so as to obtain the intermediate edge representations of the multi-party nodes in different edge types.
[0053] The update submodule is used to calculate the influence weights of the multi-party nodes on different edge types using the edge attention layer in the graph neural network, and to update the intermediate edge representations of the multi-party nodes on different edge types using the influence weights, so as to obtain the edge representations of the multi-party nodes on different edge types.
[0054] Further, the sampling submodule is specifically used to use the aggregation layer in the graph neural network to perform a preset number of random walks to sample neighboring nodes along different edge types for each node, forming edge representations of neighboring nodes on the corresponding edge types obtained by sampling the multi-party nodes under different edge types; to aggregate the edge representations of neighboring nodes on the corresponding edge types obtained by sampling the multi-party nodes under different edge types, to obtain aggregated edge representations, wherein the aggregation process uses at least one of minimum pooling aggregation, maximum pooling aggregation, and average pooling aggregation; and to update the initial edge representation of the current node under the corresponding type using the aggregated edge representations, to obtain intermediate edge representations of the multi-party nodes on different edge types.
[0055] Further, the update submodule is specifically used to input the intermediate edge representations of the multi-party node on different edge types into the edge attention framework using the edge attention layer in the graph neural network, calculate the logical similarity between the intermediate edge representations on different edge types using the edge attention framework, determine the influence weight of the multi-party node on different edge types based on the logical similarity between the intermediate edge representations on different edge types, and use the influence weight to perform a weighted summation of the intermediate edge representations of the multi-party node on different edge types to obtain the edge representation of the multi-party node on different edge types.
[0056] Furthermore, the acquisition module includes:
[0057] The learning submodule is used to input the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types into the supervised learning structure in the graph neural network, and learn the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types through negative sampling.
[0058] The determination submodule is used to compare the intrinsic relationship between the learning target node and its context nodes using a pre-set loss function during the learning process. When the loss function satisfies the iteration termination condition, the probability distribution of the similarity between the multi-party nodes in the heterogeneous graph and the target node and its context nodes under different edge type constraints is determined.
[0059] The output submodule is used to output the vector representation of the multi-party node in the heterogeneous graph on different edge types, based on the probability distribution of the similarity between the multi-party node and the target node and its context node under different edge type constraints in the heterogeneous graph.
[0060] Furthermore, the prediction unit includes:
[0061] The determination module is used to respond to a prediction instruction that a resource anomaly occurs in an order to be delivered, and to determine the vector representation of the multi-party nodes involved in the order to be delivered in a preset type by using the vector representation of the multi-party nodes in the heterogeneous graph with service meaning in different types.
[0062] The selection module is used to select vector representations of two nodes with a service relationship in the same type from the vector representations of multiple nodes involved in the order to be delivered in a preset type;
[0063] The second calculation module is used to calculate the cosine similarity between the vector representations of the two nodes with the service relationship on the same type, and use the cosine similarity as the prediction result of the resource anomaly of the order to be delivered.
[0064] Furthermore, the prediction result is characterized as the probability value of resource anomalies occurring in the orders to be delivered, and the device further includes:
[0065] The processing unit is configured to send the probability value to the resource platform if the probability value is greater than a preset value, so that the resource platform can intervene in the order to be delivered based on the probability value.
[0066] According to a third aspect of this application, a storage medium is provided on which a computer program is stored, which, when executed by a processor, implements the above-described method for predicting resource anomalies.
[0067] According to a fourth aspect of this application, a server device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described method for predicting resource anomalies.
[0068] Using the above technical solution, this application provides a method, apparatus, and device for predicting resource anomalies. This application combines a service fulfillment process with a delivery scenario, abstracting historical delivery orders into a heterogeneous graph with service meaning based on the service fulfillment process. This heterogeneous graph includes multiple nodes involved in the service scenario and different edge types formed by the nodes. The edge types describe the service relationships between the multiple nodes. For the different edge types formed by the nodes, a graph neural network is used to describe the vector representations of the multiple nodes in the heterogeneous graph on different edge types. In response to a prediction instruction that a resource anomaly occurs in a pending delivery order, the resource prediction for the pending delivery order is performed using the vector representations of the multiple nodes in the heterogeneous graph with service meaning on different edge types, obtaining the prediction result of the resource anomaly occurring in the pending delivery order. Compared to existing methods that use multi-tower residual neural networks to predict resource anomalies, this application uses heterogeneous graph neural networks to describe the vector representations of multi-party nodes on different edge types. While covering the first-order risk propagation logic, it can also incorporate the information propagation and accumulation capabilities of second-order and higher-order risks of individual participants in the resource anomaly prediction process. It compresses high-order heterogeneous graph data into low-dimensional vector representations and introduces the propagation modes of second-order and higher-order risks into the representation calculation process. It also provides the additional ability to model the mutual risk influence between different nodes, thereby improving the accuracy of resource anomaly prediction results.
[0069] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0070] 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:
[0071] Figure 1 A flowchart illustrating a method for predicting resource anomalies provided in an embodiment of this application is shown.
[0072] Figure 2 A flowchart illustrating another method for predicting resource anomalies provided in an embodiment of this application is shown.
[0073] Figure 3This paper illustrates a structural block diagram of a graph neural network provided in an embodiment of this application.
[0074] Figure 4 A schematic diagram of the structure of a resource anomaly prediction device provided in an embodiment of this application is shown. Detailed Implementation
[0075] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0076] In related technologies, the main methods for predicting resource anomalies include two main approaches: statistical analysis and pattern analysis. Statistical analysis-based approaches rely heavily on riders' historical resource anomalies, using past complaints and conflict incidents as the primary basis for assessing rider risk. Depending on the situation, interventions such as order isolation and training may be implemented for specific riders. However, this approach often only considers explicit rider resource anomalies, neglecting the importance of user, merchant, and external environmental factors in resource anomaly assessment, resulting in a high false negative rate. Furthermore, it requires riders to have a certain level of statistical accumulation regarding risk performance.
[0077] This results in riders, users, merchants, and the platform already suffering substantial losses in the early stages, making early intervention impossible. Compared to statistical analysis, pattern analysis uses historical security complaints and cases as samples, employing machine learning to model security risk patterns. This approach fully considers risks from the perspectives of riders, users, merchants, and the external environment, and can predict future risks based on historical risks. Once a situation matching a historical risk pattern is identified, it can be addressed.
[0078] Risk prevention and control were initiated to avoid actual losses caused by the accumulation of risks. However, traditional machine learning techniques still have significant shortcomings. For example, traditional machine learning solutions are mainly based on the first-order propagation logic of risk, only inferring whether the rider, user, and merchant in the current order meet the risk pattern, lacking the ability to describe the propagation of second-order or even higher-order risks. For instance, riders serving the same merchant may share some degree of common risk, and traditional machine learning methods cannot well express this common risk.
[0079] Whether it is related to the transmission and accumulation of cups in complex contractual relationships. At the same time, traditional machine learning solutions have difficulty connecting the judgment of resource anomalies. For example, they cannot reasonably explain the impact weight of user-rider and merchant-rider conflict risks on the overall risk in the waybill. This is not conducive to the analysis of the rationality of the model, nor to the subsequent governance and prevention of resource anomalies.
[0080] To address this problem, this embodiment provides a method for predicting resource anomalies, such as... Figure 1 As shown, this method is applied to the server side of the delivery platform and includes the following steps: 0 101. Set up a service fulfillment process in combination with the delivery scenario, and abstract historical delivery orders into a heterogeneous graph with service meaning according to the service fulfillment process.
[0081] The delivery scenario refers to the transportation of goods, such as meals, daily necessities, and fruits. Delivery scenarios include at least instant delivery, scheduled delivery, and delivery without specific requirements. Considering the time-sensitivity of goods, different delivery scenarios should follow different service fulfillment processes. For example, instant delivery requires delivery personnel to deliver the goods to the service provider as quickly as possible; this service fulfillment process has relatively high requirements for time and speed.
[0082] High-speed delivery requires delivery personnel to deliver items to the service provider on time, which places a high emphasis on time accuracy. Delivery without time requirements can be arranged according to the supplier's and delivery personnel's schedules, which does not place a high emphasis on speed or accuracy.
[0083] Understandably, service fulfillment processes are usually documented with service constraints. If the order delivery task is completed within the service constraints, it means the service has been successfully completed. If the order delivery task is not completed within the service constraints or if there are any abnormalities in the service, the service provider and / or supplier may evaluate the service as abnormal. In this case, it is considered that a resource abnormality has occurred in the delivery order. Considering the adverse impact of resource anomalies on spousal delivery scenarios, this study uses resource anomalies generated in historical delivery orders as a basis for predicting subsequent pending delivery orders. Historical delivery orders are abstracted into a heterogeneous graph with service meaning through the service fulfillment process. This graph includes multiple nodes involved in the service scenario and different edge types formed by these nodes. Edge types describe the service relationships between the multiple nodes. The multiple nodes involved in the delivery scenario include suppliers, delivery providers, and service providers. Suppliers are typically merchants or service providers, while delivery providers can be delivery personnel, delivery equipment, or delivery robots. Describing the service relationships between the multiple nodes can include fulfillment, evaluation, and complaints. Specifically, this can be represented as suppliers being served by the recipient, service providers being served by the recipient, service providers evaluating delivery providers, and suppliers complaining about delivery providers. The relationships between delivery providers and service providers, and between delivery providers and suppliers, describe service relationships that may generate resource anomalies in the delivery scenario. Other service relationships focus on the feedback from suppliers and service providers to the service.
[0084] In this embodiment, historical delivery orders can be selected from delivery orders generated within a preset historical time period. In order to ensure the accuracy of resource anomaly prediction for delivery orders, historical delivery orders that are closer to the current time point can usually be selected, such as delivery orders within the past 6 months.
[0085] The execution entity in this embodiment of the invention can be the server of the delivery platform. The server can collect historical delivery orders generated within the resource platform, take the multi-party nodes involved in the historical delivery orders as input, and associate the multi-party nodes involved in each historical delivery order using different edge types based on service relationships to construct a heterogeneous graph. This transforms the resource anomalies generated by historical delivery orders into edge types that predict whether there is negative feedback between the service provider and the supplier and the delivery provider, thereby simplifying the process of predicting resource anomalies in delivery orders.
[0086] 102. For the different edge types formed by the nodes, a graph neural network is used to describe the vector representation of the multi-party nodes in the heterogeneous graph on different edge types.
[0087] Typically, after a delivery service is completed, the supplier, service provider, and delivery party can provide feedback to each other. For example, the supplier and service provider can provide feedback through evaluations of delivery orders on the resource platform, or through interactive channels set up within the resource platform. Since resource anomalies may occur in delivery orders due to different edge types formed by nodes, and considering that whether a delivery order will experience resource anomalies can be predicted through the relationships between data, a graph neural network is used here to describe the vector representations of multi-party nodes in a heterogeneous graph across different edge types. This graph neural network refers to using neural networks to learn graph structure data, extract and mine features and patterns in the graph data structure, thereby meeting the needs of graph learning tasks such as clustering, classification, prediction, segmentation, and generation.
[0088] Specifically, in the process of using graph neural networks to describe the vector representation of multi-party nodes in heterogeneous graphs on different edge types, based on the hierarchical structure of graph neural networks, graph representation learning is performed on multi-party nodes in heterogeneous graphs on different edge types. Under the requirements of graph representation learning, a vector is generated as a low-dimensional expression of the graph based on the node attributes, edges, and edge attributes. This low-dimensional expression is then used as the vector representation of multi-party nodes in heterogeneous graphs on different edge types.
[0089] 103. In response to the prediction instruction that a resource anomaly has occurred in the pending delivery order, the resource prediction of the pending delivery order is performed using the vector representations of the multi-party nodes in the heterogeneous graph with service meaning on different edge types, so as to obtain the prediction result of the pending delivery order having a resource anomaly.
[0090] Because delivery orders are updated in real time and pending orders are generated simultaneously, it is impossible to determine whether there are any resource anomalies in pending orders before the delivery task is executed. Resource anomalies are not only affected by the nature of the participants themselves, but also by other participants. In order to prevent resource anomalies in pending orders, this embodiment of the invention triggers a prediction instruction for resource anomalies in pending orders at the same time as the resource platform generates pending orders. The prediction instruction for resource anomalies is executed for each newly generated pending order, thereby providing early warning before resource anomalies occur, effectively avoiding potential resource anomalies in delivery orders and saving delivery resources.
[0091] Specifically, the similarity between the vector representations of multi-party nodes in a heterogeneous graph with service meaning across different edge types can be used as a criterion for judging whether there are resource anomalies among the parties involved in a delivery scenario. For each edge type, the similarity between the vector representations of at least two parties on the corresponding edge type is calculated, and the similarity is output as the prediction result. If the similarity is higher, it indicates that the representations of at least two nodes have a higher probability of resource anomalies. If the similarity is greater than a set threshold, it is determined that the order to be delivered will have resource anomalies, and the order to be delivered is intercepted in advance as an abnormal order. If the similarity is less than or equal to the set threshold, it indicates that the order to be delivered is a normal order, and the corresponding delivery resources are further matched for the order to be delivered, and a delivery task is generated based on the delivery resources.
[0092] This paper applies heterogeneous graph neural networks to the prediction of resource anomalies in the delivery scenario. It proposes to use heterogeneous graphs containing multiple node and edge types to abstract the service fulfillment process, and apply heterogeneous graph neural networks to learn and predict the edge types of resource anomalies. This fills the gap in the model's ability to learn about the high-order interactions and accumulation of resource anomalies among delivery parties, service providers, and suppliers. It can make fuller use of historical risk information to achieve early risk prevention and warning, and effectively avoid losses for service providers, delivery parties, and suppliers.
[0093] The resource anomaly prediction method provided in this application combines a delivery scenario with a service fulfillment process. Based on the service fulfillment process, historical delivery orders are abstracted into a heterogeneous graph with service meaning. This heterogeneous graph includes multiple nodes involved in the service scenario and different edge types formed by the nodes. The edge type is used to describe the service relationship between the multiple nodes. For the different edge types formed by the nodes, a graph neural network is used to describe the vector representation of the multiple nodes in the heterogeneous graph on different edge types. In response to the prediction instruction of resource anomaly of the order to be delivered, the resource of the order to be delivered is predicted using the vector representation of the multiple nodes in the heterogeneous graph with service meaning on different edge types, and the prediction result of resource anomaly of the order to be delivered is obtained. Compared to existing methods that use multi-tower residual neural networks to predict resource anomalies, this application uses heterogeneous graph neural networks to describe the vector representations of multi-party nodes on different edge types. While covering the first-order risk propagation logic, it can also incorporate the information propagation and accumulation capabilities of second-order and higher-order risks of individual participants in the resource anomaly prediction process. It compresses high-order heterogeneous graph data into low-dimensional vector representations and introduces the propagation modes of second-order and higher-order risks into the representation calculation process. It also provides the additional ability to model the mutual risk influence between different nodes, thereby improving the accuracy of resource anomaly prediction results.
[0094] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, this embodiment provides another method for predicting resource anomalies, such as... Figure 2 As shown, the method includes:
[0095] 201. Obtain the suppliers, service providers, and delivery providers involved in the delivery scenario, and set up the service fulfillment process using the service agreements between the suppliers, service providers, and delivery providers.
[0096] Considering the constraints between the parties involved in the delivery scenario, most delivery scenarios pre-set service agreements so that all parties in the delivery scenario can follow the service agreements to execute the delivery process. For example, the service provider agrees that the supplier will provide tableware, the service provider agrees to the delivery time, the supplier agrees to the pick-up time, the delivery party agrees to the number of orders to be accepted, and so on, and then the service fulfillment process is set up according to the service agreements.
[0097] The service fulfillment process can be set for any two parties. The service fulfillment process will set corresponding conditions at different delivery stages. For delivery stages that meet the agreed conditions, the service is deemed fulfilled and will usually receive a satisfactory evaluation. For delivery stages that do not meet the agreed conditions, the service is deemed not fulfilled and may receive complaints or negative reviews from the parties, which will affect the service quality.
[0098] 202. Based on the service fulfillment process, the supplier, service provider, and delivery provider are represented as multi-party nodes, and the service flow between the supplier, service provider, and delivery provider is represented as different edge types describing the service relationship between the multi-party nodes.
[0099] 203. By combining the multi-party nodes and the different edge types describing the service relationships between the multi-party nodes, a heterogeneous graph with service meaning is abstracted.
[0100] Here, delivery orders generated within a preset historical time period can be selected. The multiple nodes involved in the delivery orders are listed, and different edge types are connected through the service relationships between the multiple nodes. Typically, delivery orders involve service providers, suppliers, and delivery providers. Considering the bidirectional nature of service relationships, for each node, there are six edge types with other adjacent nodes, including three dimensions: service, evaluation, and complaint. Taking the delivery provider as a node as an example, the order types are: supplier being served by the delivery provider, service provider being served by the delivery provider, service provider evaluating the delivery provider, service provider complaining about the delivery provider, supplier evaluating the delivery provider, and supplier complaining about the delivery provider.
[0101] Furthermore, considering the relationships between multiple nodes in different delivery orders, the delivery party of each historical delivery order can serve other delivery orders, the supplier of each order can provide services to multiple service providers, and the service provider of each order can select different suppliers in the resource platform. Specifically, multiple parties in delivery orders within a preset historical time period can be used as nodes, and the service relationships between multiple parties can be used as input to construct a heterogeneous graph with service meaning among multiple parties.
[0102] 204. Input the heterogeneous graph with service meaning into a graph neural network, and use the multi-layer structure in the graph neural network to calculate the representation parameters involved in the description process of the multi-party nodes.
[0103] The representation parameters include the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types. The multi-layer structure of the graph neural network includes an initialization layer, an aggregation layer, and an edge attention layer. The specific structure of the graph neural network is as follows: Figure 3 As shown, Figure 3The input nodes are represented as users (U), riders (R), and merchants (S). The service flow between the service provider and the delivery provider can be represented as different edge types such as user (U) being served by rider (R) C(U,R), merchant (S) being served by rider (R) C(S,R), user (U) rating (R) rider D(U,R), user (U) complaining (R) rider A(U,R), user (U) rating (R) rider D(U,R), and merchant (S) complaining (R) rider A(S,R). Although the service process is reciprocal, the rider serving user D(U,R) and the merchant complaining about rider A(S,R) describe two important service links in the service fulfillment process that are prone to resource anomalies: rider pickup and rider delivery. Therefore, in the edge prediction process of the graph neural network, this embodiment of the invention focuses on the two edge types: rider serving user and rider serving merchant.
[0104] Specifically, a heterogeneous graph with service meaning can be input into a graph neural network. The initialization layer in the graph neural network randomly initializes the representations of multi-party nodes and the edge representations of multi-party nodes on different edge types, obtaining the basic representations of multi-party nodes and the initial edge representations of multi-party nodes on different edge types. The aggregation layer in the graph neural network samples the neighboring nodes for each node, and uses the sampled edge representations of neighboring nodes on different edge types to update the initial edge representations of the current node on different edge types, obtaining the intermediate edge representations of multi-party nodes on different edge types. The edge attention layer in the graph neural network calculates the influence weights of multi-party nodes on different edge types, and uses the influence weights to update the intermediate edge representations of multi-party nodes on different edge types, obtaining the edge representations of multi-party nodes on different edge types.
[0105] Specifically, regarding the sampling process in the aggregation layer, the aggregation layer in the graph neural network can be used to perform a preset number of random walks to sample neighboring nodes along different edge types for each node, forming edge representations of neighboring nodes on the corresponding edge types by sampling the multi-party nodes under different edge types. The edge representations of neighboring nodes on the corresponding edge types obtained by sampling the multi-party nodes under different edge types are then aggregated to obtain aggregated edge representations. Here, the aggregation process uses at least one of minimum pooling aggregation, maximum pooling aggregation, and average pooling aggregation. The aggregated edge representations are then used to update the initial edge representation of the current node under the corresponding type, thus obtaining the intermediate edge representations of the multi-party nodes on different edge types.
[0106] Specifically, regarding the computation process in the edge attention layer, the edge attention layer in the graph neural network can be used to input the intermediate edge representations of multi-party nodes on different edge types into the edge attention framework. The edge attention framework is then used to calculate the logical similarity between the intermediate edge representations on different edge types. Based on the logical similarity between the intermediate edge representations on different edge types, the influence weights of multi-party nodes on different edge types are determined. The influence weights are then used to perform a weighted summation of the intermediate edge representations of multi-party nodes on different edge types to obtain the edge representations of multi-party nodes on different edge types.
[0107] In practical applications, the constructed heterogeneous graph is first loaded into the initialization layer of the graph neural network. During this process, the basic representation of each node and the edge representation of the node on different edge types are randomly initialized. Then, in the aggregation layer, for different edge types, the current node performs a certain number of random walks to sample the neighboring nodes, thereby obtaining the edge representations of the neighboring nodes on different edge types. The edge representations of the neighboring nodes on different edge types are aggregated to update the edge representations of the current node on different edge types. Here, the aggregation process can use minimum pooling, max pooling, average pooling, or a combination of these aggregation methods. Subsequently, the influence weights of different edge types on the node representation are calculated in the edge attention layer. Since the edge representation of a node on different edge types is not independent of the context, its representation is often influenced by other edge types. For example, riders who receive negative reviews may have a higher probability of being complained about. The two edge types, negative reviews and complaints, are mutually influential. That is, the edge representation of a node on the complaint edge type will be affected by the edge representation of the node on the negative review edge type. Therefore, in the edge attention layer, the influence weight of the edge representation of a node on the edge representation of other edge types can be calculated by using the process framework set by the edge attention layer to calculate the embedding contribution weight. A single hidden layer is used to learn the nonlinear expression of the node's representation under different edge types, and then multi-layer semantic information is obtained. The value range is rectified to [-1,1] through the activation layer, and then the similarity probability is output through the fully connected layer. The similarity probability is used as the influence weight, which can linearly merge the edge representation results of the node, ensuring that the edge that is more in line with the node's context has a higher influence on the node's edge representation on the corresponding edge type.
[0108] 205. Using the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types, the supervised learning structure in the graph neural network is used to obtain the intrinsic relationship between the target node and its context node, and output the vector representation of the multi-party node on different edge types in the heterogeneous graph.
[0109] In this embodiment, the graph neural network also includes an output layer. In the output layer, the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types can be input into the supervised learning structure of the graph neural network. The basic representation of the multi-party node and the edge representation of the multi-party node on different edge types are learned through negative sampling. During the learning process, the intrinsic relationship between the target node and its context nodes is compared using a pre-set loss function. When the loss function is determined to meet the iteration termination condition, the probability distribution of the similarity between the multi-party node in the heterogeneous graph and the target node and its context nodes under different edge type constraints is determined. Based on the probability distribution of the similarity between the multi-party node in the heterogeneous graph and the target node and its context nodes under different edge type constraints, the vector representation of the multi-party node in the heterogeneous graph on different edge types is output.
[0110] In practical applications, the edge representations of nodes under different edge types are concatenated with the basic representation to obtain the final representations of nodes under different edge types. Then, using a classic learning structure and loss functions from negative sampling and contrastive learning, the intrinsic relationships between the target node and its context nodes are learned under different edge types. The output layer obtains the probability distribution of the similarity between all nodes in the heterogeneous graph and the context nodes of the target node under different edge type constraints. Under specific edge type constraints, nodes with higher correlations behave more similarly in the graph neural network; that is, there is a higher probability that an edge type can connect two nodes. The ultimate goal of this prediction is to predict the matching of multiple nodes that may have resource anomalies in delivery orders; therefore, this can be achieved by predicting the generation probability of specific edge types.
[0111] 206. In response to a prediction instruction that a resource anomaly occurs in an order to be delivered, the vector representations of the multi-party nodes involved in the order to be delivered in a preset type are determined by using the vector representations of the multi-party nodes in the heterogeneous graph with service meaning in different types.
[0112] 207. Select the vector representations of two nodes with a service relationship on the same type from the vector representations of multiple nodes involved in the order to be delivered on a preset type.
[0113] 208. Calculate the cosine similarity between the vector representations of the two nodes with the service relationship of the same type, and use the cosine similarity as the prediction result of the resource anomaly of the order to be delivered.
[0114] The prediction result here represents the probability value of resource anomalies occurring in the order to be delivered. If the probability value is greater than the preset value, the probability value is sent to the resource platform so that the resource platform can intervene and process the order to be delivered based on the probability value.
[0115] Understandably, after a heterogeneous graph is input into a graph neural network, the network identifies the closest representations of two nodes connected by edges across different edge types. During prediction, only the cosine similarity of the node's edge representation across preset edge types needs to be calculated. These preset edge types can be those involving resource anomalies, such as negative reviews or complaints. A higher cosine similarity indicates greater similarity between the two nodes and a higher probability of resource anomalies. This means a higher probability of resource anomalies arising from resource matching among multiple nodes. Consequently, the platform can manage delivery orders with resource anomalies by modifying resource matching across multiple nodes. For example, it can change the delivery provider or provide more similar suppliers to the service provider, prompting the service provider to replace the current supplier with another. This mitigates subsequent resource risks and facilitates a more flexible and targeted control mechanism.
[0116] Compared to statistical analysis, the heterogeneous graph-based neural network in this embodiment takes into account both the resource anomalies occurring at the delivery party and the comprehensive impact of the external environment on resource anomalies. This solves the problem of high false negative rates caused by simply analyzing the resource anomalies of the delivery party. In addition, through the process of transmission and aggregation, the graph neural network allows neighboring nodes to update and transmit information to other nodes after the aggregation of different edge representations. This enables nodes to share historical resource anomaly knowledge and provide early warning of resource anomalies based on the similarity of behavioral patterns before they occur. Through proactive identification and management, the damage to multiple nodes caused by the early accumulation of resource anomalies is reduced. Compared to traditional pattern analysis methods, the resource anomaly prediction scheme based on heterogeneous graph neural networks, while covering the first-order propagation logic of resource anomalies, naturally introduces the second-order risk propagation and higher-order resource anomaly propagation modes of scenarios such as abnormal delivery into the representation calculation process by compressing high-order heterogeneous graph data into low-dimensional vector representations during the transmission and aggregation process. This additionally provides the scheme with the ability to model the mutual impact of resource anomalies between different nodes. Traditional pattern analysis methods only produce resource anomalies in the final delivery order, making it difficult to explain the specific resource anomalies and thus unable to determine whether the potential risk of the delivery order is due to the delivery party, the service provider, or the couriers. Resource anomalies arise between the delivery party and the supplier, and the impact of these two sources of resource anomalies on the overall delivery scenario is difficult to assess and reveal, resulting in insufficient interpretability of the solution's results and hindering the accurate prevention of resource anomalies. On the other hand, based on heterogeneous graph neural networks, resource anomaly connections under various edge type constraints can be predicted independently and simultaneously. Without increasing computational overhead, a single prediction process can simultaneously predict the matching probability of resource anomalies with service implications, such as between the delivery party and the service provider, and between the delivery party and the supplier in the delivery order. This provides better interpretability of resource anomalies, supports the rationality analysis of the model, and facilitates the resource platform's subsequent targeted prevention and control of resource anomalies.
[0117] Furthermore, as Figures 1-2 In terms of specific implementation, this application provides a resource anomaly prediction device applied to the server side, such as... Figure 4 As shown, the device includes: an abstraction unit 31, a description unit 32, and a prediction unit 33.
[0118] Abstraction unit 31 is used to set up a service fulfillment process in combination with the delivery scenario. Based on the service fulfillment process, historical delivery orders are abstracted into a heterogeneous graph with service meaning. The heterogeneous graph includes multiple nodes involved in the delivery scenario and different edge types formed by the nodes. The edge type is used to describe the service relationship between the multiple nodes.
[0119] Description unit 32 is used to describe the vector representation of the multi-party nodes in the heterogeneous graph on different edge types for different edge types formed by the nodes using a graph neural network;
[0120] The prediction unit 33 is used to respond to the prediction instruction that a resource anomaly has occurred in the order to be delivered, and to perform resource prediction on the order to be delivered by using the vector representations of the multi-party nodes in the heterogeneous graph with service meaning on different edge types, so as to obtain the prediction result that the order to be delivered has a resource anomaly.
[0121] The resource anomaly prediction device provided in this invention combines a service fulfillment process with a delivery scenario. Based on the service fulfillment process, historical delivery orders are abstracted into a heterogeneous graph with service meaning. This heterogeneous graph includes multiple nodes involved in the service scenario and different edge types formed by the nodes. The edge types are used to describe the service relationships between the multiple nodes. For the different edge types formed by the nodes, a graph neural network is used to describe the vector representations of the multiple nodes in the heterogeneous graph on different edge types. In response to a prediction instruction that a resource anomaly occurs in an order to be delivered, the device uses the vector representations of the multiple nodes in the heterogeneous graph with service meaning on different edge types to predict the resource anomaly of the order to be delivered, thereby obtaining the prediction result of the resource anomaly occurring in the order to be delivered. Compared to existing methods that use multi-tower residual neural networks to predict resource anomalies, this application uses heterogeneous graph neural networks to describe the vector representations of multi-party nodes on different edge types. While covering the first-order risk propagation logic, it can also incorporate the information propagation and accumulation capabilities of second-order and higher-order risks of individual participants in the resource anomaly prediction process. It compresses high-order heterogeneous graph data into low-dimensional vector representations and introduces the propagation modes of second-order and higher-order risks into the representation calculation process. It also provides the additional ability to model the mutual risk influence between different nodes, thereby improving the accuracy of resource anomaly prediction results.
[0122] In specific application scenarios, the abstract unit 31 includes:
[0123] The configuration module is used to acquire the suppliers, service providers, and delivery providers involved in the delivery scenario, and to configure the service fulfillment process using the service agreements between the suppliers, service providers, and delivery providers.
[0124] The representation module is used to represent the supplier, service provider, and delivery provider as multi-party nodes according to the service fulfillment process, and the service flow between the supplier, service provider, and delivery provider is represented as different edge types describing the service relationship between the multi-party nodes;
[0125] The abstract module is used to abstract a heterogeneous graph with service meaning by combining the multi-party nodes and the different edge types that describe the service relationships between the multi-party nodes.
[0126] In specific application scenarios, the description unit 32 includes:
[0127] The first calculation module is used to input the heterogeneous graph with service meaning into the graph neural network, and use the multi-layer structure in the graph neural network to calculate the representation parameters involved in the description process of the multi-party node. The representation parameters include the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types.
[0128] The acquisition module is used to acquire the intrinsic relationship between the target node and its context nodes by utilizing the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types, and using the supervised learning structure in the graph neural network, and output the vector representation of the multi-party node on different edge types in the heterogeneous graph.
[0129] In specific application scenarios, the computing module includes:
[0130] An initialization submodule is used to input the heterogeneous graph with service meaning into a graph neural network, and to use the initialization layer in the graph neural network to randomly initialize and assign values to the representation of the multi-party node and the edge representation of the multi-party node on different edge types, so as to obtain the basic representation of the multi-party node and the initial edge representation of the multi-party node on different edge types.
[0131] The sampling submodule is used to sample the neighboring nodes for each node using the aggregation layer in the graph neural network, and use the edge representations of the neighboring nodes in different edge types obtained by sampling to update the initial edge representations of the current node in different edge types, so as to obtain the intermediate edge representations of the multi-party nodes in different edge types.
[0132] The update submodule is used to calculate the influence weights of the multi-party nodes on different edge types using the edge attention layer in the graph neural network, and to update the intermediate edge representations of the multi-party nodes on different edge types using the influence weights, so as to obtain the edge representations of the multi-party nodes on different edge types.
[0133] In specific application scenarios, the sampling submodule is specifically used to use the aggregation layer in the graph neural network to perform a preset number of random walks to sample neighboring nodes along different edge types for each node, forming edge representations of neighboring nodes on the corresponding edge types obtained by sampling the multi-party nodes under different edge types; the edge representations of neighboring nodes on the corresponding edge types obtained by sampling the multi-party nodes under different edge types are aggregated to obtain aggregated edge representations, wherein the aggregation process uses at least one of minimum pooling aggregation, maximum pooling aggregation, and average pooling aggregation; the aggregated edge representations are used to update the initial edge representation of the current node under the corresponding type to obtain intermediate edge representations of the multi-party nodes on different edge types.
[0134] In a specific application scenario, the update submodule is specifically used to input the intermediate edge representations of the multi-party nodes on different edge types into the edge attention framework using the edge attention layer in the graph neural network, calculate the logical similarity between the intermediate edge representations on different edge types using the edge attention framework, determine the influence weight of the multi-party nodes on different edge types based on the logical similarity between the intermediate edge representations on different edge types, and use the influence weight to perform a weighted summation of the intermediate edge representations of the multi-party nodes on different edge types to obtain the edge representations of the multi-party nodes on different edge types.
[0135] In specific application scenarios, the acquisition module includes:
[0136] The learning submodule is used to input the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types into the supervised learning structure in the graph neural network, and learn the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types through negative sampling.
[0137] The determination submodule is used to compare the intrinsic relationship between the learning target node and its context nodes using a pre-set loss function during the learning process. When the loss function satisfies the iteration termination condition, the probability distribution of the similarity between the multi-party nodes in the heterogeneous graph and the target node and its context nodes under different edge type constraints is determined.
[0138] The output submodule is used to output the vector representation of the multi-party node in the heterogeneous graph on different edge types, based on the probability distribution of the similarity between the multi-party node and the target node and its context node under different edge type constraints in the heterogeneous graph.
[0139] In specific application scenarios, the prediction unit 33 includes:
[0140] The determination module is used to respond to a prediction instruction that a resource anomaly occurs in an order to be delivered, and to determine the vector representation of the multi-party nodes involved in the order to be delivered in a preset type by using the vector representation of the multi-party nodes in the heterogeneous graph with service meaning in different types.
[0141] The selection module is used to select vector representations of two nodes with a service relationship in the same type from the vector representations of multiple nodes involved in the order to be delivered in a preset type;
[0142] The second calculation module is used to calculate the cosine similarity between the vector representations of the two nodes with the service relationship on the same type, and use the cosine similarity as the prediction result of the resource anomaly of the order to be delivered.
[0143] In specific application scenarios, the prediction result is represented as the probability value of resource anomalies occurring in orders awaiting delivery, and the device further includes:
[0144] The processing unit is configured to send the probability value to the resource platform if the probability value is greater than a preset value, so that the resource platform can intervene in the order to be delivered based on the probability value.
[0145] It should be noted that other corresponding descriptions of the functional units involved in the resource anomaly prediction device applicable to the server side provided in this embodiment can be found in [reference]. Figure 1 and Figure 2 The corresponding description in [the document] will not be repeated here.
[0146] Based on the above, Figures 1-2 Accordingly, this application embodiment also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method. Figures 1-2 The method for predicting resource anomalies is shown.
[0147] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.
[0148] Based on the above, Figures 1-2 The method shown, and Figure 4 To achieve the above objectives, the present application also provides a server-side physical device, specifically a computer, server, or other network device, as shown in the virtual device embodiment. This physical device includes a storage medium and a processor; the storage medium stores computer programs; the processor executes the computer programs to achieve the above-mentioned objectives. Figures 1-2 The method for predicting resource anomalies is shown.
[0149] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0150] Those skilled in the art will understand that the physical device structure for predicting resource anomalies provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0151] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device for processing store search information, supporting the operation of the information processing program and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software within the information processing physical device.
[0152] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented in hardware. By applying the technical solution of this application, compared with the existing methods, this application uses a heterogeneous graph neural network to describe the vector representation of multi-party nodes on different edge types. While covering the first-order risk propagation logic, it can add the information propagation and accumulation capabilities of second-order and higher-order risks of individual participants in the process of resource anomaly prediction. It compresses high-order heterogeneous graph data into low-dimensional vector representations and introduces the propagation modes of second-order and higher-order risks into the representation calculation process, additionally providing the ability to model the mutual risk influence between different nodes, thereby improving the accuracy of resource anomaly prediction results.
[0153] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.
[0154] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A method for predicting resource anomalies, characterized in that, include: The service fulfillment process is set up in conjunction with the delivery scenario. Based on the service fulfillment process, historical delivery orders are abstracted into a heterogeneous graph with service meaning. The heterogeneous graph includes multiple nodes involved in the delivery scenario and different edge types formed by the nodes. The edge type is used to describe the service relationship between the multiple nodes. For the different edge types formed by the nodes, a graph neural network is used to describe the vector representations of the multi-party nodes in the heterogeneous graph on different edge types. The graph neural network has a multi-layer structure. The aggregation layer in the graph neural network samples the neighboring nodes for each node. The edge representations of the neighboring nodes on different edge types are obtained by sampling and the initial edge representations of the current node on different edge types are updated using the edge representations of the neighboring nodes on different edge types. The intermediate edge representations of the multi-party nodes on different edge types are obtained. The edge attention layer in the graph neural network is used to calculate the influence weights of the multi-party nodes on different edge types. The intermediate edge representations of the multi-party nodes on different edge types are updated using the influence weights and the edge representations of the multi-party nodes on different edge types are obtained. In response to a prediction instruction that a resource anomaly occurs in an order to be delivered, the vector representations of the multi-party nodes involved in the order to be delivered on a preset type are determined by using the vector representations of the multi-party nodes in the heterogeneous graph with service meaning on different edge types. From the vector representations of multiple nodes involved in the order to be delivered in a preset type, select the vector representations of two nodes with a service relationship in the same type; calculate the cosine similarity between the vector representations of the two nodes with a service relationship in the same type, and use the cosine similarity as the prediction result of the resource anomaly of the order to be delivered.
2. The method according to claim 1, characterized in that, The process of setting up a service fulfillment process in conjunction with the delivery scenario, and abstracting historical delivery orders into a heterogeneous graph with service meaning based on the service fulfillment process, specifically includes: The system acquires information about the suppliers, service providers, and delivery providers involved in the delivery scenario, and uses the service agreements between these suppliers, service providers, and delivery providers to set up a service fulfillment process. Based on the service fulfillment process, the supplier, service provider, and delivery provider are represented as multi-party nodes, and the service flow between the supplier, service provider, and delivery provider is represented as different edge types describing the service relationship between the multi-party nodes; By combining the multi-party nodes and the different edge types describing the service relationships between the multi-party nodes, a heterogeneous graph with service meaning is abstracted.
3. The method according to claim 1, characterized in that, The method of using a graph neural network to describe the vector representations of multi-party nodes in the heterogeneous graph for different edge types formed by the nodes specifically includes: The heterogeneous graph with service meaning is input into a graph neural network, and the multi-layer structure in the graph neural network is used to calculate the representation parameters involved in the description of the multi-party node. The representation parameters include the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types. By utilizing the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types, the supervised learning structure in the graph neural network is used to obtain the intrinsic relationship between the target node and its context node, and output the vector representation of the multi-party node on different edge types in the heterogeneous graph.
4. The method according to claim 3, characterized in that, The step of inputting the heterogeneous graph with service meaning into a graph neural network and using the multi-layer structure of the graph neural network to calculate the representation parameters of the multi-party nodes involved in the description process specifically includes: The heterogeneous graph with service meaning is input into a graph neural network. The initialization layer in the graph neural network is used to randomly initialize and assign values to the representation of the multi-party node and the edge representation of the multi-party node on different edge types, so as to obtain the basic representation of the multi-party node and the initial edge representation of the multi-party node on different edge types. The aggregation layer in the graph neural network samples the neighboring nodes for each node, and uses the sampled edge representations of the neighboring nodes in different edge types to update the initial edge representations of the current node in different edge types, thus obtaining the intermediate edge representations of the multi-party nodes in different edge types. The influence weights of the multi-party nodes on different edge types are calculated using the edge attention layer in the graph neural network, and the middle edge representations of the multi-party nodes on different edge types are updated using the influence weights to obtain the edge representations of the multi-party nodes on different edge types.
5. The method according to claim 4, characterized in that, The process of using the aggregation layer in the graph neural network to sample neighboring nodes for each node, updating the initial edge representation of the current node in different edge types using the edge representations of neighboring nodes obtained from the sampling, and obtaining the intermediate edge representations of multi-party nodes in different edge types specifically includes: The aggregation layer in the graph neural network is used to perform a preset number of random walks to sample neighboring nodes along different edge types for each node, forming a multi-party node sampling under different edge types to obtain the edge representation of neighboring nodes on the corresponding edge types. The edge representations of neighboring nodes on the corresponding edge types are sampled from the multi-party nodes under different edge types and then aggregated to obtain the aggregated edge representations. The aggregation process uses at least one of minimum pooling aggregation, maximum pooling aggregation, and average pooling aggregation. The aggregated edge representation is used to update the initial edge representation of the current node under the corresponding type, so as to obtain the intermediate edge representation of the multi-party node under different edge types.
6. The method according to claim 4, characterized in that, The step of calculating the influence weights of multi-party nodes on different edge types using the edge attention layer in the graph neural network, and updating the intermediate edge representations of multi-party nodes on different edge types using the influence weights, to obtain the edge representations of multi-party nodes on different edge types, specifically includes: The edge attention layer in the graph neural network is used to input the intermediate edge representations of the multi-party nodes on different edge types into the edge attention framework, and the logical similarity between the intermediate edge representations on different edge types is calculated using the edge attention framework. The influence weights of multi-party nodes on different edge types are determined based on the logical similarity between the intermediate edge representations on the different edge types. The influence weights are used to perform a weighted summation of the intermediate edge representations of the multi-party nodes on different edge types to obtain the edge representations of the multi-party nodes on different edge types.
7. The method according to claim 3, characterized in that, The process involves utilizing the basic representations of the multi-party nodes and their edge representations on different edge types, employing the supervised learning structure in the graph neural network to obtain the intrinsic relationships between the target node and its context nodes, and outputting vector representations of the multi-party nodes in the heterogeneous graph on different edge types. Specifically, this includes: The basic representation of the multi-party node and the edge representation of the multi-party node on different edge types are input into the supervised learning structure in the graph neural network, and the basic representation of the multi-party node and the edge representation of the multi-party node on different edge types are learned by negative sampling. During the learning process, a pre-set loss function is used to compare the intrinsic relationship between the learning target node and its context nodes. When the loss function is determined to meet the iteration termination condition, the probability distribution of the similarity between the multi-party node in the heterogeneous graph and the target node and its context nodes under different edge type constraints is determined. Based on the probability distribution of similarity between the multi-party node and the target node and its context nodes in the heterogeneous graph under different edge type constraints, the vector representation of the multi-party node in the heterogeneous graph under different edge types is output.
8. A resource anomaly prediction device, characterized in that, include: Abstraction unit is used to set up service fulfillment process in combination with delivery scenario. Based on the service fulfillment process, historical delivery orders are abstracted into a heterogeneous graph with service meaning. The heterogeneous graph includes multiple nodes involved in the delivery scenario and different edge types formed by the nodes. The edge type is used to describe the service relationship between the multiple nodes. The description unit is used to describe the vector representations of multi-party nodes in the heterogeneous graph for different edge types formed by the nodes using a graph neural network. The graph neural network has a multi-layer structure. The aggregation layer in the graph neural network samples the neighboring nodes for each node, updates the initial edge representations of the current node for different edge types using the sampled edge representations of the neighboring nodes for different edge types, obtains the intermediate edge representations of the multi-party nodes for different edge types, calculates the influence weights of the multi-party nodes for different edge types using the edge attention layer in the graph neural network, and updates the intermediate edge representations of the multi-party nodes for different edge types using the influence weights, thus obtaining the edge representations of the multi-party nodes for different edge types. The prediction unit is used to respond to a prediction instruction that a resource anomaly occurs in an order to be delivered, and to determine the vector representation of the multi-party nodes involved in the order to be delivered in a preset type by using the vector representation of the multi-party nodes in the heterogeneous graph with service meaning on different edge types. From the vector representations of multiple nodes involved in the order to be delivered in a preset type, select the vector representations of two nodes with a service relationship in the same type; calculate the cosine similarity between the vector representations of the two nodes with a service relationship in the same type, and use the cosine similarity as the prediction result of the resource anomaly of the order to be delivered.
9. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method for predicting resource anomalies as described in any one of claims 1 to 7.
10. A server-side device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the program, it implements the resource anomaly prediction method according to any one of claims 1 to 7.