Logistics supply and demand matching method and device, medium, product and equipment

By using multi -target task optimization models in the matching and demand matching of logistics supply and demand, the attention model of improvement based on backpack strategies, the problem of difficulty in meeting the diverse needs of the main body of logistics demand for traditional technologies, and realizing the diversified matching and optimization of logistics supply and demand.

CN119358887APending Publication Date: 2025-01-24CHINA MOBILE GROUP DESIGN INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411349771.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Traditional logistics supply and demand matching technology is difficult to meet the diverse needs of logistics demand entities, and the existing technology matching method is single, which cannot effectively meet the dispersed and diversified logistics needs.

Method used

By determining the multi-objective task optimization model based on the data from the logistics supply side and demand side, and using the improved attention model based on the backpack strategy to make decisions on the model, the optimal stable matching solution is obtained.

Benefits of technology

It achieves optimal matching of the diversified needs of logistics supply and demand parties, meets the diversified needs of logistics demand parties, and improves the efficiency and effect of logistics supply and demand matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358887A_ABST
    Figure CN119358887A_ABST
Patent Text Reader

Abstract

The invention discloses a logistics supply and demand matching method and device, a medium, a product and equipment, and the method comprises the steps: determining a multi-target task optimization model based on the data of a logistics supplier and the data of a logistics demander, so as to represent the diversified demands of the supplier and the demander; making a decision on the multi-target task optimization model by using an attention model improved based on a backpack strategy to obtain a decision result; and based on the decision result, determining an optimal stable matching scheme between the logistics supplier and the logistics demander, thereby obtaining a matching scheme capable of meeting diversified demands of the supplier and the demander, and further meeting the diversified demands of the logistics demander.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of logistics supply and demand matching, and in particular to a logistics supply and demand matching method, device, medium, product and equipment. Background Art

[0002] At present, with the advancement of Internet technology and the transformation of economic development mode, the main body of logistics demand has gradually expanded to processing manufacturers, catering departments, fresh food e-commerce, consumers, etc. At the same time, the main body of logistics demand is becoming more and more dispersed, and the demand mode is becoming more and more diversified. In the traditional logistics supply and demand matching technology, it is usually directly matching the historical data of the logistics demand subject and the logistics supply subject, so that the logistics demand subject can be matched with the appropriate logistics supply subject to provide logistics services for the logistics demand subject, but this method is difficult to meet the increasingly diversified needs of the logistics demand subject. Summary of the invention

[0003] In order to solve the above technical problems, the embodiments of the present application propose a logistics supply and demand matching method, device, medium, product and equipment, which can optimize the logistics supply and demand matching plan to meet the diverse needs of logistics demanders.

[0004] In a first aspect, an embodiment of the present application provides a logistics supply and demand matching method, including:

[0005] Determine the multi-objective task optimization model based on the data of logistics suppliers and logistics demanders;

[0006] Using the attention model improved based on the knapsack strategy, making decisions on the multi-objective task optimization model to obtain a decision result;

[0007] Based on the decision result, the optimal stable matching solution between the logistics supplier and the logistics demander is determined.

[0008] Optionally, determining a multi-objective task optimization model based on the data of the logistics supplier and the data of the logistics demander includes:

[0009] Based on the data of the logistics supplier and the data of the logistics demander, determine a first aggregate satisfaction level and a second aggregate satisfaction level, wherein the first aggregate satisfaction level is used to indicate the satisfaction evaluation of the logistics supplier to the logistics demander, and the second aggregate satisfaction level is used to indicate the satisfaction evaluation of the logistics demander to the logistics supplier;

[0010] Based on the first aggregated satisfaction level and the preset first expected value, a first satisfaction evaluation optimization objective function is constructed, and based on the second aggregated satisfaction level and the preset second expected value, a second satisfaction evaluation optimization objective function is constructed;

[0011] Based on the data of the logistics demander, the first aggregated satisfaction level and the first expected value, construct a first satisfaction level matrix for indicating the internal satisfaction level of the logistics demander;

[0012] Based on the data of the logistics providers, constructing a second satisfaction matrix for indicating satisfaction among the logistics providers;

[0013] The multi-objective task optimization model is constructed based on the first satisfaction evaluation optimization objective function, the second satisfaction evaluation optimization objective function, the first satisfaction matrix and the second satisfaction matrix.

[0014] Optionally, determining the first aggregate satisfaction level and the second aggregate satisfaction level based on the data of the logistics supplier and the data of the logistics demander includes:

[0015] Based on the data of the logistics supplier and the data of the logistics demander, determine the value of the first evaluation index system and the value of the second evaluation index system, wherein the first evaluation index system is used to indicate the satisfaction evaluation of the logistics supplier to the logistics demander, and the second evaluation index system is used to indicate the satisfaction evaluation of the logistics demander to the logistics supplier;

[0016] Determining a first indicator weight corresponding to the first evaluation indicator system and a second indicator weight corresponding to the second evaluation indicator system;

[0017] The first aggregate satisfaction level is calculated based on the value of the first evaluation index system and the first index weight, and the second aggregate satisfaction level is calculated based on the value of the second evaluation index system and the second index weight.

[0018] Optionally, determining a first indicator weight corresponding to the first evaluation indicator system and a second indicator weight corresponding to the second evaluation indicator system includes:

[0019] Using the analytic hierarchy process, determining the subjective weight corresponding to the first evaluation index system and the subjective weight corresponding to the second evaluation index system;

[0020] Using the maximum entropy principle, determine the objective weight corresponding to the first evaluation index system and the objective weight corresponding to the second evaluation index system;

[0021] The first indicator weight is calculated based on the subjective weight and the objective weight corresponding to the first evaluation indicator system, and the second indicator weight is calculated based on the subjective weight and the objective weight corresponding to the second evaluation indicator system.

[0022] Optionally, constructing a first satisfaction matrix indicating internal satisfaction of the logistics demander based on the data of the logistics demander, the first aggregated satisfaction and the first expected value includes:

[0023] Based on the data of the logistics demander, construct a competition association intensity function of the logistics demander;

[0024] Calculating a first satisfaction difference of the logistics demander based on the first aggregated satisfaction level and the first expected value;

[0025] Calculating an amplification factor based on the competitive association strength function, and calculating a second satisfaction difference value according to the amplification factor and the first satisfaction difference value;

[0026] Based on the standardized second satisfaction difference, a first satisfaction matrix for indicating the internal satisfaction of the logistics demander is constructed.

[0027] Optionally, constructing a second satisfaction matrix indicating satisfaction among the logistics suppliers based on the data of the logistics suppliers includes:

[0028] Based on the data of the logistics supplier, construct the collaboration relationship strength function and resource sharing relationship strength function of the logistics supplier;

[0029] Based on the collaboration relationship strength function and the resource sharing relationship strength function, a second satisfaction matrix is ​​constructed to indicate the satisfaction between the logistics suppliers.

[0030] Optionally, the backpack strategy is used to indicate that the logistics supplier is used as a backpack with a capacity limit, and the logistics demander is used as an item to be placed in the backpack with a capacity limit;

[0031] The attention model includes an encoder and a decoder; the encoder is used to use a self-attention mechanism to determine an embedded representation of the image according to the input feature sequence of each of the items; the decoder is used to use a self-attention mechanism to calculate a probability distribution according to the embedded representation of the image, so as to search for the elements required to be output at each time step in the feature sequence of each of the items according to the probability distribution.

[0032] Optionally, the encoder comprises N attention layers, each of which comprises a single-head attention substructure, a first multi-head attention module and a feedforward neural network;

[0033] Among them, in each attention layer:

