Instruction distribution method, device, equipment, storage medium and program product

By using target bit operations to determine the target execution node in the cloud computing platform, the problem of time-consuming and inefficient instruction distribution in the cloud platform is solved, and more efficient instruction distribution is achieved.

CN115408062BActive Publication Date: 2025-02-14QINGDAO ZHONGKE SHUGUANG TECH SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210948297.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2025-02-14
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

In cloud computing scenarios, since the cloud platform system is composed of a large number of heterogeneous nodes, the instruction distribution is time-consuming and inefficient.

Method used

By obtaining the first value corresponding to the target instruction to be distributed, and performing target bit operations on the first value and the executable instruction value of each execution node, the target execution node that can execute the target instruction is determined, and the target instruction is distributed to This node.

Benefits of technology

It reduces the computational complexity and duration of instruction distribution, improves the efficiency of instruction distribution, and significantly improves performance and efficiency in cloud platforms with massive heterogeneous nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115408062B_ABST
    Figure CN115408062B_ABST
Patent Text Reader

Abstract

The present application relates to an instruction distribution method, device, equipment, storage medium and program product. The method comprises: obtaining a first numerical value corresponding to a target instruction to be distributed; performing target bit operations on the first numerical value and the executable instruction value of each execution node respectively, and obtaining the operation results corresponding to each execution node, the executable instruction value is obtained according to the numerical value corresponding to the instruction that can be executed by the execution node; determining the target execution node that can execute the target instruction from the multiple execution nodes according to the operation results corresponding to each execution node, and distributing the target instruction to the target execution node. The use of this method can reduce the instruction distribution time and improve the instruction distribution efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to an instruction distribution method, apparatus, device, storage medium, and program product. Background Technology

[0002] Today, in cloud computing scenarios, many cloud platform systems are composed of a massive number of heterogeneous nodes. The cloud platform system distributes target instructions to each node so that each node can execute the function corresponding to the target instruction.

[0003] In the prior art, when distributing target instructions, the target instructions are compared with all executable instructions of all nodes to determine whether each node has the conditions to execute the instructions, thereby determining the target node to execute the target instructions.

[0004] However, since cloud platform systems consist of a massive number of heterogeneous nodes, the number of instructions and nodes is enormous. The process of traversing all instructions and nodes to distribute the target instruction is time-consuming and inefficient. Summary of the Invention

[0005] Therefore, it is necessary to provide an instruction distribution method, apparatus, device, storage medium, and program product that can reduce instruction distribution time and improve instruction distribution efficiency in response to the above-mentioned technical problems.

[0006] In a first aspect, this application provides an instruction distribution method for use in a management node of a cloud platform, the cloud platform including a management node and multiple execution nodes, the method comprising:

[0007] Obtain the first value corresponding to the target instruction to be distributed; perform target bit operations on the first value and the executable instruction value of each execution node to obtain the operation result corresponding to each execution node. The executable instruction value is obtained according to the value corresponding to the instruction that the execution node can execute; determine the target execution node that can execute the target instruction from the multiple execution nodes according to the operation result corresponding to each execution node, and distribute the target instruction to the target execution node.

[0008] In this embodiment, since the executable instruction value corresponding to each execution node is obtained based on the numerical value of the instruction that the execution node can execute, and the target instruction is identified by the first numerical value, when distributing the target instruction, it is not necessary to compare the target instruction with the instructions that each execution node can execute. The target execution node that needs to execute the target instruction can be determined from multiple execution nodes simply by performing a target bit operation between the first numerical value corresponding to the target instruction and the executable instruction value corresponding to each execution node. This greatly reduces the computational complexity of instruction distribution, effectively reduces the duration of the instruction distribution process, and greatly increases the efficiency of instruction distribution.

[0009] In one embodiment, all instructions on the cloud platform correspond to values ​​that are powers of 2, and the target bitwise operation is a bitwise AND operation.

[0010] In this embodiment, the characteristics of binary are innovatively utilized, and the numerical values ​​corresponding to each instruction are represented as powers of 2. Thus, for each execution node, the instructions it can execute are represented solely by the executable instruction value. When determining the target execution node, a bitwise AND operation is performed between the first value and the executable instruction value, eliminating the need to match the target instruction with each execution node individually. This effectively reduces the time complexity of the computation process and improves processing efficiency. Furthermore, all instructions that each execution node can execute are represented solely by the executable instruction value, eliminating the need to store the mapping relationship between each execution node and the instruction set, saving storage space and reducing maintenance costs.

[0011] In one embodiment, determining the target execution node capable of executing the target instruction from the plurality of execution nodes based on the calculation results corresponding to each execution node includes: if the calculation result corresponding to a candidate node among the plurality of execution nodes is not 0, then the candidate node is taken as the target execution node.

[0012] In this embodiment, the result can be obtained by simply performing a bitwise AND operation. If the result is not zero, the candidate node can be directly determined as the target execution node. This effectively simplifies the process of determining the target execution node and reduces the amount of computation, thereby improving the distribution efficiency of the target instruction. Especially for cloud platforms with a large number of heterogeneous nodes (tens of thousands or more), the performance and efficiency improvement during distribution and execution is very significant.

[0013] In one embodiment, obtaining the first value corresponding to the target instruction to be distributed includes: searching for the first value corresponding to the target instruction from a preset instruction set database according to the target instruction; wherein the instruction set database contains all distributable instructions of the cloud platform and the values ​​corresponding to each instruction.

[0014] In this embodiment, the first value corresponding to the target instruction is determined from a preset instruction set database. This method is simple and convenient, and provides a foundation for improving the efficiency of the instruction distribution process.

[0015] In one embodiment, the method further includes: after receiving an update request for the first execution node, updating the executable instruction value corresponding to the first execution node in the instruction set database according to the update request.

[0016] In one embodiment, updating the executable instruction value corresponding to the first execution node in the instruction set database according to the update request includes:

[0017] If the update request includes deleting the first instruction from the executable instructions of the first execution node, the value of the executable instruction corresponding to the first execution node is subtracted from the value corresponding to the first instruction to obtain the updated executable instruction value;

[0018] If the update request includes adding a second instruction to the executable instructions of the first execution node, the executable instruction value corresponding to the first execution node is added to the value corresponding to the second instruction to obtain the updated executable instruction value.

[0019] In this embodiment, by receiving update requests and updating the executable instruction values ​​corresponding to the respective execution nodes based on the update requests, the maintenance of executable instructions for each execution node can be achieved simply and efficiently, effectively reducing maintenance costs and improving update efficiency.

