Node switching method in distributed computing graph, electronic device and readable storage medium

By using the node registry to record node information and priorities in the distributed computing graph, and dynamically selecting high-priority nodes to replace faulty or inefficient nodes, the problem of node failure or insufficient computing power in the distributed computing graph is solved, and computing is realized Efficient completion of tasks and system reliability.

CN113504980BActive Publication Date: 2024-09-10ZEBRED NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110838844.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-23
Publication Date
2024-09-10
Estimated Expiration
2041-07-23

AI Technical Summary

Technical Problem

In a distributed computing graph, node failure or insufficient computing power causes computing tasks to fail to proceed normally, and existing technologies are difficult to effectively solve such problems.

Method used

Build and manage calculation graphs through the calculation graph manager, use the node registry to record node implementation information and priorities, and dynamically select high-priority nodes to replace faulty or inefficient nodes to ensure the continuity of computing tasks.

Benefits of technology

It realizes automatic switching of nodes in the distributed computing graph to ensure efficient completion of computing tasks, reduces task interruptions caused by node failures or low efficiency, and improves system reliability and task completion capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113504980B
    Figure CN113504980B
Patent Text Reader

Abstract

The present application provides a node switching method in a distributed computing graph, an electronic device, and a readable storage medium. The method is applied to an electronic device, and the electronic device includes a computing graph manager. The method includes: the computing graph manager constructs a computing graph of a computing task, and the computing graph includes multiple computing nodes for completing the computing task, and each computing node is managed by a corresponding node manager; the node manager receives information about the node implementation corresponding to the computing node managed by it and published by a provider in the network, and writes the information into a node registry corresponding to the computing node, and the information includes information about the provider of the node implementation; when it is detected that the original node implementation needs to be switched, the computing graph manager selects a new node implementation to replace the original node implementation based on the information of the provider in the node registry corresponding to the original node implementation. The method of the present application can be completed dynamically and automatically by the computing framework during the entire process of node switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of driving technology, and in particular to a node switching method, an electronic device, and a readable storage medium in a distributed computing graph. Background Art

[0002] With the continuous development of communication services, more and more devices can join the same network at the same time and communicate with each other. When the application in the electronic device processes the task, the computing task can be represented as a computing graph. The computing graph may include many computing nodes, and the topology structure will be relatively complex. When computing tasks, any problem at any point, or poor computing power, will affect the progress of the entire task, or make the task impossible to carry out. Therefore, such problems need to be solved. Summary of the invention

[0003] In view of this, the present application provides a node switching method in a distributed computing graph, an electronic device and a readable storage medium, which are used to solve the technical problems mentioned in the above background.

[0004] Some embodiments of the present application provide a method for switching nodes in a distributed computing graph. The present application is introduced from multiple aspects below, and the embodiments and beneficial effects of the following aspects can be referenced to each other.

[0005] In a first aspect, the present application provides a method for switching nodes in a distributed computing graph, which is applied to an electronic device, wherein the electronic device includes a computing graph manager, and the method includes:

[0006] The computation graph manager builds the computation graph of the computation task, which includes multiple computation nodes used to complete the computation task. Each computation node is managed by a corresponding node manager.

[0007] The node manager receives node implementation information corresponding to the computing node it manages and published by the provider in the network, and writes the information into the node registry corresponding to the computing node, the information including the information of the provider of the node implementation;

[0008] When it is detected that the original node implementation participating in the calculation in the calculation graph needs to be switched, the calculation graph manager selects a new node implementation to replace the original node implementation based on the provider information in the node registry corresponding to the original node implementation.

[0009] As an embodiment of the first aspect of the present application, the information also includes the priority of the node to be selected to participate in completing the computing task.

[0010] When it is detected that the original node implementation participating in the calculation in the calculation graph needs to be switched, the calculation graph manager selects a new node implementation to replace the original node implementation based on the provider information in the node registry corresponding to the original node implementation and the priority.