[0034] The single-head attention substructure is used to: perform linear transformation on the embedded representation of each input node to obtain a first query vector, a first key vector and a first value vector, calculate the correlation between the first query vector and the first key vector, reduce the correlation according to the dimension of the first key vector, perform normalization processing based on the reduced correlation to obtain an attention distribution, use the attention distribution as a weight to weight the first value vector, and aggregate information of each node and information of nodes adjacent to the node based on the weighted first value vector to obtain a node representation;

[0035] The first multi-head attention module is used to: extract features from the node representations obtained from each of the single-head attention substructures, and aggregate each extracted feature through linear transformation to obtain multi-head attention output information;

[0036] The feedforward neural network is used to: use activation function, skip connection and batch normalization to process the information input into the feedforward neural network to obtain the embedded representation of each node output by the attention layer, wherein the information input into the feedforward neural network is obtained after the multi-head attention output information is processed by skip connection and batch normalization;

[0037] Wherein, each of the nodes corresponds to each of the items one by one, the embedding representation of each of the input nodes in the first attention layer refers to the feature sequence of each of the items, and the embedding representation of each of the input nodes in each attention layer except the first attention layer refers to the embedding representation of each of the nodes output by the previous attention layer;

[0038] The embedded representation of the graph is calculated based on the embedded representation of each node output by the last attention layer.

[0039] Optionally, the decoder comprises an aggregation layer, a second multi-head attention module and a probability layer;

[0040] Where, at each time step:

[0041] The aggregation layer is used to: construct a context vector based on the embedding representation of the graph, the embedding representation of the output node of the encoder in the previous time step, and the current remaining capacity of the backpack with capacity constraints, so as to generate a second query vector according to the context vector, and generate a second key vector and a second value vector according to the embedding representation of the output node;

[0042] The second multi-head attention module is used to: generate a fusion vector based on the second query vector, the second key vector and the second value vector;

[0043] The probability layer is used to: perform a linear transformation on the fusion vector to obtain a third query vector, so as to calculate the probability distribution of the time step through the tanh function and the softmax function according to the third query vector, so as to search for the elements required to be output at the time step.

[0044] Optionally, the attention model is trained using a policy gradient-based reinforcement learning algorithm;

[0045] Wherein, the policy gradient-based reinforcement learning algorithm includes:

[0046] Off-policy algorithms for evaluating and determining target policies;

[0047] A distributed approximate strategy optimization algorithm for updating parameters, wherein a loss function of the distributed approximate strategy optimization algorithm is determined based on KL divergence; and

[0048] Actor-Critic algorithm.

[0049] In a second aspect, an embodiment of the present application provides a logistics supply and demand matching device, including:

[0050] The optimization model determination module is used to determine the multi-objective task optimization model based on the data of the logistics supplier and the data of the logistics demander;

[0051] A decision module, used to make a decision on the multi-objective task optimization model by using an attention model improved based on a knapsack strategy to obtain a decision result;

[0052] A matching solution determination module is used to determine the optimal stable matching solution between the logistics supplier and the logistics demander based on the decision result.

[0053] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the logistics supply and demand matching method described in any one of the above items are implemented.

[0054] In a fourth aspect, an embodiment of the present application provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of any of the above-mentioned logistics supply and demand matching methods.

[0055] In a fifth aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the steps of any of the above-mentioned logistics supply and demand matching methods when executing the computer program.

[0056] In summary, the embodiments of the present application have at least the following beneficial effects:

[0057] By adopting the embodiment of the present application, a multi-objective task optimization model is determined based on the data of the logistics supplier and the data of the logistics demander to characterize the diversified demands of both the supply and demand sides; a decision is made on the multi-objective task optimization model using an attention model improved based on the knapsack strategy to obtain a decision result; based on the decision result, the optimal stable matching scheme between the logistics supplier and the logistics demander is determined, thereby obtaining a matching scheme that can meet the diversified demands of both the supply and demand sides, thereby meeting the diversified demands of the logistics demander. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is a flow chart of the logistics supply and demand matching method provided in the embodiment of the present application;

[0059] Figure 2 is a schematic diagram of bilateral matching provided in an embodiment of the present application;

[0060] Figure 3 It is a structural schematic diagram of a logistics supply and demand matching device provided in an embodiment of the present application;

[0061] Figure 4 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0063] In the description of the present application, the terms "first", "second", "third", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, features defined as "first", "second", "third", etc. may explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, the meaning of "multiple" is two or more. In the description of the present application, the term "including" and its variations are open inclusions, i.e., "including but not limited to". The term "based on" means "at least partially based on". The term "according to" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments".

[0064] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0065] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this application have the same meaning as those commonly understood by those skilled in the art. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood by specific circumstances.

[0066] First, see Figure 1 , shows a flow chart of a logistics supply and demand matching method provided in an embodiment of the present application, the method includes steps S101-S103, which are as follows:

[0067] S101, determining a multi-objective task optimization model based on the data of the logistics supplier and the data of the logistics demander;

[0068] Exemplarily, the logistics demanders may be cold chain logistics demand entities, which may include at least one of the following: agricultural product producers, agricultural product middlemen, agricultural product sellers, processing manufacturers, catering departments, fresh food e-commerce, and consumers; the logistics suppliers may include at least one of the following: corporate self-operated logistics, third-party logistics companies, agricultural cooperatives, and agricultural product companies.

[0069] In one example, the data of the logistics supplier and the data of the logistics demander may be data in a bilateral matching subject feature library established based on the characteristic information of the logistics supplier and the logistics demander respectively provided by the logistics supplier and the logistics demander. Generally, the data entered therein needs to be processed and the authenticity and rationality of the supply and demand cooperation information needs to be reviewed.

[0070] S102, using the attention model improved based on the knapsack strategy to make a decision on the multi-objective task optimization model to obtain a decision result;

[0071] It should be noted that the purpose of introducing the knapsack strategy into the attention model is to enable the attention mechanism to allocate attention weights more intelligently by drawing on the idea of ​​the knapsack problem, so as to better process important information in the input sequence. Among them, the knapsack problem is a classic optimization problem. Its core lies in how to select several items from a group of items and put them into the knapsack so that the total value of the items in the knapsack is maximized while not exceeding the capacity limit of the knapsack. The knapsack problem can be divided into many types, such as the 0-1 knapsack problem and the multiple knapsack problem. Among them, the attention mechanism is mainly used to solve sequence-to-sequence tasks in deep learning. It allows the model to selectively focus on different parts of the input sequence according to the currently generated output when generating the output sequence. It improves the model's utilization of input information and enhances the model's ability to handle long-distance dependencies.

[0072] It can be understood that the multi-objective task optimization model in this embodiment is used to characterize the diverse demands between logistics suppliers and logistics demanders, and making decisions on it is equivalent to the process of optimizing and solving the multi-objective task optimization model.

[0073] S103: Based on the decision result, determine the optimal stable matching solution between the logistics supplier and the logistics demander.

[0074] It should be noted that see Figure 2 For the bilateral matching problem between logistics suppliers and logistics demanders, for the convenience of analysis, let I = {1, 2, ..., M}, J = {1, 2, ..., N}, where there are M logistics suppliers in total, then the set of logistics suppliers can be expressed as C = {C1, C2, ..., C M}, where M ≥ 2, C i represents the i-th supplier, where i∈I, and the set of logistics demanders Q={Q1,Q2,…,Q N}, where N≥2.

[0075] Define a multi-valued mapping μ∶C∪Q→C∪Q to represent a one-to-many bilateral matching between the set C of logistics suppliers and the set Q of logistics demanders if and only if The following conditions must be met:

[0076] 1)

[0077] 2)μ(Q j )∈C∪Q j ;

[0078] 3) If μ(C i )={Q j1 ,Q j2 ,…,Q jk},in Then μ(Q j1 )=μ(Q j2 )=…=μ(Q jk )=C i ,and

