Instance generation method and device in supply chain scene and related equipment

The random noise is denoised through the conditional diffusion model, and the supply chain scenario examples are generated similar to the training set structure and calculation difficulty, which solves the problem of difficulty in formulating reasonable plans and generalizing them in the existing technology, and improves the problem of improving The efficiency and richness of instance generation are enhanced and the development capabilities of MILP solvers are enhanced.

CN119046608APending Publication Date: 2024-11-29LENOVO (BEIJING) LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410865168.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing technology is difficult to formulate reasonable plans in supply chain scenarios, especially due to the cumbersome data collection and professional issues that cannot be generalized to unexperienced problems. The existing instance generation method cannot effectively cover domain-specific expertise and real-world applications. a combination structure.

Method used

The random noise is denoised by using the conditional diffusion model. By obtaining the two-part graph used to characterize existing instances, covering the constraint node or variable nodes, generating a new target instance, and using the encoder and decoder for feature extraction and decoding. Generate new instances similar to the training set structure and computational difficulty.

Benefits of technology

The efficiency and richness of instance generation are improved, and the generated instances can better simulate real scenarios, cover more situations, and significantly enhance the development capabilities of MILP solvers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046608A_ABST
    Figure CN119046608A_ABST
Patent Text Reader

Abstract

The invention provides an instance generation method and device in a supply chain scene and related equipment. The method comprises the steps that a first bipartite graph used for representing existing instances is acquired; the existing instance represents a specific plan of the supply chain scene, the first bigraph comprises constraint nodes and variable nodes, the constraint nodes represent constraint requirements of the specific plan, and the variable nodes represent decision factors of the specific plan; covering at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph; based on the second bipartite graph, random noise is denoised through a conditional diffusion model, and a third bipartite graph is generated; the third bigraph represents a target instance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device and related equipment for generating an instance in a supply chain scenario. Background Art

[0002] In the supply chain scenario, production is usually guided based on plans, and reasonable planning can improve production efficiency.

[0003] In the related technologies, it is proposed to use machine learning technology to directly or assist in making plans. However, due to the cumbersome data collection and the need for targeted processing of professional problems, it is still impossible to make reasonable plans or lack the ability to generalize to problems that have not been encountered. Summary of the invention

[0004] The present disclosure provides a method, device, electronic device and storage medium for generating an instance in a supply chain scenario, so as to at least solve the above technical problems existing in the prior art.

[0005] According to a first aspect of the present disclosure, a method for generating an instance in a supply chain scenario is provided, the method comprising:

[0006] Obtaining a first bipartite graph for representing an existing instance; the existing instance represents a specific plan of the supply chain scenario, the first bipartite graph comprising: a constraint node and a variable node, the constraint node represents a constraint requirement of the specific plan, and the variable node represents a decision factor of the specific plan;

[0007] Covering at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph;

[0008] Based on the second bipartite graph, random noise is denoised by a conditional diffusion model to generate a third bipartite graph; the third bipartite graph represents the target instance.

[0009] According to a second aspect of the present disclosure, a device for generating an instance in a supply chain scenario is provided, the device comprising:

[0010] An acquisition module is used to acquire a first bipartite graph for representing an existing instance; the existing instance represents a specific plan of the supply chain scenario, and the first bipartite graph includes: a constraint node and a variable node, the constraint node represents a constraint requirement of the specific plan, and the variable node represents a decision factor of the specific plan;

[0011] A first processing module, configured to cover at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph;

[0012] The second processing module is used to denoise the random noise based on the second bipartite graph through a conditional diffusion model to generate a third bipartite graph; the third bipartite graph represents the target instance.

[0013] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.

[0017] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0019] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0020] Figure 1 A schematic diagram of a flow chart of an instance generation method in a supply chain scenario provided by an embodiment of the present disclosure;

[0021] Figure 2 A schematic diagram of a training process provided by an embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of a MILP example provided in an embodiment of the present disclosure;

[0023] Figure 4 A schematic diagram of a flow chart of a method for generating a MILP instance provided in an embodiment of the present disclosure;

[0024] Figure 5 A schematic diagram of the structure of an instance generation device in a supply chain scenario provided by an embodiment of the present disclosure;

[0025] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] In order to make the purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0027] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0028] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.

[0029] Unless otherwise defined, all technical and scientific terms used in this disclosure have the same meaning as those commonly understood by those skilled in the art to which this disclosure belongs. The terms used in this disclosure are only for the purpose of describing the embodiments of this disclosure and are not intended to limit this disclosure.