[0011] As an embodiment of the first aspect of the present application, the stronger the computing capability of the provider of the node implementation, the higher the priority of the node implementation in being selected to participate in completing the computing task.

[0012] As an embodiment of the first aspect of the present application, detecting that a node implementation participating in a calculation in a calculation graph needs to be switched includes:

[0013] The computation graph manager determines that the original node implementation needs to be switched based on the priority in the node registry and when it determines that the priority of the node implementation in the node registry is higher than the priority of the node implementation currently participating in the computation task; or,

[0014] When the computation graph manager receives information that the provider of the original node implementation has exited the network, or the provider of the original node implementation fails when running the original node, it determines that the original node implementation needs to be switched.

[0015] As an embodiment of the first aspect of the present application, when a new provider joins the network, the node manager receives information about the nodes under its management published by the provider to the network, and writes the information into a node registry corresponding to the computing node.

[0016] As an embodiment of the first aspect of the present application, the providers include different devices, virtual machines, or different processes in the same device.

[0017] As an embodiment of the first aspect of the present application, the information of the provider of the node implementation includes: the device ID, virtual machine ID or process ID where the node implementation is located.

[0018] In a second aspect, the present application further provides an electronic device, including:

[0019] The computation graph manager is used to build the computation graph of the computation task, which includes multiple computation nodes for completing the computation task; the node manager is used to manage each computation node;

[0020] The node manager is used to receive node implementation information corresponding to the computing node it manages and published by the provider in the network, and write the information into the node registry corresponding to the computing node, the information including the information of the provider of the node implementation;

[0021] When it is detected that the original node implementation participating in the calculation in the calculation graph needs to be switched, the calculation graph manager is used to select a new node implementation to replace the original node implementation based on the information of the provider in the node registry corresponding to the original node implementation.

[0022] As an embodiment of the second aspect of the present application, the information also includes the priority of the node to be selected to participate in completing the computing task.

[0023] When it is detected that the original node implementation participating in the calculation in the calculation graph needs to be switched, the calculation graph manager is used to select a new node implementation to replace the original node implementation based on the provider information in the node registry corresponding to the original node implementation and the priority.

[0024] As an embodiment of the second aspect of the present application, the stronger the computing capability of the provider of the node implementation, the higher the priority of the node implementation in being selected to participate in completing the computing task.

[0025] As an embodiment of the second aspect of the present application, the computation graph manager is used to:

[0026] When it is determined that the priority of the node implementation in the node registry is higher than the priority of the node implementation currently participating in the computing task, it is determined that the original node implementation needs to be switched; or,

[0027] The computation graph manager is used to determine that the original node implementation needs to be switched when receiving a message that the provider of the original node implementation exits the network or the provider of the original node implementation fails when running the original node.

[0028] As an embodiment of the second aspect of the present application, when a new provider joins the network, the node manager is used to receive information about the nodes it manages and publishes to the network, and write the information into a node registry corresponding to the computing node.

[0029] As an embodiment of the second aspect of the present application, the providers include different devices, virtual machines, or different processes in the same device.

[0030] As an embodiment of the second aspect of the present application, the information of the provider of the node implementation includes: the device ID, virtual machine ID or process ID where the node implementation is located.

[0031] In a third aspect, the present application further provides an electronic device, including:

[0032] a memory for storing instructions to be executed by one or more processors of the device, and

[0033] A processor is used to execute the method of the first aspect embodiment mentioned above.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes the method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of the structure of an exemplary distributed computing graph of the present application;

[0036] Figure 2 A flowchart of a node switching method in a distributed computing graph according to an embodiment of the present application;

[0037] Figure 3 A framework diagram of creating a node according to an embodiment of the present application;

[0038] Figure 4 A schematic diagram of a structure in which a new node is added according to an embodiment of the present application;

[0039] Figure 5 This is a structural diagram of an embodiment of the present application when the original node is unavailable;

[0040] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0041] Figure 7 A schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0042] Figure 8 A block diagram of a device according to some embodiments of the present application;