[0079] 4) If μ(Q j )=C i , then Q j ∈μ(C i );

[0080] 5) Among them, μ(C i )={Q j1 ,Q j2 ,…,Q jk} represents the i-th logistics supplier C i With multiple logistics demand parties j1 ,Q j2 ,…,Q jk In the bilateral matching μ, it is a mapping relationship; C i =μ(μ j ) and Q i ∈μ(C i ) both represent the supplier C i Q j can be matched, that is, by C i In the frozen processing, cold chain transportation, storage, circulation, sales and other links to provide customers with j Provide comprehensive logistics services; when μ(Q j )=Q j When Q j Matches itself in μ, i.e. Q j In the bilateral matching μ, no suitable logistics provider was found to provide distribution services.

[0081] Assume R i =(r i1 ,r i2 ,…,r in ) is the supplier C i The priority sorting vector of the set Q of logistics demanders, where r ij ∈J={1,2,…,N} represents the supplier C i After comprehensively considering the characteristic information of the set Q of logistics demanders, the demander Q j Ranked r ij Bit.

[0082] Assume T j =(t 1j ,t 2j ,…,t mj ) is the demand side Qj Given a preference sequence vector, where t ij ∈I={1,2,…,M} represents the demand side Q j The assessment will be provided by C i Ranked t ij bit. And R i ,T j The sequence values ​​in are all strictly ordered, that is, when j≠k, r ij ≠r ik , when i≠l, t ij ≠t lj .

[0083] For a one-to-many bilateral matching μ, if the matching pair (C i ,Q j ) satisfies one of the following conditions, then it is a μ-hindered stable pair:

[0084] 1) Q j ∈μ(C i ), Q k ∈μ(C j ), satisfying r ij <r ik And t ij <t lj ;

[0085] 2) Q k ∈μ(C i ), μ(Q j )=Q j , satisfying r ij <r ik ;

[0086] 3) Q j ∈μ(C l ), μ(C i )=C i , satisfying t ij <t lj ;

[0087] 4) μ(C i )=C i ,μ(Q j )=Q j .

[0088] If there is no μ-barrier stable pair for a one-to-many bilateral matching μ, then μ is called a stable matching, that is, μ is a stable matching; otherwise, μ is called an unstable matching.

[0089] In an optional implementation, the multi-objective task optimization model is determined based on the data of the logistics supplier and the data of the logistics demander, including:

[0090] Based on the data of the logistics supplier and the data of the logistics demander, determine a first aggregate satisfaction level and a second aggregate satisfaction level, wherein the first aggregate satisfaction level is used to indicate the satisfaction evaluation of the logistics supplier to the logistics demander, and the second aggregate satisfaction level is used to indicate the satisfaction evaluation of the logistics demander to the logistics supplier;

[0091] Based on the first aggregated satisfaction level and the preset first expected value, a first satisfaction evaluation optimization objective function is constructed, and based on the second aggregated satisfaction level and the preset second expected value, a second satisfaction evaluation optimization objective function is constructed;

[0092] In some specific examples, logistics provider C i Based on the index E h Expected Positioning (i.e. the first expected value) is the reference point, and the logistics demand side Q j In indicator E h The actual evaluation value b jh In contrast, jh The first aggregate satisfaction In order to eliminate the influence of different indicator dimensions, a standardization method is used The expected values ​​and evaluation values ​​of both parties are normalized to obtain and Get the first expected utility value The logistics provider C i For logistics demand side Q j The overall expected value of is the weighted sum of the expected utility of each indicator, as follows:

[0093]

[0094] Expected Utility EU ij Considered as the satisfaction of logistics demanders α ij , we get the optimization objective function of the first satisfaction evaluation of the logistics supplier to the demander:

[0095]

[0096] Among them, x ij is a decision variable, when x ij =1 means (C i ,Q j ) become a matching pair in the one-to-many bilateral matching μ.

[0097] Similarly, the second satisfaction evaluation optimization objective function is:

[0098]

[0099] It is understandable that since the bilateral subjects have an expected attribute value and weight for each indicator of the matching object according to their own situation, the smaller the matching distance between the expected attribute value and the actual attribute value calculated by the weight of each indicator, the more satisfied they are with the matching object. Using the bilateral satisfaction aggregation method based on expected utility, both parties give their expected values ​​of their ideal cooperation objects based on the evaluation index system, and matching is to find the matching subject with the actual evaluation value that has the smallest gap with their expected value.

[0100] Based on the data of the logistics demander, the first aggregated satisfaction level and the first expected value, construct a first satisfaction level matrix for indicating the internal satisfaction level of the logistics demander;

[0101] Based on the data of the logistics providers, constructing a second satisfaction matrix for indicating satisfaction among the logistics providers;

[0102] The multi-objective task optimization model is constructed based on the first satisfaction evaluation optimization objective function, the second satisfaction evaluation optimization objective function, the first satisfaction matrix and the second satisfaction matrix.

[0103] In an optional implementation, determining the first aggregate satisfaction level and the second aggregate satisfaction level based on the data of the logistics supplier and the data of the logistics demander includes:

[0104] Based on the data of the logistics supplier and the data of the logistics demander, determine the value of the first evaluation index system and the value of the second evaluation index system, wherein the first evaluation index system is used to indicate the satisfaction evaluation of the logistics supplier to the logistics demander, and the second evaluation index system is used to indicate the satisfaction evaluation of the logistics demander to the logistics supplier;

[0105] Exemplarily, the first evaluation index system may include at least one of the following dimensions: supply guarantee service capability index, management and operation level index, and cooperation value potential index. Among them, the supply guarantee service capability index includes at least one of the following: transaction price, transportation speed, logistics network coverage, cargo time efficiency, and cargo loss rate, all of which are quantitative indicators, and the values ​​are expressed in the form of intervals, reflecting the transportation efficiency of the supplier; the management and operation level index includes at least one of the following: capital operation level, information construction level, and transportation risk management level, all of which are qualitative indicators; the cooperation value potential index includes at least one of the following: customer evaluation index, order completion quality, market influence, and collaboration ability, and the cooperation value potential index is quantified based on historical orders and data.

[0106] Exemplarily, the second evaluation index system may include at least one of the following: transaction subject qualifications and grades, production and operation scale level, industry integrity level, and transaction settlement timeliness. Among them, transaction subject qualifications and grades, production and operation scale level are qualitative indicators, and industry integrity level and transaction settlement timeliness are indicators that are quantified based on historical orders and data.

[0107] In some specific examples, the first evaluation index system can be expressed as E = (E1, E2, ..., E p ), E p is the pth indicator attribute, the supplier C i For N demand parties in indicator E p The preference sequence obtained by evaluating and ranking is in The given sequence value r ij represents satisfaction. The larger the ordinal value, the higher the satisfaction. On the other hand, the first evaluation index system can be expressed as F = (F1, F2, ..., F s ) for satisfaction evaluation. Indicates Q j C i Satisfaction on the indicator set F, in Demand side Q j In the indicator F s In the preference sequence given below, the supplier C i Ranked t ij bit, t ij The larger the value, the higher the satisfaction.

[0108] Determining a first indicator weight corresponding to the first evaluation indicator system and a second indicator weight corresponding to the second evaluation indicator system;

[0109] It should be noted that, in this embodiment, since the indicator types and units in the evaluation indicator sets constructed by the set C of logistics suppliers and the set Q of demanders may be different, the indicators can be dimensionlessly processed before determining the indicator weights.

[0110] The first aggregate satisfaction level is calculated based on the value of the first evaluation index system and the first index weight, and the second aggregate satisfaction level is calculated based on the value of the second evaluation index system and the second index weight.