[0030] It should be understood that in the various embodiments of the present disclosure, the size of the serial number of each implementation process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.

[0031] Before further describing the embodiments of the present disclosure in detail, the related technologies involved in the embodiments of the present disclosure are described.

[0032] Mixed Integer Linear Programming (MILP) is a powerful and versatile modeling technique that can be used to solve many real-world problems. It is at the core of combinatorial optimization research and is widely used in various industrial optimization scenarios such as scheduling, planning, and portfolio investment. Although MILP problems are difficult to solve, machine learning (ML) techniques have recently become a powerful way to directly solve these problems or assist in the solution process.

[0033] The availability of real-world examples is an important challenge due to the tediousness of data collection and proprietary issues. In order to develop practical MILP solvers, a large number of examples are required to identify problems through white-box testing. In addition, machine learning methods for improving MILP solvers often lead to suboptimal decisions and biased evaluations when data is limited, which affects their generalization ability to unseen problems. In response to these challenges, a series of synthetic MILP example generation techniques have emerged, which can be divided into two categories:

[0034] Expert methods: rely on experts to design formulations for specific problems, such as traveling salesman problems (TSPs) or set cover problems. However, these methods fail to capture domain-specific expertise or access the combinatorial structure of real-world applications.

[0035] Heuristic methods: construct generic MILP instances by sampling from the encoding space by controlling several specific statistics. However, they often fail to capture the rich features and underlying combinatorial structures, leading to poor matching with real-world instances.

[0036] Based on this, it is necessary to provide an instance generation method. Figure 1 As shown, Figure 1 A schematic diagram of a flow chart of a method for generating an instance in a supply chain scenario provided by an embodiment of the present disclosure, wherein the method for generating an instance in a supply chain scenario includes:

[0037] Step 101, obtaining a first bipartite graph for representing an existing instance;

[0038] The existing instance represents a specific plan of the supply chain scenario, and the first bipartite graph includes: a constraint node and a variable node, the constraint node represents the constraint requirements of the specific plan, and the variable node represents the decision factors of the specific plan;

[0039] Step 102: Cover at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph;

[0040] Step 103: Based on the second bipartite graph, denoise the random noise by using a conditional diffusion model to generate a third bipartite graph;

[0041] Wherein, the third bipartite graph represents the target instance.

[0042] In some embodiments, based on the second bipartite graph, denoising the random noise by a conditional diffusion model to generate a third bipartite graph includes:

[0043] Encoding the second bipartite graph through an encoder to obtain a first feature corresponding to the second bipartite graph;

[0044] Based on the first feature, random noise is denoised by a conditional diffusion model to obtain a second feature;

[0045] The second feature is decoded by a decoder to obtain a third bipartite graph.

[0046] Here, the encoder is used to encode or extract features of the bipartite graph to obtain features that can be processed by the conditional diffusion model; correspondingly, the decoder is used to decode the features to obtain the corresponding bipartite graph.

[0047] The first feature of the bipartite graph can also be a latent space representation of the bipartite graph, or a latent vector of the bipartite graph, which is another way to represent the bipartite graph. For example, it can convert a complex bipartite graph into a more concise and easy-to-process low-dimensional representation, which helps to understand the structure of the data and generate new data samples.

[0048] When applied, the second bipartite graph is first encoded by the encoder to obtain the first feature corresponding to the second bipartite graph; the conditional diffusion model randomly samples a random noise from the random distribution, and denoises it based on the first feature. Here, the first feature corresponding to the masked second bipartite graph can be used as conditional information to guide the conditional diffusion model to perform denoising, so that the conditional diffusion model generates new features of the masked nodes, which constitute new features with the uncovered nodes, that is, obtain the second feature; and then the decoder decodes the second feature to obtain a new bipartite graph constituted by the uncovered nodes and the newly generated masked nodes, that is, the third bipartite graph.

[0049] In this way, the conditional diffusion model is used to generate new instances, thereby improving the efficiency and richness of instance generation.

[0050] In some embodiments, the specific plan is a cargo distribution plan;

[0051] The constraint node represents the constraint requirements of cargo distribution, and the constraint requirements at least include: the total cargo quantity requirement and the cargo quantity requirement allocated to each distribution point;

[0052] The variable node represents the decision factors of cargo distribution, and the decision factors include at least: the number of distribution points and the number of each type of cargo distributed at each distribution point;

[0053] or,