[0043] Fig. 9 A block diagram of a system on a chip (SoC) according to some embodiments of the present application. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0045] refer to Figure 1 , Figure 1 The schematic diagram of the structure of the distributed computing graph is shown as an example. Figure 1 As shown in the structural diagram, the device 110 and the device 120, the device 110 includes process 1 and process 2 and the calculation graph manager in the application, and the device 120 includes process 3. The devices 110 and 120 are in the same network and can communicate with each other. When two devices need to complete a computing task together, such as Figure 1As shown, the computing nodes that complete the computing task include node 01, node 02, node 03 and node 04. Among them, node 01 is located in process 1 in device 110, node 02 and node 03 are located in process 2 in device 110, and node 04 is located in process 3 of device 120. The computing graph manager manages the life cycle of these computing nodes and constructs a computing graph based on the node implementations of these computing nodes. When any node implementation in the computing graph cannot be run, or the provider of the node implementation (device 110 or device 120) exits the network, the computing task will not be completed normally. Therefore, in order to realize the normal execution of the above-mentioned computing task, the present application automatically replaces the node implementation so that the computing task can be effectively completed.

[0046] The node switching method in the distributed computing graph of the present application is described below in conjunction with specific embodiments.

[0047] refer to Figure 2 , Figure 2 The flowchart of the node switching method in the distributed computing graph is exemplarily shown, and the method can be applied in an electronic device, and the electronic device includes a computing graph manager. Figure 2 As shown, the following steps are included:

[0048] S210, the computational graph manager constructs a computational graph for the computational task. The computational graph is constructed by the computational manager according to the business logic for implementing the computational task. For example, the computational graph for the forward-looking perception of a vehicle, the computational manager includes the following computational nodes in sequence according to the business logic for implementing the forward-looking perception: the camera obtains the image (lane lines, obstacles) taken in front of the vehicle, performs pre-processing, model inference, post-processing, and rendering output on the image data, thereby completing the computational task of forward perception. The computational manager constructs these computational nodes into a computational graph.

[0049] Each computing node in the computational graph corresponds to a node type, such as model reasoning or clustering. Each node type can include multiple node implementations. These node implementations have the same functions and can complete the computing tasks of their corresponding computing nodes. They can be located in processes of different devices or in different processes of the same device. For example, for a computing node that inputs image data, data can be obtained through a mobile phone camera or a vehicle camera. Among them, the mobile phone acquisition method and the vehicle acquisition method are two different node implementations. For another example, when judging objects in an image, judgment can be made based on model reasoning or clustering. These two judgment methods are different node implementations that implement the same function. Each process where a node implementation is located has a node manager, which is used to manage the node implementations in its process, and then create node instances through the node implementation to form a computational graph.

[0050] The management of the node implementation by the node manager will be described in detail in the following S220-S220.

[0051] S220, the node manager receives the node implementation information corresponding to the node type it manages and sent by the provider in the network, and maintains the node implementation information in the node information registry in this process. The node implementation information may include the provider information of the node implementation, and may also include the priority corresponding to the node implementation. The higher the priority, the higher the priority of the node implementation used as a replacement in the process of node replacement.

[0052] Among them, the provider information of the node implementation includes the machine ID, virtual machine ID, process ID and other information of the provider. Priority defines which one is used first when there are multiple node implementations of the same type in the network. Priority can be defined based on device computing power or time consumption during implementation. For example, for data acquisition type, compared with mobile phones, the mobile phone obtains image data as a node implementation. Since the data collected by the mobile phone camera is clearer and has stronger communication capabilities, the priority of this node implementation (obtaining image data) in the mobile phone can be set higher than that of the car computer. In the process of selecting node implementations in the data acquisition type, the node implementation in the mobile phone with a high priority can be given priority. The node information registration table is shown in Table 1.

[0053] Table 1 Node information registration table

[0054]