[0111] In some specific examples, the first aggregate satisfaction can be calculated by the following formula:

[0112]

[0113] in, represents the value of the first evaluation index system (i.e., the initial satisfaction of the logistics supplier to the logistics demander), ω ie Represents the weight of the first indicator.

[0114] In some specific examples, the second aggregate satisfaction can be calculated by the following formula:

[0115]

[0116] in, is the value of the second evaluation index system (i.e. the initial satisfaction of the logistics demand side with the logistics supplier), ω jf Represents the weight of the second indicator.

[0117] In an optional implementation manner, determining the first indicator weight corresponding to the first evaluation indicator system and the second indicator weight corresponding to the second evaluation indicator system includes:

[0118] Using the analytic hierarchy process, determining the subjective weight corresponding to the first evaluation index system and the subjective weight corresponding to the second evaluation index system;

[0119] In some specific examples, the subjective weights are determined by using the hierarchical analysis method, which can be achieved by constructing a judgment matrix A = [a ij ]∈R n*n To conduct consistency test, calculate the subjective weight ω corresponding to each indicator in the evaluation index system ai :

[0120]

[0121] in,

[0122] Using the maximum entropy principle, determine the objective weight corresponding to the first evaluation index system and the objective weight corresponding to the second evaluation index system;

[0123] In some specific examples, the maximum entropy principle is used to determine the objective weights In order to reduce the subjectivity of the hierarchical analysis method, the weight assignment model is established as follows:

[0124]

[0125] Among them, Where λ∈(0,1) is the weight coefficient of the objective function G, and 1-λ is the weight coefficient of the objective function H.

[0126] Among them, the Lagrangian function is constructed as follows:

[0127]

[0128] According to extreme value theory, Taking partial derivatives we get

[0129]

[0130] The first indicator weight is calculated based on the subjective weight and the objective weight corresponding to the first evaluation indicator system, and the second indicator weight is calculated based on the subjective weight and the objective weight corresponding to the second evaluation indicator system.

[0131] In some specific examples, based on the subjective weight and objective weight, the indicator weight ω can be calculated by the following formula: ie :

[0132]

[0133] Finally, we get the set C of logistics suppliers and the set Q of logistics demanders in the evaluation index set E = (E1, E2, …, E P ) on the weight matrix corresponding to the first evaluation index system of satisfaction (i.e., the first index weight) And the weight matrix corresponding to the second evaluation index system (i.e. the second index weight)

[0134] In an optional implementation, constructing a first satisfaction matrix indicating the internal satisfaction of the logistics demander based on the data of the logistics demander, the first aggregated satisfaction and the first expected value includes:

[0135] Based on the data of the logistics demander, construct a competition association intensity function of the logistics demander;

[0136] In some specific examples, when two demanders have logistics and distribution needs for the same supplier, they face the need to compete for and seize a certain high-quality resource, and there is resource competition between the two. In this way, the intensity of resource competition relationship can be expressed as j In all important resources to another competitor Q k Competitive pressure:

[0137]

[0138] Among them, q jy Q for the demand side j The benefit value generated by using resource y, q j Q j The benefits generated when facing all important resources, q ky For competitor Q k The benefit value generated by using resource y, q k Q kThe benefits generated in the face of all important resources.

[0139] Calculating a first satisfaction difference of the logistics demander based on the first aggregated satisfaction level and the first expected value;

[0140] In some specific examples, given the demand side Q j Satisfaction And competitor Q k Satisfaction β k , calculate the first satisfaction difference Δ(Q j ,Q k ):

[0141]

[0142] Calculating an amplification factor based on the competitive association strength function, and calculating a second satisfaction difference value according to the amplification factor and the first satisfaction difference value;

[0143] In some specific examples, the second satisfaction difference based on competitive association can be obtained by the following formula:

[0144]

[0145] Among them, RP(Q j ,Q k ) is the competitive correlation intensity between demand parties, (1+RP(Q j ,Q k )) θ is the magnification factor, and θ is the preset coefficient.

[0146] Based on the standardized second satisfaction difference, a first satisfaction matrix for indicating the internal satisfaction of the logistics demander is constructed.

[0147] In some specific examples, Standardized processing to obtain Finally, the internal satisfaction matrix of the logistics demand subject is obtained as follows: jk ] n*n :

[0148]

[0149] It can be understood that this embodiment calculates the satisfaction between logistics demand parties based on the competition association theory, and aggregates the satisfaction of logistics demand parties by the competition association strength and the satisfaction difference, wherein the competition intensity has an amplifying effect on the satisfaction difference, and the greater the intensity of the competition relationship, the smaller the satisfaction between logistics demand entities based on the difference.

[0150] In an optional implementation, constructing a second satisfaction matrix for indicating satisfaction among the logistics suppliers based on the data of the logistics suppliers includes:

[0151] Based on the data of the logistics supplier, construct the collaboration relationship strength function and resource sharing relationship strength function of the logistics supplier;

[0152] In some specific examples, when the supplier C i With C l When working together, a cooperative relationship is formed to achieve mutual benefit and create additional benefits. The intensity of the cooperative relationship is measured by the interaction volume in all periods and the cooperative activity in the most recent period, which is expressed as follows:

[0153]

[0154] in, is the number of cooperation in the kth period, The number of collaborations in the latest period, is the number of revenue growths in the kth period, τ1 and τ2 are weight coefficients respectively.

[0155] In some specific examples, when the supplier C i With C l When working together, resources such as funds, energy, information, and transportation are shared. The resource sharing level and complementarity level are used to obtain the resource sharing relationship strength, which is expressed as follows:

[0156]

[0157] in, represents the shared utilization efficiency of the d-th resource, represents the shared quantity of the d-th resource, r d (C i ,C l ) represents the Chebyshev distance between two suppliers in the dth resource dimension, It indicates the number of different resources in terms of data, information, transportation, etc. for the dth resource.

[0158] Based on the collaboration relationship strength function and the resource sharing relationship strength function, a second satisfaction matrix γ=[γ il ] m*m , which is expressed as follows:

[0159]

[0160] It can be understood that in this embodiment, based on the constraints, synergies and correlation effects between suppliers in the agricultural products cold chain logistics market, there is a collaborative, mutually beneficial and resource-sharing relationship, which is measured by the strength of the collaborative relationship and the strength of the resource-sharing relationship, and further weighted to obtain the internal satisfaction of the cold chain logistics supply entity.

[0161] Furthermore, constructing the multi-objective task optimization model based on the first satisfaction evaluation optimization objective function, the second satisfaction evaluation optimization objective function, the first satisfaction matrix and the second satisfaction matrix may include:

[0162] The multi-objective task optimization model is expressed as follows:

[0163] F=(Z1,Z2,Z3,Z4)

[0164]

[0165] In an optional implementation, the backpack strategy is used to indicate that the logistics supplier is used as a backpack with a capacity limit, and the logistics demander is used as an item to be placed in the backpack with a capacity limit;

[0166] The attention model includes an encoder and a decoder; the encoder is used to use a self-attention mechanism to determine an embedded representation of the image according to the input feature sequence of each of the items; the decoder is used to use a self-attention mechanism to calculate a probability distribution according to the embedded representation of the image, so as to search for the elements required to be output at each time step in the feature sequence of each of the items according to the probability distribution.

[0167] In some specific examples, the construction of the policy network is based on the attention model, and the network framework is a basic encoding-decoding model. In the encoding stage, the two-dimensional feature sequence of n items is input where x i =(w i ,v i ), using the attention model to obtain the embedded representation of the input sequence In the decoding stage, the optimal stable matching solution is found from the output matching relationship sequence.

[0168] In an optional embodiment, the encoder includes N attention layers, each of which includes a single-head attention substructure, a first multi-head attention module, and a feedforward neural network;