[0054] The specific plan is a production scheduling plan;

[0055] The constraint node represents the constraint requirements of production scheduling, and the constraint requirements at least include: total production scheduling time requirements, and production scheduling completion time requirements for each product or each order;

[0056] The variable nodes represent decision factors for production scheduling, and the decision factors include at least: the number of production lines, and the time required to produce each product or each order on each production line.

[0057] In some embodiments, the existing instances are represented by a bipartite graph, which may also be a weighted bipartite graph.

[0058] A bipartite graph has variable nodes and constraint nodes, and the relationship between variable nodes and constraint nodes is represented by edges in the bipartite graph (there is no edge connection between nodes of the same type). If a variable node appears in a constraint node, there is an edge in the bipartite graph, and the weight of the edge is equal to the weight of the variable node in the corresponding constraint node.

[0059] The existing example may be a mixed integer linear programming (MILP, Mixed Integer Linear Programming) example.

[0060] MILP is a powerful and versatile modeling technique that can be used to solve many real-world problems. It is at the core of combinatorial optimization research and is widely used in various industrial scenarios. For example, the present disclosure can be applied to instance generation in a supply chain scenario.

[0061] It should be understood that the method provided in the embodiments of the present disclosure may also be applied to plans or combinations of plans such as scheduling, planning, and investment, which are not limited here.

[0062] In some embodiments, at least one constraint node or variable node in the first bipartite graph is covered to obtain a second bipartite graph, including:

[0063] Randomly select at least one constraint node from the constraint nodes of the first bipartite graph; cover the selected constraint node, and add a virtual edge between the selected constraint node and each variable node;

[0064] or,

[0065] At least one variable node is randomly selected from the variable nodes of the first bipartite graph; the selected variable node is covered, and a virtual edge is added between the selected variable node and each constraint node.