[0055] As shown in Table 1, when it is necessary to select a node implementation in node type 1, since there are 2 node implementations under this type and since the priority of node implementation 2 is higher than the priority of node implementation 1, node implementation 2 is given priority when selecting a node.

[0056] In addition, when a node manager is detected to be offline (due to network disconnection or process exit), the information of the corresponding node implementation in the registry will be deleted, indicating that they are no longer available.

[0057] When a node of a specific type is needed, an application is made to the corresponding provider to create a node instance. The node manager that receives the application needs to create the corresponding node instance.

[0058] refer to Figure 3 , Figure 3The framework diagram for creating a node is shown as an example. The framework diagram includes a device 310 and a device 320, wherein the device 310 includes a process 1, a process 1 and a process 2, a process 1 is provided with a node manager 1, and a process 2 is provided with a node manager 2. The device 320 includes a process 3, and a process 3 is provided with a node manager 3. The device 320 informs the device 310 of the node implementation it has. When the device 310 acts as the initiator of a computing task, when the device 310 needs to use a node of a certain type, it can apply to the device 320 to create a node instance corresponding to the node implementation. The calculator manager of the device 310 can send an instruction to create a node to the process of the type in the device 320, and the node manager in the device 320 that receives the instruction creates a corresponding node instance according to the instruction and publishes the information of the node instance to the device 310. The computational graph manager in the device 310 forms a computational graph according to the node instance.

[0059] S230, when a new device joins the network, the node manager determines whether the node implementation published by the new device belongs to the node type managed by it.

[0060] For example, when a new device is added, the new device will publish a message with the node implementation of the node type in the computation graph to all processes containing node managers in the entire network. The node manager in the network determines whether the node type is the same as the node it manages based on the message of the node implementation.

[0061] If the judgment is yes, the node manager executes S240, that is, the node manager receives the node implementation, registers the information of the node implementation into the node information registration table of the corresponding computing node, and notifies the computing graph manager.

[0062] If it is determined not to be the case, the node manager executes S250, that is, the node manager does not write the node implementation information into the node information registration table.

[0063] refer to Figure 4 , Figure 4 The schematic diagram of the structure of adding a new node is shown as an example. Figure 4As shown, it includes two devices: a car machine and a mobile phone. Among them, the types provided by the original calculation graph on the car machine are A, B, C, D, and E. Taking the calculation graph of forward perception in step 210 as an example, node A is the camera input, node B is the pre-processing, node C is the model reasoning, node D is the post-processing, and node E is the rendering. When the mobile phone joins the network where the car machine is located, the mobile phone has the node implementation of types B, C, and D, and the mobile phone will publish the message to all processes containing node managers in the entire network. The node manager in the application process in the car machine will register the information into the node information registry and notify the calculation graph manager. If the node implementation on the mobile phone has a higher priority (because the calculation is faster), the calculation graph manager will start the node switching process to switch the original node in the calculation graph to a node with a higher priority. That is, the B, C, and D type nodes on the car machine are stopped, and the B, C, and D type nodes on the mobile phone are started.

[0064] S260, when the original node becomes unavailable, a node with a high priority under the type corresponding to the original node is selected for implementation.

[0065] In the present application, the original node becoming unavailable can be further divided into two situations: one is when the device where the node is located is disconnected; the other is when the node exits due to an error during operation (such as the required resources cannot be allocated, or the operation times out, etc.).

[0066] refer to Figure 5 , Figure 5 The schematic diagram of the structure when the original node is unavailable is shown as an example. The schematic diagram includes machine A and machine B. There are two types A and B in the calculation graph. There are two node implementations under type B, which are located in machine A and machine B respectively. Node B in machine B is used before switching. In the first case, when machine B is turned off or disconnected, the application process can detect the event through the automatic discovery mechanism of the communication layer. At this time, the node manager will delete the relevant node implementation information in machine B in the registry, and then the calculation graph manager in the application process will try to restart the node of this type. At this time, because machine B has exited, the process in machine A becomes the only provider of the node implementation of this type. Therefore, the same type of node in machine A will eventually be started. In the second case, when the original node exits due to an error, the application process will receive an error status event sent by the original node. Therefore, the priority of the node implementation in the registry will be reduced according to the specified strategy (the strategy can be manually specified, such as halving each time), and the calculation graph manager will try to restart the node of this type. In this way, if there are two providers in the system that provide the node implementation of this type at the same time, the node implementation that has failed will not be easily selected again due to the reduced priority. If the failed node fails again after running again, its priority will be lowered again until the priority drops to the specified threshold, and then it is judged to be completely unavailable.