[0169] Among them, in each attention layer:

[0170] The single-head attention substructure is used to: perform linear transformation on the embedded representation of each input node to obtain a first query vector, a first key vector and a first value vector, calculate the correlation between the first query vector and the first key vector, reduce the correlation according to the dimension of the first key vector, perform normalization processing based on the reduced correlation to obtain an attention distribution, use the attention distribution as a weight to weight the first value vector, and aggregate information of each node and information of nodes adjacent to the node based on the weighted first value vector to obtain a node representation;

[0171] The first multi-head attention module is used to: extract features from the node representations obtained from each of the single-head attention substructures, and aggregate each extracted feature through linear transformation to obtain multi-head attention output information;

[0172] The feedforward neural network is used to: use activation function, skip connection and batch normalization to process the information input into the feedforward neural network to obtain the embedded representation of each node output by the attention layer, wherein the information input into the feedforward neural network is obtained after the multi-head attention output information is processed by skip connection and batch normalization;

[0173] Wherein, each of the nodes corresponds to each of the items one by one, the embedding representation of each of the input nodes in the first attention layer refers to the feature sequence of each of the items, and the embedding representation of each of the input nodes in each attention layer except the first attention layer refers to the embedding representation of each of the nodes output by the previous attention layer;

[0174] The embedded representation of the graph is calculated based on the embedded representation of each node output by the last attention layer.

[0175] In some specific examples, the idea of ​​encoder design is to use the self-attention mechanism to obtain the attention distribution within the feature sequence, and aggregate the value vector information of neighboring nodes (including its own nodes) as a deep node representation.

[0176] (1) First, the single-head attention substructure takes the node embedding sequence obtained in the previous layer as input, and sets H = [h1,…,h n ] T , each node undergoes three different linear transformations to obtain the query vector Q, key vector K and value vector V respectively.

[0177] Q=W Q H,K=W K H,V=W V H

[0178] (2) Using the form of scaled dot product attention, the correlation between each query vector and the key vector is calculated, and the key vector is proportionally reduced according to its dimension to adjust the size of the inner product. The softmax function is used to normalize the attention distribution and weight the value vector:

[0179]

[0180] (3) The single-head attention substructure uses the attention distribution to weight the value vector and aggregate the information of each neighboring node (including its own node) as a node representation.

[0181] (4) In the multi-head attention module, features are extracted with different emphases, and then the linear transformation matrix W is used m Aggregate the information extracted by each single attention head.

[0182]

[0183] (5) Use skip connections and batch normalization after the multi-head attention sublayer:

[0184]

[0185] (6) Then pass through a layer of feedforward neural network, use the ReLU function as the activation function, use skip connection and batch normalization:

[0186]

[0187] (7) Finally, after N layers of attention, we obtain the embedding representation of n nodes and will As the embedded representation of the graph, for the convenience of description, the number of network layers N is omitted below.

[0188] In an optional embodiment, the decoder includes an aggregation layer, a second multi-head attention module and a probability layer;

[0189] Where, at each time step:

[0190] The aggregation layer is used to: construct a context vector based on the embedding representation of the graph, the embedding representation of the output node of the encoder in the previous time step, and the current remaining capacity of the backpack with capacity constraints, so as to generate a second query vector according to the context vector, and generate a second key vector and a second value vector according to the embedding representation of the output node;

[0191] The second multi-head attention module is used to: generate a fusion vector based on the second query vector, the second key vector and the second value vector;

[0192] The probability layer is used to: perform a linear transformation on the fusion vector to obtain a third query vector, so as to calculate the probability distribution of the time step through the tanh function and the softmax function according to the third query vector, so as to search for the elements required to be output at the time step.

[0193] In some specific examples, in the decoding stage, the decoder is designed in a step-by-step construction manner. In the output process at each moment, the self-attention mechanism is used to calculate the probability distribution of all elements in the input sequence. According to different search methods, one element is output at each time step until the decoding process is terminated.

[0194] (1) In the aggregation layer, unlike Q=K=V in the encoder’s multi-head attention sublayer, the decoder constructs a context vector related to the question in is the embedded representation of the graph, is the embedding representation of the output node at the previous moment, which all come from the final output of the encoder, W t is the remaining capacity of the backpack at the current moment.

[0195] (2) Using the constructed context vector c t Generate query vector, the node representation obtained by the encoder is used as the reference vector sequence to generate key vector and value vector. Let H = [h1,…,h n ], using the multi-head attention module to obtain a deep context vector representation, recorded as a fusion vector The calculation is as follows:

[0196]

[0197] (3) At the same time, a mask mechanism is introduced to mask nodes that do not meet the conditions. For items that have been put into the backpack and items whose weight is greater than the remaining capacity of the backpack, the weight is set to negative infinity at the next time step, that is, or j >W t .

[0198] (4) In the probability layer, for all times t = 1, 2, ..., T, for the sake of convenience, the fusion vector obtained by the aggregation layer is Represented as h c After linear transformation, the query vector is generated, the weight is calculated using the tanh function, and the range is controlled by the constant C. Then the softmax function is used to obtain the final probability distribution:

[0199]

[0200] (5) After obtaining the probability distribution, select an element from the input sequence at each moment and output it according to different search methods. Common search methods are:

[0201] A. Greedy search, that is, at each time step, the node with the highest probability is selected as the output. At each step, the current optimal point is selected, which has lower time complexity and space complexity.

[0202] B. Beam search is an improvement on greedy search. It sets the beam width and selects the first d solutions from all candidate solutions according to the conditional probability distribution at each time step. It obtains better solutions by expanding the search range.

[0203] In an optional embodiment, the attention model is trained using a policy gradient-based reinforcement learning algorithm;

[0204] Wherein, the policy gradient-based reinforcement learning algorithm includes:

[0205] Off-policy algorithms for evaluating and determining target policies;

[0206] A distributed approximate strategy optimization algorithm for updating parameters, wherein a loss function of the distributed approximate strategy optimization algorithm is determined based on KL divergence; and

[0207] Actor-Critic algorithm.

[0208] It can be understood that in this embodiment, the multi-objective function is decided by using an attention model based on the backpack strategy improvement. Each logistics supplier to be matched in the logistics supply subject is regarded as a backpack with limited capacity, and the logistics demander is represented as an item to be put into the backpack. The bilateral subject is assigned a normalized satisfaction value to represent the value of each item. Appropriate items are selected and put into the backpack in turn to maximize the value of the items put in. The goal task of maximizing the satisfaction function between the logistics supply and demand subjects based on expected utility and the internal satisfaction of the decision-making subjects of the supplier and demander is effectively converted. An encoder-decoder framework is built, and a deep reinforcement learning method based on policy gradient is used to continuously optimize the parameters of the network model. Combined with the REINFORCE algorithm and the Actor-Critic algorithm, three forms of valuation networks are introduced. The attention model obtains the matching relationship according to the sequence output by the probability distribution in the decoding stage, and ensures that all matching pairs are stable matches, thereby obtaining the final matching result.

[0209] In some specific examples, the idea of ​​the policy-based reinforcement learning algorithm is to directly optimize the policy by adjusting the policy parameters θ to make the policy optimal. The policy gradient algorithm updates the policy parameters by calculating the gradient of the policy expected total reward with respect to the policy parameters, and finally converges to the optimal policy after multiple iterations. Assume that the policy to be approximated is π θ , and the strategy is differentiable with respect to the parameter θ, then the objective function can be defined as:

[0210]

[0211] The gradient of the objective function is:

[0212]

[0213] in, In the strategy π θ The probability distribution of reaching state s is:

