Task operation method, device, medium and program product
By simulating the position evolution of particles under the influence of other particles, target strategies are generated to run combined optimization tasks, which solves the problem of low processing efficiency of computers when processing complex tasks, and achieves more efficient computing resource utilization and task processing.
Patent Information
- Application Number
- CN202510157167.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-02-12
AI Technical Summary
When computers process complex and large-scale combined optimization tasks, their processing efficiency is low, resulting in excessive computing resources.
By treating each object as a particle, simulating the evolution of the positions of multiple particles under the influence of other particles over time, processing task-related object information and impact information, and generating target strategies to run the task.
When determining that the particle reaches the target motion state, generate target strategies and run tasks to reduce the computing resource usage of the redundant evolution process, save time, and improve task processing efficiency.
Smart Images

Figure CN119621348B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a task running method, device, medium and program product. Background Art
[0002] With the in-depth application of computers in various fields, the amount of data required for the tasks to be performed by computers is increasing, and the complexity of the tasks is also increasing. For example: combinatorial optimization tasks applied to information technology, autonomous driving, communication networks and other fields.
[0003] Since the computing resources deployed in the computer are limited, when more computing resources are required to process a task, the computer processing efficiency will be low. Summary of the invention
[0004] In view of the above problems, the present invention provides a task running method, device, medium and program product for improving processing efficiency.
[0005] According to a first aspect of the present invention, a task running method is provided, comprising: obtaining information of multiple objects related to the task to be run and information on the influence of the multiple objects on each other; the task to be run is a task for solving a combinatorial optimization problem; the influence information represents the degree to which the operation performed by each object is affected by other objects in the multiple objects; taking each object as a particle, processing the information and influence information of the multiple objects by simulating the evolution of the positions of each of the multiple particles under the influence of other particles over time, and the position indicates the decision tendency for each object; in response to determining that each particle has reached a target motion state, generating a target strategy based on the target motion state of each particle; wherein the target motion state is that the position of each particle exceeds a predetermined area and the evolution direction of the position of each particle is a direction away from the predetermined area; the target strategy indicates the decision result for each object to meet the requirements of the task to be run; the evolution direction of the position of each particle is a direction away from the predetermined area, including: the acceleration direction of each particle is the same as the speed direction of each particle; or the acceleration direction of each particle is the same as the speed direction of each particle and the direction of the force of each particle affected by other particles; and running the task to be run according to the target strategy.
[0006] A second aspect of the present invention provides a task execution device, including: an acquisition module, an evolution module, a generation module and an execution module.
[0007] An acquisition module is used to obtain information about multiple objects related to the task to be executed and the influence information between the multiple objects; the influence information represents the degree to which the operation performed by each object is affected by other objects in the multiple objects; the task to be executed is a task used to solve a combinatorial optimization problem;.
[0008] The evolution module is used to treat each object as a particle and process the information and influence information of multiple objects by simulating the evolution of the positions of multiple particles under the influence of other particles over time. The positions indicate the decision tendency for each object.
[0009] A generation module is used to generate a target strategy based on the target motion state of each particle in response to determining that each particle has reached a target motion state; wherein the target motion state is that the position of each particle exceeds a predetermined area and the evolution direction of the position of each particle is a direction away from the predetermined area; the evolution direction of the position of each particle is a direction away from the predetermined area including: the acceleration direction of each particle is the same as the speed direction of each particle; or the acceleration direction of each particle is the same as the speed direction of each particle and the direction of the force on each particle affected by other particles; the target strategy indicates the decision result for each object to meet the needs of the task to be run.
[0010] The run module is used to run the tasks to be run according to the target strategy.
[0011] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0012] The fourth aspect of the present invention further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.
[0013] The fifth aspect of the present invention also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0014] According to an embodiment of the present invention, each object is taken as a particle, and by simulating the evolution of the positions of multiple particles under the influence of other particles over time, the information and influence information of multiple objects related to the task to be executed are processed to generate a target strategy for executing the task. Since the end point of the particle evolution can be determined by the dynamic analysis of the particle evolution process when the position of each particle exceeds the predetermined area and the evolution direction of the position of each particle is away from the predetermined area, the evolution is stopped before reaching the end point of the particle evolution. Under the premise of ensuring the accuracy of the evolution result, the occupation of computing resources by the redundant evolution process is reduced, the time required for the evolution process is saved, and the task processing efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0016] Figure 1 An application scenario diagram of a task execution method, an electronic device, a storage medium, and a program product according to an embodiment of the present invention is shown;
[0017] Figure 2 A flowchart of a task execution method according to an embodiment of the present invention is shown;
[0018] Figure 3A A schematic diagram showing the updating of particle positions at different evolution times until convergence during the simulation evolution of the relevant example;
[0019] Figure 3B A schematic diagram showing the updating of particle positions at different evolution times until convergence during the simulation evolution process of an embodiment of the present invention;
[0020] Figure 4 A flow chart of simulating the evolution of the positions of multiple particles under the influence of other particles over time according to an embodiment of the present invention is shown;
[0021] Figure 5 A schematic diagram showing the updating of the running state of each particle during the evolution process according to an embodiment of the present invention is shown;
[0022] Figure 6 A schematic diagram showing the updating of the running state of each particle during the evolution process according to another embodiment of the present invention;
[0023] Figure 7 A schematic diagram showing a simulation of the evolution of the positions of multiple particles under the influence of other particles over time according to an embodiment of the present invention;
[0024] Figure 8 A schematic diagram showing a method of generating a target strategy by simulating an evolutionary process according to an embodiment of the present invention is shown;
[0025] Fig. 9 A schematic diagram of a structure of a task execution device according to an embodiment of the present invention is shown;
[0026] Fig.10 A block diagram of an electronic device suitable for implementing a task running method according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0027] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.
[0028] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0029] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0030] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0031] Combinatorial optimization problems are widely used in various scenarios. For example, in the field of computer technology, combinatorial optimization problems can be used to configure or schedule resources in server clusters to maximize the resource utilization of server clusters. In the field of artificial intelligence, combinatorial optimization problems can be used to plan the paths of autonomous vehicles or drones based on the road environment to minimize the time to reach the destination. In the field of market push, combinatorial optimization problems can be used to plan push strategies for potential user groups to maximize the conversion rate of potential users to actual users.
[0032] However, since combinatorial optimization problems involve a large amount of input data, computers need to occupy more computing resources when performing tasks related to combinatorial optimization problems, and the task operation efficiency is low.
[0033] In view of this, an embodiment of the present invention provides a task running method, which takes each object as a particle, and processes the information and influence information of multiple objects related to the task to be run by simulating the evolution of the positions of multiple particles under the influence of other particles over time. Based on dynamic analysis, when the position of each particle exceeds a predetermined area and the evolution direction of the position of each particle is in a direction away from the predetermined area, the end point of the particle evolution can be determined. Therefore, the evolution is stopped before reaching the end point of the particle evolution, which reduces the occupation of computing resources by redundant evolution processes and further improves the task processing efficiency.
[0034] Figure 1 The application scenario diagram of the task execution method, electronic device, storage medium and program product according to the embodiment of the present invention is schematically shown.
[0035] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0036] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0038] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0039] It should be noted that the task execution method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the task execution device provided in the embodiment of the present invention can generally be set in the server 105. The task execution method provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the task execution device provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0040] The task execution method provided in the embodiment of the present invention may also be executed by the first terminal device 101, the second terminal device 102, and the third terminal device 103. Accordingly, the task execution device provided in the embodiment of the present invention may generally be arranged in a terminal device.
[0041] In some embodiments, the task running method provided by the embodiments of the present invention can be executed by a simulated fork machine through obtaining information of multiple objects related to the task to be run and information on the influence between the multiple objects from a classical computer.
[0042] In some embodiments, the task running method provided by the embodiment of the present invention can also be performed through the interaction between the first terminal device 101 and the second terminal device 102. For example: the first terminal device 101 can send the information of each object related to the task to be run, the influence information between each object, and various parameters used in the particle evolution process to the second terminal device 102. Then, the second terminal device 102 is used to perform the simulated evolution process and generate a target strategy. And the target strategy is returned to the first terminal device 101. So that the first terminal device 101 executes the task to be run.
[0043] For example, the first terminal device 101 may perform resource configuration on each object based on the first target strategy corresponding to the resource configuration optimization task obtained from the second terminal device 102 .
[0044] For another example, the first terminal device 101 may generate a planned path based on the second target strategy corresponding to the path planning task obtained from the second terminal device 102, and send the planned path to each object.
[0045] In some embodiments, the simulation evolution process may also be performed through interaction between the first terminal device 101 and the second terminal device 102 .
[0046] For example, the first terminal device 101 may be a classical computer, and the second terminal device 102 may be a simulated fork machine. The second terminal device 102 may obtain the loss function, information of each object, impact information, boundary values of a predetermined area, and initial parameters of each particle related to the task to be run from the first terminal device 101. When the second terminal device 102 receives the evolution instruction sent by the first terminal device 101, the second terminal device 102 starts to run the evolution process.
[0047] During the evolution process, the external input predetermined evolution function can be adjusted on the first terminal device 101. At the same time, the first terminal device 101 sends a measurement instruction to the second terminal device 102, so that the position of each particle is measured on the second terminal device 102 and fed back to the first terminal device 101.
[0048] Next, after the first terminal device 101 records the positions of the particles at different times, the speed of the particles at that time is calculated on the first terminal device 101. At the same time, the first terminal device 101 calculates the forces exerted on the particles by other particles based on the influence information J between the particles, the particle positions, and the external input a(t).
[0049] Then, the relationship between the particle position and the boundary value of the predetermined area is compared on the first terminal device 101. If the particle position exceeds the predetermined area and the evolution direction of each particle is away from the predetermined area, the first terminal device 101 sends a stop operation instruction to the second terminal device 102, stops the evolution of the particle in the second terminal device 102, and sets the position of the particle at this time to the current symbol value or boundary value in the second terminal device 102. Other particles continue to evolve according to the latest position value of this particle.
[0050] Finally, when it is determined on the first terminal device 101 that all particle evolutions have reached convergence, the first terminal device 101 sends an end-of-run instruction to end the operation of the simulated fork machine, and outputs the position of each particle on the first terminal device 101 as the decision result of each particle that meets the task requirements.
[0051] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0052] The following will be based on Figure 1 The scene described by Figure 2~Figure 8 The task execution method of the disclosed embodiment is described in detail.
[0053] Figure 2The flowchart of the task execution method according to the embodiment of the present invention is schematically shown.
[0054] like Figure 2 As shown, the task execution method 200 of this embodiment includes operations S210 to S240.
[0055] In operation S210 , information about a plurality of objects related to the task to be executed and information about the influence between the plurality of objects are obtained.
[0056] In operation S220, each object is regarded as a particle, and the information and influence information of the plurality of objects are processed by simulating the evolution of the positions of the plurality of particles under the influence of other particles over time.
[0057] In operation S230 , in response to determining that each particle has reached a target motion state, a target strategy is generated based on the target motion state of each particle.
[0058] In operation S240 , the to-be-executed task is executed according to the target policy.
[0059] According to an embodiment of the present invention, the task to be executed may be a task for solving a combinatorial optimization problem, such as a resource allocation task, a path planning task, or an item push task, etc. An object may represent an entity related to the task to be executed, for example, an object related to a resource allocation task may be a server of resources to be configured, an object related to a path planning task may be an autonomous driving vehicle, and an object related to an item push task may be a potential user.
[0060] According to an embodiment of the present invention, the impact information represents the degree to which the operation performed by each object is affected by other objects in the multiple objects. The operation represents the operation related to the task to be executed, for example: in the item push task, the operation can be a transaction operation; in the resource configuration task, the operation can be a configuration operation; in the path planning task, the operation can be a path selection operation.
[0061] For example, before a new product is released, a push strategy for the new product can be generated by running an item push task. The item push task can be to push a free new product to user A among potential users. Since user B among potential users is associated with user A, user A may influence user B to trigger a transaction operation for the new product, such as purchase or application for trial. Therefore, the influence information can be used to describe the degree of influence of user A on user B to trigger a transaction operation for the new product.
[0062] Then, each potential user is taken as a particle, and the information and influence information of multiple objects are processed by simulating the evolution of the positions of multiple particles under the influence of other particles over time. When the position of each particle exceeds the predetermined area and the evolution direction of the position of each particle is away from the predetermined area, a target strategy is generated according to the position of each particle. The position of each particle indicates the decision tendency for each object. For example, in the item push task, the position of each particle indicates whether to push free new products to each object.
[0063] In some embodiments, the information of the object may be a user ID, and the ID of each potential user may be used as a particle identifier to simulate the evolution of the positions of multiple particles under the influence of other particles over time. As the evolution time increases, the position of each particle will change from an oscillation form similar to a sine function to an oscillation form similar to a natural exponential function. This change in form comes from the bifurcation phenomenon. After a certain period of time, each particle reaches a stable state and can stop evolving. At this time, the stop position of each particle indicates the decision result for each object.
[0064] In some embodiments, the decision result for each object can be represented based on the boundary value of the predetermined area. For example, in the item push task, the predetermined area can be [-1, 1]. When the stop position of a particle is 1, it means that a free new product will be pushed to the object corresponding to the particle. When the stop position of a particle is -1, it means that a free new product will not be pushed to the object corresponding to the particle.
[0065] In the process of simulating the evolution of the positions of multiple particles under the influence of other particles over time and processing the information of multiple objects and the influence information, since the time when each particle undergoes bifurcation is different, the complexity of the information to be processed increases with the increase in the number of particles. If the evolution is not stopped until all particles converge, it will inevitably take up more computing resources, affecting the processing efficiency of the task.
[0066] Therefore, the embodiment of the present invention determines the evolution trend and convergence trend of each particle before each particle reaches the evolution endpoint based on the dynamic analysis during the evolution process, and stops the evolution. Thus, under the premise of ensuring the accuracy of the evolution result, the occupation of computing resources by the redundant evolution process is reduced, the time required for the evolution process is saved, and the task processing efficiency is improved.
[0067] The following takes the trajectory simulation bifurcation algorithm as an example to describe in detail the implementation principle of the embodiment of the present invention.
[0068] The classic Hamiltonian equation satisfied by the trajectory simulation bifurcation algorithm is as follows:
[0069]
[0070]
[0071] in, represents the energy of the particle; represents the predetermined evolution parameter; N represents the number of particles; represents the particle velocity; represents the potential energy of the particle; Represents the influence information between the i-th particle and the j-th particle in the influence information matrix J; represents a predetermined evolution function; represents a predetermined impact intensity parameter; Indicates the particle position.
[0072] The evolution process of the trajectory simulation bifurcation algorithm is as follows:
[0073]
[0074]
[0075] in, represents the particle velocity; Represents the particle acceleration.
[0076] In the embodiment of the present invention, the constant term in the loss function of the evolution process is simplified as follows:
[0077]
[0078] The goal of evolution is to find a set of To minimize the loss function value, in this embodiment of the present invention, the eigenstate with the largest eigenvalue of J can be used to approximate this group When the evolution process reaches a stable state, , ,at this time, =0.
[0079] When the maximum eigenvalue of J is less than , then formula (4) has a unique solution =0. is a linear function of t, The value increases as t increases, so As t increases, it decreases until = maximum eigenvalue, the second solution of formula (4) appears, that is, the eigenstate of the maximum eigenvalue of J. Then, as t increases, the position of each particle will gradually evolve until it reaches = ±1 for an ideal inelastic wall.
[0080] Based on the above analysis, we can see that although the ballistic bifurcation algorithm in the relevant example uses an ideal inelastic wall to limit the movement range of particles, each particle still needs to continue to evolve to =±1 to converge. Therefore, if the evolution time from the bifurcation point to convergence can be shortened, the task processing efficiency can be further improved.
[0081] Based on dynamic analysis, if the particle's position, speed, and acceleration all point to the same direction, then the particle will move in that direction for a long period of time until the acceleration reverses and the speed of movement also reverses. Then, during the evolution process, when it is determined that the particle's evolution trend will converge, the evolution can be stopped, thereby shortening the redundant evolution time.
[0082] In some embodiments, by setting a reasonable predetermined area, when the particle movement position exceeds the predetermined area, and the position of each particle exceeds the predetermined area and the evolution direction of the position of each particle is away from the predetermined area, it can be determined that the evolution trend of each particle is bound to converge, and it is determined that each particle reaches the target motion state and stops evolving.
[0083] In some embodiments, the evolution direction of the position of each of the particles being a direction away from the predetermined area may include: the acceleration direction of each of the particles is the same as the velocity direction of each of the particles.
[0084] In some embodiments, the evolution direction of the position of each particle is a direction away from the predetermined area, which may include: the acceleration direction of each particle is the same as the velocity direction of each particle and the direction of the force acting on each particle by other particles.
[0085] In order to further illustrate the evolution effect of the embodiment of the present invention, Figure 3A and Figure 3B The evolution effects of the embodiments of the present invention and related examples are compared and explained.
[0086] Figure 3A A schematic diagram showing the updating of particle positions at different evolution times until convergence during the simulated evolution process of the relevant example.
[0087] like Figure 3A As shown, in embodiment 300A, each type of line curve represents the evolution of the position of a particle over time. When a(t)=0.52, the evolution of particle Pa converges. When a(t)=0.6, the evolution of particle Pb converges. When a(t)=0.58, the evolution of particle Pc converges. When a(t)=0.54, the evolution of particle Pd converges.
[0088] Since the particles can be determined to be collectively in a stable state only when all particles converge, in the relevant example, the termination moment of the particle evolution is a(t) = 0.6, which is the corresponding evolution moment.
[0089] Figure 3B A schematic diagram showing the updating of particle positions at different evolution times until convergence during the simulated evolution process of an embodiment of the present invention.
[0090] like Figure 3B As shown, in embodiment 300B, when a(t)=0.45, the evolution process of particle Pa converges. When a(t)=0.55, the evolution process of particle Pb converges. When a(t)=0.51, the evolution process of particle Pc converges. When a(t)=0.47, the evolution process of particle Pd converges.
[0091] Since the particles can be determined to be collectively in a stable state only when all particles converge, in the relevant example, the termination moment of the particle evolution is a(t) = 0.55, which is the corresponding evolution moment.
[0092] By comparison Figure 3A and Figure 3B It can be seen that the evolution time of the simulated evolution process of the embodiment of the present invention is shorter than that of the simulated evolution process in the related examples, and the result of the simulated evolution process of the embodiment of the present invention is the same as that of the simulated evolution process in the related examples. It can be seen that the embodiment of the present invention reduces the occupation of computing resources by redundant evolution processes, saves the time required for the evolution process, and improves the task processing efficiency while ensuring the accuracy of the evolution results.
[0093] According to an embodiment of the present invention, when it is determined that each particle has reached the target motion state, a target strategy is generated based on the target motion state of each particle.
[0094] In some embodiments, decision information corresponding to the target motion state of each particle may be configured according to the actual application scenario involved in the task to be executed.
[0095] For example, the predetermined area can be configured as [-0.5.0.5]. For the item push task, when the target position of particle Pa is 0.8, it can be determined that the target position of particle Pa is close to the boundary value 0.5. When the boundary value 0.5 indicates that the decision information for the object is to push free new products to the object, it can be determined that the decision for object A corresponding to particle Pa is to push free new products to object A. Therefore, the decision result for each object can be determined according to the target position of each particle, so that the item push task can meet the task requirement, which can be the maximum new product transaction rate.
[0096] Then, the tasks to be run can be run according to the target strategy, and new products can be pushed according to the decision results for each object indicated in the target strategy. The tasks to be run can be run to simulate and calculate the new product transaction rate that can be achieved by the push strategy, so that relevant personnel can determine the feasibility of the push strategy based on the new product transaction rate obtained by simulation.
[0097] According to an embodiment of the present invention, each object is taken as a particle, and by simulating the evolution of the positions of multiple particles under the influence of other particles over time, the information and influence information of multiple objects related to the task to be executed are processed to generate a target strategy for executing the task. Since the end point of the particle evolution can be determined by the dynamic analysis of the particle evolution process when the position of each particle exceeds the predetermined area and the evolution direction of the position of each particle is away from the predetermined area, the evolution is stopped before reaching the end point of the particle evolution. Under the premise of ensuring the accuracy of the evolution result, the occupation of computing resources by the redundant evolution process is reduced, the time required for the evolution process is saved, and the task processing efficiency is improved.
[0098] According to an embodiment of the present invention, the plurality of particles includes I, where I is an integer greater than 1. Taking each object as a particle, processing the information and influence information of the plurality of objects by simulating the evolution of the positions of the plurality of particles under the influence of other particles over time, may include the following operations: determining the initial position and initial velocity of each particle; based on a predetermined evolution function, processing the information and influence information of the plurality of objects by simulating the evolution of the positions of the plurality of particles under the influence of other particles over time to update the motion state of each particle; in response to determining that the position of the i-th particle is within a predetermined area, returning to execute the update operation for the motion state of I particles based on the updated motion state of the i-th particle, wherein 1≤i≤I; in response to determining that the position of the i-th particle exceeds the predetermined area and the evolution direction of the position of the i-th particle is a direction away from the predetermined area, determining that the i-th particle reaches the target motion state.
[0099] According to an embodiment of the present invention, the predetermined evolution function is used to characterize the correlation relationship between the evolution parameter and the evolution time.
[0100] In some embodiments, the initial position and initial velocity of each particle can be configured according to the actual application scenario involved in the task to be executed. For example, the initial position can be any value in [-1, 1], the initial velocity can be any non-zero value, and the direction of the initial velocity can also be randomly configured, which is not specifically limited in the embodiments of the present invention.
[0101] In some embodiments, the predetermined evolution function may be a linear function with the evolution time as the independent variable and the evolution parameter as the dependent variable. For example, the value of the predetermined evolution function may increase as the evolution time increases.
[0102] In some embodiments, the boundary value of the predetermined area is determined according to the simulation type involved in the task to be executed.
[0103] For example, when the simulation type is to simulate the information processing process using an actual physical system, the position, velocity and force direction of each particle in the actual physical system can be recorded during the information processing process. When the position, velocity and force direction of the particles point to the same direction, the position of each particle is recorded, and the maximum value of the absolute value of the position of each particle can be used as the boundary value of the predetermined area.
[0104] For example, when the simulation type is to use numerical simulation information processing, the position, velocity and force direction of each particle can be recorded in real time during the process of numerically solving the differential equation. When the position, velocity and force direction of a particle point to the same direction, the position of the particle is recorded, and the position of each particle can be used as the boundary value of the predetermined area of the particle.
[0105] Therefore, the boundary values of the predetermined regions of the particles may be the same or different.
[0106] The boundary value of the predetermined area is determined based on the simulation type involved in the task to be run, which realizes the flexible allocation of the constraints of the evolution process according to the simulation type, thereby accurately determining the evolution trend of each particle and further improving the accuracy of the evolution results.
[0107] Figure 4 A flow chart of simulating the temporal evolution of the positions of multiple particles under the influence of other particles according to an embodiment of the present invention is shown.
[0108] like Figure 4 As shown, the evolution process 400 may include operations S421 to S425.
[0109] In operation S421, an initial position and an initial velocity of each particle are determined.
[0110] In operation S422, based on a predetermined evolution function, the information of the plurality of objects and the influence information are processed by simulating the evolution of the positions of the plurality of particles under the influence of other particles over time to update the motion state of each particle.
[0111] In operation S423, it is determined whether the position of the i-th particle is within the predetermined area. If so, the operation S422 is returned to be executed based on the updated position of the i-th particle. If not, operation S424 is executed.
[0112] In operation S424, it is determined that the evolution direction of the position of the i-th particle is a direction away from the predetermined area. If so, operation S425 is performed. If not, the operation S422 is returned to be performed based on the updated position of the i-th particle.
[0113] In operation S425 , it is determined whether the i-th particle reaches a target motion state.
[0114] According to the embodiment of the present invention, by reasonably configuring the predetermined area, the motion state of each particle is updated in an iterative manner under the impetus of the predetermined evolution function to simulate evolution. In addition, the evolution trend of each particle is accurately judged during the evolution process to stop the evolution before each particle evolves to the convergence point, thereby further reducing the occupation of computing resources by the redundant evolution process and improving the task processing efficiency.
[0115] According to an embodiment of the present invention, the evolution process includes T moments, where T is an integer greater than 1. Based on a predetermined evolution function, by simulating the evolution of the positions of multiple particles under the influence of other particles over time, processing the information and influence information of multiple objects to update the motion state of each particle may include the following operations: determining a target evolution parameter by processing a predetermined evolution function based on the evolution moment; and updating the motion state of each particle at the t+1th moment according to the motion state of each particle at the tth moment based on a predetermined influence intensity parameter, a predetermined evolution parameter, and a target evolution parameter, 1<t≤T-1.
[0116] In some embodiments, the predetermined evolution function may be a(t)=mt, m is a coefficient greater than 0, and a(T)=a0, where a0 is a predetermined evolution parameter.
[0117] For example, the target evolution parameter determined based on the predetermined evolution function at time t1 may be mt1, and the target evolution parameter determined based on the predetermined evolution function at time t2 may be mt2.
[0118] Then, the motion state of each particle at time t+1 can be updated based on formulas (3) and (4). The motion state can include speed and position.
[0119] In some embodiments, the position of each particle at the t+1th time may be updated first, and then the speed of each particle at the t+1th time may be updated based on the updated position of each particle at the t+1th time.
[0120] According to an embodiment of the present invention, based on a predetermined influence intensity parameter, a predetermined evolution parameter and a target evolution parameter, based on the motion state of each particle at the tth moment, updating the motion state of each particle at the t+1th moment may include the following operations: based on the predetermined evolution parameter and the motion state of each particle at the tth moment, obtaining the position of each particle at the t+1th moment; based on the position of each particle at the t+1th moment, the predetermined evolution parameter and the target evolution parameter at the t+1th moment, generating a first force acting on the motion state of each particle at the t+1th moment due to itself; based on the position of each particle at the t+1th moment, the influence information and the predetermined influence intensity parameter, generating a second force acting on the motion state of each particle at the t+1th moment due to the motion state of other particles; based on the first force and the second force, obtaining the velocity of each particle at the t+1th moment.
[0121] Figure 5 A schematic diagram showing the updating of the running status of each particle during the evolution process according to an embodiment of the present invention is shown.
[0122] like Figure 5 As shown, in this embodiment 500, according to the predetermined evolution parameter a0501 and the velocity y in the particle motion state 502 at the tth moment i According to formula (3), we can get the rate of change between the particle's position at time t+1 and the position at time t. Based on the rate of change and the position at time t, we can get the position x at time t+1. i '503.
[0123] Then, the predetermined evolution function a(t) is processed based on the evolution time t+1 505 to obtain the target evolution parameter 506 at the t+1th time.
[0124] Next, according to the position xi' 503 at the time t+1, the predetermined evolution parameter a0 501 and the target evolution parameter a(t+1) 506, according to formula (4): The first force 504 of the particle at the time t+1 can be obtained, and the first force 504 represents the degree to which the decision executed by each object is affected by itself.
[0125] Then, according to the position x of each particle at time t+1 i ', x j '507, Impact InformationJ ij 508 and a predetermined impact intensity parameter 509, according to formula (4) The second force 510 of the particle at the time t+1 can be obtained. The second force 510 represents the degree to which the decision executed by each object is affected by other objects.
[0126] Finally, based on the first force 504 and the second force 510, the particle velocity y at time t+1 is further determined by calculating the change rate of the particle velocity at time t and time t+1 according to formula (4). i '511.
[0127] During the simulated evolution process, the particle velocity at time t+1 is first updated based on the particle position at time t, and then the position of each particle at time t+1 is updated based on the updated velocity of each particle at time t+1. The update accuracy of the motion state of each particle is higher, which is more suitable for offline task execution scenarios.
[0128] For example, in a resource configuration task, each object may be a server in a server cluster, and the first force may be used to characterize the degree to which the resources required for each server to be configured are affected by the resources required for the task to be run by the object to be configured. The second force may be used to characterize the degree to which the resources required for each server to be configured are affected by the resources required by other servers, so as to achieve the maximum resource utilization of the server cluster when all particles reach the target motion state.
[0129] According to an embodiment of the present invention, the particle position at time t+1 is first updated based on the particle velocity at time t, and then the velocity of each particle at time t+1 is updated based on the updated position of each particle at time t+1, thereby achieving a synchronous update of the motion state of each particle, thereby further improving the execution speed of the simulated bifurcation algorithm and improving the task operation efficiency.
[0130] In some embodiments, the speed of each particle at the t+1th time may be updated first, and then the position of each particle at the t+1th time may be updated based on the updated speed of each particle at the t+1th time.
[0131] According to an embodiment of the present invention, based on a predetermined influence intensity parameter, a predetermined evolution parameter and a target evolution parameter, based on the motion state of each particle at the tth moment, updating the motion state of each particle at the t+1th moment may include the following operations: generating a third force acting on the motion state of each particle at the tth moment based on the position of each particle at the tth moment, the predetermined evolution parameter and the target evolution parameter at the tth moment; generating a fourth force acting on the motion state of each particle at the tth moment based on the position of each particle at the tth moment, the influence information and the predetermined influence intensity parameter; obtaining the velocity of each particle at the t+1th moment based on the third force and the fourth force; and generating the position of each particle at the t+1th moment based on the velocity of each particle at the t+1th moment and the predetermined evolution parameter.
[0132] Figure 6 A schematic diagram showing the updating of the running status of each particle during the evolution process according to another embodiment of the present invention is shown.
[0133] like Figure 6 As shown, in this embodiment 600, first, based on the evolution time t 603, the predetermined evolution function is processed to obtain the target evolution parameter a(t) 604. Then, according to the particle position x at the tth time i 601, predetermined evolution parameter a0 602 and target evolution parameter a(t) 604, according to formula (4) The third force 605 at the tth moment is obtained. The third force 605 represents the degree to which the decision executed by each object is affected by itself.
[0134] Next, according to the position x of each particle at time t i ,y i 606. Impact Information ij 607 and the predetermined impact intensity parameter c0608, according to formula (4) The fourth force 609 of the particle at the tth moment can be obtained. The fourth force 609 at the tth moment represents the degree to which the decision executed by each object is affected by other objects.
[0135] Then, based on the third force 605 at time t and the fourth force 609 at time t, the velocity change rate between time t and time t+1 is obtained according to formula (4), and then the particle velocity y at time t+1 is calculated in combination with the particle velocity at time t. i '610.
[0136] Finally, based on the particle velocity y at time t+1 i '610 and the predetermined evolution parameter a0 are used to obtain the position change rate from time t to time t+1 according to formula (3), and then combined with the particle position x at time t i Get the particle position x at time t+1 i '611.
[0137] In the process of simulated evolution, the particle velocity at time t+1 is first updated based on the particle position at time t, and then the position of each particle at time t+1 is updated based on the updated velocity of each particle at time t+1. The update speed of the motion state of each particle is faster, which is more suitable for online task execution scenarios.
[0138] For example, in a path planning task, each object can be a vehicle in the road area of the path to be planned. The first force can be used to characterize the degree to which the path selected by each vehicle is affected by the destination to be reached by the vehicle. The second force can be used to characterize the degree to which the path selected by each vehicle is affected by the paths selected by other vehicles. This ensures that when all particles reach the target motion state, the time for each vehicle in the road area to reach its destination is the shortest.
[0139] According to an embodiment of the present invention, the particle velocity at time t+1 is first updated based on the position of each particle at time t, and then the position of each particle at time t+1 is updated based on the updated velocity of each particle at time t+1, thereby achieving a synchronous update of the motion state of each particle, thereby further improving the execution speed of the simulation bifurcation algorithm and improving the task operation efficiency.
[0140] According to an embodiment of the present invention, in response to determining that each particle has reached a target motion state, generating a target strategy based on the target motion state of each particle may include the following operations: in response to determining that the positions of j particles exceed a predetermined area and the evolution direction of the positions of the j particles is a direction away from the predetermined area, stopping the update operation of the motion states of the j particles; wherein 1≤j≤I; wherein, when j is less than I, the j particles return to the target motion state and execute the operation of simulating the evolution process of the positions of multiple particles under the influence of other particles over time; when it is determined that j is equal to I, determining that each particle has reached the target motion state; and generating a target strategy based on the target motion state of each particle.
[0141] Figure 7 A schematic diagram of simulating the temporal evolution of the positions of multiple particles under the influence of other particles according to an embodiment of the present invention is shown.
[0142] like Figure 7 As shown, in this embodiment, particles A, B, C, and D participate in the evolution process, and the markings on the connecting lines between the particles contain the influence information between the particles. For example, the marking J on the connecting line between particle A and particle D AD Represents the influence information between particles A and D.
[0143] In the motion state 710 of each particle at time t, particle A has reached the target motion state, for example: the position x of particle A a It has exceeded the predetermined area [-0.5, 0.5], which is marked in gray in the figure. Therefore, particle A can a The boundary value of the predetermined area close to the particle A is taken as the position of the particle A, for example: a >0.5, then we can determine x a It is close to the boundary value 0.5, so the position of particle A can be updated to 0.5 and the speed can be updated to 0 to participate in the next evolution process. In the evolution process at subsequent evolution moments, the position and speed of particle A are no longer updated.
[0144] In the particle motion state 720 at time t+1, the position of particle A is 0.5 and the speed is 0, and the other particles B to D continue to update their motion states. During the evolution process at this moment, particles B and D have also reached the target motion state, for example: marked in gray in the figure. The positions of particles B and D can be updated using the same position update method as particle A.
[0145] For example, particle B can be b 'The boundary value of the predetermined area close to the particle B is taken as the position of particle B, for example: x b '<-0.5, then we can determine x b 'Close to the boundary value -0.5, therefore, the position of particle B can be updated to -0.5 and the speed to 0 to participate in the next evolution process, and in the evolution process at subsequent evolution moments, the position and speed of particle B are no longer updated.
[0146] Similarly, in the particle motion state 730 at time t+2, particle C also reaches the target motion state. At this time, particles A to D all reach the target motion state, and operation S740 can be performed to determine to stop the evolution.
[0147] According to an embodiment of the present invention, when it is determined that the evolution trend of a particle will definitely converge to the boundary value of a predetermined area, the update operation of the particle position can be stopped. As the number of particles reaching the target motion state increases, the number of particles that still need to perform the position update operation decreases until all particles reach the target motion state. Therefore, as the evolution process proceeds, the required computing resources are also reduced, which can further reduce the occupation of computing resources and improve the utilization rate of computing resources.
[0148] Based on the dynamic analysis of the particle, when the position of the particle exceeds the predetermined area and the direction of the acceleration is the same as the direction of the velocity, it can be determined that the next movement of the particle will always be in a direction away from the predetermined area.
[0149] Therefore, in some embodiments, in response to determining that the positions of the j particles exceed a predetermined area and the acceleration direction of each of the j particles is the same as the velocity direction of each particle, the update operation for the motion states of the j particles may be stopped.
[0150] Since the motion state of each particle is also affected by the motion state of other particles during the evolution process, when the position of a particle exceeds the predetermined area and the acceleration direction is the same as the velocity direction, it is also possible to consider whether the direction of the force exerted on the particle by other particles is the same as the current acceleration method and velocity direction. If the above acceleration direction, velocity direction and force direction are the same, it can be determined that the next movement of the particle will always be in the direction away from the predetermined area.
[0151] Therefore, in some embodiments, in response to determining that the positions of j particles exceed a predetermined area, and the acceleration direction of each of the j particles is the same as the velocity direction of each particle and the direction of the force acting on each particle by other particles, the update operation on the motion state of the j particles can be stopped.
[0152] According to an embodiment of the present invention, based on the dynamic analysis of particles, the evolution trend of particles can be accurately determined according to the changes in the motion state of particles during the evolution process, thereby determining the evolution end point of the particles in advance and stopping redundant evolution operations. Without affecting the evolution accuracy, the duration of the evolution process is shortened. The method is applicable to any form of simulation bifurcation algorithm, has strong universality, and can achieve the technical effect of improving the efficiency of task operation.
[0153] According to an embodiment of the present invention, generating a target strategy based on the target motion state of each particle may include the following operations: determining a decision result of each particle based on a difference between a position indicated by the target motion state of each particle and a predetermined area; and generating a target strategy based on the decision result of each particle.
[0154] Figure 8 A schematic diagram of generating a target strategy by simulating an evolutionary process according to an embodiment of the present invention is shown.
[0155] like Figure 8 As shown, in this embodiment, the simulation evolution process evolves from the motion state 810 of each particle at the start time to the motion state 820 of each particle at the stop time.
[0156] The decision result of each particle may be determined based on the difference between the target position of each particle and the predetermined area [−α, α] (α>0) in the motion state 820 of each particle at the stopping time.
[0157] For example, in the item push task, the difference between the position values of particles A and C and α is small, that is, the positions of particles A and C are closer to α, and a decision 801 to push new products for free can be executed for the users corresponding to particles A and C. The difference between the position values of particles B and D and -α is small, that is, the positions of particles B and D are closer to -α, and a decision 802 not to push new products for free can be executed for the users corresponding to particles B and D.
[0158] In some embodiments, the predetermined area may include a first boundary value and a second boundary value. Determining the decision result of each particle based on the difference between the position indicated by the target motion state of each particle and the predetermined area may include the following operations: in response to determining that the target position indicated by the target motion state of a first particle among the plurality of particles is close to the first boundary value, determining the first type corresponding to the first boundary value as the decision result of the first particle; and in response to determining that the target position indicated by the target motion state of a second particle among the plurality of particles is close to the second boundary value, determining the second type corresponding to the second boundary value as the decision result of the second particle.
[0159] According to an embodiment of the present invention, the predetermined area may be used to define the range of decision-making tendencies of various objects related to the task to be executed.
[0160] For example, in the item push task, the predetermined area can be [-0.3, 0.3]. When the evolution endpoint of a particle's position is close to 0.3, it means that the decision tendency for the particle is to push the item. When the evolution endpoint of a particle's position is close to -0.3, it means that the decision tendency for the particle is not to push the item.
[0161] For another example: in a resource allocation task, the predetermined region may be [-0.6, 0.5]. When the evolution endpoint of a particle's position is close to 0.5, it indicates that the decision-making tendency for the particle is to allocate type A resources. When the evolution endpoint of a particle's position is close to -0.6, it indicates that the decision-making tendency for the particle is to allocate type B resources.
[0162] According to an embodiment of the present invention, the decision result of each particle is determined based on the difference between the predetermined area and the position indicated by the target motion state of each particle, which further improves the efficiency of generating the decision result.
[0163] When determining the decision result for each particle, in addition to being determined based on the boundary value, since the evolution process of each particle changes from an oscillation form similar to a sine function to an oscillation form similar to a natural exponential function, the signs of the boundary values of the predetermined area are different, and the decision result for each particle can also be determined based on the sign of the boundary value.
[0164] In some embodiments, the predetermined area includes a third boundary value and a fourth boundary value. In response to determining that the target position indicated by the target motion state of a first particle among the plurality of particles is close to the third boundary value, a third type corresponding to the sign of the third boundary value is determined as a decision result with the first particle; and in response to determining that the target position indicated by the target motion state of a second particle among the plurality of particles is close to the fourth boundary value, a fourth type corresponding to the sign of the fourth boundary value is determined as a decision result with the second particle.
[0165] For example, in a path planning task, the predetermined area can be [-0.8, 0.8]. When the evolution endpoint of a particle's position is close to 0.8, the decision tendency for the particle can be determined to be to select a path pointing to node P1 based on the sign "+" of the boundary value 0.8. When the evolution endpoint of a particle's position is close to -0.8, it means that the decision tendency for the particle is to select a path to execute node P2 based on the sign "-" of the boundary value -0.8.
[0166] According to an embodiment of the present invention, the decision result of each particle is determined based on the sign of the boundary value of the position indicated by the target motion state of each particle close to the predetermined area, which can further improve the generation efficiency of the decision result.
[0167] According to an embodiment of the present invention, generating a target strategy according to the decision results of each particle may include the following operations: determining the decision information of each object according to the decision results of each particle; and generating a target strategy based on the decision information of each object.
[0168] In some embodiments, for example, for a resource configuration task, the decision result for each particle, for example, the resource type to be configured, can be matched to each object according to the object identifier corresponding to each particle to determine the decision information of each object. Then, based on the decision information of each object, a resource configuration strategy is generated.
[0169] In some embodiments, for example, for a communication link planning task, the decision result for each particle, for example, the selection result of the communication link, can be matched to each communication node according to the identifier of the communication node corresponding to each particle to determine the direction of the communication link of each communication node, thereby generating a complete communication link planning strategy.
[0170] According to an embodiment of the present invention, by simulating the evolution of the positions of multiple particles under the influence of other particles over time, the information and influence information of multiple objects are processed, and after determining that each particle has reached the target motion state, a target strategy for running the task to be run is generated based on the target motion state of each particle, thereby further improving the task processing efficiency while meeting the task requirements.
[0171] Based on the above task running method, the present invention also provides a task running device. Fig. 9 The device is described in detail.
[0172] Fig. 9 The structure block diagram of the task execution device according to the embodiment of the present invention is schematically shown.
[0173] like Fig. 9As shown, the task running device 900 of this embodiment includes an acquisition module 910 , an evolution module 920 , a generation module 930 and an operation module 940 .
[0174] The acquisition module 910 is used to acquire information of multiple objects related to the task to be executed and information on the influence of multiple objects on each other; the influence information represents the degree to which the operation performed by each object is affected by other objects in the multiple objects. The task to be executed is a task for solving a combinatorial optimization problem. In one embodiment, the acquisition module 910 can be used to execute the operation S210 described above, which will not be repeated here.
[0175] The evolution module 920 is used to treat each object as a particle, and to process the information and influence information of the multiple objects by simulating the evolution of the positions of the multiple particles under the influence of other particles over time, wherein the positions indicate the decision tendency for each object. In one embodiment, the evolution module 920 can be used to perform the operation S220 described above, which will not be described in detail here.
[0176] The generation module 930 is used to generate a target strategy based on the target motion state of each particle in response to determining that each particle has reached the target motion state; wherein the target motion state is that the position of each particle exceeds the predetermined area and the evolution direction of the position of each particle is in the direction away from the predetermined area; the evolution direction of the position of each particle is in the direction away from the predetermined area including: the evolution direction of the position of each particle is in the direction away from the predetermined area including: the acceleration direction of each particle is the same as the speed direction of each particle; or the acceleration direction of each particle is the same as the speed direction of each particle and the direction of the force on each particle affected by other particles. The target strategy indicates the decision results for each object to meet the needs of the task to be run. In one embodiment, the generation module 930 can be used to perform the operation S230 described above, which will not be repeated here.
[0177] The running module 940 is used to run the task to be run according to the target strategy. In one embodiment, the running module 940 can be used to perform the operation S240 described above, which will not be described in detail here.
[0178] According to an embodiment of the present invention, the plurality of particles includes I, where I is an integer greater than 1; the evolution module includes: a first determination submodule, an evolution submodule, and a second determination submodule.
[0179] The first determination submodule is used to determine the initial position and initial velocity of each particle.
[0180] The evolution submodule is used to process the information and influence information of multiple objects by simulating the evolution of the positions of multiple particles under the influence of other particles over time based on a predetermined evolution function to update the motion state of each particle. The predetermined evolution function is used to characterize the correlation between the evolution parameters and the evolution moment.
[0181] The second determination submodule is used for, in response to determining that the position of the i-th particle is within the predetermined area, returning to execute the update operation of the motion state of I particles based on the updated motion state of the i-th particle, where 1≤i≤I; in response to determining that the position of the i-th particle exceeds the predetermined area and the evolution direction of the position of the i-th particle is a direction away from the predetermined area, determining that the i-th particle has reached the target motion state.
[0182] According to an embodiment of the present invention, the evolution process includes T moments, where T is an integer greater than 1. The evolution submodule includes: a first determination unit and an update unit.
[0183] The first determining unit is used to determine the target evolution parameter by processing the predetermined evolution function based on the evolution moment.
[0184] The updating unit is used to update the motion state of each particle at time t+1 based on the predetermined influence intensity parameter, the predetermined evolution parameter and the target evolution parameter according to the motion state of each particle at time t, 1<t≤T-1.
[0185] According to an embodiment of the present invention, the motion state includes a position and a speed. The updating unit includes: a first obtaining subunit, a first generating subunit, a second generating subunit and a second obtaining subunit.
[0186] The first obtaining subunit is used to obtain the position of each particle at time t+1 based on the predetermined evolution parameter and the motion state of each particle at time t.
[0187] The first generating subunit is used to generate the first force acting on the motion state of each particle at the time t+1 based on the position of each particle at the time t+1, the predetermined evolution parameter and the target evolution parameter at the time t+1, and the first force represents the degree of influence of the decision executed by each object on which the object is affected.
[0188] The second generating subunit is used to generate a second force on the motion state of each particle at time t+1 affected by the motion state of other particles based on the position of each particle at time t+1, the impact information and the predetermined impact strength parameter, and the second force represents the degree to which the decision executed by each object is affected by other objects.
[0189] The second obtaining subunit is used to obtain the velocity of each particle at the t+1th moment based on the first force and the second force.
[0190] According to an embodiment of the present invention, the updating unit includes: a third generating subunit, a fourth generating subunit, a third obtaining subunit and a fourth obtaining subunit.
[0191] The third generating subunit is used to generate the third force acting on the motion state of each particle at the t moment based on the position of each particle at the t moment, the predetermined evolution parameter and the target evolution parameter at the t moment; the third force represents the degree of influence of the decision executed by each object on itself.
[0192] The fourth generating subunit is used to generate a fourth force on the motion state of each particle at the t moment affected by the motion state of other particles based on the position of each particle at the t moment, the influence information and the predetermined influence intensity parameter; the fourth force represents the degree to which the decision executed by each object is affected by other objects.
[0193] The third obtaining subunit is used to obtain the velocity of each particle at the t+1th moment based on the third force and the fourth force.
[0194] The fourth obtaining subunit is used to generate the position of each particle at the t+1th time based on the velocity of each particle at the t+1th time and the predetermined evolution parameter.
[0195] According to an embodiment of the present invention, the generating module includes: a third determining submodule and a generating submodule.
[0196] The third determination submodule is used to stop the update operation of the motion state of the j particles in response to determining that the positions of the j particles exceed the predetermined area and the evolution direction of the positions of the j particles is in the direction away from the predetermined area; wherein 1≤j≤I; wherein, when j is less than I, the j particles return to execute the operation of simulating the evolution process of the positions of multiple particles under the influence of other particles over time in the target motion state; when it is determined that j is equal to I, it is determined that each particle has reached the target motion state.
[0197] The generation submodule is used to generate a target strategy based on the target motion state of each particle.
[0198] According to an embodiment of the present invention, the third determination submodule includes a second determination unit, which is used to stop the update operation of the motion state of the j particles in response to determining that the positions of the j particles exceed a predetermined area and the acceleration direction of each of the j particles is the same as the velocity direction of each particle.
[0199] According to an embodiment of the present invention, the third determination submodule includes a third determination unit, which is used to stop the update operation of the motion state of the j particles in response to determining that the positions of j particles exceed a predetermined area, and the acceleration direction of each particle among the j particles is the same as the velocity direction of each particle and the direction of the force acting on each particle affected by other particles.
[0200] According to an embodiment of the present invention, the generating submodule includes: a fourth determining unit and a generating unit.
[0201] The fourth determining unit is used to determine the decision result of each particle based on the difference between the position indicated by the target motion state of each particle and the predetermined area.
[0202] The generation unit is used to generate a target strategy based on the decision results of each particle.
[0203] According to an embodiment of the present invention, the predetermined area includes a first boundary value and a second boundary value. The fourth determining unit includes: a first determining subunit and a second determining subunit.
[0204] The first determination subunit is used to determine a first type corresponding to the first boundary value as a decision result with the first particle in response to determining that a target position indicated by a target motion state of a first particle among the multiple particles is close to a first boundary value.
[0205] The second determination subunit is used to determine the second type corresponding to the second boundary value as the decision result with the second particle in response to determining that the target position indicated by the target motion state of the second particle among the multiple particles is close to the second boundary value.
[0206] According to an embodiment of the present invention, the predetermined area includes a third boundary value and a fourth boundary value; the fourth determining unit includes: a third determining subunit and a fourth determining subunit.
[0207] The third determining subunit is used to determine a third type corresponding to the sign of the third boundary value as a decision result with the first particle in response to determining that the target position indicated by the target motion state of the first particle among the multiple particles is close to the third boundary value.
[0208] The fourth determination subunit is used to determine a fourth type corresponding to the sign of the fourth boundary value as a decision result with the second particle in response to determining that the target position indicated by the target motion state of the second particle among the multiple particles is close to the fourth boundary value.
[0209] According to an embodiment of the present invention, the generating unit includes: a fifth determining subunit and a generating subunit.
[0210] The fifth determining subunit is used to determine the decision information of each object according to the decision result of each particle.
[0211] The generation subunit is used to generate a target strategy based on the decision information of each object.
[0212] According to an embodiment of the present invention, any multiple modules among the acquisition module 910, the evolution module 920, the generation module 930 and the operation module 940 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the acquisition module 910, the evolution module 920, the generation module 930 and the operation module 940 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the acquisition module 910, the evolution module 920, the generation module 930 and the operation module 940 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0213] Fig.10 A block diagram of an electronic device suitable for implementing a task running method according to an embodiment of the present invention is schematically shown.
[0214] like Fig.10 As shown, the electronic device 1000 according to an embodiment of the present invention includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0215] In RAM 1003, various programs and data required for the operation of electronic device 1000 are stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other via bus 1004. Processor 1001 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 1002 and / or RAM 1003. It should be noted that the program can also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in the one or more memories.
[0216] According to an embodiment of the present invention, the electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The electronic device 1000 may further include one or more of the following components connected to the input / output (I / O) interface 1005: an input portion 1006 including a keyboard, a mouse, etc.; an output portion 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk, etc.; and a communication portion 1009 including a network interface card such as a LAN card, a modem, etc. The communication portion 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output (I / O) interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage portion 1008 as needed.
[0217] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.
[0218] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 1002 and / or RAM 1003 described above and / or one or more memories other than ROM 1002 and RAM 1003.
[0219] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present invention.
[0220] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 1001. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0221] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1009, and / or installed from the removable medium 1011. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0222] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0223] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0224] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0225] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations fall within the scope of the present invention.
[0226] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A task running method, characterized in that: The method comprises: Acquire information of multiple objects related to the task to be executed and information about the influence of the multiple objects on each other; the influence information represents the degree to which the operation performed by each object is influenced by other objects in the multiple objects; the task to be executed is a task for solving a combinatorial optimization problem; Taking each of the objects as a particle, processing the information of the multiple objects and the influence information by simulating the evolution of the positions of each of the multiple particles under the influence of other particles over time, wherein the positions indicate the decision tendency for each object; In response to determining that each of the particles has reached a target motion state, a target strategy is generated based on the target motion state of each of the particles; wherein the target motion state is that the position of each of the particles exceeds a predetermined area and the evolution direction of the position of each of the particles is a direction away from the predetermined area; the target strategy indicates a decision result for each of the objects to meet the needs of the task to be run; the evolution direction of the position of each of the particles is a direction away from the predetermined area including: the acceleration direction of each of the particles is the same as the velocity direction of each of the particles; or the acceleration direction of each of the particles is the same as the velocity direction of each of the particles and the direction of the force acting on each of the particles affected by other particles; and Run the task to be run according to the target strategy.
2. The method according to claim 1, characterized in that The plurality of particles includes I, where I is an integer greater than 1; The method of treating each object as a particle and processing the information of the multiple objects and the influence information by simulating the evolution of the positions of the multiple particles under the influence of other particles over time includes: Determine the initial position and initial velocity of each particle; Based on a predetermined evolution function, by simulating the evolution of the position of each of the plurality of particles under the influence of other particles over time, processing the information of the plurality of objects and the influence information to update the motion state of each of the particles, wherein the predetermined evolution function is used to characterize the correlation between the evolution parameter and the evolution moment; In response to determining that the position of the i-th particle is within the predetermined area, returning to perform an update operation on the motion states of I particles based on the updated motion state of the i-th particle, wherein 1≤i≤I; and In response to determining that the position of the i-th particle exceeds the predetermined area and the evolution direction of the position of the i-th particle is a direction away from the predetermined area, it is determined that the i-th particle reaches the target motion state.
3. The method according to claim 2, characterized in that The evolution process includes T moments, where T is an integer greater than 1; The method of processing the information of the plurality of objects and the influence information based on a predetermined evolution function by simulating the evolution of the positions of the plurality of particles under the influence of other particles over time to update the motion state of each particle comprises: determining a target evolution parameter by processing a predetermined evolution function based on the evolution moment; and Based on the predetermined impact intensity parameter, the predetermined evolution parameter and the target evolution parameter, the motion state of each particle at the tth time is updated according to the motion state of each particle at the tth time, 1<t≤T-1.
4. The method according to claim 3, characterized in that The motion state includes position and speed; The updating of the motion state of each particle at time t+1 based on the predetermined influence intensity parameter, the predetermined evolution parameter and the target evolution parameter and based on the motion state of each particle at time t includes: Based on the predetermined evolution parameter and the velocity of each particle at the tth time, obtaining the position of each particle at the t+1th time; Based on the position of each particle at the t+1th time, the predetermined evolution parameter and the target evolution parameter at the t+1th time, generating a first force acting on the motion state of each particle at the t+1th time, wherein the first force represents the degree of influence of the decision executed by each object on itself; Based on the position of each of the particles at the t+1th time, the influence information and the predetermined influence strength parameter, generating a second force on the motion state of each of the particles at the t+1th time affected by the motion state of other particles, wherein the second force represents the degree to which the decision executed by each of the objects is affected by other objects; and Based on the first force and the second force, the velocity of each particle at the time t+1 is obtained.
5. The method according to claim 3, characterized in that: The motion state includes position and speed; The updating of the motion state of each particle at time t+1 based on the predetermined influence intensity parameter, the predetermined evolution parameter and the target evolution parameter and based on the motion state of each particle at time t includes: Based on the position of each particle at the t-th time, the predetermined evolution parameter and the target evolution parameter at the t-th time, generating a third force on the motion state of each particle at the t-th time under the influence of itself, wherein the third force represents the degree to which the decision executed by each object is influenced by itself; Based on the position of each particle at the t-th moment, the influence information and the predetermined influence intensity parameter, generating a fourth force on the motion state of each particle at the t-th moment affected by the motion state of other particles, wherein the fourth force represents the degree to which the decision executed by each object is affected by other objects; and Based on the third force and the fourth force, obtaining the velocity of each of the particles at time t+1; and Based on the speed of each particle at the t+1th time and the predetermined evolution parameter, the position of each particle at the t+1th time is generated.
6. The method according to claim 1, characterized in that In response to determining that each of the particles has reached a target motion state, generating a target strategy based on the target motion state of each of the particles includes: In response to determining that the positions of the j particles exceed the predetermined area and the evolution direction of the positions of the j particles is a direction away from the predetermined area, stopping the update operation of the motion states of the j particles; wherein 1≤j≤I; Wherein, when j is less than 1, the j particles return to perform the operation of simulating the evolution of the positions of the multiple particles under the influence of other particles over time in the target motion state; When it is determined that j is equal to 1, it is determined that each of the particles has reached the target motion state; A target strategy is generated based on the target motion state of each of the particles.
7. The method according to claim 6, characterized in that In response to determining that the positions of the j particles exceed the predetermined area and the evolution direction of the positions of the j particles is a direction away from the predetermined area, stopping the simulation evolution operation for the j particles includes: In response to determining that the positions of the j particles exceed the predetermined area and the acceleration direction of each of the j particles is the same as the velocity direction of each of the j particles, the update operation for the motion states of the j particles is stopped.
8. The method according to claim 6, characterized in that In response to determining that the positions of the j particles exceed the predetermined area and the evolution direction of the positions of the j particles is a direction away from the predetermined area, stopping the update operation for the j particles includes: In response to determining that the positions of j particles exceed the predetermined area, and the acceleration direction of each of the j particles is the same as the velocity direction of each particle and the direction of the force exerted on each particle by other particles, the update operation of the motion status of the j particles is stopped.
9. The method according to claim 1, characterized in that: The generating of the target strategy based on the target motion state of each particle comprises: Determining a decision result for each particle based on a difference between a position indicated by a target motion state of each particle and the predetermined area; and The target strategy is generated according to the decision results of each particle.
10. The method according to claim 9, characterized in that The predetermined area includes a first boundary value and a second boundary value; The determining of the decision result of each particle based on the difference between the position indicated by the target motion state of each particle and the predetermined area comprises: In response to determining that a target position indicated by a target motion state of a first particle among the plurality of particles is close to the first boundary value, determining a first type corresponding to the first boundary value as a decision result with the first particle; and In response to determining that the target position indicated by the target motion state of a second particle among the multiple particles is close to the second boundary value, a second type corresponding to the second boundary value is determined as a decision result with the second particle.
11. The method according to claim 9, characterized in that The predetermined area includes a third boundary value and a fourth boundary value; The determining of the decision result of each particle based on the difference between the position indicated by the target motion state of each particle and the predetermined area comprises: In response to determining that the target position indicated by the target motion state of a first particle among the plurality of particles is close to the third boundary value, determining a third type corresponding to the sign of the third boundary value as a decision result with the first particle; and In response to determining that the target position indicated by the target motion state of a second particle among the multiple particles is close to the fourth boundary value, a fourth type corresponding to the sign of the fourth boundary value is determined as a decision result with the second particle.
12. The method according to claim 9, characterized in that Generating the target strategy according to the decision results of each particle includes: Determining decision information of each of the objects according to the decision results of each of the particles; and The target strategy is generated based on the decision information of each of the objects.
13. A task running method, characterized in that: The method comprises: The information of multiple objects related to the task to be executed and the influence information between the multiple objects sent by the classical computer are obtained by simulating the bifurcation machine; the influence information represents the degree to which the operation performed by each object is influenced by other objects in the multiple objects; the task to be executed is a task for solving a combinatorial optimization problem; The simulated bifurcating machine takes each of the objects as a particle, and processes the information of the multiple objects and the influence information by simulating the evolution of the positions of each of the multiple particles under the influence of other particles over time, wherein the positions indicate the decision tendency for each object; in response to determining that each of the particles has reached a target motion state, a target strategy is generated based on the target motion state of each of the particles; wherein the target motion state is that the position of each of the particles exceeds a predetermined area and the evolution direction of the position of each of the particles is a direction away from the predetermined area; the target strategy indicates the decision result for each of the objects to meet the requirements of the task to be run; the evolution direction of the position of each of the particles is a direction away from the predetermined area, including: the acceleration direction of each of the particles is the same as the speed direction of each of the particles; or the acceleration direction of each of the particles is the same as the speed direction of each of the particles and the direction of the force on each of the particles affected by other particles; The simulated forking machine runs the task to be run according to the target strategy.
14. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 13.
15. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
16. A computer program product, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
Citation Information
Patent Citations
Task processing method and device, electronic equipment and storage medium
CN116089070A
Task scheduling method and device, electronic equipment, storage medium and program product
CN118227289A