[0020] Secondly, this application also provides an instruction distribution method for use in execution nodes of a cloud platform, the cloud platform including a management node and multiple execution nodes, the method comprising:

[0021] The system receives a first value corresponding to the target instruction sent by the management node; performs a target bitwise operation on the first value and the pre-stored executable instruction value to obtain the operation result, which is obtained according to the value corresponding to the instruction that the execution node can execute; and determines whether to execute the target instruction based on the operation result.

[0022] In this embodiment, since the executable instruction value is obtained based on the numerical value corresponding to the instruction that the execution node can execute, and the target instruction is identified by the first numerical value, during the instruction distribution process, the execution node does not need to compare the target instruction with all the executable instructions. Instead, it can determine whether the target instruction needs to be executed simply by performing a target bit operation between the first numerical value and the executable instruction value. This greatly reduces the computational complexity during instruction distribution, effectively reduces the duration of the instruction distribution process, and greatly increases the efficiency of instruction distribution.

[0023] In one embodiment, all instructions on the cloud platform correspond to values ​​that are powers of 2, and the target bitwise operation is a bitwise AND operation.

[0024] In one embodiment, determining whether to execute the target instruction based on the calculation result includes: if the calculation result is not 0, then determining to execute the target instruction.

[0025] In one embodiment, the method further includes: upon receiving an update request, updating the executable instruction value according to the update request; wherein, if the update request includes deleting a first instruction from the executable instructions, updating the executable instruction value according to the update request includes: subtracting the executable instruction value from the value corresponding to the first instruction to obtain an updated executable instruction value; if the update request includes adding a second instruction to the executable instructions, updating the executable instruction value according to the update request includes: adding the executable instruction value to the value corresponding to the second instruction to obtain an updated executable instruction value.

[0026] In one embodiment, after determining that the target instruction will be executed, the method further includes: searching for the target instruction corresponding to the first value from a preset instruction set database, wherein the instruction set database contains instructions executable by the execution node and the values ​​corresponding to each instruction; or sending a query request to the management node, the query request carrying the first value, the query request being used to instruct the management node to return the target instruction.

[0027] In this embodiment, the first value corresponding to the target instruction is determined from a preset instruction set database. This method is simple and convenient to implement and can improve instruction distribution efficiency.

[0028] In one embodiment, after determining that the target instruction should be executed, the method further includes:

[0029] In this embodiment, the execution node obtains the target instruction from the management node, eliminating the need for the execution node to maintain its own instruction set database locally, thus reducing storage and maintenance costs.

[0030] Thirdly, this application also provides an instruction distribution device, which includes:

[0031] The acquisition module is used to acquire the first value corresponding to the target instruction to be distributed;

[0032] The execution module is used to perform target bit operations on the first value and the executable instruction value of each execution node to obtain the operation result corresponding to each execution node. The executable instruction value is obtained according to the value corresponding to the instruction that the execution node can execute.

[0033] The determination module is used to determine the target execution node that can execute the target instruction from the multiple execution nodes according to the calculation results corresponding to each execution node, and to distribute the target instruction to the target execution node.

[0034] In one embodiment, all instructions on the cloud platform correspond to values ​​that are powers of 2, and the target bitwise operation is a bitwise AND operation.

[0035] In one embodiment, the determining module is specifically used to: if the operation result corresponding to the candidate node among the plurality of execution nodes is not 0, then take the candidate node as the target execution node.

[0036] In one embodiment, the acquisition module is specifically used to: search for the first value corresponding to the target instruction from a preset instruction set database according to the target instruction; wherein the instruction set database contains all distributable instructions of the cloud platform and the values ​​corresponding to each instruction.

[0037] In one embodiment, the device further includes:

[0038] The update module is used to update the executable instruction value corresponding to the first execution node in the instruction set database according to the update request after receiving an update request for the first execution node.

[0039] In one embodiment, the update module is specifically configured to: when the update request includes deleting the first instruction from the executable instructions of the first execution node, subtract the value of the executable instruction corresponding to the first execution node from the value corresponding to the first instruction to obtain the updated executable instruction value; when the update request includes adding the second instruction to the executable instructions of the first execution node, add the value of the executable instruction corresponding to the first execution node to the value corresponding to the second instruction to obtain the updated executable instruction value.

[0040] Fourthly, this application also provides an instruction distribution device, which includes:

[0041] The receiving module is used to receive the first value corresponding to the target instruction sent by the management node;

[0042] An execution module is used to perform a target bit operation on the first value and a pre-stored executable instruction value to obtain the operation result. The executable instruction value is obtained according to the value corresponding to the instruction that the execution node can execute.

[0043] The determination module is used to determine whether to execute the target instruction based on the calculation result.

[0044] In one embodiment, all instructions on the cloud platform correspond to values ​​that are powers of 2, and the target bitwise operation is a bitwise AND operation.

[0045] In one embodiment, the determining module is specifically used to: if the result of the operation is not 0, then determine to execute the target instruction.

[0046] In one embodiment, the device further includes:

[0047] An update module is used to update the executable instruction value according to an update request after receiving the update request. Specifically, when the update request includes deleting a first instruction from the executable instructions, the update module is used to subtract the value corresponding to the first instruction from the executable instruction value to obtain the updated executable instruction value. When the update request includes adding a second instruction to the executable instructions, the update module is used to add the value corresponding to the second instruction to the executable instruction value to obtain the updated executable instruction value.

[0048] In one embodiment, the device further includes a lookup module or a sending module:

[0049] The lookup module is used to search for the target instruction corresponding to the first value from a preset instruction set database, wherein the instruction set database contains the instructions that can be executed by the execution node and the values ​​corresponding to each instruction;

[0050] The sending module is used to send a query request to the management node, the query request carrying the first value, and the query request is used to instruct the management node to return the target instruction.

[0051] Fifthly, this application also provides a computer device, including a memory and a processor, the memory storing a computer program, wherein the processor executes the computer program to implement the steps of the method described in any of the first aspects above, or, the processor executes the computer program to implement the steps of the method described in any of the second aspects above.

[0052] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above, or, when executed by a processor, implements the steps of the method described in any one of the second aspects above.

[0053] In a seventh aspect, this application also provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects above, or, when executed by a processor, implements the steps of the method described in any one of the second aspects above.