[0214] In reinforcement learning, the target policy is the policy that the algorithm needs to evaluate, and the behavior policy is the policy adopted by the agent when interacting with the environment. Depending on whether the behavior policy is consistent with the target policy during the learning process, the algorithm can be divided into on-policy algorithms and off-policy algorithms. If the algorithm uses the sample data generated by the target policy to evaluate the target policy, the algorithm is called an on-policy algorithm; if the algorithm attempts to use the sample data generated by the behavior policy to evaluate the target policy, that is, the policy used to generate the sample data is not the same as the policy being evaluated, then the algorithm is called an off-policy algorithm.

[0215] In this application, the off-policy algorithm is used because in theory, the off-policy algorithm can use samples generated by any strategy to evaluate the target strategy. When solving the problem of bilateral matching of supply and demand of cold chain logistics of agricultural products, a deep reinforcement learning algorithm based on policy gradient is used. Given a problem instance s, a numbered arrangement π|s is output through the policy network, and θ is used. p Represents the parameters of the policy network. The optimization goal of the policy network is to minimize the negative expected total value:

[0216]

[0217] In the training phase, the gradient descent method is used to learn the network parameters, and the REINFORCE algorithm based on policy gradient is used to adjust the parameters θ p Derivative:

[0218]

[0219] Among them, b(s) is the valuation function, and its goal is to estimate the expected value of the objective function and reduce the gradient variance.

[0220] The distributed approximate policy optimization method is used to update the parameters, introducing the KL divergence difference between the probability distribution predicted by the old policy and the updated policy:

[0221]

[0222] This ensures that the strategies before and after the update will not differ too much, avoiding the shock of parameter training and controlling the parameter update process accordingly.

[0223] The Actor-Critic algorithm is a widely used algorithm based on policy gradient. In the Actor-Critic algorithm, the actor selects a strategy based on the state based on the policy selection function, while the critic evaluates the actor's current strategy and guides the actor to improve its strategy.

[0224] Both the actor network and the critic network are represented by deep neural networks with parameters θ and μ and θ Q The actor network, also called the policy network, is represented by a = π(s|θ μ ), used to update the strategy; the critic network, also called the valuation network, is represented by Q(s,a|θ Q ), which is used to approximate the value function and provide gradient information. The target network parameters θ of the two networks μ ' and θ Q 'Update via slower changing methods:

[0225] θ μ ′←τθ μ +(1-τ)θ μ '

[0226] θ Q ′←τθ Q +(1-τ)θ Ω '

[0227] Here, τ is generally set to 0.001 to increase the stability of the learning process.

[0228] In some specific examples, there are generally three ways to select the valuation function:

[0229] (1) Exponential moving average is a method of forecasting using historical data. It is weighted in chronological order and based on the development trend of the data. It can effectively avoid the impact of random fluctuations in the forecast process and obtain a more accurate estimate of the forecast value:

[0230] b n+1 (s)←α×[-V n(π|s)]+(1-α)×b n (s)

[0231] (2) A more widely used valuation method is to construct a valuation network that is independent of the policy network parameters, which is the actor-critic algorithm. The parameters of the valuation network are represented by θ v , the optimization goal is to minimize the mean square error between the predicted value and the objective function value obtained by the policy network:

[0232]

[0233] The valuation network and the policy network are trained synchronously. The valuation network evaluates the current policy and guides the policy network to improve the policy.

[0234] (3) Adopting the Rollout method, during the training process, the policy network is continuously updated. After each epoch of training, the validation set is solved using the current policy network. If the solution is significantly improved, the parameters of the valuation network are replaced with the current policy.

[0235] Update the parameters under certain conditions, compare them with the parameters of the policy network, compare the results of the two on the validation set, and perform a one-sided paired t-test to test whether there is a significant difference between the samples before and after. The setting of β = 0.05 indicates that the optimization effect of the current policy network parameters is better. At this time, the parameters of the updated valuation network are θ p →θ v , otherwise the parameters are not updated.

[0236] In some specific examples, the Actor-Critic algorithm process optimized by the embodiment of the present application is as follows:

[0237] Input: Policy Network Valuation Network Training sample set S, number of training times T, batch size n.

[0238] Output: Optimal parameters θ p ,θ v .

[0239] 1: Initialize the policy network parameters θ p , estimated network parameters θ v .

[0240] 2: Let t = 1, 2, ..., T, and repeat steps 3-8.

[0241] 3: Sampling training samples s1, s2, …, s n ~S.

[0242] 4: Sampling strategy output

[0243] 5: Valuation network gets estimated value

[0244] 6: Calculate the loss function of the valuation network:

[0245] 7: Update parameter θ v :

[0246] 8: Update the parameter θ using the following distributed strategy optimization method p :

[0247]

[0248] is equivalent to:

[0249]

[0250] 9: When t = T, return the optimal parameter θ p ,θ v .

[0251] In summary, this application builds a decoder-encoder framework composed of a deep neural network, uses the policy gradient-based REINFORCE algorithm and Actor-Critic algorithm to improve and optimize the network training method, uses the improved attention model algorithm to select the optimal matching solution, constructs a policy network and a valuation network for update respectively, introduces the existence of three valuation networks, and obtains the matching relationship according to the sequence output by the attention model according to the probability distribution in the decoding stage, and ensures that all matching pairs are stable matches, and finds the optimal stable matching solution from the matching relationship sequence output by the model.

[0252] On the second aspect, accordingly, the embodiments of the present application also provide a logistics supply and demand matching device, which can implement all the processes of the logistics supply and demand matching method provided in the above embodiments.

[0253] See also Figure 3 , showing a schematic diagram of the structure of a logistics supply and demand matching device provided in an embodiment of the present application, the device comprising:

[0254] The optimization model determination module 301 is used to determine the multi-objective task optimization model based on the data of the logistics supplier and the data of the logistics demander;

[0255] A decision module 302 is used to make a decision on the multi-objective task optimization model using an attention model improved based on a knapsack strategy to obtain a decision result;

[0256] The matching solution determination module 303 is used to determine the optimal stable matching solution between the logistics supplier and the logistics demander based on the decision result.

[0257] In an optional implementation, the multi-objective task optimization model is determined based on the data of the logistics supplier and the data of the logistics demander, including:

[0258] Based on the data of the logistics supplier and the data of the logistics demander, determine a first aggregate satisfaction level and a second aggregate satisfaction level, wherein the first aggregate satisfaction level is used to indicate the satisfaction evaluation of the logistics supplier to the logistics demander, and the second aggregate satisfaction level is used to indicate the satisfaction evaluation of the logistics demander to the logistics supplier;

[0259] Based on the first aggregated satisfaction level and the preset first expected value, a first satisfaction evaluation optimization objective function is constructed, and based on the second aggregated satisfaction level and the preset second expected value, a second satisfaction evaluation optimization objective function is constructed;

[0260] Based on the data of the logistics demander, the first aggregated satisfaction level and the first expected value, construct a first satisfaction level matrix for indicating the internal satisfaction level of the logistics demander;

[0261] Based on the data of the logistics providers, constructing a second satisfaction matrix for indicating satisfaction among the logistics providers;

[0262] The multi-objective task optimization model is constructed based on the first satisfaction evaluation optimization objective function, the second satisfaction evaluation optimization objective function, the first satisfaction matrix and the second satisfaction matrix.

[0263] In an optional implementation, determining the first aggregate satisfaction level and the second aggregate satisfaction level based on the data of the logistics supplier and the data of the logistics demander includes:

[0264] Based on the data of the logistics supplier and the data of the logistics demander, determine the value of the first evaluation index system and the value of the second evaluation index system, wherein the first evaluation index system is used to indicate the satisfaction evaluation of the logistics supplier to the logistics demander, and the second evaluation index system is used to indicate the satisfaction evaluation of the logistics demander to the logistics supplier;