[0067] According to the method of the embodiment of the present application, the entire process of node switching is completed dynamically and automatically by the computing framework, and the application logic does not need to be processed, so the computing task can be completed as efficiently as possible.

[0068] refer to Figure 6 , the present application also provides an electronic device, including:

[0069] A computational graph manager is used to construct a computational graph for a computational task. The computational graph includes multiple computational nodes for completing the computational task.

[0070] Node manager, used to manage each computing node;

[0071] The node manager is used to receive node implementation information corresponding to the computing node it manages and published by the provider in the network, and write the information into the node registry corresponding to the computing node, the information including the information of the provider of the node implementation;

[0072] When it is detected that the original node implementation participating in the calculation in the calculation graph needs to be switched, the calculation graph manager is used to select a new node implementation to replace the original node implementation based on the information of the provider in the node registry corresponding to the original node implementation.

[0073] In one embodiment of the present application, the information also includes the priority of the node to be selected to participate in completing the computing task.

[0074] When it is detected that the original node implementation participating in the calculation in the calculation graph needs to be switched, the calculation graph manager is used to select a new node implementation to replace the original node implementation based on the provider information in the node registry corresponding to the original node implementation and the priority.

[0075] In one embodiment of the present application, the stronger the computing capability of the provider of the node implementation, the higher the priority of the node implementation in being selected to participate in completing the computing task.

[0076] In one embodiment of the present application, the computational graph manager is used to: when it is determined that the priority of the node implementation in the node registry is higher than the priority of the node implementation currently participating in the computing task, determine that the original node implementation needs to be switched; or, when the computational graph manager receives a message that the provider of the original node implementation exits the network, or the provider of the original node implementation fails when running the original node, determine that the original node implementation needs to be switched.

[0077] In one embodiment of the present application, when a new provider joins the network, the node manager is used to receive information about the nodes it manages and publishes to the network, and write the information into a node registry corresponding to the computing node.

[0078] In one embodiment of the present application, the providers include different devices, virtual machines, or different processes in the same device.

[0079] In one embodiment of the present application, the information of the provider of the node implementation includes: the device ID, virtual machine ID or process ID where the node implementation is located.

[0080] The working process and function of each module of the electronic device of the present application have been described in detail in the above embodiments. Figure 2 The description of the method will not be repeated here.

[0081] refer to Figure 7 , the present application also provides an electronic device, including:

[0082] A memory 710 for storing instructions executed by one or more processors of the device, and

[0083] Processor 720, used to execute the above embodiment Figure 2 The method shown.

[0084] The present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the above-mentioned embodiment. Figure 2 The method shown.

[0085] Reference now Figure 8 , shown is a block diagram of a device 1200 according to one embodiment of the present application. The device 1200 may include one or more processors 1201 coupled to a controller hub 1203. For at least one embodiment, the controller hub 1203 communicates with the processor 1201 via a multi-drop bus such as a front side bus (FSB), a point-to-point interface such as a Quick Path Interconnect (QPI), or a similar connection 1206. The processor 1201 executes instructions that control general types of data processing operations. In one embodiment, the controller hub 1203 includes, but is not limited to, a graphics memory controller hub (GMCH) (not shown) and an input / output hub (IOH) (which may be on a separate chip) (not shown), wherein the GMCH includes a memory and a graphics controller and is coupled to the IOH.