[0066] Specifically, taking the covering constraint node as an example, for the first bipartite graph, a constraint node can be randomly selected and the constraint node and its adjacent edges can be covered. To simplify the processing, the variable node is kept unchanged. Covering (such as Figure 2 The constraint node is marked with [mask] in the figure, and a virtual edge is added to connect the constraint node with each variable node. The constraint node and the virtual edge are given special representations (for example, Figure 2In this way, the information of the constraint node and the relationship between the edges are covered.

[0067] Similarly, by covering a variable node and adding virtual edges between it and each constraint node, the information of the variable node and the relationship between the edges are covered. The covering operation refers to the constraint node and will not be repeated here.

[0068] In this way, by sampling multiple times and randomly selecting a node to cover each time, more sample data can be obtained for training; then, the second bipartite graph is obtained through the covered nodes, and based on the second bipartite graph, the random noise is denoised through the conditional diffusion model to obtain a new third bipartite graph.

[0069] In some embodiments, the method further includes a joint parameter adjustment process of the conditional diffusion model and the decoder based on the sample set; the method further includes obtaining the sample set, specifically including:

[0070] Obtain at least one sample instance; the sample instance represents a specific plan of the supply chain scenario;

[0071] Determine a sample first bipartite graph corresponding to each sample instance; the sample first bipartite graph includes: a constraint node and a variable node;

[0072] Covering at least one constraint node or variable node in each of the first bipartite graphs of the samples to obtain a second bipartite graph of the samples;

[0073] Sample data is determined according to the sample first bipartite graph and the sample second bipartite graph.

[0074] Specifically, determining sample data according to the sample first bipartite graph and the sample second bipartite graph includes:

[0075] Encoding the sample second bipartite graph by an encoder to obtain sample features corresponding to the sample second bipartite graph as training data;

[0076] Determine a training label according to the covered information in the first bipartite graph of the sample; the training data and the training label constitute the sample data;

[0077] The covered information includes at least one of the following: a value related to a constraint node, a variable node related to a constraint node, a coefficient of a variable node related to a constraint node, and whether there is a connection relationship between a constraint node and a variable node;

[0078] or,

[0079] The covered information includes at least one of the following: a value related to a variable node, and whether there is a connection relationship between the variable node and the constraint node.

[0080] Here, when at least one constraint node or variable node in the first bipartite graph of the sample is covered, the covered information may be counted, and the training label may be determined based on the statistically obtained information.

[0081] When the node being covered is a constraint node, the statistical covered information includes at least one of the following: a value related to the constraint node, a variable node related to the constraint node, a coefficient of a variable node related to the constraint node, and whether there is a connection relationship between the constraint node and the variable node.

[0082] Among them, the value related to the constraint node can also be described as the right-hand side value of the constraint symbol or the constraint type; the variable node related to the constraint node can also be described as the node degree, which refers to the number of variable nodes involved in the constraint node; the coefficient of the variable node related to the constraint node can also be described as the node coefficient, which refers to the contribution and weight of the variable node in the constraint; whether there is a connection relationship between the constraint node and the variable node can characterize whether the variable node appears in a certain constraint node.

[0083] When the node being covered is a variable node, the statistical covered information includes at least one of the following: the value related to the variable node, whether there is a connection relationship between the variable node and the constraint node. The value related to the variable node includes: target coefficient, upper bound, lower bound, whether it is an integer variable.

[0084] For example, Figure 3 is a schematic diagram of a MILP example. Figure 3 The MILP instance is represented in the traditional form and HVPI (HypervolumePolyhedronIntersection) form.

[0085] The information of the first constraint node (v1) includes: the right-hand side value of the constraint symbol “≥” is 1, and the related variable nodes include w1 and w2; the information of the second constraint node (v2) includes: the right-hand side value of the constraint symbol “≥” is 1.

[0086] The information of the first variable node (w1) includes: the target coefficient of x1 is 1, and the upper bound is 3; the information of the second variable node (w2) includes: the target coefficient of x2 is 2, the upper bound is 5, and x2 is an integer.

[0087] In some embodiments, the joint parameter adjustment process of the conditional diffusion model and the decoder based on the sample set includes:

[0088] Inputting the training data of each sample data into the conditional diffusion model to obtain the original features output by the conditional diffusion model;

[0089] Inputting the original features into the decoder to obtain a sample third bipartite graph output by the decoder;

[0090] Determine the value of the total loss based on the sample third bipartite graph and the training label of the sample data, and if the value of the total loss is greater than or equal to a threshold, adjust the parameters of the conditional diffusion model and the parameters of the decoder; the total loss includes: a first loss of the conditional diffusion model and a second loss of the decoder;

[0091] Continue to perform the above joint parameter adjustment process until the value of the total loss is less than the threshold.

[0092] Among them, the training process of the conditional diffusion model includes forward diffusion and reverse transformation;

[0093] The conditional diffusion model performs forward diffusion on the first feature of the sample to gradually add noise to obtain the second feature of the sample after adding noise;

[0094] The conditional diffusion model performs an inverse transformation on the second feature of the sample to reduce the noise of the second feature of the sample into the first feature of the sample.

[0095] Here, the threshold, the first loss of the conditional diffusion model, and the second loss of the decoder can be set according to actual application scenarios, application requirements, etc., and are not limited here.

[0096] Specifically, Figure 2 is an example of a training process. MILP instances are sample instances, v1 and v2 are constraint nodes; w1 and w2 are variable nodes, and v and w are connected by edges; mask means covering a node of the bipartite graph to obtain the second bipartite graph of the sample; combined with Figure 2 Describe the joint training process, which may include:

[0097] I. Randomly select sample data;

[0098] Here, the sample data includes: training data and sample labels; wherein the training data is the features of the masked sample second bipartite graph, obtained by encoding the sample second bipartite graph through an encoder (such as using a graph neural network (GNN)); the sample label is the information of the masked node.

[0099] II. The conditional diffusion model gradually adds a small amount of noise to the training data;

[0100] The noise may be random noise or noise generated according to a specific noise model, such as Gaussian noise.

[0101] Combination Figure 2, Z0 is the feature of the second bipartite graph of the sample, obtained through the encoder; the process from Z0 to Zt is the process of gradually adding noise to the training data Z0, that is, through the forward diffusion process; Z1 is the result after adding noise to Z0, and so on, Zt is the result after adding noise to Zt-1.

[0102] III. Train the noisy training data so that the conditional diffusion model can learn to map the noisy training data back to the original features, and then the decoder decodes the original features to obtain the original training data;

[0103] Here, the conditional diffusion model can use a neural network model with an inverse transformation. After gradually adding noise through the forward diffusion process, the inverse transformation (or reverse diffusion) is used to learn how to map the noise back to the original sample step by step, that is, to learn to reduce the noise of the second feature of the sample to the first feature of the sample.

[0104] Combination Figure 2 , Zt to Z0 is the reverse diffusion process, that is, the denoising process; in the reverse diffusion process, Zt-1 is the result of Zt after removing the noise, and so on, Z0 is the result of Z1 after removing the noise.

[0105] IV. Repeat operations II to III until the preset number of training rounds or convergence conditions (such as the value of the total loss is less than the threshold) are reached to obtain the conditional diffusion model and encoder.

[0106] Through the above iterative process, the neural network model can gradually learn how to reverse the added noise conversion, thereby restoring the information of the original sample and obtaining a trained conditional diffusion model. In this way, the conditional diffusion model can be used to denoise the newly sampled random noise and obtain new features.

[0107] Figure 2 In the paper, MLPbias, MLPlogits, and MLFcoef are three modules of the decoder, which work together to determine multiple components of new instances, involving both structural and numerical prediction tasks. This method can generate instances that are very similar to the training set in terms of structure and computational difficulty.

[0108] The above three modules predict Lbias, Llogits, and Lcoef respectively; where Lbias is the value related to the predicted constraint node (such as the value on the right hand side of the constraint symbol); Llogits is the variable node related to the predicted constraint node (such as the variable on the left hand side of the constraint symbol); Lcoef is the coefficient of the variable node related to the predicted constraint node (such as the coefficient of the variable node on the left hand side of the constraint symbol). In the decoded graph, if there is a line between the constraint node and the variable node, it means that there is a connection relationship, and if there is no line, it means that there is no connection relationship.

[0109] In some embodiments, the encoder may use a graph neural network (GNN), which may be pre-trained, or any existing encoder may be used, without limitation. If trained, the encoder may be divided into multiple iterations of graph convolutional layers (GCN) during the training process, each of which updates the feature representation of the node, and updates the feature of the current node by aggregating the features of the node's neighbors; through the iteration of multiple graph convolutional layers, the node feature information may be gradually propagated, thereby obtaining a richer feature representation.

[0110] Of course, the encoder can be jointly trained with the conditional diffusion model and the decoder. If the three are jointly trained, the training steps can refer to the above joint training process. The difference is that the training data in the sample data used can be the second bipartite graph of the sample. In addition, the total loss used for parameter adjustment can include: the third loss of the encoder, the first loss of the conditional diffusion model, and the second loss of the decoder. The corresponding thresholds used can be adjusted according to the actual application scenario. There is no limitation on the loss, threshold, etc. here. Moreover, if the value of the total loss is greater than or equal to the threshold, the encoding parameters, the conditional diffusion model parameters, and the decoder parameters can be adjusted.

[0111] Through the method provided by the embodiment of the present disclosure, a bipartite graph is used to represent an instance (such as a MILP instance), the instance generation problem is redefined as a graph generation problem, and a new method for generating instances is proposed; a sampled latent vector is used to iteratively destroy and replace parts of the original graph to generate new instances, which can generate instances that are very similar to the training set in terms of structure and computational difficulty.

[0112] Figure 4 A flow chart of a method for generating a MILP instance provided in an embodiment of the present disclosure; Figure 4 As shown, the method includes:

[0113] Step 401: Obtain a sample data set;

[0114] Specifically, step 401 includes:

[0115] Step 4011: Obtain a sample MILP instance (an example of a sample instance) represented by a sample first weighted bipartite graph, wherein the weighted bipartite graph has variable nodes and constraint nodes, and the relationship between the variable nodes and the constraint nodes is represented by edges in the weighted bipartite graph (there is no edge connection between nodes of the same type).

[0116] like Figure 2 As shown, Figure 2 v1 and v2 are constraint nodes; w1 and w2 are variable nodes, and v and w are connected by an edge. Variable nodes can include the following features: target coefficient, upper bound, lower bound, and whether it is an integer variable; constraint nodes can include the following features: constraint type (which can also be understood as constraint symbols, such as ≥, ≤, <, >, etc.), right-hand side value (the right-hand side value is the value after the constraint type). It can also include: whether there is a connection relationship between the variable node and the constraint node.

[0117] Step 4012: Cover at least one node in the first weighted bipartite graph of the sample to obtain a second weighted bipartite graph of the sample.

[0118] Here, a constraint node is randomly selected and masked with its adjacent edges. To simplify the process, we keep the variable nodes unchanged. Specifically, [mask] can be used to mark the constraint node (any v), and virtual edges can be added to connect the constraint node with each variable node. The constraint node and virtual edges are given special representations to distinguish them from other nodes.

[0119] At the same time, the information of the covered nodes is counted as training labels. For example, the information of the covered nodes includes: the value related to the constraint node (i.e., the right-hand end value), the variable node related to the constraint node (i.e., the node degree), the coefficient of the variable node related to the constraint node (i.e., the node coefficient), and whether there is a connection relationship between the constraint node and the variable node (i.e., whether there is an edge).

[0120] Step 4013: extract features from the sample second bipartite graph based on the encoder to obtain training data; and determine training labels based on the masked information. The training data and the training labels constitute the sample data.

[0121] Step 402: Train a conditional diffusion model and an encoder based on a sample data set.

[0122] Specifically, a conditional diffusion model is obtained by training a neural network model with an inverse transformation. During the training process, a small amount of noise can be iteratively added to the training data, and the neural network model can be trained to reverse the transformation process. Specifically, the following steps may be included:

[0123] Step 4021: randomly select sample data;

[0124] Step 4022: The conditional diffusion model gradually adds a small amount of noise to the training data. The noise may be random noise or noise generated according to a specific noise model, such as Gaussian noise.

[0125] Step 4023: Use a neural network model with inverse transformation to train the noisy sample data so that it can learn to map the noisy sample data back to sample data;

[0126] Step 4024: The encoder decodes the mapped back sample data to reconstruct the covered constraint nodes;

[0127] Step 4025: Repeat step 4022 and step 4024 until a preset number of training rounds or convergence condition is reached, and a conditional diffusion model and an encoder are obtained.

[0128] By iterating the above process, the conditional diffusion model can gradually learn how to reverse the added noise conversion, thereby restoring the information of the original sample data. When applied, the trained conditional diffusion model can be used to denoise the newly sampled features.

[0129] Here, the decoder can determine the following in order: the values ​​associated with the constraint nodes (such as Figure 2 Lbias in the constraint symbol represents the right-hand side value), the constraint nodes related to the variable nodes (such as Figure 2 The Llogits of the variable nodes in the constraint node are used to indicate whether the variable node is related to the constraint node), the coefficients of the variable nodes related to the constraint node (such as Figure 2 Lcoef in the figure represents the weight of the edge).

[0130] Step 403: Generate a new MILP instance using the trained conditional diffusion model and encoder.

[0131] Specifically, an appropriate conditional value (i.e., a second bipartite graph corresponding to an existing instance) is determined, and based on the second bipartite graph, the trained conditional diffusion model is used to denoise the random noise, generate a new bipartite graph, and obtain a new MILP instance.

[0132] The method provided by the embodiment of the present disclosure uses a conditional diffusion model as a generator of MILP instances. The conditional diffusion model can actively learn how to generate new instances from various real MILP instances. The generated MILP instances can simulate real scenarios, cover more situations, and significantly enrich the data set, thereby enhancing the development of MILP solvers at a relatively low cost. In addition, it should be noted that the generated instances can also be used to understand the problem space, find challenging cases, and learn representation methods.

[0133] Figure 5FIG. 4 shows a schematic diagram of a structure of an instance generation device in a supply chain scenario provided by an embodiment of the present disclosure; Figure 5 As shown, the device comprises:

[0134] An acquisition module is used to acquire a first bipartite graph for representing an existing instance; the existing instance represents a specific plan of the supply chain scenario, and the first bipartite graph includes: a constraint node and a variable node, the constraint node represents a constraint requirement of the specific plan, and the variable node represents a decision factor of the specific plan;

[0135] A first processing module, configured to cover at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph;

[0136] The second processing module is used to denoise the random noise based on the second bipartite graph through a conditional diffusion model to generate a third bipartite graph; the third bipartite graph represents the target instance.

[0137] In some embodiments, the second processing module is used to encode the second bipartite graph through an encoder to obtain a first feature corresponding to the second bipartite graph;

[0138] Based on the first feature, random noise is denoised by a conditional diffusion model to obtain a second feature;

[0139] The second feature is decoded by a decoder to obtain a third bipartite graph.

[0140] In some embodiments, the specific plan is a cargo distribution plan;

[0141] The constraint node represents the constraint requirements of cargo distribution, and the constraint requirements at least include: the total cargo quantity requirement and the cargo quantity requirement allocated to each distribution point;

[0142] The variable node represents the decision factors of cargo distribution, and the decision factors include at least: the number of distribution points and the number of each type of cargo distributed at each distribution point;

[0143] or,

[0144] The specific plan is a production scheduling plan;

[0145] The constraint node represents the constraint requirements of production scheduling, and the constraint requirements at least include: total production scheduling time requirements, and production scheduling completion time requirements for each product or each order;

[0146] The variable nodes represent decision factors for production scheduling, and the decision factors include at least: the number of production lines, and the time required to produce each product or each order on each production line.

[0147] In some embodiments, the apparatus further comprises: a third processing module, configured to perform a joint parameter adjustment process of the conditional diffusion model and the decoder based on the sample set;

[0148] The third processing module is further used to obtain the sample set; obtaining the sample set includes:

[0149] Obtain at least one sample instance; the sample instance represents a specific plan of the supply chain scenario;

[0150] Determine a sample first bipartite graph corresponding to each sample instance; the sample first bipartite graph includes: a constraint node and a variable node;

[0151] Covering at least one constraint node or variable node in each of the first bipartite graphs of the samples to obtain a second bipartite graph of the samples;

[0152] Sample data is determined according to the sample first bipartite graph and the sample second bipartite graph.

[0153] In some embodiments, the third processing module is used to encode the sample second bipartite graph through an encoder to obtain sample features corresponding to the sample second bipartite graph as training data;

[0154] Determine a training label according to the covered information in the first bipartite graph of the sample; the training data and the training label constitute the sample data;

[0155] The covered information includes at least one of the following: a value related to a constraint node, a variable node related to a constraint node, a coefficient of a variable node related to a constraint node, and whether there is a connection relationship between a constraint node and a variable node;

[0156] or,

[0157] The covered information includes at least one of the following: a value related to a variable node, and whether there is a connection relationship between the variable node and the constraint node.

[0158] In some embodiments, the third processing module is used to input the training data of each sample data into the conditional diffusion model to obtain the sample features output by the conditional diffusion model;

[0159] Inputting the sample features into the decoder to obtain a sample third bipartite graph output by the decoder;

[0160] Determine the value of the total loss based on the sample third bipartite graph and the training label of the sample data, and if the value of the total loss is greater than or equal to a threshold, adjust the parameters of the conditional diffusion model and the parameters of the decoder; the total loss includes: a first loss of the conditional diffusion model and a second loss of the decoder;

[0161] Continue to perform the above joint parameter adjustment process until the value of the total loss is less than the threshold.

[0162] In some embodiments, the first processing module is used to randomly select at least one constraint node from the constraint nodes of the first bipartite graph; cover the selected constraint node, and add a virtual edge between the selected constraint node and each variable node;

[0163] or,

[0164] At least one variable node is randomly selected from the variable nodes of the first bipartite graph; the selected variable node is covered, and a virtual edge is added between the selected variable node and each constraint node.

[0165] It is understandable that when the instance generation device in the supply chain scenario provided in the above embodiment implements the instance generation method in the corresponding supply chain scenario, the above processing can be assigned to different program modules as needed to complete all or part of the above-described processing. In addition, the device provided in the above embodiment and the embodiment of the corresponding method belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0166] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.

[0167] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0168] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0169] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0170] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the instance generation method in the supply chain scenario. For example, in some embodiments, the instance generation method in the supply chain scenario may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the instance generation method in the supply chain scenario described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the instance generation method in the supply chain scenario in any other appropriate manner (e.g., by means of firmware).