[0054] In the aforementioned instruction distribution method, apparatus, device, storage medium, and program product, the management node in the cloud platform obtains the first value corresponding to the target instruction to be distributed, and performs target bit operations on the first value and the executable instruction values ​​of each execution node to obtain the operation results corresponding to each execution node. Based on the operation results corresponding to each execution node, the target execution node capable of executing the target instruction can be determined from multiple execution nodes, and the target instruction is distributed to that target execution node. Since the executable instruction value corresponding to each execution node is obtained based on the value corresponding to the instructions that the execution node can execute, and the target instruction is identified by the first value, when distributing the target instruction, it is not necessary to compare the target instruction with all the instructions that each execution node can execute. The target execution node that needs to execute the target instruction can be determined from multiple execution nodes simply by performing target bit operations on the first value corresponding to the target instruction and the executable instruction values ​​corresponding to each execution node. This greatly reduces the computational complexity of instruction distribution, effectively reduces the duration of the instruction distribution process, and significantly increases the efficiency of instruction distribution. Attached Figure Description

[0055] Figure 1 This is a diagram illustrating the application environment of the instruction dispatch method in one embodiment;

[0056] Figure 2 This is a flowchart illustrating an instruction dispatch method in one embodiment;

[0057] Figure 3 This is a schematic diagram of the process for updating the executable instruction value in one embodiment;

[0058] Figure 4 This is a flowchart illustrating the instruction dispatch method in another embodiment;

[0059] Figure 5 This is a schematic diagram of the executable instruction value maintenance process in one embodiment;

[0060] Figure 6 This is a schematic diagram of each node after initialization in one embodiment;

[0061] Figure 7 This is a schematic diagram of a binary instruction set in one embodiment;

[0062] Figure 8 This is a structural block diagram of an instruction distribution device in one embodiment;

[0063] Figure 9 This is a structural block diagram of the instruction distribution device in another embodiment;

[0064] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0066] In cloud computing scenarios, handling instruction distribution to a cloud platform with massive heterogeneous nodes is a frequently encountered technical challenge. In actual production environments, factors such as varying hardware resources of host nodes, the age of the machines, the network environment of the nodes, and the user's usage plans often lead to significant differences in the business instructions that each node can process. To maximize resource utilization, improve the efficiency of business instruction execution, and reduce operational costs, a method for distributing instructions to a cloud platform with massive heterogeneous nodes is needed to solve this problem.

[0067] Current technologies rely on simple traversal to determine if nodes meet the instruction distribution criteria. However, this approach only satisfies the instruction distribution requirements for a limited number of nodes. In cloud platforms with massive heterogeneous environments, it suffers from low execution efficiency and difficulty in improving resource utilization. Specifically, each node maintains an instruction set containing executable instructions. When an instruction needs to be distributed, all instruction and node data must be traversed to determine if each node meets the execution criteria. However, cloud platforms with a vast number of heterogeneous nodes contain a massive number of instructions and nodes, making the process of traversing all instructions and nodes to distribute the target instruction time-consuming and inefficient. In particular, when there are many instructions distributed, it is necessary to traverse the total number of instructions * the number of nodes for each instruction and each node to determine whether each node meets the execution requirements. The computational complexity is: number of instructions * number of nodes * (total number of instructions * number of nodes). When the number of instructions (m) and the number of nodes (n) are on the order of magnitude, the complexity of the entire algorithm m * n2 will also lead to the problem of excessive time in selecting the instruction execution node and low running efficiency.

[0068] In view of this, embodiments of this application provide an instruction distribution method that can be applied to a cloud platform containing management nodes and multiple execution nodes to solve the problems of long processing time and low efficiency in the instruction distribution process.

[0069] The multiple instruction dispatch methods provided in the embodiments of this application can be applied to, for example... Figure 1In the application environment shown, the management node 101 communicates with multiple execution nodes 102. In one implementation environment, the instruction distribution method is implemented with the management node 101 as the execution subject. Specifically, the management node 101 stores each execution node 102 and the executable instruction value corresponding to each execution node 102. After obtaining the first value corresponding to the target instruction to be distributed, the management node 101 performs target bit operations on the first value and the executable instruction value corresponding to each execution node 102 to determine the target execution node from the multiple execution nodes 102, and then distributes the target instruction to the target execution node. In another implementation environment, the instruction distribution method is implemented with the execution node 102 as the execution subject. Specifically, the execution node 102 receives the first value corresponding to the target instruction sent by the management node 101, and performs target bit operations on the first value and the locally stored executable instruction value to determine whether the target instruction needs to be executed. It should be noted that... Figure 1 This example uses only one management node and three execution nodes 102; the number of execution nodes is not specifically limited in this embodiment. The management node 101 and execution nodes 102 can be, but are not limited to, any devices used to build a cloud platform, such as various computers, laptops, servers, switches, routers, hubs, or bridges; they will not be described in detail here. The server can be a standalone server or a server cluster composed of multiple servers.

[0070] The following section will provide a detailed explanation of the different execution entities involved in the instruction dispatch methods.

[0071] In one embodiment, such as Figure 2 As shown, an instruction dispatch method is provided, which is applied to... Figure 1 Taking management node 101 as an example, the following steps are included:

[0072] Step 201: Obtain the first value corresponding to the target instruction to be distributed.

[0073] In this context, a cloud platform, also known as a cloud computing platform, refers to a service that provides computing, networking, and storage capabilities based on hardware and software resources. Currently, many cloud platforms are composed of massive heterogeneous nodes. Heterogeneous nodes refer to nodes within the cloud platform that differ in type, parameters, model, or resource configuration, and are not configured uniformly. Conversely, non-heterogeneous nodes refer to nodes that adhere to a unified standard. The instruction distribution method provided in this application embodiment is mainly used to implement the instruction distribution process for nodes facing a cloud platform composed of massive heterogeneous nodes. The management node refers to any node in the cloud platform that can provide instruction distribution services. The execution node refers to any node in the cloud platform that receives or executes instructions.

[0074] All instructions on the cloud platform are identified by corresponding numerical values. One of the functions of the management node is instruction distribution. In other words, when the management node determines that an instruction needs to be distributed to the corresponding execution node, it sends the instruction to be distributed to that execution node. The instruction to be distributed is the target instruction to be distributed.

[0075] Optionally, the management node may store all instructions in the cloud platform and the corresponding values ​​for each instruction. Therefore, after determining that a target instruction needs to be distributed, a first value corresponding to the target instruction can be obtained, and the target execution node for executing the target instruction can be determined based on this first value.

[0076] Step 202: Perform target bit operations on the first value and the executable instruction value of each execution node to obtain the operation result corresponding to each execution node. The executable instruction value is obtained according to the value corresponding to the instruction that the execution node can execute.