[0086] The device 1200 may also include a coprocessor 1202 and a memory 1204 coupled to the controller hub 1203. Alternatively, one or both of the memory and the GMCH may be integrated within the processor (as described in the present application), with the memory 1204 and the coprocessor 1202 directly coupled to the processor 1201 and the controller hub 1203, with the controller hub 1203 and the IOH being in a single chip. The memory 1204 may be, for example, a dynamic random access memory (DRAM), a phase change memory (PCM), or a combination of the two. In one embodiment, the coprocessor 1202 is a special-purpose processor, such as, for example, a high-throughput MIC processor (Many Integerated Core, MIC), a network or communication processor, a compression engine, a graphics processor, a general-purpose graphics processor (General Purpose Computing on GPU, GPGPU), or an embedded processor, etc. The optional properties of the coprocessor 1202 are indicated by dashed lines in Figure 8 middle.

[0087] The memory 1204, as a computer-readable storage medium, may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. For example, the memory 1204 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as one or more hard disk drives (HDD(s)), one or more compact disc (CD) drives, and / or one or more digital versatile disc (DVD) drives.

[0088] In one embodiment, the device 1200 may further include a network interface (Network Interface Controller, NIC) 1206. The network interface 1206 may include a transceiver for providing a radio interface for the device 1200 to communicate with any other suitable device (such as a front-end module, an antenna, etc.). In various embodiments, the network interface 1206 may be integrated with other components of the device 1200. The network interface 1206 may implement the functions of the communication unit in the above-mentioned embodiments.

[0089] The device 1200 may further include input / output (I / O) devices 1205. The I / O 1205 may include: a user interface designed to enable a user to interact with the device 1200; a peripheral component interface designed to enable peripheral components to interact with the device 1200; and / or sensors designed to determine environmental conditions and / or location information related to the device 1200.

[0090] It is worth noting that Figure 8 This is for illustrative purposes only. Figure 8 It is shown that the device 1200 includes multiple components such as a processor 1201, a controller hub 1203, and a memory 1204. However, in actual applications, the device using the methods of the present application may only include a part of the components of the device 1200, for example, it may only include the processor 1201 and the NIC 1206. Figure 8 The properties of optional devices are shown with dotted lines.

[0091] According to some embodiments of the present application, the memory 1204 as a computer-readable storage medium stores instructions, and when the instructions are executed on the computer, the system 1200 performs the calculation method according to the above embodiment. For details, please refer to the above embodiment. Figure 2 The method shown will not be repeated here.

[0092] Reference now Fig. 9 , which is a block diagram of a SoC (System on Chip) 1300 according to an embodiment of the present application. Fig. 9 In the FIG, similar components have the same reference numerals. In addition, the dashed boxes are optional features of more advanced SoCs. Fig. 9 In the embodiment, SoC 1300 includes: an interconnect unit 1350, which is coupled to an application processor 1310; a system agent unit 1380; a bus controller unit 1390; an integrated memory controller unit 1340; a group or one or more coprocessors 1320, which may include integrated graphics logic, an image processor, an audio processor, and a video processor; a static random access memory (SRAM) unit 1330; and a direct memory access (DMA) unit 1360. In one embodiment, the coprocessor 1320 includes a dedicated processor, such as, for example, a network or communication processor, a compression engine, a GPGPU, a high throughput MIC processor, or an embedded processor.

[0093] The static random access memory (SRAM) unit 1330 may include one or more computer-readable media for storing data and / or instructions. The computer-readable storage medium may store instructions, specifically, temporary and permanent copies of the instructions. The instructions may include: when executed by at least one unit in the processor, the Soc 1300 performs the calculation method according to the above embodiment, which may be specifically referred to in the above embodiment. Figure 2 The method shown in will not be repeated here.

[0094] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.