[0171] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), integrated systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor.

[0172] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0173] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0174] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0175] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0176] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0177] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0178] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0179] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for generating instances in a supply chain scenario, characterized in that: The method comprises: Obtaining a first bipartite graph for representing an existing instance; the existing instance represents a specific plan of the supply chain scenario, the first bipartite graph comprising: a constraint node and a variable node, the constraint node represents a constraint requirement of the specific plan, and the variable node represents a decision factor of the specific plan; Covering at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph; Based on the second bipartite graph, random noise is denoised by a conditional diffusion model to generate a third bipartite graph; the third bipartite graph represents the target instance.

2. The method according to claim 1, characterized in that Based on the second bipartite graph, random noise is denoised by a conditional diffusion model to generate a third bipartite graph, including: Encoding the second bipartite graph through an encoder to obtain a first feature corresponding to the second bipartite graph; Based on the first feature, random noise is denoised by a conditional diffusion model to obtain a second feature; The second feature is decoded by a decoder to obtain a third bipartite graph.

3. The method according to claim 1, characterized in that The specific plan is a cargo distribution plan; The constraint node represents the constraint requirements of cargo distribution, and the constraint requirements at least include: the total cargo quantity requirement and the cargo quantity requirement allocated to each distribution point; The variable node represents the decision factors of cargo distribution, and the decision factors include at least: the number of distribution points and the number of each type of cargo distributed at each distribution point; or, The specific plan is a production scheduling plan; The constraint node represents the constraint requirements of production scheduling, and the constraint requirements at least include: total production scheduling time requirements, and production scheduling completion time requirements for each product or each order; The variable nodes represent decision factors for production scheduling, and the decision factors include at least: the number of production lines, and the time required to produce each product or each order on each production line.