[0265] Determining a first indicator weight corresponding to the first evaluation indicator system and a second indicator weight corresponding to the second evaluation indicator system;

[0266] The first aggregate satisfaction level is calculated based on the value of the first evaluation index system and the first index weight, and the second aggregate satisfaction level is calculated based on the value of the second evaluation index system and the second index weight.

[0267] In an optional implementation manner, determining the first indicator weight corresponding to the first evaluation indicator system and the second indicator weight corresponding to the second evaluation indicator system includes:

[0268] Using the analytic hierarchy process, determining the subjective weight corresponding to the first evaluation index system and the subjective weight corresponding to the second evaluation index system;

[0269] Using the maximum entropy principle, determine the objective weight corresponding to the first evaluation index system and the objective weight corresponding to the second evaluation index system;

[0270] The first indicator weight is calculated based on the subjective weight and the objective weight corresponding to the first evaluation indicator system, and the second indicator weight is calculated based on the subjective weight and the objective weight corresponding to the second evaluation indicator system.

[0271] In an optional implementation, constructing a first satisfaction matrix indicating the internal satisfaction of the logistics demander based on the data of the logistics demander, the first aggregated satisfaction and the first expected value includes:

[0272] Based on the data of the logistics demander, construct a competition association intensity function of the logistics demander;

[0273] Calculating a first satisfaction difference of the logistics demander based on the first aggregated satisfaction level and the first expected value;

[0274] Calculating an amplification factor based on the competitive association strength function, and calculating a second satisfaction difference value according to the amplification factor and the first satisfaction difference value;

[0275] Based on the standardized second satisfaction difference, a first satisfaction matrix for indicating the internal satisfaction of the logistics demander is constructed.

[0276] In an optional implementation, constructing a second satisfaction matrix for indicating satisfaction among the logistics suppliers based on the data of the logistics suppliers includes:

[0277] Based on the data of the logistics supplier, construct the collaboration relationship strength function and resource sharing relationship strength function of the logistics supplier;

[0278] Based on the collaboration relationship strength function and the resource sharing relationship strength function, a second satisfaction matrix is ​​constructed to indicate the satisfaction between the logistics suppliers.

[0279] In an optional implementation, the backpack strategy is used to indicate that the logistics supplier is used as a backpack with a capacity limit, and the logistics demander is used as an item to be placed in the backpack with a capacity limit;

[0280] The attention model includes an encoder and a decoder; the encoder is used to use a self-attention mechanism to determine an embedded representation of the image according to the input feature sequence of each of the items; the decoder is used to use a self-attention mechanism to calculate a probability distribution according to the embedded representation of the image, so as to search for the elements required to be output at each time step in the feature sequence of each of the items according to the probability distribution.

[0281] In an optional embodiment, the encoder includes N attention layers, each of which includes a single-head attention substructure, a first multi-head attention module, and a feedforward neural network;

[0282] Among them, in each attention layer:

[0283] The single-head attention substructure is used to: perform linear transformation on the embedded representation of each input node to obtain a first query vector, a first key vector and a first value vector, calculate the correlation between the first query vector and the first key vector, reduce the correlation according to the dimension of the first key vector, perform normalization processing based on the reduced correlation to obtain an attention distribution, use the attention distribution as a weight to weight the first value vector, and aggregate information of each node and information of nodes adjacent to the node based on the weighted first value vector to obtain a node representation;

[0284] The first multi-head attention module is used to: extract features from the node representations obtained from each of the single-head attention substructures, and aggregate each extracted feature through linear transformation to obtain multi-head attention output information;

[0285] The feedforward neural network is used to: use activation function, skip connection and batch normalization to process the information input into the feedforward neural network to obtain the embedded representation of each node output by the attention layer, wherein the information input into the feedforward neural network is obtained after the multi-head attention output information is processed by skip connection and batch normalization;

[0286] Wherein, each of the nodes corresponds to each of the items one by one, the embedding representation of each of the input nodes in the first attention layer refers to the feature sequence of each of the items, and the embedding representation of each of the input nodes in each attention layer except the first attention layer refers to the embedding representation of each of the nodes output by the previous attention layer;

[0287] The embedded representation of the graph is calculated based on the embedded representation of each node output by the last attention layer.

[0288] In an optional embodiment, the decoder includes an aggregation layer, a second multi-head attention module and a probability layer;

[0289] Where, at each time step:

[0290] The aggregation layer is used to: construct a context vector based on the embedding representation of the graph, the embedding representation of the output node of the encoder in the previous time step, and the current remaining capacity of the backpack with capacity constraints, so as to generate a second query vector according to the context vector, and generate a second key vector and a second value vector according to the embedding representation of the output node;

[0291] The second multi-head attention module is used to: generate a fusion vector based on the second query vector, the second key vector and the second value vector;

[0292] The probability layer is used to: perform a linear transformation on the fusion vector to obtain a third query vector, so as to calculate the probability distribution of the time step through the tanh function and the softmax function according to the third query vector, so as to search for the elements required to be output at the time step.

[0293] In an optional embodiment, the attention model is trained using a policy gradient-based reinforcement learning algorithm;

[0294] Wherein, the policy gradient-based reinforcement learning algorithm includes:

[0295] Off-policy algorithms for evaluating and determining target policies;

[0296] A distributed approximate strategy optimization algorithm for updating parameters, wherein a loss function of the distributed approximate strategy optimization algorithm is determined based on KL divergence; and

[0297] Actor-Critic algorithm.

[0298] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the logistics supply and demand matching method described in any one of the above items are implemented.

[0299] In a fourth aspect, an embodiment of the present application provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of any of the above-mentioned logistics supply and demand matching methods.

[0300] In a fifth aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the steps of any of the above-mentioned logistics supply and demand matching methods when executing the computer program.

[0301] See also Figure 4 The computer device of this embodiment includes: a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401, such as a logistics supply and demand matching program. When the processor 401 executes the computer program, the steps in the above-mentioned logistics supply and demand matching method embodiments are implemented, such as Figure 1 Steps S101-S103 are shown.

[0302] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 402 and executed by the processor 401 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the computer device.

[0303] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that the schematic diagram is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown in the diagram, or may combine certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0304] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor 401 may also be any conventional processor, etc. The processor 401 is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.

[0305] The memory 402 can be used to store the computer program and / or module, and the processor 401 realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory 402, and calling the data stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0306] Wherein, if the module / unit integrated in the computer device is implemented in the form of 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 present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor 401. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0307] In summary, the embodiments of the present application have at least the following beneficial effects:

[0308] By adopting the embodiment of the present application, a multi-objective task optimization model is determined based on the data of the logistics supplier and the data of the logistics demander to characterize the diversified demands of both the supply and demand sides; a decision is made on the multi-objective task optimization model using an attention model improved based on the knapsack strategy to obtain a decision result; based on the decision result, the optimal stable matching scheme between the logistics supplier and the logistics demander is determined, thereby obtaining a matching scheme that can meet the diversified demands of both the supply and demand sides, thereby meeting the diversified demands of the logistics demander.

[0309] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary hardware platform, and of course, it can also be implemented entirely by hardware. Based on such an understanding, all or part of the contribution of the technical solution of the present application to the background technology can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0310] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.

Claims

1. A logistics supply and demand matching method, characterized in that: include: Determine the multi-objective task optimization model based on the data of logistics suppliers and logistics demanders; Using the attention model improved based on the knapsack strategy, making decisions on the multi-objective task optimization model to obtain a decision result; Based on the decision result, the optimal stable matching solution between the logistics supplier and the logistics demander is determined.