[0077] For a single execution node, all instructions that the node can execute are pre-determined. Based on the numerical values ​​corresponding to each of the instructions that the node can execute, the executable instruction value for that node is determined. Thus, the management node can determine whether an execution node is a target execution node based on this executable instruction value. Optionally, the numerical values ​​corresponding to each of the instructions that the node can execute can be added together to obtain the executable instruction value for that node. In this way, the executable instruction value alone is sufficient to encompass all the information about the instructions that the node can execute.

[0078] Optionally, the management node may store the executable instruction values ​​corresponding to each execution node.

[0079] After obtaining the first value, the management node performs target bit operations on the first value and the executable instruction value corresponding to each execution node to obtain the operation result corresponding to each execution node, and determines the target execution node that needs to execute the target instruction based on the operation result.

[0080] Bitwise operations directly manipulate the binary bits of an integer in memory, with the target bitwise operation being a bitwise operation of a preset type.

[0081] Optionally, the instructions, the corresponding values ​​of each instruction, or the executable instruction values ​​corresponding to each execution node in the cloud platform can also be stored in other nodes. The management node obtains the instructions, the corresponding values ​​of each instruction, or the executable instruction values ​​corresponding to each execution node by sending a query request. This application embodiment does not specifically limit this, as long as the management node can obtain the required data.

[0082] Step 203: Based on the calculation results corresponding to each execution node, determine the target execution node that can execute the target instruction from the multiple execution nodes, and distribute the target instruction to the target execution node.

[0083] Specifically, the result of the operation on each execution node obtained by performing the target bit operation indicates whether the corresponding execution node is the target execution node. After determining the target execution node, the management node can obtain the target instruction corresponding to the first value and send the target instruction to the target execution node, so that the target execution node can execute the target instruction upon receiving it, thus realizing the target instruction distribution process.

[0084] Optionally, whether an execution node is a target execution node can be determined based on whether the calculation result corresponding to each execution node is a preset calculation value.

[0085] Optionally, in a real production environment, the number of execution nodes for this target can be one or more.

[0086] In the aforementioned instruction distribution method, the management node in the cloud platform obtains the first value corresponding to the target instruction to be distributed, and performs target bitwise operations on the first value and the executable instruction values ​​of each execution node to obtain the operation results corresponding to each execution node. Based on the operation results corresponding to each execution node, the target execution node capable of executing the target instruction can be determined from multiple execution nodes, and the target instruction is distributed to that target execution node. Since the executable instruction value corresponding to each execution node is obtained from the values ​​corresponding to the instructions that the execution node can execute, and the target instruction is identified by the first value, it is not necessary to compare the target instruction with all the instructions that each execution node can execute when distributing the target instruction. The target execution node that needs to execute the target instruction can be determined from multiple execution nodes simply by performing target bitwise operations on the first value corresponding to the target instruction and the executable instruction values ​​corresponding to each execution node. This greatly reduces the computational complexity of instruction distribution, effectively reduces the duration of the instruction distribution process, and significantly increases the efficiency of instruction distribution.

[0087] In one embodiment, all instructions on the cloud platform correspond to values ​​that are powers of 2, and the target bitwise operation is a bitwise AND operation.

[0088] Specifically, when a computer performs numerical operations, regardless of the type of operation, it automatically converts the numerical value to binary form for the operation. Based on this characteristic, all instructions on this cloud platform can correspond to numerical values ​​that are powers of 2, and the powers of the values ​​for each instruction are different. Therefore, based on the characteristics of binary, in the binary value of each instruction, there is exactly one bit with a value of 1, and the bit with the value of 1 is different for each instruction. For example, for instruction 0, its corresponding numerical value is 1, i.e., 2. 0 The binary value corresponding to instruction 0 is 0000000000001; for instruction 1, the corresponding value is 2, i.e., 2. 1 The binary value corresponding to instruction 1 is 0000000000010; for instruction 4, the corresponding value is 16, which is 2. 4 Instruction 4 corresponds to the binary value 0000000010000; for instruction 7, the corresponding value is 128, or 2. 7 The binary value corresponding to instruction 7 is 0000010000000.

[0089] As mentioned above, the executable instruction value of each execution node can be obtained by adding the values ​​of all the instructions it can execute. For example, for execution node 2, the instructions it can execute include instruction 0, instruction 1, and instruction 7, so the executable instruction value N2 for execution node 2 is 1 + 2 + 2. 7 =131, and the binary representation of N2 is 0000010000011. Therefore, when all instructions on the cloud platform correspond to values ​​that are powers of 2, the executable instruction refers to all instructions that can be executed by that execution node. Optionally, the initial value of the executable instruction value for each execution node can be 0, meaning no instructions will be executed; of course, the initial value can also be non-zero, but it is sufficient to ensure that the initial values ​​of all executable instruction values ​​are the same.

[0090] The bitwise AND operation is to AND the corresponding bits of the two numbers involved in the operation. The result bit is 1 only when both corresponding bits are 1.

[0091] Based on this, the value corresponding to the first instruction is bitwise ANDed with the executable instruction value corresponding to each execution node. The computer device converts the value to binary and performs the bitwise AND operation during the operation to obtain the result. Based on the result, the target instruction to be executed can be determined.

[0092] In this embodiment, the characteristics of binary are innovatively utilized, and the numerical values ​​corresponding to each instruction are represented as powers of 2. Thus, for each execution node, the instructions it can execute are represented solely by the executable instruction value. When determining the target execution node, a bitwise AND operation is performed between the first numerical value and the executable instruction value, eliminating the need to match the target instruction with each execution node individually. This effectively reduces the time complexity of the computation process and improves processing efficiency. Furthermore, all instructions that each execution node can execute are represented solely by the executable instruction value, eliminating the need to store the mapping relationship between each execution node and the instruction set, saving storage space and reducing maintenance costs.

[0093] In one embodiment, determining the target execution node capable of executing the target instruction from the plurality of execution nodes based on the calculation results corresponding to each execution node includes: if the calculation result corresponding to a candidate node among the plurality of execution nodes is not 0, then the candidate node is taken as the target execution node.

[0094] Specifically, the execution node corresponding to the executable instruction value that performs the target bit operation with the first value is selected as a candidate node. If the operation result of the candidate node is 0, it means that the candidate node is not the target execution node and does not need to execute the target instruction. If the operation result of the candidate node is not 0, it means that the candidate node needs to execute the target instruction, and the candidate node becomes the target execution node. The target instruction is then sent to the target execution node. In the case where the operation result is not 0, the operation result is the first value. It should be noted that any candidate node whose operation result is not 0 can serve as the target execution node to execute the target instruction. Therefore, the number of target execution nodes that can execute the target instruction can be multiple or one.