4. The method according to claim 2, characterized in that: The method further includes a joint parameter adjustment process of the conditional diffusion model and the decoder based on the sample set; the method further includes obtaining the sample set, including: Obtain at least one sample instance; the sample instance represents a specific plan of the supply chain scenario; Determine a sample first bipartite graph corresponding to each sample instance; the sample first bipartite graph includes: a constraint node and a variable node; Covering at least one constraint node or variable node in each of the first bipartite graphs of the samples to obtain a second bipartite graph of the samples; Sample data is determined according to the sample first bipartite graph and the sample second bipartite graph.

5. The method according to claim 4, characterized in that Determining sample data according to the sample first bipartite graph and the sample second bipartite graph includes: Encoding the sample second bipartite graph by an encoder to obtain sample features corresponding to the sample second bipartite graph as training data; Determine a training label according to the covered information in the first bipartite graph of the sample; the training data and the training label constitute the sample data; The covered information includes at least one of the following: a value related to a constraint node, a variable node related to a constraint node, a coefficient of a variable node related to a constraint node, and whether there is a connection relationship between a constraint node and a variable node; or, The covered information includes at least one of the following: a value related to a variable node, and whether there is a connection relationship between the variable node and the constraint node.

6. The method according to claim 4, characterized in that The joint parameter adjustment process of the conditional diffusion model and the decoder based on the sample set includes: Inputting the training data of each sample data into the conditional diffusion model to obtain the sample features output by the conditional diffusion model; Inputting the sample features into the decoder to obtain a sample third bipartite graph output by the decoder; Determine the value of the total loss based on the sample third bipartite graph and the training label of the sample data, and if the value of the total loss is greater than or equal to a threshold, adjust the parameters of the conditional diffusion model and the parameters of the decoder; the total loss includes: a first loss of the conditional diffusion model and a second loss of the decoder; Continue to perform the above joint parameter adjustment process until the value of the total loss is less than the threshold.

