Service resource processing method and related equipment
By constructing a constraint penalty coefficient matrix of an undirected business graph and performing sparsification, and then solving it using a quantum optimization algorithm, the problem of low efficiency in business resource allocation in existing technologies is solved, achieving more efficient resource allocation.
Patent Information
- Application Number
- CN202511034559.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-18
AI Technical Summary
In existing technologies, the computational complexity of business resource allocation algorithms is high, resulting in low allocation efficiency and failing to effectively improve the allocation efficiency of business resources.
By constructing an undirected graph of business operations, sparsification is performed using the constraint penalty coefficient matrix to obtain a sparse coefficient matrix. This is then combined with a quantum optimization algorithm to solve the target resource allocation function, ensuring efficient allocation of business resources.
It significantly improves the search efficiency and calculation speed of business resource allocation, reduces computational complexity, achieves faster resource allocation results, and improves allocation efficiency.
Smart Images

Figure CN120973516A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to a business resource processing method and device, a readable medium, equipment and a program product. BACKGROUND
[0002] When allocating business resources in a business scenario, the same business resource cannot be allocated to two associated resource receiving objects. In related technologies, greedy algorithm, backtracking algorithm, local search algorithm and other algorithms are usually used to allocate business resources in these business scenarios. However, the calculation complexity of the existing algorithms is too high, and the calculation efficiency is too low, resulting in low efficiency of business resource allocation. Therefore, how to improve the allocation efficiency of business resources is a technical problem to be solved at present. SUMMARY
[0003] The embodiments of the present application provide a business resource processing method and device, a readable medium, equipment and a program product, which can improve the allocation efficiency of business resources.
[0004] In one aspect, the embodiments of the present application provide a business resource processing method, comprising:
[0005] According to the association relationship between a plurality of resource receiving objects, a business undirected graph is constructed; the nodes in the business undirected graph represent the resource receiving objects, and the edges in the business undirected graph represent the association relationship;
[0006] Based on a plurality of business resources and the business undirected graph, an initial resource allocation function is constructed; wherein the initial resource allocation function contains a constraint penalty coefficient matrix, and each element in the constraint penalty coefficient matrix represents a constraint penalty coefficient between two nodes allocated with business resources;
[0007] The constraint penalty coefficient matrix is processed to obtain a sparse coefficient matrix, and the initial resource allocation function is updated based on the sparse coefficient matrix to obtain a target resource allocation function;
[0008] A quantum optimization algorithm is called to solve the target resource allocation function, to obtain target business resources corresponding to each node in the business undirected graph, so as to allocate the target business resources to the resource receiving objects represented by the nodes.
[0009] In one aspect, the embodiments of the present application provide a business resource processing device, which comprises a graph construction unit, a function construction unit, a function processing unit and an algorithm calling unit, wherein:
[0010] The graph construction unit is configured to construct a service undirected graph according to an association relationship between a plurality of resource receiving objects; a node in the service undirected graph represents the resource receiving object, and an edge in the service undirected graph represents the association relationship.
[0011] The function construction unit is configured to construct an initial resource allocation function based on a plurality of service resources and the service undirected graph; the initial resource allocation function contains a constraint penalty coefficient matrix, and each element in the constraint penalty coefficient matrix represents a constraint penalty coefficient between two nodes to which service resources are allocated.
[0012] The function processing unit is configured to perform sparse processing on the constraint penalty coefficient matrix to obtain a sparse coefficient matrix, and update the initial resource allocation function based on the sparse coefficient matrix to obtain a target resource allocation function.
[0013] The algorithm calling unit is configured to call a quantum optimization algorithm to solve the target resource allocation function to obtain target service resources corresponding to each node in the service undirected graph, and allocate the target service resources to the resource receiving objects represented by the nodes.
[0014] In an embodiment of the present application, based on the foregoing scheme, when the function processing unit performs sparse processing on the constraint penalty coefficient matrix to obtain a sparse coefficient matrix, the function processing unit can also be configured to perform the following: obtaining target elements from the constraint penalty coefficient matrix; the target elements include elements in the constraint penalty coefficient matrix corresponding to adjacent nodes, and elements corresponding to the same node and the same service resource; setting other elements in the constraint penalty coefficient matrix to zero except the target elements to obtain the sparse coefficient matrix.
[0015] In an embodiment of the present application, based on the foregoing scheme, when the function construction unit constructs an initial resource allocation function based on a plurality of service resources and a service undirected graph, the function construction unit can be specifically configured to perform the following: constructing a node penalty term corresponding to each node based on the plurality of service resources and each node in the service undirected graph, and a edge penalty term corresponding to adjacent nodes connected by an edge in the service undirected graph; constructing the initial resource allocation function according to the node penalty term corresponding to each node and a node constraint penalty weight, and the edge penalty term corresponding to the adjacent nodes and an edge constraint penalty weight.
[0016] In an embodiment of the present application, based on the foregoing scheme, the function construction unit, when constructing the node penalty term corresponding to each node and the edge penalty term corresponding to adjacent nodes connected by an edge in the service undirected graph based on the plurality of service resources and the nodes in the service undirected graph, can specifically be configured to perform: obtaining the binary variable corresponding to each node; wherein the binary variable represents the allocation of the plurality of service resources in each node; constructing the node penalty term corresponding to each node according to the binary variable corresponding to each node under the node constraint condition representing that a node is allocated a service resource; and constructing the edge penalty term corresponding to adjacent nodes according to the binary variable corresponding to the adjacent nodes under the edge constraint condition representing that the adjacent nodes are allocated different service resources.
[0017] In an embodiment of the present application, based on the foregoing scheme, when the function construction unit constructs the initial resource allocation function according to the node penalty term corresponding to each node and the node constraint penalty weight, and the edge penalty term corresponding to adjacent nodes and the edge constraint penalty weight, the function construction unit can specifically be configured to perform: obtaining the constraint penalty coefficient corresponding to each node based on the node penalty term corresponding to each node and the node constraint penalty weight; obtaining the constraint penalty coefficient corresponding to adjacent nodes based on the edge penalty term corresponding to adjacent nodes and the edge constraint penalty weight; and constructing a constraint penalty coefficient matrix according to the constraint penalty coefficient corresponding to each node and the constraint penalty coefficient corresponding to adjacent nodes, so as to generate the initial resource allocation function based on the constraint penalty coefficient matrix.
[0018] In an embodiment of the present application, based on the foregoing scheme, the function processing unit can further be configured to perform: adding a first node and an edge corresponding to the first node in the service undirected graph to obtain an updated undirected graph; obtaining the node penalty term and the edge penalty term corresponding to the first node in the updated undirected graph based on the plurality of service resources and the updated service undirected graph; and updating the target resource allocation function according to the node penalty term and the edge penalty term corresponding to the first node to obtain an updated target resource allocation function. The algorithm calling unit 804 can also be configured to perform: calling a quantum optimization algorithm to solve the updated target resource allocation function, and allocating service resources based on the solving result.
[0019] In an embodiment of the present application, based on the foregoing scheme, when the function processing unit updates the target resource allocation function according to the node penalty term and the edge penalty term corresponding to the first node, the function processing unit can specifically be configured to perform: obtaining a first constraint penalty coefficient based on the node penalty term corresponding to the first node and the node constraint penalty weight, and obtaining a second constraint penalty coefficient based on the edge penalty term corresponding to the first node and the edge constraint penalty weight; and adding the first constraint penalty coefficient and the second constraint penalty coefficient as elements in a sparse coefficient matrix contained in the target resource allocation function, so as to update the target resource allocation function.
[0020] In an embodiment of the present application, based on the foregoing scheme, the function processing unit can be further configured to perform: deleting the second node in the service undirected graph and deleting the edge connected to the second node; updating the target resource allocation function based on the node penalty term and the edge penalty term corresponding to the second node to obtain an updated target resource allocation function. The algorithm calling unit 804 can be further configured to perform: calling the quantum optimization algorithm to solve the updated target resource allocation function, and allocating service resources based on the solving result.
[0021] In an embodiment of the present application, based on the foregoing scheme, the function processing unit can be further configured to perform: adding an edge in the service undirected graph, and obtaining two associated nodes connected by the added edge to construct an edge penalty term corresponding to the two associated nodes; updating the target resource allocation function based on the edge penalty term corresponding to the two associated nodes to obtain an updated target resource allocation function. The algorithm calling unit 804 can be further configured to perform: calling the quantum optimization algorithm to solve the updated target resource allocation function, and allocating service resources based on the solving result.
[0022] In an embodiment of the present application, based on the foregoing scheme, the function processing unit can be further configured to perform: deleting an edge in the service undirected graph, and obtaining a target edge penalty term corresponding to the nodes connected by the deleted edge; updating the target resource allocation function based on the target edge penalty term to obtain an updated target resource allocation function. The algorithm calling unit 804 can be further configured to perform: calling the quantum optimization algorithm to solve the updated target resource allocation function, and allocating service resources based on the solving result.
[0023] In an embodiment of the present application, based on the foregoing scheme, when the algorithm calling unit calls the quantum optimization algorithm to solve the target resource allocation function to obtain the target service resources corresponding to each node in the service undirected graph, the algorithm calling unit can be specifically configured to: convert the target resource allocation function into a quantum Hamiltonian; call the quantum optimization algorithm to perform quantum optimization calculation on the quantum Hamiltonian to obtain a bit sequence; analyze the subsequence corresponding to each node in the bit sequence to obtain the target service resources allocated to each node.
[0024] In one aspect, the embodiments of the present application provide an electronic device, which comprises an input interface and an output interface, and further comprises:
[0025] a processor adapted to implement one or more instructions; and
[0026] a computer storage medium storing one or more instructions, the one or more instructions being adapted to be loaded and executed by the processor to implement the above-mentioned service resource processing method.
[0027] In an aspect, an embodiment of the present application provides a computer readable medium, wherein the computer readable medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the business resource processing method.
[0028] In an aspect, an embodiment of the present application provides a computer program product or a computer program, wherein the computer program product or the computer program comprises computer instructions stored in a computer readable storage medium; a processor of an electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, and the computer instructions are executed by the processor to implement the business resource processing method.
[0029] In the technical solution provided by the embodiment of the present application, the search efficiency of the solution of the target resource allocation function can be significantly improved by solving the target resource allocation function through the quantum optimization algorithm; thus, compared with the prior art, the solution of the target resource allocation function can be calculated faster; and the target business resource corresponding to each node can be determined through the solution, so that the corresponding target business resource is allocated to the resource receiving object represented by each node, thereby effectively improving the allocation efficiency of the business resource. Meanwhile, the calculation redundancy in the resource allocation function can be effectively reduced by sparsifying the constraint penalty coefficient matrix in the initial resource allocation function to obtain the target resource allocation function, which is conducive to reducing the calculation complexity when the target resource allocation function is solved through the quantum optimization algorithm, thereby further improving the solution speed of the target resource allocation function, and further improving the allocation efficiency of the business resource. BRIEF DESCRIPTION OF DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0031] Figure 1 is an architecture schematic diagram of a business resource processing system provided by an embodiment of the present application;
[0032] Figure 2 is a flowchart of a business resource processing method provided by an embodiment of the present application;
[0033] Figure 3 is a flowchart of another business resource processing method provided by an embodiment of the present application;
[0034] Figure 4 is a variation diagram of a service resource allocation scheme after adding a node according to an embodiment of the present application;
[0035] Figure 5 is a variation diagram of a service resource allocation scheme after deleting a node according to an embodiment of the present application;
[0036] Figure 6 is a variation diagram of adding an edge in a service undirected graph according to an embodiment of the present application;
[0037] Figure 7 is a variation diagram of deleting an edge in a service undirected graph according to an embodiment of the present application;
[0038] Figure 8 is a structural diagram of a service resource processing apparatus according to an embodiment of the present application;
[0039] Figure 9 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0040] The exemplary embodiments will be described in detail herein below with reference to the drawings. In the following description, the same drawings refer to the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application, as detailed in the appended claims.
[0041] The block diagrams shown in the drawings are merely functional entities, and do not necessarily have to correspond to physically independent entities. That is, the functional entities can be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0042] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program having a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that includes the functions of the module or unit.
[0043] The flowchart shown in the drawing is only an exemplary illustration, and is not necessarily required to include all the contents and operations, nor is it necessarily required to be executed in the order described. For example, some operations can be further decomposed, and some operations can be combined or partially combined, so the actual execution order can be changed according to actual conditions.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this application is for the purpose of describing embodiments of this application only, and is not intended to be limiting of this application.
[0045] It should also be noted that "multiple" is used in this application to refer to two or more. The association relationship of "and / or" describes the associated objects, which means that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0046] When allocating business resources in a business scenario, the same business resource cannot be allocated to two associated resource receiving objects. For example, in a wireless channel allocation business scenario, in order to avoid co-channel interference, different channels will be allocated to adjacent access points or base stations; in a mapping and regional planning scenario, adjacent plots will be planned to realize different functions, etc.
[0047] In related technologies, greedy algorithms, backtracking algorithms, local search algorithms, and some heuristic methods are usually used to allocate business resources in these business scenarios. In these algorithms, simple and efficient algorithms often cannot guarantee to find the optimal solution of business resource allocation, and algorithms that can find the optimal solution of business resource allocation have high computational complexity and limited applicability. Algorithms that cannot guarantee to find the optimal solution of business resource allocation will result in low allocation of business resources, and algorithms with high computational complexity will result in low efficiency of business resource allocation.
[0048] Based on this, an embodiment of the present application provides a business resource processing scheme, which constructs a business undirected graph based on the association relationship between a plurality of resource receiving objects, to construct an initial resource allocation function through a plurality of business resources and the business undirected graph. Then, the constraint penalty coefficient matrix in the initial resource allocation function is processed in a sparse manner to obtain a target resource allocation function. Finally, a quantum optimization algorithm is called to solve the target resource allocation function to obtain the target business resource corresponding to each node in the business undirected graph, so as to allocate the target business resource to the resource receiving object represented by each node.
[0049] In this undirected service graph, nodes represent resource receiving objects, and edges represent the relationships between resource receiving objects. A resource receiving object is an object that receives service resources. For example, in a wireless channel allocation service scenario, a resource receiving object could be an access point or a base station, and the service resources include the wireless channel.
[0050] Furthermore, the initial resource allocation function contains a constraint penalty coefficient matrix, where each element represents the constraint penalty coefficient between two nodes to which business resources are allocated. After sparsifying the constraint penalty coefficient matrix, a sparse coefficient matrix is obtained; then, by updating the initial resource allocation function based on the sparse coefficient matrix, the target resource allocation function can be obtained.
[0051] Quantum computing possesses the characteristics of parallelism and quantum superposition, enabling the simultaneous exploration of multiple possible solutions in the solution space, thereby accelerating problem-solving. Therefore, this scheme significantly improves the search efficiency for solutions to the target resource allocation function by using a quantum optimization algorithm. As can be seen, compared with existing schemes, this scheme can calculate the solution to the target resource allocation function faster, and then allocate business resources to the resource receiving objects represented by each node based on the solution results, thereby effectively improving the allocation efficiency of business resources.
[0052] Meanwhile, by sparsifying the constraint penalty coefficient matrix in the initial resource allocation function to obtain the target resource allocation function, this scheme can effectively reduce computational redundancy in the resource allocation function, which is beneficial to reducing the computational complexity when solving it using quantum optimization algorithms. This can further improve the solution speed of the target resource allocation function, and thus allocate business resources to the resource receiving objects represented by each node more quickly, effectively improving the efficiency of business resource allocation.
[0053] Based on the above-described business resource processing method, this application provides a business resource processing system, which can be found in [reference needed]. Figure 1 , Figure 1 The business resource processing system shown may include terminal devices 101 and servers 102. The number of terminal devices 101 may include at least one, and the number of servers 102 may include at least one. A communication connection is established between any terminal device and any server. Figure 1 As shown, terminal device 101 may include any one or more of the following: sensors, smartphones, tablets, laptops, desktop computers, smart vehicles, and smart wearable devices. Terminal device 101 may run various applications (APPs), such as shopping clients, payment clients, game clients, virtual interaction clients, multimedia playback clients, social clients, information streaming clients, and so on.
[0054] The server 102 can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal device 101 and the server 102 can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.
[0055] In one embodiment, the above business resource processing method can be executed only by the terminal device 101 in the business resource processing system as shown in Figure 1 The specific execution process is as follows: the terminal device 101 can construct a business undirected graph according to the association relationship between multiple resource receiving objects; then, the terminal device 101 can construct an initial resource allocation function based on multiple business resources and the business undirected graph; thereafter, the terminal device 101 can perform sparse processing on the constraint penalty coefficient matrix to obtain a sparse coefficient matrix, and update the initial resource allocation function based on the sparse coefficient matrix to obtain a target resource allocation function; finally, the terminal device 101 can call a quantum optimization algorithm to solve the target resource allocation function, and obtain the target business resource corresponding to each node in the business undirected graph, so as to allocate the target business resource to the resource receiving object represented by each node.
[0056] Alternatively, the above business resource processing method can also be executed only by the server 102 in the business resource processing system as shown in Figure 1 The specific execution process can refer to the specific execution process of the terminal device 101, which will not be described here.
[0057] In another embodiment, the above business resource processing method can be executed by the terminal device 101 and the server 102 in the business resource processing system as shown in Figure 1The terminal device 101 and the server 102 in the business resource processing system shown jointly perform, and the specific execution process is as follows: the terminal device 101 can obtain the association relationship between a plurality of resource receiving objects and send it to the server 201; the server 201 can construct a business undirected graph according to the association relationship between a plurality of resource receiving objects; then, the server 201 can construct an initial resource allocation function based on a plurality of business resources and the business undirected graph; after that, the server 201 can perform sparse processing on the constraint penalty coefficient matrix to obtain a sparse coefficient matrix, and update the initial resource allocation function based on the sparse coefficient matrix to obtain a target resource allocation function; finally, the server 201 can call a quantum optimization algorithm to solve the target resource allocation function to obtain the target business resource corresponding to each node in the business undirected graph, so as to allocate the target business resource to the resource receiving object represented by each node.
[0058] It should be noted that the embodiments of the present application can be applied to any business scenario that requires the same business resource to be unable to be allocated to the associated resource receiving object, including but not limited to smart traffic, intelligent communication, smart e-commerce, smart logistics and the like, without limitation.
[0059] Meanwhile, in the specific embodiments of the present application, if the association relationship between the business resource and the resource receiving object involves object-related data or information, when the embodiments of the present application are applied to specific products or technologies, the permission or consent of the object needs to be obtained, and the collection, use and processing of the related data or information need to comply with relevant laws, regulations and standards of the relevant countries and regions.
[0060] Based on the above business resource processing scheme and the business resource processing system, the embodiments of the present application provide a business resource processing method. Referring to Figure 2 , a flowchart of a business resource processing method provided by the embodiments of the present application. Figure 2 The business resource processing method shown can be executed by Figure 2 the server or the terminal device in the business resource processing system. In the embodiments of the present application, the method executed by the terminal device is taken as an example for description.
[0061] Among them, Figure 2 The business resource processing method shown can include steps S201 to S204:
[0062] S201, constructing a business undirected graph according to the association relationship between a plurality of resource receiving objects.
[0063] In the embodiments of the present application, the nodes in the service undirected graph represent resource receiving objects, and the edges in the service undirected graph represent association relationships. The resource receiving object is an object receiving a service resource. The association relationship between multiple resource receiving objects can include multiple association relationships, and the meaning represented by the association relationship can be different in different service scenarios.
[0064] For example, in the service scenario of wireless channel allocation, if two resource receiving objects are adjacent access points or base stations, an association relationship is established between the two resource receiving objects. At this time, the association relationship represents that the two resource receiving objects are adjacent access points or base stations. For another example, in the scenario of map drawing and regional planning, if two resource receiving objects are adjacent plots, an association relationship is established between the two resource receiving objects. At this time, the association relationship represents that the two resource receiving objects are adjacent plots.
[0065] In some embodiments, the specific construction process of the service undirected graph can include: constructing each node based on each resource receiving object in the multiple resource receiving objects, and constructing an edge between two nodes corresponding to two resource receiving objects having an association relationship in the multiple resource receiving objects, to obtain the service undirected graph. In a specific implementation, the service undirected graph can be represented by G(V, E), where V is a node set, and E is an edge set.
[0066] In S202, an initial resource allocation function is constructed based on the multiple service resources and the service undirected graph.
[0067] In the embodiments of the present application, the number of service resources can be artificially set, or can be obtained by a server or a terminal device according to the number of allocable service resources, which is not limited herein. In different service scenarios, the service resources are different. For example, in the service scenario of wireless channel allocation, the service resources include wireless channels; in the scenario of map drawing and regional planning, the service resources include plots or regions, etc.
[0068] In some embodiments, the construction process of the initial resource allocation function can include: constructing a node penalty term corresponding to each node based on the multiple service resources and each node in the service undirected graph, and constructing an edge penalty term corresponding to adjacent nodes connected by an edge in the service undirected graph; and then constructing the initial resource allocation function according to the node penalty term corresponding to each node and a node constraint penalty weight, and the edge penalty term corresponding to the adjacent nodes and an edge constraint penalty weight.
[0069] The node constraint penalty weight and the edge constraint penalty weight can be set artificially, or set by the server or the terminal device in the system, and are not limited herein. In a specific implementation, the most reasonable node constraint penalty weight and edge constraint penalty weight can be obtained by setting different node constraint penalty weights and different edge constraint penalty weights. Optionally, the node constraint penalty weight can be a positive number, and the edge constraint penalty weight can be a positive number.
[0070] In addition, if two nodes in the service undirected graph are connected by an edge, the two nodes can be referred to as adjacent nodes. That is, the adjacent nodes include the two nodes. Then, the edge penalty term corresponding to the adjacent nodes also has a corresponding relationship between the two nodes.
[0071] In some embodiments, the construction process of the node penalty term corresponding to each node can include: obtaining a binary variable corresponding to each node in the service undirected graph; and then constructing the node penalty term corresponding to each node according to the binary variable corresponding to each node under the node constraint condition that a node is assigned a service resource.
[0072] The binary variable represents the allocation of the plurality of service resources in each node. Specifically, each binary variable corresponding to each node in the service undirected graph can be obtained based on each service resource in the plurality of service resources, and each binary variable represents whether the corresponding service resource is allocated to the corresponding node.
[0073] For example, it can be assumed that there are n nodes and r edges in the service undirected graph G(V, E), and the total number of service resources is m. Then, a binary variable x i,k :
[0074]
[0075] A node can be assigned one service resource at a time. Then, a node has m allocation conditions when the total number of service resources is m. Therefore, node i has m binary variables, i.e., x i,1 to x i,m .
[0076] Optionally, the node constraint condition represents that a node is assigned one service resource, that is, a node cannot be assigned at least two service resources at the same time.
[0077] In a specific implementation, the node constraint condition can be converted into a mathematical expression based on the binary variable, and the mathematical expression includes: for any node i∈V in the service undirected graph, the following condition needs to be met The mathematical expression of the node constraint condition is converted into a function form, and a node penalty term C1 of the node i is obtained. The formula of the node penalty term C1 is as follows:
[0078]
[0079] Specifically, if a node is not allocated any service resource (i.e., all binary variables corresponding to the node are 0), or a node is allocated at least two service resources (there are at least two binary variables equal to 1 in the binary variables corresponding to the node), the value of the node penalty term corresponding to the node is greater than zero; and only when a node is allocated exactly one service resource, the node penalty term corresponding to the node is zero. This way of generating a non-zero penalty when a node is not allocated any service resource and is allocated at least two service resources can guide the subsequent resource allocation function formed based on the node penalty term to avoid conflicting solutions of not allocating any service resource to a node and allocating at least two service resources to a node, which is beneficial to improve the accuracy of the subsequent solution result, thereby improving the accuracy of service resource allocation.
[0080] In some embodiments, the specific construction process of the edge penalty term corresponding to adjacent nodes can include: obtaining the binary variables corresponding to each node in the service undirected graph; and then, under the edge constraint condition representing that adjacent nodes are allocated different service resources, constructing the edge penalty term corresponding to the adjacent nodes according to the binary variables corresponding to the adjacent nodes.
[0081] The edge constraint condition represents that adjacent nodes are allocated different service resources, that is, two service resources allocated to two nodes of adjacent nodes cannot be the same.
[0082] In a specific implementation, the edge constraint condition can be converted into a mathematical expression based on binary variables, and the mathematical expression includes: for each edge (i, j) E in the service undirected graph, x i,k +x jk ≤1, Wherein, the node i and the node j are adjacent nodes belonging to the same edge. The mathematical expression of the edge constraint condition is converted into a function form, and an edge penalty term C2 corresponding to the adjacent nodes i and j is obtained. The formula of the edge penalty term C2 is as follows:
[0083]
[0084] Specifically, if the adjacent nodes i and j are allocated the same service resource k, there is x i,k =1, x j,k= 1. At this time, the value of the edge penalty term C2 is 1, indicating a violation of the edge constraint condition; otherwise, the value is 0, and no penalty is generated. This way of generating a non-zero penalty when adjacent vertices are assigned the same service resource can guide the subsequent resource allocation function formed based on the edge penalty term to avoid conflict solutions about assigning the same service resource to adjacent vertices, which is beneficial to improve the accuracy of the subsequent solution result, thereby improving the accuracy of service resource allocation.
[0085] Optionally, according to the node penalty term corresponding to each node and the node constraint penalty weight, and the edge penalty term corresponding to adjacent nodes and the edge constraint penalty weight, the specific process of constructing the initial resource allocation function can include: multiplying the node constraint penalty weight and the node penalty term corresponding to each node to obtain a first penalty term, multiplying the edge constraint penalty weight and the edge penalty term corresponding to adjacent nodes to obtain a second penalty term; and obtaining the initial resource allocation function based on the first penalty term and the second penalty term.
[0086] Optionally, the specific process of obtaining the initial resource allocation function based on the first penalty term and the second penalty term can include: adding the first penalty term and the second penalty term to obtain an original resource allocation function; performing function expansion on the original resource allocation function to obtain a quadratic form expression corresponding to the original resource allocation function; and taking the quadratic form expression corresponding to the original resource allocation function as the initial resource allocation function.
[0087] Specifically, the quadratic term coefficient of each node obtained by expanding the first penalty term is the constraint penalty coefficient corresponding to each node in the constraint penalty coefficient matrix of the initial resource allocation function, and the first penalty term is obtained based on the node constraint penalty weight and the node penalty term corresponding to each node; therefore, it is equivalent to obtaining the constraint penalty coefficient corresponding to each node based on the node penalty term corresponding to each node and the node constraint penalty weight.
[0088] Similarly, the quadratic term coefficient of the node obtained by expanding the second penalty term is the constraint penalty coefficient corresponding to adjacent nodes in the constraint penalty coefficient matrix of the initial resource allocation function, and the second penalty term is obtained based on the edge constraint penalty weight and the edge penalty term corresponding to adjacent nodes; therefore, it is equivalent to obtaining the constraint penalty coefficient corresponding to adjacent nodes based on the node penalty term corresponding to each node and the node constraint penalty weight.
[0089] Finally, according to the constraint penalty coefficient corresponding to each node and the constraint penalty coefficient corresponding to adjacent nodes, a constraint penalty coefficient matrix can be constructed to generate the initial resource allocation function based on the constraint penalty coefficient matrix.
[0090] In a specific implementation, based on the above example, the formula of the original resource allocation function is as follows:
[0091] Q(x) = λ1C1 + λ2C2
[0092] where λ1is a node constraint penalty weight, λ2is an edge constraint penalty weight, and λ1and λ2are used to balance the importance of the constraint conditions corresponding to different penalty terms. λ1C1is the first penalty term; and λ2C2is the second penalty term.
[0093] Further, by expanding the original resource allocation function, a quadratic form expression corresponding to the original resource allocation function (i.e., an initial resource allocation function) can be constructed. Specifically, the quadratic form expression corresponding to the original resource allocation function is shown in the following formula:
[0094] Q(x) = x T Qx
[0095] where Q is a constraint penalty coefficient matrix, x is a row vector, x T is a permutation matrix of x.
[0096] Q is a dense matrix of nk x nk, and the expanded form of Q is shown in the following formula:
[0097]
[0098] where the variables x i,k and x j,t In the process of expanding the original resource allocation function, the corresponding quadratic term coefficient is the constraint penalty coefficient corresponding to the variables x i,k and x j,t , which determines the value of Q (i,k),(j,t) . In addition, x j,t is a binary variable defined for a node j∈{1,2,...,n} and a service resource t∈{1,2,...,m}.
[0099] Specifically, i=j and k=t represent the self-action term of a single variable x i,j , at which time Q (i,k),(j,t) corresponding node i and node j are the same node and the corresponding allocated service resource is the same service resource; i=j and k≠t represent the interaction term of a node i selecting different service resources k and t, at which time Q (i,k),(j,t) corresponding node i and node j are the same node, but the corresponding allocated service resource is different; i≠j and k=t represent the interaction term of whether two adjacent nodes i and j select the same service resource k, at which time Q (i,k),(j,t) corresponding node i and node j are adjacent nodes, and the corresponding allocated service resource is the same service resource. Other elements in the constraint penalty coefficient matrix are combinations of unrelated nodes or unrelated service resources, and the values are usually 0, indicating no direct relationship.
[0100] S203, sparsify the constraint penalty coefficient matrix to obtain a sparse coefficient matrix, and update the initial resource allocation function based on the sparse coefficient matrix to obtain a target resource allocation function.
[0101] In the embodiments of the present application, the specific process of updating the initial resource allocation function based on the sparse coefficient matrix can include: updating the constraint penalty coefficient matrix in the initial resource allocation function to the sparse coefficient matrix to obtain the target resource allocation function.
[0102] In some embodiments, a target element is obtained from the constraint penalty coefficient matrix; and other elements in the constraint penalty coefficient matrix except the target element are set to zero to obtain the sparse coefficient matrix. The target element includes an element in the constraint penalty coefficient matrix corresponding to two nodes being adjacent nodes, and an element corresponding to two nodes being the same node and corresponding allocated service resources being the same service resource.
[0103] Specifically, only the service resource conflict constraint (i.e., the edge constraint condition) between adjacent nodes is the key factor affecting the service resource allocation result, and other variables of non-adjacent nodes will not affect the final result; therefore, the elements corresponding to non-adjacent nodes in the constraint penalty coefficient matrix can be directly set to zero, thereby reducing the non-zero elements in the constraint penalty coefficient matrix. In addition, for the node constraint condition, it is only necessary to ensure that one node is allocated one kind of service resource, and the case that one node is allocated different service resources can be discarded; therefore, the element corresponding to two nodes being the same node and corresponding allocated service resources being different service resources in the constraint penalty coefficient matrix can be directly set to zero, thereby further reducing the non-zero elements in the constraint penalty coefficient matrix.
[0104] Through the sparsification of the elements except the target element, it can be ensured that the constraint penalty coefficient matrix only contains necessary node self-constraint terms and edge constraint terms; thus, the dense matrix originally containing a large number of invalid interactions is converted into a sparse matrix containing only key constraints, which greatly improves the calculation efficiency and storage performance, and also ensures that the target resource allocation function strictly complies with the edge constraint condition and the node constraint condition, thereby ensuring the reliability of the solution result of the target resource allocation function, to improve the allocation reliability of the service resource; at the same time, the sparsification of the elements except the target element also significantly reduces the number of non-zero elements in the constraint penalty coefficient matrix, which is conducive to improving the calculation efficiency of the target resource allocation function, and faster calculation of the result of the target resource allocation function, which is conducive to greatly improving the allocation efficiency of the service resource.
[0105] S204, calling a quantum optimization algorithm to solve the target resource allocation function to obtain a target service resource corresponding to each node in the service undirected graph, so as to allocate the target service resource to the resource receiving object represented by each node.
[0106] In the embodiment of the present application, the solving process of the target resource allocation function by calling the quantum optimization algorithm can specifically include: converting the target resource allocation function into a quantum Hamiltonian; calling the quantum optimization algorithm to perform quantum optimization calculation on the quantum Hamiltonian to obtain a bit sequence; and finally, parsing the subsequence corresponding to each node in the bit sequence to obtain the target service resource allocated to each node.
[0107] The quantum optimization algorithm can be a quantum approximate optimization algorithm (QAOA). Alternatively, the quantum optimization algorithm can also be other algorithms, which are not limited herein. Alternatively, converting the target resource allocation function into a quantum Hamiltonian can be specifically converting the sparse matrix in the target resource allocation function into a quantum Hamiltonian.
[0108] In a specific implementation, taking the example in step S202, the target resource allocation function is a function in the form of a quadratic unconstrained binary optimization (QUBO), and the QUBO target function can be effectively solved by being converted into a quantum Hamiltonian and combined with the quantum approximate optimization algorithm QAOA. In QAOA, the sparse matrix in the target resource allocation function can be first converted into a corresponding quantum Hamiltonian to reduce the consumption of computing resources.
[0109] Specifically, the initial state of the quantum bit is usually a uniform superposition state, representing the superposition of all possible solutions, and the calculation formula of the quantum state |ψ0> is as follows:
[0110]
[0111] Where n is the total number of nodes, m is the total number of service resource types, x represents the binary coding (bit sequence) of all possible service resource allocation schemes, i.e., the permutation and combination of binary variables x i,k , where x i,k represents whether node i is allocated service resource k. And |x> is a quantum state based on x, representing a service resource allocation scheme; ∑ x |x> represents the summation of all possible service resource allocation schemes x. is a normalization factor.
[0112] QAOA alternately applies the problem Hamiltonian H C (for encoding the target resource allocation function) and the mixing Hamiltonian H BThe unitary transformation driven by the Hamiltonian H C and the mixing Hamiltonian H B can be obtained by transforming the target resource allocation function.
[0113] The problem Hamiltonian H C is used to evolve the quantum state to evolve the state of the quantum bits to a low-energy state, which is mathematically expressed as follows:
[0114]
[0115] Where Z i,k is the Pauli-Z operator acting on the quantum bit (i, k).
[0116] The mixing Hamiltonian H B drives the quantum state to explore the solution space, usually choosing a transverse field Hamiltonian, which is mathematically expressed as follows:
[0117]
[0118] Where X i,k is the Pauli-X operator acting on the quantum bit (i, k). Specifically, for each parameterized quantum circuit depth p, QAOA evolves the quantum state by applying a series of exponential unitary transformations of the Hamiltonian H C and the exponential unitary transformation of the mixing Hamiltonian H B , which is:
[0119]
[0120] Where U (γ,β) is a unitary operator that acts on the current quantum state to evolve the quantum state towards the optimal solution; γ and β are parameters that need to be optimized.
[0121] The goal of QAOA is to minimize the expected value of the target resource allocation function, which represents the energy of the quantum state. The expected value of the target resource allocation function <H C > is calculated by the following formula:
[0122] <H C > = <ψ(γ, β) | H C | ψ(γ, β) >
[0123] Where ψ(γ, β) is the U (γ,β)Transformed quantum state. The quantum optimization algorithm minimizes the energy of the quantum state by optimizing γ and β. The initial values of γ and β are randomly selected at initialization, and then the quantum computer is used to perform U (γ,β) operation, and the quantum bits are measured to obtain a classical bit string. According to the measurement result, the expected value of the target resource allocation function is calculated as <H C >. The quantum optimization algorithm updates the parameters γ and β according to the expected value, and repeatedly performs quantum evolution and calculates the expected value until the optimization converges.
[0124] Finally, when the optimization converges, the resulting quantum state corresponds to an approximate solution to the service resource allocation problem. Measuring the final quantum state can obtain a bit sequence x. For example, assuming that there are 3 nodes (i.e., n = 3) in the service undirected graph, and the total number of service resources is 3 (i.e., m = 3), then the length of the final bit sequence should be 9 (n x m = 9). Assuming that the bit sequence x = 010001100; among them, 010 is the subsequence corresponding to node 1, which can be parsed as node 1 allocating service resource 2; 001 is the subsequence corresponding to node 2, which can be parsed as node 2 allocating service resource 1; 100 is the subsequence corresponding to node 3, which can be parsed as node 3 allocating service resource 3.
[0125] In the embodiments of the present application, the way of solving the target resource allocation function by the quantum optimization algorithm can significantly improve the search efficiency of the solution of the target resource allocation function; in this way, compared with the existing scheme, the solution result of the target resource allocation function can be calculated faster, and through the solution result, the target service resource corresponding to each node can be determined, so as to allocate the corresponding target service resource to the resource receiving object represented by each node, thereby effectively improving the allocation efficiency of the service resource. At the same time, in the embodiments of the present application, the way of obtaining the target resource allocation function by sparsifying the constraint penalty coefficient matrix in the initial resource allocation function can effectively reduce the calculation redundancy in the resource allocation function, which is conducive to reducing the calculation complexity when subsequently solving the target resource allocation function by the quantum optimization algorithm, thereby further improving the solution speed of the target resource allocation function, which is conducive to further improving the allocation efficiency of the service resource.
[0126] Based on the above service resource processing scheme and service resource processing system, the embodiments of the present application provide another service resource processing method. Referring to Figure 3 , the flowchart of another service resource processing method provided by the embodiments of the present application is shown. Figure 3 The service resource processing method shown in Figure 2 The server or terminal device in the service resource processing system shown in can execute the service resource processing method. In the embodiments of the present application, the method is executed by the terminal device as an example. In the embodiments of the present application, Figure 3The method shown is extended.
[0127] wherein, Figure 3 The service resource processing method shown can include the following steps S301 to S305:
[0128] S301, constructing a service undirected graph according to an association relationship between a plurality of resource receiving objects.
[0129] In the embodiments of the present application, the specific implementation of step S301 can be referred to step S201, which will not be repeated here.
[0130] S302, constructing an initial resource allocation function based on the plurality of service resources and the service undirected graph.
[0131] In the embodiments of the present application, the specific implementation of step S302 can be referred to step S202, which will not be repeated here.
[0132] S303, performing sparse processing on the constraint penalty coefficient matrix to obtain a sparse coefficient matrix, and updating the initial resource allocation function based on the sparse coefficient matrix to obtain a target resource allocation function.
[0133] In the embodiments of the present application, the specific implementation of step S303 can be referred to step S203, which will not be repeated here.
[0134] S304, calling a quantum optimization algorithm to solve the target resource allocation function to obtain a target service resource corresponding to each node in the service undirected graph, so as to allocate the target service resource to the resource receiving object represented by each node.
[0135] In the embodiments of the present application, the specific implementation of step S304 can be referred to the specific implementation in step S204, which will not be repeated here.
[0136] S305, if it is detected that the service undirected graph exists update, updating the target resource allocation function based on the updated service undirected graph, and solving the updated target resource allocation function to allocate service resources based on the solving result.
[0137] In the embodiments of the present application, the updating manner of the service undirected graph includes at least one of the following: adding a node, deleting a node, adding an edge, and deleting an edge. The adding of a node also involves adding edges corresponding to the added node in the service undirected graph, and the deleting of a node also involves removing edges corresponding to the deleted node in the service undirected graph. Specifically, the adding of a node in the service undirected graph is usually detecting an added resource receiving object, and the deleting of a node is usually detecting a deleted resource receiving object; the adding of an edge in the service undirected graph is usually detecting an added association relationship between two resource receiving objects, and the deleting of an edge is usually detecting a deleted association relationship between two resource receiving objects.
[0138] Therefore, if it is detected that a first node is added in the service undirected graph and edges corresponding to the first node are added, a second node is deleted in the service undirected graph and edges connected to the second node are deleted, an edge is added in the service undirected graph, or an edge is deleted in the service undirected graph, it is determined that the service undirected graph is updated.
[0139] The manner of updating the target resource allocation function based on the updated service undirected graph is different due to the different updating manners of the service undirected graph.
[0140] In some embodiments, if it is detected that a first node is added in the service undirected graph and edges corresponding to the first node are added, the specific manner of updating the target resource allocation function based on the updated service undirected graph can include: obtaining a node penalty term and an edge penalty term corresponding to the first node in the updated service undirected graph based on the plurality of service resources and the updated service undirected graph; and updating the target resource allocation function according to the node penalty term and the edge penalty term corresponding to the first node, to obtain an updated target resource allocation function.
[0141] Optionally, the specific process of updating the target resource allocation function according to the node penalty term and the edge penalty term corresponding to the first node can include: obtaining a first constraint penalty coefficient based on the node penalty term corresponding to the first node and a node constraint penalty weight, and obtaining a second constraint penalty coefficient based on the edge penalty term corresponding to the first node and an edge constraint penalty weight; and then adding the first constraint penalty coefficient and the second constraint penalty coefficient as elements in a sparse coefficient matrix contained in the target resource allocation function, to update the target resource allocation function.
[0142] Specifically, the process of adding the first constraint penalty coefficient and the second constraint penalty coefficient as elements in the sparse coefficient matrix contained in the target resource allocation function can include: a row of element positions and a column of element positions corresponding to the first node can be added first in the sparse coefficient matrix contained in the target resource allocation function; then, the first constraint penalty coefficient is filled into the element positions corresponding to both nodes being the first node, and the second constraint penalty coefficient is filled into the element positions corresponding to the two nodes including the first node and the adjacent node of the first node.
[0143] Further, a quantum optimization algorithm can be called to solve the updated target resource allocation function, and based on the solving result, the service resources are allocated. The solving result includes the service resources corresponding to each node in the updated service undirected graph, so as to allocate the service resources to the resource receiving objects represented by each node.
[0144] In a specific implementation, when a new node i new is added in the service undirected graph, two aspects of the target resource allocation function need to be updated: the node constraint part and the edge constraint part. Since the total number of allocatable service resources m is fixed, the newly added node still needs to select one service resource from the m service resources, therefore, the corresponding node constraint part needs to be added, and a node i new corresponding node penalty term Q node-new1 is added, the formula of which is as follows:
[0145]
[0146] wherein, is a binary variable, indicating whether the node i new selects the color k.
[0147] The above formula ensures that the node i new will be allocated only one service resource. Since the target resource allocation function contains a sparse matrix, only a row and a column related to i new need to be added in the sparse matrix, and other element positions remain unchanged, and the constraint penalty coefficient obtained based on the node penalty term Q node-new1 is filled into the corresponding element positions.
[0148] Then, the edge constraint part is updated. If the node i new is newly connected with other nodes v i (i∈V), the corresponding edge constraint part needs to be added to ensure that the service resource allocated to the node i new is not the same as the service resource allocated to its adjacent node, and the calculation formula of the edge penalty term Q new corresponding to the node i node-new2 is as follows:
[0149]
[0150] wherein, is a binary variable indicating whether the adjacent node v new of node i i has chosen color k. When a new node is connected to an existing node, the newly added edge constraint part can be used to avoid them being assigned the same color. Specifically, for each edge connecting the new node i new and the existing node v i , the edge constraint realizes the punishment of service resource selection conflict by detecting the common selection of them in all candidate service resources. The edge penalty term ensures that when the same service resource is selected by both nodes, the corresponding term value is 1, so as to be punished in the target resource allocation function; otherwise, if the same service resource is not selected, the product is 0, and no punishment is generated. By summing the products of all colors, the edge penalty term effectively quantifies the degree of service resource selection conflict between two adjacent nodes, and is used as a constraint condition in the optimization process to prompt the solver to avoid assigning the same service resource to adjacent nodes.
[0151] For example, please refer to the accompanying drawings, which show a schematic diagram of the change of the service resource allocation scheme after a new node is added. As shown in the drawings, the service undirected graph 401 contains nodes 1 to 4; wherein, the different colors of the nodes represent different service resources assigned to the nodes. In the service undirected graph 401, the service resources assigned to nodes 1 and 4 are the same (in the drawings, the same gray color is used to fill nodes 1 and 4 to represent that the service resources assigned to nodes 1 and 4 are the same), the service resource assigned to node 2 is different from those of other nodes (in the drawings, the color of node 2 is white, which is different from those of other nodes), and the service resource assigned to node 3 is also different from those of other nodes (in the drawings, the color of node 3 is dark gray, which is different from those of other nodes). Figure 4 Figure 4 Then, as shown in the drawings, a new node 5 is added to the service undirected graph 401, and since the resource receiving object represented by node 5 is associated with the resource receiving object represented by node 2, an edge can be established between node 5 and node 2; similarly, an edge can be established between node 5 and node 3.
[0152] Figure 4
[0153] Then, the node penalty term and the edge penalty term corresponding to the node 5 are constructed according to the above scheme, and the target resource allocation function is updated according to the node penalty term and the edge penalty term corresponding to the node 5; finally, a quantum optimization algorithm is called to solve the updated target resource allocation function, and the obtained solution result is shown in the service undirected graph 402. In the service undirected graph 401, the service resources allocated to the nodes 1, 4 and 5 are the same, and the service resources allocated to the nodes 2 and 4 are the same.
[0154] In some embodiments, if it is detected that the second node is deleted in the service undirected graph and the edge connected to the second node is deleted, the specific way of updating the target resource allocation function based on the updated service undirected graph can include: updating the target resource allocation function based on the node penalty term and the edge penalty term corresponding to the second node to obtain the updated target resource allocation function.
[0155] Specifically, the updating process of the target resource allocation function can include: the binary variable corresponding to the second node in the target resource allocation function can be deleted, and the row and column in which the element obtained based on the node penalty term corresponding to the second node in the sparsification matrix of the target resource allocation function is deleted, and the row and column in which the element obtained based on the edge penalty term corresponding to the second node in the sparsification matrix of the target resource allocation function is deleted.
[0156] Further, a quantum optimization algorithm can be called to solve the updated target resource allocation function, and the service resources are allocated based on the solution result.
[0157] In a specific implementation, when the node i remove is deleted, the part related to the node in the target resource allocation function needs to be removed, which specifically involves the node constraint part and the edge constraint part. For the node constraint part, the element obtained based on the node penalty term Q remove of the node i node-remove1 needs to be removed from the node constraint part. The expression formula of Q nide-remove1 is as follows:
[0158]
[0159] In the sparsification matrix, deleting the element obtained based on the node penalty term of the node means deleting the row and column related to the node. Since most of the elements in the row and column related to the node are zero, only these rows and columns need to be removed.
[0160] And for the edge constraint part, all the elements obtained based on the edge penalty term Q remove of the node i edge-remove2 need to be removed. The expression formula of Q edge-remove2 is as follows:
[0161]
[0162] For each edge (v remove ,v i ) related to node i remove , it is necessary to remove these elements in the sparse matrix.
[0163] For example, the business resource allocation scheme after the deletion of node 5 is shown in FIG. 4B. In the business undirected graph 401, node 5 and its corresponding edges are deleted. Then, the target resource allocation function is updated according to the above scheme about the deletion of a node. Finally, the quantum optimization algorithm is called to solve the updated target resource allocation function, and the obtained solution is shown in the business undirected graph 403. In the business undirected graph 403, the business resource allocated to node 1 and node 3 is the same, the business resource allocated to node 2 is different from that allocated to any other node, and the business resource allocated to node 4 is also different from that allocated to any other node. Figure 4 Figure 5 For example, the business resource allocation scheme after the deletion of node 5 is shown in FIG. 4B. In the business undirected graph 401, node 5 and its corresponding edges are deleted. Then, the target resource allocation function is updated according to the above scheme about the deletion of a node. Finally, the quantum optimization algorithm is called to solve the updated target resource allocation function, and the obtained solution is shown in the business undirected graph 403. In the business undirected graph 403, the business resource allocated to node 1 and node 3 is the same, the business resource allocated to node 2 is different from that allocated to any other node, and the business resource allocated to node 4 is also different from that allocated to any other node.
[0164] It should be noted that, since the same business undirected graph can have multiple optimal solutions, the business resource allocation scheme represented by the business undirected graph 403 is different from the business resource allocation scheme represented by the business undirected graph 401.
[0165] In some embodiments, if it is detected that a new edge is added in the business undirected graph, the specific way of updating the target resource allocation function based on the updated business undirected graph can include: updating the target resource allocation function based on the edge penalty term corresponding to the two associated nodes to obtain the updated target resource allocation function.
[0166] Specifically, the updating process of the target resource allocation function can include: obtaining a third constraint penalty coefficient based on the edge penalty term corresponding to the two associated nodes and the edge constraint penalty weight; and then adding the third constraint penalty coefficient as an element in the sparse coefficient matrix contained in the target resource allocation function to update the target resource allocation function.
[0167] Specifically, the process of adding the third constraint penalty coefficient as an element in the sparse coefficient matrix contained in the target resource allocation function is described in the above specific embodiments about the first constraint penalty coefficient and the second constraint penalty coefficient, which will not be repeated here.
[0168] Further, the quantum optimization algorithm can be called to solve the updated target resource allocation function, and the business resource can be allocated based on the solution.
[0169] In the specific implementation, when a new edge (v i ,v j When the two associated nodes of this new edge are node i and node j, we need to update the edge constraint part to ensure that the two nodes of this new edge are allocated different business resources. The addition of a new edge will require the addition of a new edge penalty term to the edge constraint part. i ,v j The edge penalty term Q corresponding to nodes i and j of ) edge-add The calculation formula is as follows:
[0170]
[0171] Since the sparsification matrix only retains non-zero elements, we only need to add a new edge (v) to the sparsification matrix. i ,v j The non-zero elements related to (i,j). This is equivalent to inserting a new pair of (i,j) row and column elements into the sparse matrix.
[0172] For example, accept Figure 5 For an example, please see the appendix. Figure 6 This diagram illustrates a change when adding an edge to an undirected business graph. An edge is added between node 1 and node 4 in the undirected business graph 403. Then, the target resource allocation function is updated according to the above-described scheme for adding the edge; finally, the quantum optimization algorithm is called to solve the updated target resource allocation function, and the solution result is shown below. Figure 6 The business undirected graph 404 is shown in the figure.
[0173] In some embodiments, if it is detected that an edge has been deleted in the business undirected graph, the specific method for updating the target resource allocation function based on the updated business undirected graph may include: updating the target resource allocation function based on the target edge penalty term to obtain the updated target resource allocation function.
[0174] Specifically, the update process of the target resource allocation function may include: deleting the rows and columns containing the elements obtained based on the target edge penalty term in the sparsification matrix of the target resource allocation function.
[0175] Furthermore, a quantum optimization algorithm can be invoked to solve the updated target resource allocation function, and business resources can be allocated based on the solution results.
[0176] In the specific implementation, when deleting an edge (v) i ,v j When deleting an edge (v), the corresponding edge penalty term needs to be removed from the edge constraint part; connect the deleted edge (v) i ,v j The edge penalty term Q corresponding to node i and node j of ) edge-remove The calculation formula is as follows:
[0177]
[0178] In the sparsified matrix, remove edges (v) i ,v j The related elements mean that the corresponding row and column elements are deleted from the sparse matrix.
[0179] For example, accept Figure 6 For an example, please see the appendix. Figure 7 This diagram illustrates a change in the process of deleting an edge in a business undirected graph. The edge between node 1 and node 2 is deleted in business undirected graph 404. Then, the target resource allocation function is updated according to the edge deletion scheme described above. Finally, the quantum optimization algorithm is called to solve the updated target resource allocation function, and the solution result is shown below. Figure 7 The undirected business graph 405 is shown in the figure. In the undirected business graph 405, nodes 1 and 2 are assigned the same business resources, node 3 is assigned different business resources from all other nodes, and node 4 is assigned different business resources from all other nodes.
[0180] In summary, when the graph structure of the business undirected graph changes (such as adding or deleting nodes, adding or deleting edges), this embodiment uses a dynamic graph adjustment strategy to update the target resource allocation function in real time. This ensures that the target resource allocation function used for subsequent quantum optimization calculations can quickly adapt to the dynamic changes in the graph. Furthermore, the update of the target resource allocation function in this embodiment only involves adding and deleting some elements in the sparse matrix, and adding and deleting binary variables for some nodes. This effectively avoids the large amount of computational resources and time consumed by calculating a new target resource allocation function from scratch, which helps to shorten the time for obtaining the corresponding solution results when the business undirected graph changes, thereby greatly improving the efficiency of business resource allocation.
[0181] It is easy to see that the advantage of this embodiment is that by combining dynamic graph adjustment with matrix sparsity, the computation path can be dynamically optimized during quantum computing, reducing redundant computations, and effectively utilizing the sparsity of the graph to reduce computational complexity, thereby significantly improving the performance of quantum optimization algorithms in business resource allocation problems.
[0182] In the embodiments of the present application, by updating the target resource allocation function in real time based on the updated service undirected graph, it can be ensured that the target resource allocation function used for subsequent quantum optimization calculation can quickly adapt to the dynamic changes of the graph; and the updating of the target resource allocation function can effectively avoid the process of calculating a new target resource allocation function from scratch based on the updated service undirected graph, which consumes a large amount of computing resources and a large amount of computing time, is beneficial to shorten the acquisition time of the corresponding solution result when the service undirected graph changes, thereby being beneficial to accurately and quickly obtaining the solution result in the scenario where the resource receiving object and its associated relationship change, and thereby greatly improving the allocation efficiency of the service resource.
[0183] Based on the above description of the service resource processing method, the present application further discloses a service resource processing device. The service resource processing device can run a computer program (including program code) in one of the above-mentioned computer devices. The service resource processing device can perform the service resource processing method as shown in Figure 2 and Figure 3 , please refer to Figure 8 , the service resource processing device can at least include a graph construction unit 801, a function construction unit 802, a function processing unit 803 and an algorithm calling unit 804, wherein:
[0184] The graph construction unit 801 is configured to construct a service undirected graph according to the associated relationship between a plurality of resource receiving objects; the nodes in the service undirected graph represent the resource receiving objects, and the edges in the service undirected graph represent the associated relationship;
[0185] The function construction unit 802 is configured to construct an initial resource allocation function based on a plurality of service resources and the service undirected graph; wherein the initial resource allocation function contains a constraint penalty coefficient matrix, and each element in the constraint penalty coefficient matrix represents a constraint penalty coefficient between two nodes allocated with service resources;
[0186] The function processing unit 803 is configured to perform sparse processing on the constraint penalty coefficient matrix to obtain a sparse coefficient matrix, and update the initial resource allocation function based on the sparse coefficient matrix to obtain a target resource allocation function;
[0187] The algorithm calling unit 804 is configured to call a quantum optimization algorithm to solve the target resource allocation function, and obtain the target service resource corresponding to each node in the service undirected graph, so as to allocate the target service resource to the resource receiving object represented by each node.
[0188] In an implementation, the function processing unit 803, when performing the sparsification on the constraint penalty coefficient matrix to obtain the sparse coefficient matrix, can also be configured to perform: obtaining target elements from the constraint penalty coefficient matrix; wherein the target elements include elements in the constraint penalty coefficient matrix corresponding to two nodes being adjacent nodes, and elements corresponding to two nodes being the same node and corresponding allocated service resources being the same service resource; and setting other elements in the constraint penalty coefficient matrix except the target elements to zero to obtain the sparse coefficient matrix.
[0189] In another implementation, the function construction unit 802, when constructing the initial resource allocation function based on the plurality of service resources and the service undirected graph, can be specifically configured to perform: constructing, based on each node in the plurality of service resources and the service undirected graph, a node penalty term corresponding to each node, and an edge penalty term corresponding to adjacent nodes connected by an edge in the service undirected graph; and constructing the initial resource allocation function according to the node penalty term corresponding to each node and a node constraint penalty weight, and the edge penalty term corresponding to the adjacent nodes and an edge constraint penalty weight.
[0190] In yet another implementation, the function construction unit 802, when constructing, based on each node in the plurality of service resources and the service undirected graph, a node penalty term corresponding to each node, and an edge penalty term corresponding to adjacent nodes connected by an edge in the service undirected graph, can be specifically configured to perform: obtaining a binary variable corresponding to each node in the service undirected graph; wherein the binary variable represents allocation of the plurality of service resources in each node; constructing, under a node constraint condition representing that a node is allocated a service resource, the node penalty term corresponding to each node according to the binary variable corresponding to each node; and constructing, under an edge constraint condition representing that adjacent nodes are allocated different service resources, the edge penalty term corresponding to the adjacent nodes according to the binary variable corresponding to the adjacent nodes.
[0191] In yet another implementation, the function construction unit 802, when constructing the initial resource allocation function according to the node penalty term corresponding to each node and a node constraint penalty weight, and the edge penalty term corresponding to the adjacent nodes and an edge constraint penalty weight, can be specifically configured to perform: obtaining a constraint penalty coefficient corresponding to each node based on the node penalty term corresponding to each node and the node constraint penalty weight; obtaining a constraint penalty coefficient corresponding to the adjacent nodes based on the edge penalty term corresponding to the adjacent nodes and the edge constraint penalty weight; and constructing a constraint penalty coefficient matrix according to the constraint penalty coefficient corresponding to each node and the constraint penalty coefficient corresponding to the adjacent nodes, to generate the initial resource allocation function based on the constraint penalty coefficient matrix.
[0192] In yet another implementation, the function processing unit 803 can also be configured to perform: adding the first node and the edge corresponding to the first node in the service undirected graph to obtain an updated undirected graph; obtaining a node penalty term and an edge penalty term corresponding to the first node in the updated undirected graph based on the plurality of service resources and the updated service undirected graph; and updating the target resource allocation function according to the node penalty term and the edge penalty term corresponding to the first node to obtain an updated target resource allocation function. The algorithm calling unit 804 can also be configured to perform: calling a quantum optimization algorithm to solve the updated target resource allocation function, and allocating the service resources based on a solution result.
[0193] In yet another implementation, when the function processing unit 803 updates the target resource allocation function according to the node penalty term and the edge penalty term corresponding to the first node, the function processing unit 803 can be specifically configured to perform: obtaining a first constraint penalty coefficient based on the node penalty term corresponding to the first node and a node constraint penalty weight, and obtaining a second constraint penalty coefficient based on the edge penalty term corresponding to the first node and an edge constraint penalty weight; and adding the first constraint penalty coefficient and the second constraint penalty coefficient as elements in a sparse coefficient matrix contained in the target resource allocation function to update the target resource allocation function.
[0194] In yet another implementation, the function processing unit 803 can also be configured to perform: deleting the second node and the edge connecting the second node in the service undirected graph; and updating the target resource allocation function based on a node penalty term and an edge penalty term corresponding to the second node to obtain an updated target resource allocation function. The algorithm calling unit 804 can also be configured to perform: calling a quantum optimization algorithm to solve the updated target resource allocation function, and allocating the service resources based on a solution result.
[0195] In yet another implementation, the function processing unit 803 can also be configured to perform: adding an edge in the service undirected graph, and obtaining two associated nodes connected by the added edge to construct edge penalty terms corresponding to the two associated nodes; and updating the target resource allocation function based on the edge penalty terms corresponding to the two associated nodes to obtain an updated target resource allocation function. The algorithm calling unit 804 can also be configured to perform: calling a quantum optimization algorithm to solve the updated target resource allocation function, and allocating the service resources based on a solution result.
[0196] In yet another implementation, the function processing unit 803 can also be configured to perform: deleting an edge in the service undirected graph, and obtaining a target edge penalty term corresponding to a node pair connected by the deleted edge; updating the target resource allocation function based on the target edge penalty term, to obtain an updated target resource allocation function. The algorithm calling unit 804 can also be configured to perform: calling a quantum optimization algorithm, solving the updated target resource allocation function, and allocating service resources based on a solving result.
[0197] In yet another implementation, when the algorithm calling unit 804 calls the quantum optimization algorithm to solve the target resource allocation function to obtain target service resources corresponding to each node in the service undirected graph, the algorithm calling unit 804 can be specifically configured to: convert the target resource allocation function into a quantum Hamiltonian; call the quantum optimization algorithm to perform quantum optimization calculation on the quantum Hamiltonian to obtain a bit sequence; and parse a subsequence corresponding to each node in the bit sequence to obtain the target service resources allocated to each node.
[0198] According to an embodiment of the present application, Figure 2 and Figure 3 Each step involved in the method shown in FIG. 10 can be performed by each unit in the service resource processing apparatus shown in FIG. 11. For example, Figure 8 Step S301 shown in FIG. 10 can be performed by the graph construction unit 801 in the service resource processing apparatus shown in FIG. 11; step S302 can be performed by the function construction unit 802 in the service resource processing apparatus shown in FIG. 11; step S303 can be performed by the function processing unit 803 in the service resource processing apparatus shown in FIG. 11; and steps S304 to S305 can be performed by the algorithm calling unit 804 in the service resource processing apparatus shown in FIG. 11. Figure 3 Figure 8 Figure 8 Figure 8 Figure 8
[0199] According to another embodiment of the present application, Figure 8 Each unit in the service resource processing apparatus shown in FIG. 11 is divided based on logical functions, and each unit can be combined into one or several other units or can be further split into multiple units with smaller functions to achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. In other embodiments of the present application, the service resource processing apparatus can also include other units, and these functions can also be assisted by other units in actual application, and can be achieved by cooperation of multiple units.
[0200] According to another embodiment of this application, a general-purpose computing device, such as a computer device, including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), can run an application capable of performing tasks such as... Figure 2 or Figure 3 The computer program (including program code) involved in each step of the method shown is used to construct, for example... Figure 8 The present invention describes a business resource processing apparatus and a business resource processing method for implementing embodiments of this application. A computer program may be recorded on, for example, a computer storage medium, loaded onto the aforementioned computer device via the computer storage medium, and run therein.
[0201] In this embodiment, solving the target resource allocation function using a quantum optimization algorithm significantly improves the search efficiency for solutions. Compared to existing methods, this approach yields a faster solution, allowing for the determination of target service resources for each node. This enables the allocation of corresponding target service resources to the resource receiving objects represented by each node, thereby effectively improving the efficiency of service resource allocation. Furthermore, by sparsifying the constraint penalty coefficient matrix in the initial resource allocation function to obtain the target resource allocation function, this embodiment effectively reduces computational redundancy within the resource allocation function. This reduces the computational complexity of subsequent quantum optimization algorithm-based solutions, further increasing the solution speed and improving the efficiency of service resource allocation.
[0202] Based on the above method and apparatus embodiments, this application also provides an electronic device. See also Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 The electronic device shown may include at least a processor 901, an input interface 902, an output interface 903, and a computer storage medium 904. The processor 901, input interface 902, output interface 903, and computer storage medium 904 may be connected via a bus or other means.
[0203] The computer storage medium 904 can be stored in the memory of the electronic device, and is used to store a computer program including program instructions. The processor 901 is used to execute the program instructions stored in the computer storage medium 904. The processor 901 (or CPU (Central Processing Unit, central processor)) is the computing core and control core of the electronic device, and is adapted to implement one or more instructions, and is specifically adapted to load and execute one or more instructions to implement the above-mentioned service resource processing method flow or corresponding function.
[0204] The computer storage medium (Memory) provided by the embodiment of the present application is a memory device in the electronic device, and is used to store programs and data. It can be understood that the computer storage medium herein can include the built-in storage medium in the terminal, and of course can also include the expansion storage medium supported by the terminal. The computer storage medium provides a storage space, and the storage space stores the operating system of the terminal. In addition, one or more instructions adapted to be loaded and executed by the processor 901 are also stored in the storage space, and the instructions can be one or more computer programs (including program codes). It should be noted that the computer storage medium herein can be a high-speed random access memory (RAM) memory, or a non-volatile memory such as at least one disk memory; and optionally, at least one computer storage medium located away from the aforementioned processor.
[0205] In one embodiment, one or more instructions stored in the computer storage medium can be loaded and executed by the processor 901 to implement the corresponding steps of the method in the above-mentioned service resource processing method embodiments of Figure 2 and Figure 3 , and in the specific implementation, the one or more instructions in the computer storage medium are loaded and executed by the processor 901 to implement the steps in the service resource processing method embodiments as shown in Figure 2 and Figure 3 .
[0206] The embodiment of the present application provides a computer program product or computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the electronic device execute the above-mentioned service resource processing method embodiments as shown in Figure 2 and Figure 3The method embodiment is shown. Wherein, the computer readable storage medium can be a magnetic disk, an optical disk, a Read-Only Memory (ROM) or a Random Access Memory (RAM) and the like.
[0207] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims. In addition, the present application does not limit the execution order of each step in the specific implementation.
Claims
1. A method for processing business resources, characterized in that, The method includes: A business undirected graph is constructed based on the association relationships between multiple resource receiving objects; the nodes in the business undirected graph represent the resource receiving objects, and the edges in the business undirected graph represent the association relationships. Based on multiple business resources and the business undirected graph, an initial resource allocation function is constructed; wherein, the initial resource allocation function contains a constraint penalty coefficient matrix, and each element in the constraint penalty coefficient matrix represents the constraint penalty coefficient between two nodes of the allocated business resources; The constraint penalty coefficient matrix is sparsified to obtain a sparse coefficient matrix, and the initial resource allocation function is updated based on the sparse coefficient matrix to obtain the target resource allocation function. The quantum optimization algorithm is invoked to solve the target resource allocation function, thereby obtaining the target service resources corresponding to each node in the undirected service graph, and then allocating the target service resources to the resource receiving objects represented by each node.
2. The method according to claim 1, characterized in that, The process of sparsifying the constraint penalty coefficient matrix to obtain a sparse coefficient matrix includes: Obtain the target element from the constraint penalty coefficient matrix; wherein, the target element includes elements in the constraint penalty coefficient matrix whose corresponding two nodes are adjacent nodes, and elements whose corresponding two nodes are the same node and whose corresponding allocated business resources are the same business resources; Set all elements in the constraint penalty coefficient matrix except the target element to zero to obtain the sparse coefficient matrix.
3. The method according to claim 1, characterized in that, The initial resource allocation function, constructed based on multiple business resources and the undirected business graph, includes: Based on the multiple business resources and each node in the business undirected graph, construct the node penalty term corresponding to each node, and the edge penalty term corresponding to the adjacent nodes connected by edges in the business undirected graph; The initial resource allocation function is constructed based on the node penalty terms and node constraint penalty weights corresponding to each node, as well as the edge penalty terms and edge constraint penalty weights corresponding to the adjacent nodes.
4. The method according to claim 3, characterized in that, The step of constructing node penalty terms corresponding to each node and edge penalty terms corresponding to adjacent nodes connected by edges in the undirected business graph, based on the multiple business resources and each node in the undirected business graph, includes: Obtain the binary variables corresponding to each node in the undirected graph of the services; wherein, the binary variables represent the allocation of the multiple services resources in each node; Under the node constraint that represents a node being allocated a business resource, a node penalty term is constructed for each node based on the binary variables corresponding to each node. Under the edge constraint that represents the adjacent nodes being allocated different service resources, the edge penalty term corresponding to the adjacent nodes is constructed based on the binary variables corresponding to the adjacent nodes.
5. The method according to claim 3, characterized in that, The step of constructing the initial resource allocation function based on the node penalty term and node constraint penalty weight corresponding to each node, and the edge penalty term and edge constraint penalty weight corresponding to the adjacent nodes, includes: Based on the node penalty term and the node constraint penalty weight corresponding to each node, the constraint penalty coefficient corresponding to each node is obtained; Based on the edge penalty term corresponding to the adjacent node and the edge constraint penalty weight, the constraint penalty coefficient corresponding to the adjacent node is obtained; Based on the constraint penalty coefficients corresponding to each node and the constraint penalty coefficients corresponding to the adjacent nodes, the constraint penalty coefficient matrix is constructed to generate the initial resource allocation function.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Add a first node and the edge corresponding to the first node to the undirected graph of the business to obtain the updated undirected graph; Based on the multiple business resources and the updated business undirected graph, obtain the node penalty term and edge penalty term corresponding to the first node in the updated undirected graph; The target resource allocation function is updated based on the node penalty term and edge penalty term corresponding to the first node to obtain the updated target resource allocation function. The quantum optimization algorithm is invoked to solve the updated target resource allocation function, and business resources are allocated based on the solution results.
7. The method according to claim 6, characterized in that, The step of updating the target resource allocation function based on the node penalty term and edge penalty term corresponding to the first node includes: Based on the node penalty term corresponding to the first node and the node constraint penalty weight, a first constraint penalty coefficient is obtained, and based on the edge penalty term corresponding to the first node and the edge constraint penalty weight, a second constraint penalty coefficient is obtained. The first constraint penalty coefficient and the second constraint penalty coefficient are added as elements in the sparse coefficient matrix contained in the target resource allocation function to update the target resource allocation function.
8. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Delete the second node and the edge connecting the second node in the undirected graph of the business; Based on the node penalty term and edge penalty term corresponding to the second node, the target resource allocation function is updated to obtain the updated target resource allocation function; The quantum optimization algorithm is invoked to solve the updated target resource allocation function, and business resources are allocated based on the solution results.
9. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Add an edge to the undirected graph of the business and obtain the two associated nodes connected by the added edge to construct the edge penalty term corresponding to the two associated nodes; Based on the edge penalty terms corresponding to the two associated nodes, the target resource allocation function is updated to obtain the updated target resource allocation function. The quantum optimization algorithm is invoked to solve the updated target resource allocation function, and business resources are allocated based on the solution results.
10. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Delete an edge in the undirected graph and obtain the target edge penalty term corresponding to the node connected to the deleted edge; Based on the target edge penalty term, the target resource allocation function is updated to obtain the updated target resource allocation function; If the quantum optimization algorithm is invoked, the updated target resource allocation function is solved, and business resources are allocated based on the solution results.
11. The method according to any one of claims 1 to 5, characterized in that, The quantum optimization algorithm is invoked to solve the target resource allocation function, obtaining the target service resources corresponding to each node in the undirected service graph, including: The target resource allocation function is transformed into a quantum Hamiltonian; The quantum optimization algorithm is invoked to perform quantum optimization calculations on the quantum Hamiltonian to obtain a bit sequence; The subsequences corresponding to each node in the bit sequence are parsed to obtain the target service resources allocated to each node.
12. A business resource processing device, characterized in that, The device includes a graph construction unit, a function construction unit, a function processing unit, and an algorithm calling unit, wherein: The graph construction unit is used to construct a business undirected graph based on the association relationships between multiple resource receiving objects; the nodes in the business undirected graph represent the resource receiving objects, and the edges in the business undirected graph represent the association relationships. The function construction unit is used to construct an initial resource allocation function based on multiple business resources and the business undirected graph; wherein, the initial resource allocation function contains a constraint penalty coefficient matrix, and each element in the constraint penalty coefficient matrix represents the constraint penalty coefficient between two nodes of the allocated business resources; The function processing unit is used to perform sparsification processing on the constraint penalty coefficient matrix to obtain a sparse coefficient matrix, and update the initial resource allocation function based on the sparse coefficient matrix to obtain the target resource allocation function; The algorithm invocation unit is used to invoke the quantum optimization algorithm to solve the target resource allocation function, obtain the target service resources corresponding to each node in the service undirected graph, and allocate the target service resources to the resource receiving objects represented by each node.
13. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the business resource processing method as described in any one of claims 1 to 11.
14. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the business resource processing method as described in any one of claims 1 to 11.
15. A computer program product, characterized in that, The computer program product includes a computer program adapted to be loaded by a processor and executed as described in any one of claims 1 to 11.