[0095] For example, taking the above execution node 2 as the candidate node and the target instruction as instruction 7, the bitwise AND operation of N2 = 131 and 128 is performed. The binary operation process is that 0000010000011 and 0000010000000 are bitwise ANDed. The binary form of the result is 0000010000000, which is 128. At this time, the result is not 0 and is the value corresponding to instruction 7. Therefore, it is determined that execution node 2 should execute instruction 7.

[0096] In this embodiment, the result can be obtained by simply performing a bitwise AND operation. If the result is not zero, the candidate node can be directly determined as the target execution node. This effectively simplifies the process of determining the target execution node and reduces the amount of computation, thereby improving the distribution efficiency of the target instruction. Especially for cloud platforms with a large number of heterogeneous nodes (tens of thousands or more), the performance and efficiency improvement during distribution and execution is very significant.

[0097] As mentioned above, when the management node determines that a target instruction needs to be distributed, it needs to obtain the first value corresponding to the target instruction. The process of obtaining the first value will be explained below.

[0098] In one embodiment, obtaining the first value corresponding to the target instruction to be distributed includes: searching for the first value corresponding to the target instruction from a preset instruction set database; wherein the instruction set database contains all distributable instructions of the cloud platform and the values ​​corresponding to each instruction.

[0099] As mentioned above, each instruction in the cloud platform is identified by a corresponding numerical value. Optionally, the management node may contain a pre-maintained instruction set database. This database contains a one-to-one correspondence between all instructions in the cloud platform that can be distributed to execution nodes and their corresponding numerical values. Therefore, the target instruction to be distributed is also stored in this instruction set database. After determining the target instruction, it can be retrieved from the database, and its corresponding numerical value can be used as the first value to perform subsequent target bitwise operations. Alternatively, this instruction set database can also be included in other nodes.

[0100] In this embodiment, the first value corresponding to the target instruction is determined from a preset instruction set database. This method is simple and convenient, and provides a basis for improving the efficiency of the instruction distribution process.

[0101] During the operation of the cloud platform, the instructions that each execution node can execute will change. For a single execution node, there may be situations where executable instructions are added to that node, or situations where certain executable instructions need to be deleted. Accordingly, in both of these cases, the executable instruction value should be updated to ensure its accuracy. The two update processes for executable instruction values ​​will be explained below.

[0102] Please refer to Figure 3 This illustration shows a flowchart of an embodiment of the present application for updating an executable instruction value. The instruction distribution method further includes:

[0103] Step 301: Receive an update request for the first execution node.

[0104] Step 302: Update the executable instruction value corresponding to the first execution node in the instruction set database according to the update request.

[0105] The update request is used to instruct the management node to update the executable instruction value of the corresponding execution node. The execution node that needs to update the executable instruction value is the first execution node.

[0106] Optionally, the update request also carries the value corresponding to the update instruction. Upon receiving the update request, the update can be performed directly based on the value corresponding to the update instruction and the executable instruction value corresponding to the first execution node. Specifically, this can be done in the following two ways.

[0107] In one possible scenario, the update request includes deleting the first instruction from the executable instructions of the first execution node. The update request is then used to update the executable instruction value corresponding to the first execution node in the instruction set database, including subtracting the value of the executable instruction corresponding to the first execution node from the value corresponding to the first instruction to obtain the updated executable instruction value.

[0108] Where the update request includes information about deleting the first instruction from the executable instructions of the first execution node, optionally, the value corresponding to the first instruction can be obtained from a preset instruction set database, or the value corresponding to the first instruction can be directly obtained from the information carried in the update request. Furthermore, by subtracting the value corresponding to the first instruction from the executable instruction value of the first execution node, the first instruction can be deleted from all executable instructions of the first execution node, so that the first execution node no longer has the ability to execute the first instruction, and the updated executable instruction value is obtained.

[0109] In another possible scenario, the update request includes adding a second instruction to the executable instructions of the first execution node. According to the update request, the executable instruction value corresponding to the first execution node in the instruction set database is updated by adding the executable instruction value corresponding to the first execution node to the value corresponding to the second instruction to obtain the updated executable instruction value.

[0110] Where the update request includes information on adding a second instruction to the executable instructions of the first execution node, optionally, the value corresponding to the second instruction can be obtained from a preset instruction set database, or the value corresponding to the second instruction can be directly obtained from the information carried in the update request. Furthermore, by adding the executable instruction value corresponding to the first execution node to the value corresponding to the second instruction, the second instruction can be added to all executable instructions of the first execution node, enabling the first execution node to execute the second instruction and obtaining the updated executable instruction value.

[0111] In this embodiment of the application, by receiving an update request and updating the executable instruction value corresponding to the corresponding execution node based on the update request, the maintenance of the executable instructions of each execution node can be realized in a simple and efficient manner, effectively reducing maintenance costs and improving update efficiency.

[0112] In one embodiment, such as Figure 4 As shown, an instruction dispatch method is provided, which is applied to... Figure 1 Taking execution node 102 as an example, the following steps are included:

[0113] Step 401: Receive the first value corresponding to the target instruction sent by the management node.

[0114] In this system, all instructions on the cloud platform are identified by a corresponding numerical value. When the management node determines that an instruction needs to be distributed to a specific execution node, it sends that instruction to all execution nodes; this instruction is the target instruction to be distributed. Therefore, the execution nodes receive the first numerical value corresponding to the target instruction sent by the management node.

[0115] Step 402: Perform target bit operation on the first value and the pre-stored executable instruction value to obtain the operation result. The executable instruction value is obtained according to the value corresponding to the instruction that the execution node can execute.

[0116] Specifically, the executable instruction value corresponding to the execution node can be obtained based on the values ​​corresponding to all instructions that the execution node can execute. This executable instruction value is pre-stored in the execution node. After receiving the first value, a target bitwise operation is performed between the first value and the executable instruction value to obtain the result, which is used to determine whether the target instruction needs to be executed. Optionally, the executable instruction value corresponding to the execution node can be obtained by adding the values ​​corresponding to all instructions that the execution node can execute.

[0117] Step 403: Determine whether to execute the target instruction based on the calculation result.

[0118] The calculation result indicates whether the execution node needs to execute the instruction. Optionally, the execution of the target instruction can be determined based on whether the calculation result corresponding to each execution node is a preset calculation value.