2. The logistics supply and demand matching method according to claim 1, characterized in that: The multi-objective task optimization model is determined based on the data of the logistics supplier and the data of the logistics demander, including: Based on the data of the logistics supplier and the data of the logistics demander, determine a first aggregate satisfaction level and a second aggregate satisfaction level, wherein the first aggregate satisfaction level is used to indicate the satisfaction evaluation of the logistics supplier to the logistics demander, and the second aggregate satisfaction level is used to indicate the satisfaction evaluation of the logistics demander to the logistics supplier; Based on the first aggregated satisfaction level and the preset first expected value, a first satisfaction evaluation optimization objective function is constructed, and based on the second aggregated satisfaction level and the preset second expected value, a second satisfaction evaluation optimization objective function is constructed; Based on the data of the logistics demander, the first aggregated satisfaction level and the first expected value, construct a first satisfaction level matrix for indicating the internal satisfaction level of the logistics demander; Based on the data of the logistics providers, constructing a second satisfaction matrix for indicating satisfaction among the logistics providers; The multi-objective task optimization model is constructed based on the first satisfaction evaluation optimization objective function, the second satisfaction evaluation optimization objective function, the first satisfaction matrix and the second satisfaction matrix.

3. The logistics supply and demand matching method according to claim 2, characterized in that: The determining of the first aggregate satisfaction level and the second aggregate satisfaction level based on the data of the logistics supplier and the data of the logistics demander includes: Based on the data of the logistics supplier and the data of the logistics demander, determine the value of the first evaluation index system and the value of the second evaluation index system, wherein the first evaluation index system is used to indicate the satisfaction evaluation of the logistics supplier to the logistics demander, and the second evaluation index system is used to indicate the satisfaction evaluation of the logistics demander to the logistics supplier; Determining a first indicator weight corresponding to the first evaluation indicator system and a second indicator weight corresponding to the second evaluation indicator system; The first aggregate satisfaction level is calculated based on the value of the first evaluation index system and the first index weight, and the second aggregate satisfaction level is calculated based on the value of the second evaluation index system and the second index weight.

4. The logistics supply and demand matching method according to claim 3, characterized in that: The determining of the first indicator weight corresponding to the first evaluation indicator system and the second indicator weight corresponding to the second evaluation indicator system includes: Using the analytic hierarchy process, determining the subjective weight corresponding to the first evaluation index system and the subjective weight corresponding to the second evaluation index system; Using the maximum entropy principle, determine the objective weight corresponding to the first evaluation index system and the objective weight corresponding to the second evaluation index system; The first indicator weight is calculated based on the subjective weight and the objective weight corresponding to the first evaluation indicator system, and the second indicator weight is calculated based on the subjective weight and the objective weight corresponding to the second evaluation indicator system.

5. The logistics supply and demand matching method according to claim 2, characterized in that: The step of constructing a first satisfaction matrix indicating the internal satisfaction of the logistics demander based on the data of the logistics demander, the first aggregated satisfaction level and the first expected value includes: Based on the data of the logistics demander, construct a competition association intensity function of the logistics demander; Calculating a first satisfaction difference of the logistics demander based on the first aggregated satisfaction level and the first expected value; Calculating an amplification factor based on the competitive association strength function, and calculating a second satisfaction difference value according to the amplification factor and the first satisfaction difference value; Based on the standardized second satisfaction difference, a first satisfaction matrix for indicating the internal satisfaction of the logistics demander is constructed.

6. The logistics supply and demand matching method according to claim 2, characterized in that: The step of constructing a second satisfaction matrix for indicating satisfaction among the logistics suppliers based on the data of the logistics suppliers comprises: Based on the data of the logistics supplier, construct the collaboration relationship strength function and resource sharing relationship strength function of the logistics supplier; Based on the collaboration relationship strength function and the resource sharing relationship strength function, a second satisfaction matrix is ​​constructed to indicate the satisfaction between the logistics suppliers.

7. The logistics supply and demand matching method according to claim 1, characterized in that: The backpack strategy is used to indicate that the logistics supplier is used as a backpack with a capacity limit, and the logistics demander is used as an item to be placed in the backpack with a capacity limit; The attention model includes an encoder and a decoder; the encoder is used to determine the embedding representation of the image according to the input feature sequence of each item using a self-attention mechanism; The decoder is used to calculate the probability distribution according to the embedded representation of the graph using the self-attention mechanism, so as to search for the elements required to be output at each time step in the feature sequence of each of the items according to the probability distribution.

8. The logistics supply and demand matching method according to claim 7, characterized in that: The encoder includes N attention layers, each of which includes a single-head attention substructure, a first multi-head attention module, and a feedforward neural network; Among them, in each attention layer: The single-head attention substructure is used to: perform linear transformation on the embedded representation of each input node to obtain a first query vector, a first key vector and a first value vector, calculate the correlation between the first query vector and the first key vector, reduce the correlation according to the dimension of the first key vector, perform normalization processing based on the reduced correlation to obtain an attention distribution, use the attention distribution as a weight to weight the first value vector, and aggregate information of each node and information of nodes adjacent to the node based on the weighted first value vector to obtain a node representation; The first multi-head attention module is used to: extract features from the node representations obtained from each of the single-head attention substructures, and aggregate each extracted feature through linear transformation to obtain multi-head attention output information; The feedforward neural network is used to: use activation function, skip connection and batch normalization to process the information input into the feedforward neural network to obtain the embedded representation of each node output by the attention layer, wherein the information input into the feedforward neural network is obtained after the multi-head attention output information is processed by skip connection and batch normalization; Wherein, each of the nodes corresponds to each of the items one by one, the embedding representation of each of the input nodes in the first attention layer refers to the feature sequence of each of the items, and the embedding representation of each of the input nodes in each attention layer except the first attention layer refers to the embedding representation of each of the nodes output by the previous attention layer; The embedded representation of the graph is calculated based on the embedded representation of each node output by the last attention layer.

9. The logistics supply and demand matching method according to claim 7, characterized in that: The decoder includes an aggregation layer, a second multi-head attention module and a probability layer; Where, at each time step: The aggregation layer is used to: construct a context vector based on the embedding representation of the graph, the embedding representation of the output node of the encoder in the previous time step, and the current remaining capacity of the backpack with capacity constraints, so as to generate a second query vector according to the context vector, and generate a second key vector and a second value vector according to the embedding representation of the output node; The second multi-head attention module is used to: generate a fusion vector based on the second query vector, the second key vector and the second value vector; The probability layer is used to: perform a linear transformation on the fusion vector to obtain a third query vector, so as to calculate the probability distribution of the time step through the tanh function and the softmax function according to the third query vector, so as to search for the elements required to be output at the time step.

10. The logistics supply and demand matching method according to claim 1, characterized in that: The attention model is trained using a policy gradient-based reinforcement learning algorithm; Wherein, the policy gradient-based reinforcement learning algorithm includes: Off-policy algorithms for evaluating and determining target policies; A distributed approximate strategy optimization algorithm for updating parameters, wherein a loss function of the distributed approximate strategy optimization algorithm is determined based on KL divergence; and Actor-Critic algorithm.

11. A logistics supply and demand matching device, characterized in that: include: The optimization model determination module is used to determine the multi-objective task optimization model based on the data of the logistics supplier and the data of the logistics demander; A decision module, used to make a decision on the multi-objective task optimization model by using an attention model improved based on a knapsack strategy to obtain a decision result; A matching solution determination module is used to determine the optimal stable matching solution between the logistics supplier and the logistics demander based on the decision result.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the logistics supply and demand matching method described in any one of claims 1 to 10 is implemented.

13. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the logistics supply and demand matching method described in any one of claims 1-10 is implemented.

14. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the logistics supply and demand matching method according to any one of claims 1 to 10 when executing the computer program.