Operation method of task, electronic device, medium and product
By redetermining the time function value at the initial moment in the simulated bifurcation machine, using the maximum cutting problem and the prediction method of the sub-undirected graph, the problem of low computing efficiency of the simulated bifurcation machine is solved, and more efficient computing and resource saving is achieved.
Patent Information
- Application Number
- CN202510222693.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-02-27
AI Technical Summary
The simulation bifurcator has low computing efficiency during operation, mainly due to the long-term redundancy between the initial moment and the critical moment.
By determining the maximum cutting problem based on the actual pending task, building multiple subundirected graphs, predicting the loss function value, and redetermining the time function value at the initial moment of the simulation bifurcating machine operation, making it closer to the value of the critical moment, thereby shortening the operation time.
It reduces the running time of the simulation bifurcator, improves the computing efficiency, and saves computing resources.
Smart Images

Figure CN119718553B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and particularly to an operation method for tasks, an electronic device, a medium, and a product. Background Art
[0002] With the rapid development of information technology, more and more practical tasks can be attributed to combinatorial optimization problems, and it is of great significance to process combinatorial optimization problems through a simulated bifurcation machine.
[0003] In related technologies, when a simulated bifurcation machine operates, it starts from the initial moment. Among them, the time function value at the initial moment is 0. After operating for a period of time, it reaches the critical moment of the bifurcation point, and bifurcation operations start from the critical moment. The time after the critical moment is the time that plays an important role in the operation result. However, the operation efficiency of the simulated bifurcation machine is relatively low when it is operating. Summary of the Invention
[0004] This application provides an operation method for tasks, an electronic device, a medium, and a product, so as to at least solve the problem that the operation efficiency of a simulated bifurcation machine is relatively low when it is operating in related technologies.
[0005] This application provides an operation method for tasks, including:
[0006] Determine a corresponding maximum cut problem to be solved according to the actual task to be processed;
[0007] Construct a plurality of sub-undirected graphs corresponding to the maximum cut problem to be solved;
[0008] Determine a predicted value of the loss function of the maximum cut problem to be solved according to the plurality of sub-undirected graphs;
[0009] Determine the time function value at the initial moment when the simulated bifurcation machine starts to operate according to the predicted value of the loss function;
[0010] Perform the operation of the maximum cut problem to be solved by using the simulated bifurcation machine according to the time function value at the initial moment until a preset convergence condition is satisfied, and obtain an operation result.
[0011] This application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above operation methods for tasks when executing the computer program.
[0012] This application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above operation methods for tasks are implemented.
[0013] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the arithmetic method for any one of the above tasks.
[0014] Through the present application, the corresponding maximum cut problem is determined according to the actual task to be processed, and a plurality of sub-undirected graphs corresponding to the maximum cut problem are constructed. The predicted value of the loss function is determined according to the plurality of sub-undirected graphs, so as to determine the time function value at the initial moment when the analog bifurcation machine starts to run the operation according to the predicted value of the loss function, so that the analog computer starts to run according to the time function value, thereby reducing the long-term redundancy between the initial moment and the critical moment when the analog bifurcation machine runs in the related art when the time function value at the initial moment is set to 0, and further improving the operation efficiency of the analog bifurcation machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application, the drawings required for the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0016] Figure 1 It is a hardware architecture diagram of an arithmetic method for executing a task provided by an embodiment of the present application;
[0017] Figure 2 It is a flowchart of an arithmetic method for a task provided by an embodiment of the present application;
[0018] Figure 3 It is a running schematic diagram of a ballistic analog bifurcation machine provided by an embodiment of the present application;
[0019] Figure 4 It is a flowchart of a method for determining the predicted value of the loss function of the maximum cut problem to be solved provided by an embodiment of the present application;
[0020] Figure 5 It is a flowchart of a method for determining the time function value at the initial moment when the analog bifurcation machine starts to run the operation provided by an embodiment of the present application;
[0021] Figure 6 It is a structural schematic diagram of an arithmetic device for a task provided by an embodiment of the present application;
[0022] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.
[0024] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such a process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0025] With the development of information technology, some practical problems, such as route planning problems, network design problems, data classification problems, etc., play an increasingly important role. The commonality of these problems is that the answers are only two cases of either A or B. Mathematically, these problems can be abstracted into a class of combinatorial optimization problems. A combinatorial optimization problem refers to a mathematical problem of finding the optimal solution that satisfies specific constraint conditions in a discrete solution space. Its core lies in determining a better solution by optimizing the objective function from a finite set of feasible solutions.
[0026] The Max-Cut problem is a classic combinatorial optimization problem, and the actual problem is solved by transforming it into the corresponding Max-Cut problem. In physics, the Max-Cut problem is equivalent to a class of classical Ising models, and the Ising model can be solved by a simulated bifurcation machine. Therefore, in practice, the problem can be specifically solved by a simulated bifurcation machine.
[0027] In the related art, when the simulated bifurcation machine is running (evolving), the operation of the system starts from the initial moment The value of the time function at the initial moment However, the moment that plays a key role in the operation of the system is the moment when the simulated bifurcation machine starts to appear bifurcation points, that is, the critical moment The time function at the critical moment can be expressed as Therefore, when the simulated bifurcation machine is running, there is actually a long time redundancy problem between and which leads to a low operating efficiency of the simulated bifurcation machine.
[0028] Therefore, in view of the problems in the above related technologies, the inventor found in the process of research that if the time interval of the analog bifurcation machine during operation can be reduced, by re-determining a new initial time value, even if the time function value of the new initial time to The shorter the time interval between them, the shorter the duration of the analog bifurcation machine running to the critical moment by re-determining a new initial time value, that is, the time function value of the new initial time , where , The closer it is to , the shorter the duration of the analog bifurcation machine running to the critical moment, thereby shortening the entire running duration of the model bifurcation machine, and thus improving the running efficiency of the analog bifurcation machine. Specifically, by determining the corresponding maximum cut problem according to the actual task to be processed, constructing a plurality of sub-undirected graphs corresponding to the maximum cut problem to be solved, determining the predicted value of the loss function of the maximum cut problem according to the plurality of sub-undirected graphs, and determining the time function value of the initial time when the analog bifurcation machine starts to run and operate based on the predicted value of the loss function, so that the model bifurcation machine operates according to the time function value of the initial time, thereby reducing the running duration of the analog bifurcation machine and saving computing resources at the same time. Therefore, the present application proposes an operation method, an electronic device, a medium and a product for tasks.
[0029] Please refer to Figure 1 , Figure 1 FIG. is a hardware architecture diagram of an operation method for executing tasks provided by an embodiment of the present application. The execution subject of this method can be an electronic device, which includes a calculation module 01 and an analog bifurcation machine module 02, and the calculation module 01 and the analog bifurcation machine module 02 are connected.
[0030] The calculation module 01 includes a first control module 011 and a storage module 012. The first control module 011 is used to determine the corresponding maximum cut problem to be solved according to the actual task to be processed, and determine the predicted value of the loss function of the maximum cut problem to be solved according to a plurality of sub-undirected graphs constructed for the maximum cut problem to be solved. It is also used to determine the time function value of the initial time when the analog bifurcation machine starts to run and operate according to the predicted value of the loss function, and send the time function value of the initial time to the analog bifurcation machine module 02. The storage module 012 is used to store the above data, and the data includes but is not limited to the predicted value of the loss function and the time function value of the initial time, etc.
[0031] The analog bifurcation machine module 02 includes a second control module 021, an operation module 022, and a measurement module 023. The second control module 021 is configured to receive the time function value at the initial moment sent by the first control module 011, and receive the evolution start instruction sent by the first control module 011. The operation module 022 is configured to perform operations according to the evolution start instruction and the time function value at the initial moment until a preset convergence condition is satisfied, obtain an operation result, and send the operation result to the second control module 021. The measurement module 023 is configured to measure measurement data during the operation of the analog bifurcation machine, etc. The second control module 021 sends the operation result to the first control module 011, and the first control module 011 sends an evolution end instruction to the second control module 021 according to the operation result, and the operation module 022 ends the calculation according to the evolution end instruction.
[0032] It can be understood that the modules in the above examples are only for illustration and do not limit the present application. It may further include other modules, such as an input module, an output module, etc.
[0033] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of an operation method for a task provided by an embodiment of the present application. The execution subject of this method may be an operation device for the task, and this operation device for the task may be implemented through a computer program; it may also be implemented through a medium storing relevant computer programs, such as a USB flash drive and / or an optical disc, etc., or may also be implemented through an entity device integrated or installed with relevant computer programs, such as a chip or an electronic device, etc. Among them, the electronic device may be an intelligent terminal such as a server, a server cluster, and a computer. This method may include the following steps:
[0035] S201. Determine the corresponding maximum cut problem to be solved according to the actual task to be processed.
[0036] The maximum cut problem is a classic problem in the fields of graph theory and combinatorial optimization, and its definition is given an undirected graph , where is the vertex set, represents the number of vertices, is the edge set, and the edge connects the vertices and . The goal of the maximum cut problem is to divide the vertex set It is divided into two disjoint subsets A and B such that the number of edges or the sum of the weights of the edges connecting the vertices in A and B reaches the maximum. The set of these edges connecting the two subsets is called a "cut", and finding the partitioning method that maximizes the "cut" is the core of the maximum cut problem.
[0037] If we use to represent the partitioning state of vertex , if represents that the vertex belongs to subset A, and if represents that the vertex belongs to subset B, then the loss function of the maximum cut problem can be expressed as the following formula (1).
[0038]
[0039] Where, represents the loss function; represents the weight; represents the value of the th vertex, represents the value of the th vertex; represents the edge set.
[0040] The actual task to be processed can be abstracted as a type of combinatorial optimization problem, which is defined on binary variables or ( or ). Suppose there are multiple objects in the actual task to be processed. According to the number of objects, the vertex set of the maximum cut problem can be determined, and according to the relationships between the objects, the edge set of the maximum cut problem can be determined.
[0041] S202. Construct multiple sub-undirected graphs corresponding to the maximum cut problem to be solved. The maximum cut problem belongs to the non-deterministic polynomial hard (NP-hard) problem. NP-hard problems mean that as the problem size increases, the size is generally exponential, and the computing resources required to process the problem are also higher. However, due to limited computing resources currently, generally, the maximum cut problem within 200 vertices can be processed. Therefore, it is necessary to decompose the large-scale maximum cut problem to be solved into multiple small-scale maximum cut problems. Among them, the order of magnitude of the number of vertices contained in the large scale is significantly larger than that of the small scale.
[0042] In this embodiment, a possible implementation of constructing multiple sub - undirected graphs corresponding to the maximum - cut problem to be solved is as follows:
[0043] Obtain the undirected graph corresponding to the maximum - cut problem to be solved, and create multiple sub - undirected graphs according to the feature information in the undirected graph.
[0044] Among them, the undirected graph includes multiple vertices and the edges between the vertices. The vertices are used to represent the objects corresponding to the actual tasks to be processed, and the edges are used to represent the preset relationships between the objects. The order of magnitude of the number of vertices included in any sub - undirected graph is less than the order of magnitude of the number of vertices in the undirected graph.
[0045] The undirected graph corresponding to the maximum - cut problem to be solved is at a level equivalent to the large - system level mentioned above, and each sub - undirected graph is at a level equivalent to the small - system level mentioned above.
[0046] S203. Determine the predicted value of the loss function of the maximum - cut problem to be solved according to the multiple sub - undirected graphs.
[0047] In this embodiment, by decomposing the maximum - cut problem of the large system into multiple maximum - cut problems of small systems according to the feature information in the undirected graph corresponding to the maximum - cut problem to be solved, the predicted value of the loss function corresponding to each maximum - cut problem of the small system is obtained. Among them, the predicted value of the loss function is also called the predicted value of energy.
[0048] Furthermore, according to the predicted values of the loss functions corresponding to each maximum - cut problem of the small system, the predicted value of the loss function of the maximum - cut problem of the large system is indirectly obtained. The method indicated above can also be called the energy interpolation method.
[0049] S204. Determine the time - function value at the initial moment when the analog bifurcation machine starts to run and operate according to the predicted value of the loss function.
[0050] When solving the maximum - cut problem, it can be carried out through the classical Ising model. Among them, the Ising model is a spin model. For example, the spin - up can be corresponded with and the spin - down can be corresponded with The highest excited state of the spin model corresponds to the solution of the maximum - cut problem.
[0051] In this embodiment, the analog bifurcation machine can be used to solve the spin model. To facilitate the understanding of the analog bifurcation machine in this step, the analog bifurcation machine is first introduced.
[0052] The inside of the analog bifurcation machine is composed of multiple components. Each component can be used to represent the vertices of the maximum - cut problem. The Hamiltonian describing the components of the analog bifurcation machine is shown in formulas (2) - (3):
[0053]
[0054]
[0055] Among them, represents the Hamiltonian; represents a preset constant, generally taking the value of 1; represents the number of components; represents the potential energy of the component; represents a time function, , generally speaking , and ; represents the -th coordinate of the component; represents the -th coordinate of the component; represents the interaction constant; represents the weight; represents the momentum of the component.
[0056] This Hamiltonian describes the motion behavior of the N components under the quartic harmonic oscillator potential and the interaction of the surrounding components. The motion equation of each component can be shown by the Hamiltonian equations (4)-(5):
[0057]
[0058]
[0059] In the above-mentioned simulated bifurcation machine, the role of the quartic potential is that when or , it makes oscillate near 0, so that continues to grow and move in the direction of being or .
[0060] It should be noted that when solving, takes the value of or , which means that the part less than or greater than has little significance. Therefore, the quartic potential energy term corresponding to this part can be ignored. To prevent it from exceeding the range, an inelastic wall can be introduced, that is, if , then is taken as one of , specifically or , depending on the current The symbol. Thus, the deformation of the simulated bifurcation machine, namely the ballistic simulated bifurcation machine (bSBM), is obtained.
[0061] The Hamiltonian of the components of the ballistic simulated bifurcation machine and the kinematic equations they satisfy are shown in Formulas (6)-(9):
[0062]
[0063]
[0064]
[0065]
[0066] In this embodiment, taking the ballistic simulated bifurcation machine as an example of the simulated bifurcation machine, during the operation of the ballistic simulated bifurcation machine, each component can be regarded as being in the harmonic oscillator potential and the interaction potential between the components. The coordinates and momentum of each component will gradually change with evolution. As Figure 3 shown, Figure 3 is a schematic diagram of the operation of a ballistic simulated bifurcation machine provided by an embodiment of the present application. Among them, when , oscillates near 0, and when , will diverge rapidly. This behavior change is the bifurcation phenomenon. is also called the moment corresponding to the bifurcation point. The initial moment when the ballistic simulated bifurcation machine in this step starts to run the operation is before , and the time function value at the initial moment is not 0 in the related art. Compared with the related art, it saves the operation duration as Figure 3 shown.
[0067] According to the predicted value of the loss function corresponding to the maximum cut problem to be solved, the time function value at the initial moment when the ballistic simulated bifurcation machine starts to run the operation is determined. The specific implementation process will be described in detail in the following embodiments. Please refer to the following embodiments.
[0068] S205. According to the time function value at the initial moment, use the simulated bifurcation machine to perform the operation of the maximum cut problem to be solved until the preset convergence condition is satisfied, and obtain the operation result.
[0069] In the present application, the type of the simulated bifurcation machine is not limited. It can be a ballistic simulated bifurcation machine or other variant forms of the simulated bifurcation machine.
[0070] After determining the time function value at the initial moment, the simulation bifurcation machine runs according to this time function value, so that the simulation bifurcation machine runs to the bifurcation point for divergence in a relatively short time. When the preset convergence condition is reached, the operation result is obtained.
[0071] Exemplarily, taking the release of a certain public welfare promotional video as an example, if you want to select a part of users to release this public welfare promotional video, these users will in turn affect the users around them to expand the influence range of this public welfare promotional video. The goal is to find suitable users to maximize the spread range of this public welfare promotional video. The problem of releasing this public welfare promotional video can be abstracted into a maximum cut problem. All users are represented by binary variables When it means that this user has received this public welfare promotional video. When it means that this user has not received this public welfare promotional video. Through the method of this embodiment, the operation result finally obtained by the simulation bifurcation machine is whether each user will receive this public welfare promotional video.
[0072] In the above embodiment of the present application, the corresponding maximum cut problem is determined according to the actual task to be processed, and the predicted value of the loss function of this maximum cut problem is determined according to the multiple sub-undirected graphs corresponding to the constructed maximum cut problem, so as to determine the time function value at the initial moment when the simulation bifurcation machine starts to run the operation according to this predicted value of the loss function. The simulation computer runs according to this time function value at the initial moment, so that it can quickly calculate to the critical moment, thereby reducing the long-term redundancy problem between the initial moment and the critical moment when the time function value at the initial moment is set to 0 in the related art, and thus improving the operation efficiency of the simulation bifurcation machine.
[0073] Further, on the basis of the above embodiment, the process of determining the predicted value of the loss function of the maximum cut problem to be solved is described through the following embodiment.
[0074] Please refer to Figure 4 , Figure 4 which is a schematic flow chart of a method for determining the predicted value of the loss function of the maximum cut problem to be solved provided by an embodiment of the present application. The method includes the following steps:
[0075] S401. Obtain the undirected graph corresponding to the maximum cut problem to be solved.
[0076] S402. Create multiple sub-undirected graphs according to the undirected graph.
[0077] Optionally, extract the feature information of each vertex in the undirected graph. The feature information can be, for example, the number of vertices that each vertex can connect to, etc. Obtain the preset vertex number information in each sub-undirected graph. The preset vertex numbers in each sub-undirected graph can be different. For example, assume that the first sub-undirected graph is preset to include 100 vertices, the second sub-undirected graph is preset to include 150 vertices, etc. Then, create multiple sub-undirected graphs according to the preset vertex number information and feature information in each sub-undirected graph.
[0078] It should be noted that the feature information of the vertices in any sub-undirected graph needs to be the same as the feature information of each vertex in the undirected graph, so that each sub-undirected graph and the undirected graph corresponding to the maximum cut problem to be solved have common similar properties. In this way, the predicted value of the loss function of the maximum cut problem to be solved indirectly determined according to the sub-undirected graph is not much different from the actual predicted value of the loss function of the maximum cut problem to be solved.
[0079] Optionally, based on a preset configuration model, randomly select multiple regions from the undirected graph. For any region, extract the image information in the region, and randomly generate multiple sub-undirected graphs including different numbers of vertices according to the image information.
[0080] Optionally, based on a preset probability model, obtain the statistical characteristics of the graph from the undirected graph, such as the probability of the existence of edges, the other vertices that a vertex may connect to, etc. Then, generate multiple sub-undirected graphs according to the statistical characteristics, where the number of vertices included in each sub-undirected graph is different.
[0081] S403. Determine the predicted value of the loss function of the maximum cut problem to be solved according to multiple sub-undirected graphs.
[0082] Based on a preset algorithm, such as a heuristic algorithm, calculate the sub-loss function values corresponding to each sub-undirected graph. Among them, the loss function corresponding to each sub-undirected graph is the same as formula (1).
[0083] Then, determine the predicted value of the loss function of the maximum cut problem to be solved according to the sub-loss function values corresponding to each sub-undirected graph and the undirected graph.
[0084] A possible implementation method is:
[0085] Adopt a preset fitting algorithm to fit a preset function according to the number of vertices in each sub-undirected graph and the corresponding sub-loss function values, where the preset function represents the mapping relationship between the number of vertices in the sub-undirected graph and the sub-loss function values.
[0086] Optionally, the preset function can be a linear function or a non-linear function, etc. This embodiment does not make a limitation.
[0087] Determine the predicted value of the loss function for the maximum cut problem to be solved according to a preset function and the number of vertices in the undirected graph.
[0088] Optionally, input the number of vertices in the undirected graph into the preset function to determine the predicted value of the loss function for the maximum cut problem to be solved.
[0089] In the above embodiments of the present application, an undirected graph corresponding to the maximum cut problem to be solved is obtained, and according to the undirected graph, multiple sub-undirected graphs are created. Furthermore, according to the multiple sub-undirected graphs, the predicted value of the loss function for the maximum cut problem to be solved is determined. In the method of this embodiment, due to the limited computing resources of the current computing module, it is impossible to directly solve the undirected graph corresponding to the maximum cut problem to be solved. Therefore, by creating multiple sub-undirected graphs, the computing module can quickly obtain the loss function values corresponding to each sub-undirected graph according to the current computing resources. Furthermore, according to the loss function values corresponding to each sub-undirected graph, the predicted value of the loss function of the undirected graph corresponding to the maximum cut problem to be solved is obtained, improving the flexibility of obtaining the predicted value of the loss function of the undirected graph corresponding to the maximum cut problem to be solved.
[0090] Furthermore, on the basis of the above embodiments, the process of determining the initial moment when the simulated bifurcator starts to perform bifurcation operations according to the predicted value of the loss function is described through the following embodiments.
[0091] Please refer to Figure 5 , Figure 5 which is a schematic flowchart of a method for determining the time function value of the initial moment when the simulated bifurcator starts to operate. The method may include the following steps:
[0092] S501. Determine the weight matrix according to the loss function corresponding to the maximum cut problem to be solved.
[0093] Among them, the weight matrix includes the weights of the edges between the vertices.
[0094] The solution to the maximum cut problem to be solved is to find the minimum value of its corresponding loss function. The loss function corresponding to the maximum cut problem to be solved is shown in the following formula (10), and formula (10) is the same as formula (1).
[0095]
[0096] It can be seen from the above formula that the loss function includes the weight matrix , is one of the weight values in the weight matrix . Without considering the binary characteristic, finding the minimum value of the loss function is to find the maximum eigenvalue of the weight matrix .
[0097] It should be noted that the element corresponding to the maximum eigenvalue of the weight matrix is not binary, but a random number between [-1, 1]. Therefore the maximum eigenvalue of is not the solution to the original problem, but an approximate solution can be obtained by taking the sign operation on
[0098] The simulated bifurcation machine in this embodiment can be a ballistic simulated bifurcation machine. Considering the kinematic equations of the ballistic simulated bifurcation machine, namely formulas (8) and (9), when the motion state reaches stability, the operation of the ballistic simulated bifurcation machine is terminated and the sign of
[0099]
[0100]
[0101] is output. The solution corresponding to the sign is used as the approximate solution. When reaching stability, the kinematic equations are as shown in formulas (11)-(12): , and .
[0102] If the maximum eigenvalue of the weight matrix is less than , then there is a unique solution, that is , because the time function will increase as the running time of the ballistic simulated bifurcation machine increases. Therefore will become smaller until when a second solution appears. At this time is the eigenstate corresponding to the maximum eigenvalue of the weight matrix . , and subsequently, as the running time increases will also continue to evolve from the maximum eigenstate of the previously obtained matrix until it converges to the inelastic wall located at .
[0103] As can be seen from the above content, in the principle of the ballistic simulated bifurcation machine, since the time function will increase as the running time of the ballistic simulated bifurcation machine increases. Therefore will have a change process from greater than to less than . In the simulated bifurcation machine in the related art, since it takes a long time to go from to equal to The process of is the process of occurring bifurcation points, so the operating efficiency of the analog bifurcation machine is low.
[0104] Therefore, in this application, for the time function a new initial value of evolution is set , rather than 0 in the related art, as the time function value corresponding to the initial moment when the ballistic simulation bifurcation machine starts to run and calculate, that is , so the kinematic equation of the ballistic simulation bifurcation machine becomes as shown in the following formulas (13)-(14):
[0105]
[0106]
[0107] During the operation of the ballistic simulation bifurcation machine, it is necessary to change from greater than to less than so that evolves to the maximum eigenstate of the weight matrix , so it needs to satisfy the following formula (15):
[0108]
[0109] S502. Determine the predicted value of the maximum eigenvalue of the weight matrix according to the predicted value of the loss function.
[0110] Perform normalization processing on the predicted value of the loss function to obtain the normalized predicted value of the loss function, and determine the predicted value of the maximum eigenvalue of the weight matrix according to the normalized predicted value of the loss function.
[0111] When calculating the maximum eigenvalue of the weight matrix , the default maximum eigenstate is normalized, that is, the sum of the squares of all elements in each eigenstate is 1. However, when calculating the maximum cut, the sum of the squares of all elements of the obtained solution is N, so normalization processing needs to be performed on the result of the maximum cut. In addition, when calculating the maximum cut, the contribution of the number of edges is included, but when calculating the eigenvalue of the weight matrix , there is no such contribution. Therefore, when predicting the maximum eigenvalue, the information of the number of edges needs to be excluded. Therefore, the method for determining the predicted value of the maximum eigenvalue of the weight matrix obtained through conversion is as shown in the following formula (16):
[0112]
[0113] Among them, represents the maximum eigenvalue of the weight matrix; represents an empirical constant; represents the number of vertices; represents the predicted value of the loss function after normalization.
[0114] Therefore, by obtaining the number of vertices in the undirected graph corresponding to the maximum cut problem to be solved and the preset empirical constant, and according to the number of vertices, the empirical constant, and the predicted value of the loss function after normalization, substituting the above data into formula (16) to determine the weight matrix of the predicted value of the maximum eigenvalue.
[0115] Obtained from the above formula (16) is actually an estimated value of. In this embodiment, by setting an appropriate empirical constant, can be achieved from greater than to less than change process. Therefore, it is necessary to set an appropriate empirical constant according to experience.
[0116] S503. According to the predicted value of the maximum eigenvalue, determine the time function value at the initial moment when the analog bifurcation machine starts to run the operation.
[0117] Determine the time function value at the initial moment according to formula (17):
[0118]
[0119] where, represents the time function value at the initial moment; represents the interaction constant; represents a preset constant.
[0120] Compared with the situation in the related art where the time function value at the initial moment of the analog bifurcation machine is taken as 0, the running duration of the time length of is shortened.
[0121] After determining according to Use the analog bifurcation machine to perform the operation of the maximum cut problem to be solved. When any in the ballistic analog bifurcation machine reaches or at this time, that is, the operation reaches convergence and the operation result is obtained.
[0122] Obtain the duration used to get this operation result. If this duration is greater than the preset duration threshold, it means that the currently set empirical constant makes the running time of the analog bifurcation machine too long, then reset the empirical constant so that the analog bifurcation machine can obtain a new empirical constant.
[0123] In the above embodiments of the present application, according to the loss function corresponding to the maximum cut problem to be solved, a weight matrix is determined. According to the predicted value of the loss function, the predicted value of the maximum eigenvalue of the weight matrix is determined. Furthermore, according to the predicted value of the maximum eigenvalue, the time function value at the initial moment when the analog bifurcation machine starts to run the operation is determined, so that the model bifurcation machine starts to operate according to the time function value at the initial moment, thereby reducing the running duration of the analog bifurcation machine and improving the running efficiency.
[0124] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0125] Figure 6 It is a schematic structural diagram of an operation device for a task provided by an embodiment of the present application. As Figure 6 shown, it includes:
[0126] A determination module 601, configured to determine a corresponding maximum cut problem to be solved according to the actual task to be processed.
[0127] A construction module 602, configured to construct a plurality of sub-undirected graphs corresponding to the maximum cut problem to be solved.
[0128] The determination module 601 is further configured to determine the predicted value of the loss function of the maximum cut problem to be solved according to the plurality of sub-undirected graphs.
[0129] The determination module 601 is further configured to determine the time function value at the initial moment when the analog bifurcation machine starts to run the operation according to the predicted value of the loss function.
[0130] A processing module 603, configured to perform the operation of the maximum cut problem to be solved by using the analog bifurcation machine according to the time function value at the initial moment until a preset convergence condition is met, and obtain an operation result.
[0131] A possible implementation manner is that the construction module 602 is specifically configured to:
[0132] Obtain an undirected graph corresponding to the maximum cut problem to be solved. The undirected graph includes a plurality of vertices and edges between the vertices. The vertices are used to represent the objects corresponding to the actual tasks to be processed, and the edges are used to represent the preset relationships between the objects.
[0133] Create a plurality of sub-undirected graphs according to the feature information in the undirected graph. The number of vertices included in any sub-undirected graph is of a magnitude less than the number of vertices in the undirected graph.
[0134] A possible implementation manner is that the construction module 602 is specifically configured to:
[0135] Extract the feature information of each vertex in the undirected graph.
[0136] Obtain the preset vertex quantity information in each sub-undirected graph.
[0137] Create multiple sub-undirected graphs according to the preset vertex quantity information and feature information in each sub-undirected graph.
[0138] Among them, the feature information of the vertices in any sub-undirected graph is the same as the feature information of each vertex in the undirected graph.
[0139] A possible implementation is that the determination module 601 is specifically used for:
[0140] Based on a preset algorithm, calculate the sub-loss function values corresponding to each sub-undirected graph.
[0141] According to the sub-loss function values corresponding to each sub-undirected graph and the undirected graph, determine the loss function value of the maximum cut problem to be solved.
[0142] A possible implementation is that the determination module 601 is specifically used for:
[0143] Adopt a preset fitting algorithm to fit a preset function according to the number of vertices in each sub-undirected graph and the corresponding sub-loss function values, where the preset function represents the mapping relationship between the number of vertices in the sub-undirected graph and the sub-loss function values.
[0144] According to the preset function and the number of vertices in the undirected graph, determine the predicted value of the loss function of the maximum cut problem to be solved.
[0145] A possible implementation is that the determination module 601 is specifically used for:
[0146] Input the number of vertices in the undirected graph into the preset function to determine the predicted value of the loss function of the maximum cut problem to be solved.
[0147] A possible implementation is that the determination module 601 is specifically used for:
[0148] According to the loss function corresponding to the maximum cut problem to be solved, determine the weight matrix, where the weight matrix includes the weights of the edges between each vertex.
[0149] According to the predicted value of the loss function, determine the predicted value of the largest eigenvalue of the weight matrix.
[0150] According to the predicted value of the largest eigenvalue, determine the time function value at the initial moment when the analog bifurcation machine starts to run the operation.
[0151] A possible implementation is that the determination module 601 is specifically used for:
[0152] Normalize the predicted value of the loss function to obtain the predicted value of the loss function after normalization.
[0153] Determine the predicted value of the maximum eigenvalue of the weight matrix according to the predicted value of the loss function after normalization.
[0154] A possible implementation is the determination module 601, specifically used for:
[0155] Obtain the number of vertices in the undirected graph corresponding to the maximum cut problem to be solved.
[0156] Obtain a preset empirical constant.
[0157] Determine the predicted value of the maximum eigenvalue of the weight matrix according to the number of vertices, the empirical constant, and the predicted value of the loss function after normalization.
[0158] A possible implementation is the determination module 601, specifically used for:
[0159] Determine the predicted value of the maximum eigenvalue of the weight matrix according to the following formula:
[0160]
[0161] Where, represents the maximum eigenvalue of the weight matrix. represents the empirical constant. represents the number of vertices. represents the predicted value of the loss function after normalization.
[0162] A possible implementation is the determination module 601, specifically used for:
[0163] Determine the value of the time function at the initial moment according to the following formula:
[0164]
[0165] Where, represents the value of the time function at the initial moment. represents the interaction constant. represents the preset constant.
[0166] A possible implementation is the determination module 601, specifically used for:
[0167] Obtain the duration used to obtain the operation result.
[0168] If the duration is greater than the preset duration threshold, re-obtain a new empirical constant.
[0169] For the description of the features in the embodiments corresponding to the arithmetic device of the task, reference may be made to the relevant descriptions in the embodiments corresponding to the arithmetic method of the task, which will not be elaborated here one by one.
[0170] Figure 7 This is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 7 shown, the electronic device 70 provided in this embodiment includes: at least one processor 701 and a memory 702. Optionally, the electronic device 70 further includes a communication component 703. Among them, the processor 701, the memory 702, and the communication component 703 are connected through a bus 704.
[0171] In a specific implementation process, at least one processor 701 executes the computer execution instructions stored in the memory 702, so that at least one processor 701 executes the above-mentioned arithmetic method embodiment of the task.
[0172] For the specific implementation process of the processor 701, reference may be made to the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0173] In the above embodiments, it should be understood that the processor may be a central processing unit (Central Processing Unit, abbreviated as: CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as: DSP), application-specific integrated circuits (Application Specific Integrated Circuit, abbreviated as: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0174] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0175] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
[0176] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in the method embodiment of any one of the above tasks when running.
[0177] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media that can store computer programs such as a USB flash drive, a read-only memory (ROM for short), a random access memory (RAM for short), a mobile hard disk, a magnetic disk, or an optical disc.
[0178] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in the method embodiment of any one of the above tasks.
[0179] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in the method embodiment of any one of the above tasks.
[0180] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0181] The above has introduced in detail a computing method, an electronic device, a medium and a product for a task provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A task operation method, characterized in that: include: According to the actual tasks to be processed, determine the corresponding maximum cut problem to be solved; Constructing multiple sub-undirected graphs corresponding to the maximum cut problem to be solved; Determine, according to the multiple sub-undirected graphs, a predicted value of a loss function of the maximum cut problem to be solved; Determining a predicted value of a maximum eigenvalue of a weight matrix according to the predicted value of the loss function, wherein the weight matrix includes weights of edges between vertices; Determine the time function value at the initial moment when the simulated bifurcation machine starts running operation according to the predicted value of the maximum eigenvalue; According to the time function value at the initial moment, the simulation bifurcation machine is used to perform the operation of the maximum cut problem to be solved until a preset convergence condition is met to obtain the operation result.
2. The method according to claim 1, characterized in that The step of constructing a plurality of sub-undirected graphs corresponding to the maximum cut problem to be solved includes: Obtain an undirected graph corresponding to the maximum cut problem to be solved, wherein the undirected graph includes a plurality of vertices and edges between the vertices, the vertices are used to represent objects corresponding to the actual tasks to be processed, and the edges are used to represent preset relationships between the objects; A plurality of sub-undirected graphs are created according to the characteristic information in the undirected graph, wherein the number of vertices included in any of the sub-undirected graphs is smaller than the number of vertices in the undirected graph.
3. The method according to claim 2, characterized in that The step of creating a plurality of sub-undirected graphs according to the feature information in the undirected graph comprises: Extracting feature information of each vertex in the undirected graph; Get the preset vertex number information in each sub-undirected graph; Creating multiple sub-undirected graphs according to the preset vertex quantity information and the feature information in each sub-undirected graph; The feature information of the vertices in any of the sub-undirected graphs is the same as the feature information of the vertices in the undirected graph.
4. The method according to claim 3, characterized in that The step of determining the predicted value of the loss function of the maximum cut problem to be solved according to the multiple sub-undirected graphs includes: Based on a preset algorithm, calculate the sub-loss function value corresponding to each of the sub-undirected graphs; According to the sub-loss function values corresponding to each of the sub-undirected graphs and the undirected graph, the loss function prediction value of the maximum cut problem to be solved is determined.
5. The method according to claim 4, characterized in that The step of determining the predicted value of the loss function of the maximum cut problem to be solved according to the sub-loss function values corresponding to each of the sub-undirected graphs and the undirected graph comprises: Using a preset fitting algorithm, a preset function is fitted according to the number of vertices in each sub-undirected graph and the corresponding sub-loss function value, wherein the preset function represents a mapping relationship between the number of vertices in the sub-undirected graph and the sub-loss function value; According to the preset function and the number of vertices in the undirected graph, a predicted value of the loss function of the maximum cut problem to be solved is determined.
6. The method according to claim 5, characterized in that The step of determining the predicted value of the loss function of the maximum cut problem to be solved according to the preset function and the number of vertices in the undirected graph includes: The number of vertices in the undirected graph is input into the preset function to determine the predicted value of the loss function of the maximum cut problem to be solved.
7. The method according to claim 1, characterized in that Also includes: The weight matrix is determined according to the loss function corresponding to the maximum cut problem to be solved.
8. The method according to claim 7, characterized in that Determining the predicted value of the maximum eigenvalue of the weight matrix according to the predicted value of the loss function includes: Normalizing the loss function prediction value to obtain a normalized loss function prediction value; The predicted value of the maximum eigenvalue of the weight matrix is determined according to the predicted value of the loss function after the normalization process.
9. The method according to claim 8, characterized in that Determining the predicted value of the maximum eigenvalue of the weight matrix according to the predicted value of the loss function after the normalization process includes: Obtain the number of vertices in the undirected graph corresponding to the maximum cut problem to be solved; Get the preset empirical constants; The predicted value of the maximum eigenvalue of the weight matrix is determined according to the number of vertices, the empirical constant and the predicted value of the normalized loss function.
10. The method according to claim 9, characterized in that Determining the predicted value of the maximum eigenvalue of the weight matrix according to the number of vertices, the empirical constant, and the predicted value of the loss function after normalization includes: The predicted value of the maximum eigenvalue of the weight matrix is determined according to the following formula: Among them, the represents the predicted value of the maximum eigenvalue of the weight matrix; represents the empirical constant; represents the number of vertices; Represents the predicted value of the loss function after the normalization process.
11. The method according to claim 10, characterized in that Determining the time function value at the initial moment when the simulated bifurcation machine starts running the operation according to the predicted value of the maximum eigenvalue comprises: The time function value at the initial moment is determined according to the following formula: Among them, the represents the time function value of the initial moment; represents the interaction constant; Indicates a preset constant.
12. The method according to claim 9, characterized in that Also includes: Obtaining the time taken to obtain the calculation result; If the duration is greater than the preset duration threshold, a new empirical constant is re-acquired.
13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the operation method of simulating a bifurcation machine as claimed in any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the operation method of simulating a bifurcation machine as claimed in any one of claims 1 to 12.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the operation method of simulating a forking machine as claimed in any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Quantum calculation method and device, electronic equipment and storage medium
CN116306951A