[0119] In the aforementioned instruction distribution method, the execution node in the cloud platform receives a first value corresponding to the target instruction sent by the management node, performs a target bitwise operation on this first value and a pre-stored executable instruction value, and determines whether to execute the target instruction based on the result. Since the executable instruction value is obtained from the values ​​corresponding to the instructions that the execution node can execute, and the target instruction is identified by the first value, the execution node does not need to compare the target instruction with all executable instructions during instruction distribution. It can determine whether to execute the target instruction simply by performing a target bitwise operation on the first value and the executable instruction value. This significantly reduces the computational complexity of instruction distribution, effectively reduces the duration of the instruction distribution process, and greatly increases the efficiency of instruction distribution.

[0120] In one embodiment, all instructions on the cloud platform correspond to values ​​that are powers of 2, and the target bitwise operation is a bitwise AND operation.

[0121] In one embodiment, determining whether to execute the target instruction based on the calculation result includes: if the calculation result is not 0, then determining to execute the target instruction.

[0122] In one embodiment, the method further includes: upon receiving an update request, updating the executable instruction value according to the update request.

[0123] In one embodiment, the update request includes deleting the first instruction from the executable instructions, and updating the executable instruction value according to the update request includes subtracting the executable instruction value from the value corresponding to the first instruction to obtain the updated executable instruction value.

[0124] In one embodiment, the update request includes adding a second instruction to an executable instruction, and updating the executable instruction value according to the update request includes adding the executable instruction value to the value corresponding to the second instruction to obtain the updated executable instruction value.

[0125] Based on the calculation results, the execution node can determine whether the target instruction needs to be executed. If it is determined that the target instruction needs to be executed, the execution node also needs to obtain the target instruction based on the calculation results and execute it. The process of obtaining the target instruction will be explained below.

[0126] In one possible implementation, after determining the target instruction to be executed, the method further includes: searching for the target instruction corresponding to the first value from a preset instruction set database, wherein the instruction set database contains instructions executable by the execution node and the values ​​corresponding to each instruction.

[0127] Optionally, the preset instruction set database may contain all instructions of the cloud platform and the corresponding values ​​of each instruction; alternatively, the preset instruction set database may contain only all instructions executed by the execution node and the corresponding values ​​of each instruction.

[0128] After obtaining the calculation result, based on the above explanation, if the calculation result is not 0, then the calculation result is the first value corresponding to the target instruction. The target instruction can then be obtained from the preset instruction set database based on the first value and executed.

[0129] Optionally, the preset instruction set database may be included in the execution node or in other nodes.

[0130] In this embodiment, the first value corresponding to the target instruction is determined from a preset instruction set database. This method is simple and convenient to implement and can improve instruction distribution efficiency.

[0131] In another possible implementation, after determining that the target instruction should be executed, the method further includes sending a query request to the management node, the query request carrying the first value, the query request being used to instruct the management node to return the target instruction.

[0132] Optionally, the management node may store all instructions in the cloud platform and their corresponding values. The execution node does not need to maintain an instruction set database. After determining that a target instruction needs to be executed, a query request carrying a first value is sent to the management node. This query request instructs the management node to query for the target instruction based on the first value. After finding the target instruction, the management node returns the target instruction to the execution node, enabling the execution node to successfully execute the target instruction.

[0133] In this embodiment, the execution node obtains the target instruction from the management node, thus reducing storage and maintenance costs, without needing to maintain the instruction set database locally.

[0134] The limitations on the instruction dispatch method implemented by the execution node are the same as those on the instruction dispatch method implemented by the management node mentioned above, and will not be repeated here.

[0135] In one embodiment, a method for distributing instructions to a cloud platform with a large number of heterogeneous nodes is provided, and the method will be described below.

[0136] First, the cloud platform maintains an instruction set. Specifically, for instruction m in the instruction set, its corresponding value is defined as M = 2. m Examples are shown in the table below:

[0137] Command m numerical values binary form numerical values Instruction 0 20 00000000000000000000000000000001 1 Instruction 1 <![CDATA[2 1 ]]> 00000000000000000000000000000010 2 Instruction 2 <![CDATA[2 2 ]]> 00000000000000000000000000000100 4 Instruction 3 <![CDATA[2 3 ]]> 00000000000000000000000000001000 8 Instruction 4 <![CDATA[2 4 ]]> 00000000000000000000000000010000 16 Instruction 5 <![CDATA[2 5 ]]> 00000000000000000000000000100000 32 Instruction 6 <![CDATA[2 6 ]]> 00000000000000000000000001000000 64 Instruction 7 <![CDATA[2 7 ]]> 00000000000000000000000010000000 128 Instruction 8 <![CDATA[2 8 ]]> 00000000000000000000000100000000 512 ... ... ... ...

[0138] Secondly, the maintenance of the executable instruction set for each node is implemented using executable instruction values. Specifically, for node n, its initial value of executable instruction value Nn is defined as 0. Each time an executable instruction m is added, the executable instruction value Nn of that node = Nn + 2. m .

[0139] Please refer to Figure 5 This illustration shows a schematic diagram of an executable instruction value maintenance process provided in an embodiment of this application. The management node in the cloud platform executes an instruction distribution service, which is associated with other nodes in the cloud platform. These other nodes maintain the instructions they can execute using an executable instruction value Nn. The management node can send instruction m to other nodes through the instruction distribution service so that the other nodes can add instruction m. For example, for node 0, after adding instruction m, the instruction N0 that node 0 can process is N0 = N0 + 2. m For node 1, after adding instruction m, the instruction N1 that node 1 can process becomes N1 = N1 + 2. m For node 2, after adding instruction m, the number of instructions N2 that node 2 can process becomes N2 = N2 + 2. m For node 3, after adding instruction m, the instruction N3 that node 3 can process becomes N1 = N3 + 2. m For node n, after adding instruction m, the number of instructions Nn that node n can process becomes Nn = Nn + 2. m Similarly, when node n needs to remove an executable instruction m from the executable instruction set, the executable instruction value Nn of that node is Nn-2. m .

[0140] Based on the above processing, the executable instruction values ​​for each node can be initialized based on the values ​​corresponding to the instructions that each node can execute, such as... Figure 6 As shown, it illustrates a schematic diagram of each node after initialization according to an embodiment of this application. For example, node 0 can execute instructions 0, 1, and 2. Therefore, its corresponding executable instruction value, or tag value, is 1+2+4=7, and the binary form of 7 is 0000000000111; node 1 can execute instructions 1, 4, and 6. Therefore, its corresponding executable instruction value, or tag value, is 2+16+64=82, and the binary form of 82 is 0000000101010; node 2 can execute instructions 5, 6, and 7. Therefore, its corresponding executable instruction value, or tag value, is 32+64+128=224, and the binary form of 224 is 0000001110000; node 3 can execute instructions 7 and 8. Therefore, its corresponding executable instruction value, or tag value, is 128+256=384, and the binary form of 384 is 0000011000000.