[0095] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0096] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0097] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or by other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, compact disc read-only memories (Compact Disc Read Only Memory, CD-ROMs), magneto-optical disks, read-only memories (Read Only Memory, ROM), random access memories (RAM), erasable programmable read-only memories (Erasable Programmable Read Only Memory, EPROM), electrically erasable programmable read-only memories (Electrically Erasable Programmable Read Only Memory, EEPROM), magnetic cards or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Accordingly, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).

[0098] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the accompanying drawings of the specification. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0099] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.

Claims

1. A method for switching nodes in a distributed computing graph, characterized in that: Applied in an electronic device, the electronic device includes a computation graph manager, and the method includes: The computation graph manager constructs a computation graph for a computation task, wherein the computation graph includes a plurality of computation nodes for completing the computation task, and each computation node is managed by a corresponding node manager; The node manager receives node implementation information corresponding to the computing node managed by the node manager and publishes it from a provider in the network, and writes the information into a node registry corresponding to the computing node, wherein the information includes information of the provider of the node implementation; The information also includes the priority of the node to be selected to participate in completing the computing task. The computation graph manager determines that the original node implementation needs to be switched when it determines that the priority of the node implementation in the node registry is higher than the priority of the node implementation currently participating in the computing task according to the priority in the node registry; or, the computation graph manager receives that the provider of the original node implementation has exited the network, or the provider of the original node implementation fails when running the original node, then determines that the original node implementation needs to be switched; When it is detected that the original node implementation participating in the calculation in the calculation graph needs to be switched, the calculation graph manager selects a new node implementation to replace the original node implementation based on the information of the provider in the node registry corresponding to the original node implementation and the priority; The stronger the computing capability of the provider of the node implementation, the higher the priority of the node implementation in being selected to participate in completing the computing task.

2. The method according to claim 1, characterized in that When a new provider joins the network, the node manager receives information about the nodes under its management that is published by the provider to the network, and writes the information into the node registration table corresponding to the computing node.

3. The method according to claim 1, characterized in that: The providers include different devices, virtual machines, or different processes in the same device.

4. The method according to claim 1, characterized in that: The information of the provider of the node implementation includes: the device ID, virtual machine ID or process ID where the node implementation is located.

5. An electronic device, characterized in that: include: A computation graph manager, used to construct a computation graph of a computation task, wherein the computation graph includes a plurality of computation nodes for completing the computation task; Node manager, used to manage each computing node; The node manager is used to receive node implementation information corresponding to the computing node managed by it and published by the provider in the network, and write the information into the node registration table corresponding to the computing node, wherein the information includes the information of the provider of the node implementation; The information also includes the priority of the node to be selected to participate in completing the computing task. The computation graph manager is used to: determine that the original node implementation needs to be switched when it is determined that the priority of the node implementation in the node registry is higher than the priority of the node implementation currently participating in the computing task; or, when receiving a message that the provider of the original node implementation exits the network, or the provider of the original node implementation fails when running the original node, determine that the original node implementation needs to be switched; When it is detected that the original node implementation participating in the calculation in the calculation graph needs to be switched, the calculation graph manager is used to select a new node implementation to replace the original node implementation based on the information of the provider in the node registry corresponding to the original node implementation and the priority; The stronger the computing capability of the provider of the node implementation, the higher the priority of the node implementation in being selected to participate in completing the computing task.

6. The electronic device according to claim 5, characterized in that: When a new provider joins the network, the node manager is used to receive information about the nodes under its management that is published by the new provider to the network, and write the information into a node registration table corresponding to the computing node.

7. The electronic device according to claim 5, characterized in that: The providers include different devices, virtual machines, or different processes in the same device.

8. The electronic device according to claim 5, characterized in that: The information of the provider of the node implementation includes: the device ID, virtual machine ID or process ID where the node implementation is located.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is enabled to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Distributed storage defense in a cluster

    CN105283831A

  • Node switching method and device, manager, node device, and distributed system

    CN109542627A

  • Federated computing high availability method and device, and medium

    CN110990329A

  • Automatic node discovery method and related device

    CN111757462A

  • System and method for managing a moving peer-to-peer network

    US20190190802A1