7. The method according to claim 1, characterized in that Covering at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph includes: Randomly select at least one constraint node from the constraint nodes of the first bipartite graph; cover the selected constraint node, and add a virtual edge between the selected constraint node and each variable node; or, At least one variable node is randomly selected from the variable nodes of the first bipartite graph; the selected variable node is covered, and a virtual edge is added between the selected variable node and each constraint node.

8. An instance generation device in a supply chain scenario, characterized in that: The device comprises: An acquisition module is used to acquire a first bipartite graph for representing an existing instance; the existing instance represents a specific plan of the supply chain scenario, and the first bipartite graph includes: a constraint node and a variable node, the constraint node represents a constraint requirement of the specific plan, and the variable node represents a decision factor of the specific plan; A first processing module, configured to cover at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph; The second processing module is used to denoise the random noise based on the second bipartite graph through a conditional diffusion model to generate a third bipartite graph; the third bipartite graph represents the target instance.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute: Obtaining a first bipartite graph for representing an existing instance; the existing instance represents a specific plan of the supply chain scenario, the first bipartite graph comprising: a constraint node and a variable node, the constraint node represents a constraint requirement of the specific plan, and the variable node represents a decision factor of the specific plan; Covering at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph; Based on the second bipartite graph, random noise is denoised by a conditional diffusion model to generate a third bipartite graph; the third bipartite graph represents the target instance.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute: Obtaining a first bipartite graph for representing an existing instance; the existing instance represents a specific plan of the supply chain scenario, the first bipartite graph comprising: a constraint node and a variable node, the constraint node represents a constraint requirement of the specific plan, and the variable node represents a decision factor of the specific plan; Covering at least one constraint node or variable node in the first bipartite graph to obtain a second bipartite graph; Based on the second bipartite graph, random noise is denoised by a conditional diffusion model to generate a third bipartite graph; the third bipartite graph represents the target instance.

Citation Information

Patent Citations

  • Flow data set generation method and device based on conditional diffusion model

    CN116304705A

  • Data determination method, device and equipment

    CN118014272A

  • Methods and systems for diverse instance generation in artificial intelligence planning

    US20210142197A1