[0141] Therefore, for binary numerical values, different bits with a value of 1 correspond to different instructions. For example... Figure 7 The diagram illustrates a binary representation of an instruction set provided in an embodiment of this application. It is evident that, for a given instruction, a binary bit of 1 indicates that the node corresponding to that executable instruction value can execute the instruction.

[0142] During the instruction distribution process, the management node sends the first value corresponding to the target instruction to other nodes through the instruction distribution service. After receiving the instruction, node Nn performs a bitwise AND operation between the first value and the executable instruction value. If the result is not 0, the target instruction is obtained and executed.

[0143] For example, when the instruction distribution service receives a request to execute instruction 1, it sends instruction 1 to other nodes. The binary form of the value corresponding to instruction 1 is 000000000000000000000000000000010. The instruction distribution service then distributes the value corresponding to instruction 1 to each node. Taking node 0 as an example, after receiving the value corresponding to instruction 1, node 0 performs the following judgment: 0000000000000000000000000000000010 & 0000000000000000000000000000000111 = 000000000000000000000000000000010 = 2, meaning it retrieves and executes instruction 1. Taking node 2 as an example, after receiving the value corresponding to instruction 1, node 2 makes the following judgment: 000000000000000000000000000001110000&00000000000000000000000000000010=00000000000000000000000000000000=0, then instruction 1 is not executed.

[0144] The aforementioned instruction distribution method for cloud platforms with massive heterogeneous nodes can maintain and process the executable instruction sets of each node through a simple addition operation, significantly reducing maintenance costs. Simultaneously, each node only needs one data entry to store its instruction set, greatly saving node storage space and reducing the time complexity of traversing node instruction sets, thus improving distribution efficiency. Furthermore, there is no need to maintain a node-instruction set mapping table, saving both storage space and the time spent traversing the mapping table. The time complexity of determining whether a single instruction is executable is reduced from the number of nodes * (total number of instructions * number of nodes) to the number of nodes * 1. When distributing instructions on cloud platforms with massive heterogeneous nodes (tens of thousands or more), the performance and efficiency improvements are very significant.

[0145] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0146] Based on the same inventive concept, this application also provides an instruction distribution apparatus for implementing the instruction distribution method described above. The solution provided by this apparatus is similar to the implementation described in the instruction distribution method executed by the management node. Therefore, the specific limitations in one or more instruction distribution apparatus embodiments provided below can be found in the limitations of the instruction distribution method above, and will not be repeated here.

[0147] In one embodiment, such as Figure 8 As shown, an instruction distribution device 800 is provided, comprising: an acquisition module 801, an execution module 802, and a determination module 803, wherein:

[0148] The acquisition module 801 is used to acquire the first value corresponding to the target instruction to be distributed;

[0149] The execution module 802 is used to perform target bit operations on the first value and the executable instruction value of each execution node to obtain the operation result corresponding to each execution node. The executable instruction value is obtained according to the value corresponding to the instruction that can be executed by the execution node.

[0150] The determination module 803 is used to determine the target execution node that can execute the target instruction from the plurality of execution nodes according to the calculation results corresponding to each execution node, and to distribute the target instruction to the target execution node.

[0151] In one embodiment, all instructions on the cloud platform correspond to values ​​that are powers of 2, and the target bitwise operation is a bitwise AND operation.

[0152] In one embodiment, the determining module 803 is specifically used to: if the operation result corresponding to the candidate node among the plurality of execution nodes is not 0, then the candidate node is taken as the target execution node.

[0153] In one embodiment, the acquisition module 801 is specifically used to: search for the first value corresponding to the target instruction from a preset instruction set database according to the target instruction; wherein the instruction set database contains all distributable instructions of the cloud platform and the values ​​corresponding to each instruction.

[0154] In one embodiment, the device further includes:

[0155] The update module is used to update the executable instruction value corresponding to the first execution node in the instruction set database according to the update request after receiving an update request for the first execution node.

[0156] In one embodiment, the update module is specifically configured to: when the update request includes deleting a first instruction from the executable instructions of the first execution node, subtract the value of the executable instruction corresponding to the first execution node from the value corresponding to the first instruction to obtain an updated executable instruction value; when the update request includes adding a second instruction to the executable instructions of the first execution node, add the value of the executable instruction corresponding to the first execution node to the value corresponding to the second instruction to obtain an updated executable instruction value.

[0157] Based on the same inventive concept, this application also provides an instruction dispatching apparatus for implementing the instruction dispatching method described above. The solution provided by this apparatus is similar to the implementation described in the instruction dispatching method executed by the execution node. Therefore, the specific limitations in one or more instruction dispatching apparatus embodiments provided below can be found in the limitations of the instruction dispatching method above, and will not be repeated here.

[0158] In one embodiment, such as Figure 9 As shown, another instruction distribution device 900 is provided, comprising: a receiving module 901, an execution module 902, and a determining module 903, wherein:

[0159] The receiving module 901 is used to receive the first value corresponding to the target instruction sent by the management node;

[0160] The execution module 902 is used to perform a target bit operation on the first value and the pre-stored executable instruction value to obtain the operation result. The executable instruction value is obtained according to the value corresponding to the instruction that the execution node can execute.

[0161] The determination module 903 is used to determine whether to execute the target instruction based on the calculation result.

[0162] In one embodiment, all instructions on the cloud platform correspond to values ​​that are powers of 2, and the target bitwise operation is a bitwise AND operation.

[0163] In one embodiment, the determining module 903 is specifically used to: determine to execute the target instruction if the result of the operation is not 0.

[0164] In one embodiment, the device further includes:

[0165] An update module is used to update the executable instruction value according to an update request after receiving the update request. Specifically, when the update request includes deleting a first instruction from the executable instructions, the update module is used to subtract the value corresponding to the first instruction from the executable instruction value to obtain the updated executable instruction value. When the update request includes adding a second instruction to the executable instructions, the update module is used to add the value corresponding to the second instruction to the executable instruction value to obtain the updated executable instruction value.

[0166] In one embodiment, the device further includes a lookup module or a sending module:

[0167] The lookup module is used to search for the target instruction corresponding to the first value from a preset instruction set database, wherein the instruction set database contains the instructions that can be executed by the execution node and the values ​​corresponding to each instruction;

[0168] The sending module is used to send a query request to the management node, the query request carrying the first value, and the query request is used to instruct the management node to return the target instruction.

[0169] Each module in the aforementioned instruction distribution device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.

[0170] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores instruction dispatch data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements an instruction dispatch method.

[0171] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0172] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the method embodiment described above for executing a management node, or the processor executes the computer program to implement the steps in the method embodiment described above for executing an execution node.

[0173] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the method embodiment for executing a management node described above, or, when executed by a processor, implements the steps in the method embodiment for executing an execution node described above.

[0174] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the method embodiment for executing a management node, or, when executed by a processor, implements the steps in the method embodiment for executing an execution node.

[0175] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0176] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0177] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for distributing instructions, characterized in that: In a management node for a cloud platform, the cloud platform includes a management node and a plurality of execution nodes, and the method includes: Obtaining a first value corresponding to a target instruction to be distributed; Execute target bit operations on the first value and the executable instruction values ​​of each execution node respectively to obtain operation results corresponding to each execution node, wherein the executable instruction value is obtained according to the value corresponding to the instruction executable by the execution node; wherein the values ​​corresponding to all instructions of the cloud platform are integer powers of 2, the target bit operation is a bitwise AND operation, and the powers of the values ​​corresponding to each instruction are different; A target execution node capable of executing the target instruction is determined from the plurality of execution nodes according to the operation results corresponding to each of the execution nodes, and the target instruction is distributed to the target execution node.

2. The method according to claim 1, characterized in that The determining, from the plurality of execution nodes, a target execution node capable of executing the target instruction according to the operation results corresponding to each of the execution nodes comprises: If the operation result corresponding to the candidate node among the multiple execution nodes is not 0, the candidate node is used as the target execution node.

3. The method according to claim 1, characterized in that The obtaining of a first value corresponding to the target instruction to be distributed includes: According to the target instruction, the first value corresponding to the target instruction is searched from a preset instruction set database; wherein the instruction set database contains all distributable instructions of the cloud platform and the value corresponding to each instruction.

4. The method according to claim 3, characterized in that The method further comprises: After receiving the update request for the first execution node, the executable instruction value corresponding to the first execution node in the instruction set database is updated according to the update request.

5. The method according to claim 4, characterized in that The updating of the executable instruction value corresponding to the first execution node in the instruction set database according to the update request includes: In a case where the update request includes deleting the first instruction from the executable instructions of the first execution node, subtracting the executable instruction value corresponding to the first execution node from the value corresponding to the first instruction to obtain an updated executable instruction value; In the case where the update request includes adding the second instruction to the executable instruction of the first execution node, the executable instruction value corresponding to the first execution node is added to the value corresponding to the second instruction to obtain an updated executable instruction value.

6. A method for distributing instructions, characterized in that: In an execution node used in a cloud platform, the cloud platform includes a management node and a plurality of the execution nodes, and the method includes: Receive a first value corresponding to a target instruction sent by the management node; Performing a target bit operation on the first value and a pre-stored executable instruction value to obtain an operation result, wherein the executable instruction value is obtained according to the value corresponding to the instruction executable by the execution node; wherein the values ​​corresponding to all instructions of the cloud platform are integer powers of 2, the target bit operation is a bitwise AND operation, and the powers of the values ​​corresponding to the instructions are different; Determine whether to execute the target instruction according to the operation result.

7. The method according to claim 6, characterized in that The determining whether to execute the target instruction according to the operation result includes: If the operation result is not 0, it is determined to execute the target instruction.

8. The method according to claim 6, characterized in that The method further comprises: After receiving the update request, updating the executable instruction value according to the update request; Wherein, in the case where the update request includes deleting the first instruction from the executable instructions, the updating process of the executable instruction value according to the update request includes: subtracting the executable instruction value from the value corresponding to the first instruction to obtain an updated executable instruction value; In the case where the update request includes adding a second instruction to an executable instruction, the updating process of the executable instruction value according to the update request includes: adding the executable instruction value to a numerical value corresponding to the second instruction to obtain an updated executable instruction value.

9. The method according to claim 7, characterized in that: After determining to execute the target instruction, the method further includes: According to the first value, searching for the target instruction corresponding to the first value from a preset instruction set database, wherein the instruction set database includes instructions executable by the execution node and a value corresponding to each instruction; Alternatively, a query request is sent to the management node, the query request carries the first value, and the query request is used to instruct the management node to return the target instruction.

10. An instruction distribution device, characterized in that: In a management node for a cloud platform, the cloud platform includes a management node and a plurality of execution nodes, and the device includes: An acquisition module, used for acquiring a first value corresponding to a target instruction to be distributed; An execution module, used to respectively perform a target bit operation on the first value and the executable instruction values ​​of the plurality of execution nodes to obtain operation results corresponding to the execution nodes, wherein the executable instruction values ​​are obtained according to the values ​​corresponding to the instructions executable by the execution nodes; wherein the values ​​corresponding to all the instructions of the cloud platform are integer powers of 2, the target bit operation is a bitwise AND operation, and the powers of the values ​​corresponding to the instructions are different; A determination module is used to determine a target execution node that can execute the target instruction from the multiple execution nodes according to the operation results corresponding to each of the execution nodes, and distribute the target instruction to the target execution node.

11. An instruction distribution device, characterized in that: In an execution node used in a cloud platform, the cloud platform includes a management node and a plurality of the execution nodes, and the device includes: A receiving module, used for receiving a first value corresponding to a target instruction sent by a management node; An execution module, configured to perform a target bit operation on the first value and a pre-stored executable instruction value to obtain an operation result, wherein the executable instruction value is obtained according to the value corresponding to the instruction executable by the execution node; wherein the values ​​corresponding to all instructions of the cloud platform are integer powers of 2, the target bit operation is a bitwise AND operation, and the powers of the values ​​corresponding to the instructions are different; A determination module is used to determine whether to execute the target instruction according to the operation result.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented; or, when the processor executes the computer program, the steps of the method according to any one of claims 6 to 9 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented; or, when the computer program is executed by a processor, the steps of the method according to any one of claims 6 to 9 are implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented; or, when the computer program is executed by a processor, the steps of the method according to any one of claims 6 to 9 are implemented.

Citation Information

Patent Citations

  • Task Distribution in Peer to Peer Networks

    US20160217014A1

  • Technology for extensible in-memory computing

    US20180101583A1