Task processing method and device, electronic equipment and storage medium

By managing slave node resources through the LXD plugin of the FTTR system, the master node selects slave nodes with surplus resources to process tasks, which solves the problem of resource waste in FTTR home networking and achieves efficient task distribution and management.

CN116828350BActive Publication Date: 2026-07-03INSPUR COMM TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR COMM TECH CO LTD
Filing Date
2023-06-30
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In FTTR home networking, the existing technology directly selects idle slave nodes to process tasks, which leads to a waste of computing resources and affects the task distribution efficiency and resource utilization of network nodes.

Method used

The master node obtains the remaining computing power and hardware resources of each slave node through the LXD plugin of the FTTR system, selects slave nodes with sufficient remaining resources to process tasks, and splits tasks when necessary to ensure efficient use of resources.

Benefits of technology

It improves the distributed cluster management and network communication management between network nodes, avoids resource waste, and improves the efficiency and reliability of task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116828350B_ABST
    Figure CN116828350B_ABST
Patent Text Reader

Abstract

The application provides a node management method and device, electronic equipment and storage medium, an LXD plug-in based on an FTTR system is built between a master node and each slave node in intelligent networking, the LXD plug-in is used to provide technical support for the master node and each slave node to respectively provide distributed cluster management functions and network communication management functions, the method comprises the following steps: determining at least two first slave nodes for processing a target task, each first slave node is a slave node in intelligent networking; obtaining the residual computing power resources and the residual hardware resources of each first slave node; determining a second slave node from the at least two first slave nodes based on the residual computing power resources and the residual hardware resources and target computing power resources and target hardware resources required for processing the target task; distributing the target task to the second slave node and instructing the second slave node to report the processing result after processing the target task. Using the application can avoid resource waste when the slave node processes the task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a task processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] In the field of communication technology, one of the more common networking methods is Fiber to the Room (FTTR) home networking. FTTR home networking offers a fast multi-node setup, typically consisting of one master node and multiple slave nodes. For most users, the primary purpose of using FTTR home networking is data forwarding, data transmission, and network experience—that is, data communication. In data communication, the master node often sends tasks to the slave nodes, and the slave nodes process the tasks and then report the results back to the master node. The key to this process lies in how to select the appropriate slave node to handle the task, which is crucial for task processing efficiency.

[0003] In related technologies, when the master node in an FTTR home network receives a task to be processed from a terminal, it usually selects a target slave node that can process the task from among the slave nodes that are currently idle, and then sends the task to the target slave node.

[0004] However, since the tasks processed by each slave node in an FTTR home network are mainly hardware-accelerated, and the cost of hardware is decreasing year by year while the performance is increasing exponentially, directly selecting a slave node that is currently idle to process tasks will result in a waste of computing resources. Summary of the Invention

[0005] This invention provides a task processing method, apparatus, electronic device, and storage medium to address the shortcomings of existing FTTR home networks, which result in wasted computing resources when the master node distributes tasks to currently idle slave nodes. The master node selects a second slave node with ample remaining computing and hardware resources from multiple first slave nodes processing the target task, ensuring that the second slave node processing the target task does not cause wasted computing resources. This not only improves the distributed cluster management effect of task distribution among network nodes but also enhances the network communication management effect between network nodes.

[0006] This invention provides a task processing method applied to a master node in an intelligent network. The intelligent network includes the master node and multiple slave nodes. The master node and each slave node are connected via an LXD plugin based on an FTTR system. The LXD plugin provides technical support for distributed cluster management and network communication management functions for the master node and each slave node, respectively. The method includes:

[0007] Identify at least two first slave nodes for processing the target task, each of which is a slave node in the intelligent network;

[0008] Obtain the remaining computing power resources and remaining hardware resources of each of the first slave nodes;

[0009] Based on the remaining computing power resources and the remaining hardware resources, as well as the target computing power resources and target hardware resources required to process the target task, a second slave node is determined from the at least two first slave nodes;

[0010] The target task is distributed to the second slave node, and the second slave node is instructed to process the target task and then report the processing result.

[0011] According to a task processing method provided by the present invention, determining a second slave node from at least two first slave nodes based on each of the remaining computing power resources and each of the remaining hardware resources, as well as the target computing power resources and target hardware resources required to process the target task, includes:

[0012] Determine target remaining computing power resources that are greater than or equal to the target computing power resources from each of the remaining computing power resources, and determine target remaining hardware resources that are greater than or equal to the target hardware resources from each of the remaining hardware resources;

[0013] From the at least two first slave nodes, determine a second slave node that matches the target remaining computing power resources and / or the target remaining hardware resources.

[0014] According to a task processing method provided by the present invention, determining a second slave node from the at least two first slave nodes that matches the target remaining computing power resources and / or the target remaining hardware resources includes:

[0015] From the at least two first slave nodes, determine a third slave node containing the target remaining computing power resources and a fourth slave node containing the target remaining hardware resources;

[0016] If the third slave node and the fourth slave node are the same slave node, then the third slave node or the fourth slave node is determined to be the second slave node;

[0017] If the third slave node and the fourth slave node are different slave nodes, then both the third slave node and the fourth slave node are determined to be the second slave node.

[0018] According to a task processing method provided by the present invention, the number of second slave nodes is at least two, and the step of distributing the target task to the second slave nodes includes:

[0019] When the remaining computing power resources of each second slave node are greater than or equal to the target computing power resources and the remaining hardware resources are greater than or equal to the target hardware resources, the computing power resource difference between each remaining computing power resource and the target computing power resource, and the hardware resource difference between each remaining hardware resource and the target hardware resource are determined.

[0020] The differences in computing power resources and hardware resources are sorted, and the target task is distributed to the second slave node corresponding to the smallest difference in computing power resources and the smallest difference in hardware resources.

[0021] According to a task processing method provided by the present invention, the number of second slave nodes is at least two, and the step of distributing the target task to the second slave nodes further includes:

[0022] In the case where at least two second slave nodes include at least one second slave node with remaining computing power resources greater than or equal to the target computing power resources and at least one second slave node with remaining hardware resources greater than or equal to the target hardware resources, the target task is split into at least two sub-tasks.

[0023] Each subtask is distributed to a corresponding second slave node; wherein the computing power and hardware resources required to process each subtask are less than or equal to the remaining computing power and hardware resources of the corresponding second slave node.

[0024] According to a task processing method provided by the present invention, obtaining the remaining computing power resources and remaining hardware resources of each first slave node includes:

[0025] The resource management tool in the LXD plugin is invoked. The resource management tool is used to manage the used computing power resources and remaining computing power resources of each slave node in the intelligent network, as well as the used hardware resources and remaining hardware resources of each slave node.

[0026] Obtain the remaining computing power resources and remaining hardware resources of each first slave node from the resource management tool.

[0027] According to a task processing method provided by the present invention, the method further includes:

[0028] If no report result is received from the second slave node within a preset time period, a processing query instruction is generated;

[0029] Based on the processing viewing command, the process management tool in the LXD plugin is invoked. The process management tool is used to manage the task processing process of each slave node in the intelligent network.

[0030] Obtain the task processing procedure of the second slave node from the process management tool.

[0031] The present invention also provides a task processing device applied to a master node in an intelligent network, the intelligent network including the master node and multiple slave nodes, the master node and each slave node being connected via an LXD plugin based on an FTTR system, the LXD plugin being used to provide technical support for distributed cluster management functions and network communication management functions for the master node and each slave node respectively, the device comprising:

[0032] The determination module is used to determine at least two first slave nodes for processing the target task, each of the first slave nodes being a slave node in the intelligent network;

[0033] The acquisition module is used to acquire the remaining computing power resources and remaining hardware resources of each of the first slave nodes;

[0034] The determining module is further configured to determine a second slave node from the at least two first slave nodes based on each of the remaining computing power resources and each of the remaining hardware resources, as well as the target computing power resources and target hardware resources required to process the target task;

[0035] The task processing module is used to distribute the target task to the second slave node and instruct the second slave node to process the target task and then report the processing result.

[0036] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the task processing method described above.

[0037] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the task processing method as described above.

[0038] The present invention provides a task processing method, apparatus, electronic device, and storage medium. The task processing method involves establishing an LXD plugin based on an FTTR system between the master node and each slave node in an intelligent network. This LXD plugin provides technical support for distributed cluster management and network communication management functions to the master node and each slave node, respectively. The master node first determines at least two first slave nodes for processing the target task, each first slave node being a slave node in the intelligent network. Then, it acquires the remaining computing power and hardware resources of each first slave node. Further, based on the remaining computing power and hardware resources, as well as the target computing power and hardware resources required to process the target task, it determines a second slave node from the at least two first slave nodes. Finally, it distributes the target task to the second slave node and instructs the second slave node to process the target task and report the processing result. In this way, the master node selects a second slave node from multiple first slave nodes that have sufficient remaining computing power and hardware resources to ensure that the second slave node that processes the target task does not waste computing power or computing resources. This not only improves the distributed cluster management effect of task distribution among network nodes, but also improves the network communication management effect among network nodes. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0040] Figure 1 This is one of the flowcharts illustrating the task processing method provided by the present invention;

[0041] Figure 2 This is a schematic diagram of the mesh networking structure provided by the present invention;

[0042] Figure 3 This is a schematic diagram of the network architecture of the LXD plugin based on the FTTR system provided by the present invention;

[0043] Figure 4 This is the second flowchart of the task processing method provided by the present invention;

[0044] Figure 5 This is a schematic diagram of the task processing device provided by the present invention;

[0045] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0047] It should be noted that the serial numbers assigned to the objects described in this invention, such as "first" and "second", are only used to distinguish the objects being described and do not have any sequential or technical meaning.

[0048] The following is combined Figures 1-6 This invention describes a task processing method, apparatus, electronic device, and storage medium. The task processing method is applied to a master node in an intelligent network, which includes a master node and multiple slave nodes. The master node and each slave node are connected via an LXD plugin based on an FTTR system. The FTTR system can be a system providing FTTR home networking. The LXD plugin provides technical support for distributed cluster management and network communication management functions for the master node and each slave node, respectively. LXD is a Linux container that provides a state transition application programming interface. The following description uses the master node in the intelligent network as an example to illustrate the execution of this task processing method.

[0049] Figure 1 An exemplary flowchart of one of the task processing methods provided by the present invention is shown, with reference to... Figure 1 As shown, the task processing method may include the following steps 110 to 140.

[0050] Step 110: Determine at least two first slave nodes for processing the target task, each of which is a slave node in the intelligent network.

[0051] In this invention, intelligent networking involves creating personalized networking solutions based on different home layouts to ensure smooth internet access for various smart terminal devices, achieving full WiFi coverage and fast internet speeds in the user's home. Intelligent networking is applied in distributed systems. In intelligent networking, each slave node can communicate with other slave nodes or the master node, and can also receive task processing instructions from the master node, playing a crucial role in the stability and reliability of the entire intelligent network. That is, in intelligent networking, slave nodes are often responsible for reading and processing task data, while the master node is responsible for data distribution and scheduling. Furthermore, the master node and each slave node can be a workstation, client, network user, or personal computer, or a server, terminal device, or network device. This invention does not specifically limit the specific form of the master node and each slave node.

[0052] Furthermore, during network setup, the intelligent networking utilizes a one-to-many rapid networking method, connecting multiple slave optical modems through a single master optical modem. Distributed cluster management technology facilitates interaction between intelligent devices on the master and slave optical modems, enabling the deployment of a range of IoT applications. These intelligent terminals include, but are not limited to, temperature and humidity sensors, robotic vacuum cleaners, cameras, internet-connected air conditioners, internet-connected televisions, and internet-connected refrigerators.

[0053] For example, one type of intelligent networking is mesh networking. Figure 2 An exemplary diagram of a mesh networking structure is shown. Figure 2 In this context, when a home network management platform accesses a home via an operator's network, it can connect a main optical modem to a secondary optical modem in the study, a secondary optical modem in the master bedroom, a secondary optical modem in the guest room, a secondary optical modem in the living room, and a secondary optical modem in the kitchen / balcony / bathroom / toilet. This enables interaction between devices such as robot vacuum cleaners, cameras, network-connected air conditioners, temperature and humidity sensors, mobile phones, and virtual reality personal computers (VRPCs) / tablet PCs located between the main and secondary optical modems. This achieves the purpose of IoT deployment and enhances the data flow and interactive value of the network.

[0054] Based on this, in step 110, the master node in the intelligent network first determines at least two first slave nodes from among multiple slave nodes that can handle the target task for the target task. For example, when the target task is a scanning task, the master node determines at least two first slave nodes from among multiple slave nodes that can perform the scanning task as a scanning device and a printer with built-in scanning function.

[0055] Step 120: Obtain the remaining computing power resources and remaining hardware resources of each first slave node.

[0056] The remaining computing resources may include, but are not limited to, the remaining resources of the central processing unit (CPU), memory, and storage of the corresponding first slave node, and the remaining hardware resources may include, but are not limited to, the remaining resources of the keyboard, mouse, touch screen, fax machine, etc. No specific limitations are specified here.

[0057] Specifically, in step 120, the master node obtains the remaining computing power resources and remaining hardware resources of each first slave node. This can be achieved by the master node automatically generating a remaining resource reporting instruction after determining at least two first slave nodes to process the target task. This instruction reports the current remaining computing power resources and remaining hardware resources. Then, the master node sends this remaining resource reporting instruction to each first slave node, ensuring that each first slave node immediately reports its current remaining computing power resources and remaining hardware resources upon receiving the instruction. In this way, the master node can obtain the remaining computing power resources and remaining hardware resources of each first slave node.

[0058] Step 130: Based on the remaining computing power resources and hardware resources, as well as the target computing power resources and target hardware resources required to process the target task, determine the second slave node from at least two first slave nodes.

[0059] Specifically, in step 130, after obtaining the remaining computing power resources and remaining hardware resources of each first slave node, the master node can traverse each remaining computing power resource and each remaining hardware resource based on the target computing power resources and target hardware resources required to process the target task. The purpose of the traversal is to find the first slave node that will not generate computing power waste and hardware resource waste in the entire process of processing the target task, and to determine the found first slave node as the second slave node.

[0060] Step 140: Distribute the target task to the second slave node and instruct the second slave node to process the target task and then report the processing result.

[0061] Specifically, in step 140, when the master node determines the second slave node from at least two first slave nodes, the target task can be distributed to the second slave node, and the second slave node can be instructed to process the target task and report the processing result, thereby achieving the purpose of the slave node actively reporting the processing result after processing the target task; accordingly, after the master node distributes the target task to the second slave node, it can enter the waiting state for the result.

[0062] The task processing method provided by this invention establishes an LXD plugin based on an FTTR system between the master node and each slave node in an intelligent network. This LXD plugin provides technical support for distributed cluster management and network communication management functions for the master node and each slave node, respectively. The master node first determines at least two first slave nodes to process the target task, each of which is a slave node in the intelligent network. Then, it acquires the remaining computing power and hardware resources of each first slave node. Based on these remaining computing power and hardware resources, as well as the target computing power and hardware resources required to process the target task, it further determines a second slave node from the at least two first slave nodes. The target task is then distributed to the second slave node, and the second slave node is instructed to process the target task and report the processing result. In this way, by selecting second slave nodes with abundant remaining computing power and hardware resources from multiple first slave nodes processing the target task, the master node ensures that the second slave node processing the target task does not waste computing power or computational resources. This not only improves the distributed cluster management effect of task distribution among network nodes but also enhances the network communication management effect among network nodes.

[0063] based on Figure 1 In a corresponding embodiment of the task processing method, in one example embodiment, if the LXD plugin of the FTTR system contains a resource management tool, the master node can obtain the remaining computing power resources and remaining hardware resources of each first slave node by calling this resource management tool. Based on this, the specific implementation process in step 120 may include:

[0064] The resource management tool in the LXD plugin is invoked. The resource management tool is used to manage the used and remaining computing power resources of each slave node in the intelligent network, as well as the used and remaining hardware resources of each slave node. The remaining computing power resources and remaining hardware resources of each first slave node are obtained from the resource management tool.

[0065] For example, Figure 3 An exemplary diagram illustrates the network architecture of the LXD plugin based on the FTTR system provided by this invention. Figure 3 In the open virtualization management interface of the LXD plugin, an LXD management tool is built. The LXD management tool is called and used when the master node or slave node performs distributed cluster management. For example, the master node can call the resource management tool to obtain the current remaining computing power resources and remaining hardware resources of each first slave node.

[0066] The task processing method provided by this invention, in which the resource management tool in the LXD plugin is used to manage the used and remaining resources of each slave node in the intelligent network, enables the master node to quickly and accurately obtain the remaining resources of each first slave node by calling the resource management tool in the LXD plugin.

[0067] In actual processing, although slave nodes proactively report processing results to the master node, there are situations where the master node may not receive the reported results within a certain timeframe, such as due to network instability causing processing delays. In such cases, the master node can query the processing status of the target task by issuing a query command. Based on this, Figure 1 In one example embodiment of the task processing method corresponding to the embodiments, where the LXD plugin based on the FTTR system contains a process management tool, the task processing method provided by the present invention further includes:

[0068] If no report result is received from the second slave node within the preset time period, a processing process query command is generated; based on the processing process query command, the process management tool in the LXD plugin is invoked. The process management tool is used to manage the task processing process of each slave node in the intelligent network; the task processing process of the second slave node is obtained from the process management tool.

[0069] Specifically, in Figure 3 The network architecture diagram of the LXD plugin based on the FTTR system shown in the diagram includes an LXD management tool in the virtualization management interface of the LXD plugin. This process management tool is invoked when the master node does not receive a reported result within a preset time period. Its purpose is to enable the master node to know the current task processing status of the slave nodes. For example, the master node can obtain the current task processing process of the second slave node by invoking the process management tool.

[0070] It should be noted that, in Figure 3 The network architecture diagram of the LXD plugin based on the FTTR system shown in the diagram includes the LXD management tool built in the virtualization management interface of the LXD plugin. It can also build service capability tools and configuration management tools. The service capability tools are used to plug in the application services that users have already used, so that other users do not need to download and install them repeatedly. The configuration management tools can be used to configure the initialization method of the master node and each slave node. They can also be used to configure the specific location of smart devices in the home according to different scenarios. For example, the TV and the network-connected refrigerator are set in the living room, and the network-connected air conditioner and VRPC are set in the bedroom.

[0071] In addition, Figure 3The network architecture diagram of the LXD plugin based on the FTTR system shown in the diagram includes an application monitoring tool. This tool monitors the operation of various components and functional modules in the master node and each slave node of the intelligent network, and optimizes and adjusts the intelligent network based on the monitoring results. Furthermore, the Hardware Abstraction Layer (HAL) of the LXD plugin consists of the FTTR system and a virtual system. The network protocol stack, hardware resource management, and general software resource management within the FTTR system have the same structure and functions as the existing FTTR system, and will not be elaborated further here. Moreover, the virtual storage, virtual switches, virtual hosts, virtual databases, and databases (DBs) in the virtual system are all supported by the LXD plugin using Cgroups / namespaces. Cgroups are a mechanism in Linux for managing processes by group; they are a feature of the Linux kernel used to limit, control, and separate the resources (such as CPU, memory, disk I / O, etc.) of a process group. Namespaces are used to distinguish functions, classes, and variables with the same name in different libraries.

[0072] Furthermore, in Figure 3 The network architecture diagram of the LXD plugin based on the FTTR system shown in the figure illustrates how this invention uses LXD plugins, composed of cgroups, namespaces, and other related virtualization technologies, to build an open virtualization software technology platform on an embedded Linux system. Each LXD plugin provides an operating system-level virtualization environment—a complete and independent Linux environment—corresponding to an independent process on the smart terminal, sharing the smart terminal's hardware and software resources. Each LXD plugin corresponds to a miniaturized basic virtual file system (rootfs). Only one copy of this common resource needs to be stored in the smart gateway's system, and other LXD plugins share this common resource. This allows for the standardization of LXD plugins for each application, enabling the promotion of these LXD plugins as open plugins in the public plugin market. The failure of the LXD virtual machine will not affect other services on the original smart terminal, and the smart terminal can detect the anomaly and restart the corresponding LXD plugin within seconds.

[0073] It should be noted that for LXD plugins based on the FTTR system, this invention draws on the characteristics of existing OpenWRT plugins, using ipk (OpenWRT's package format) to organize and manage plugins. Furthermore, to facilitate plugin generation and distribution, this invention provides a corresponding toolset for developers to easily develop and deploy plugins. Simultaneously, to ensure security, this invention does not expose the underlying dependency libraries and environment setup. This is to guarantee the security of the smart gateway itself; only by ensuring the security of the smart gateway can a stable, secure, and rich usage environment be provided for the entire FTTR operating environment and various plugins.

[0074] The task processing method provided by this invention, when the process management tool in the LXD plugin is used to manage the task processing process of each slave node in the intelligent network, enables the master node to quickly and accurately obtain the current task processing process of the second slave node by calling the process management tool in the LXD plugin.

[0075] based on Figure 1 In a corresponding embodiment of the task processing method, in one example embodiment, the specific implementation process of step 130 may include:

[0076] First, target remaining computing power resources greater than or equal to the target computing power resources are determined from all remaining computing power resources, and target remaining hardware resources greater than or equal to the target hardware resources are determined from all remaining hardware resources; then, a second slave node matching the target remaining computing power resources and / or target remaining hardware resources is determined from at least two first slave nodes.

[0077] Specifically, after obtaining the remaining computing power and hardware resources of each first slave node, the master node compares each remaining computing power resource with the target computing power resource to select target remaining computing power resources that are greater than or equal to the target computing power resource. Simultaneously, it compares each remaining hardware resource with the target hardware resource to select target remaining hardware resources that are greater than or equal to the target hardware resource. At this point, the master node can select a second slave node from at least two first slave nodes that matches the target remaining computing power and / or target remaining hardware resources. The number of second slave nodes can be one, two, or more. No specific limitation is made here.

[0078] For example, the remaining computing power resources of the second slave node can be greater than or equal to the target computing power resources and the remaining hardware resources can be greater than or equal to the target hardware resources, or the remaining computing power resources of the second slave node can be greater than or equal to the target computing power resources and the remaining hardware resources can be less than the target hardware resources, or the remaining computing power resources of the second slave node can be less than the target computing power resources and the remaining hardware resources can be greater than or equal to the target hardware resources.

[0079] The task processing method provided by this invention improves the necessity and rationality of determining the second slave node by having the master node determine the second slave node with surplus resources from at least two first slave nodes. This avoids wasting computing power and hardware resources and ensures that all nodes in the intelligent network can cooperate to complete the overall business.

[0080] based on Figure 1 In a corresponding embodiment of the task processing method, in one example embodiment, the master node determines a second slave node from at least two first slave nodes that matches the target remaining computing power resources and / or target remaining hardware resources. The specific implementation process may include:

[0081] From at least two first slave nodes, determine a third slave node containing the target remaining computing power resources and a fourth slave node containing the target remaining hardware resources; if the third slave node and the fourth slave node are the same slave node, determine the third slave node or the fourth slave node as the second slave node; if the third slave node and the fourth slave node are different slave nodes, determine both the third slave node and the fourth slave node as the second slave node.

[0082] Specifically, when the master node determines a target remaining computing power resource greater than or equal to the target computing power resource from the remaining computing power resources of each first slave node, and a target remaining hardware resource greater than or equal to the target hardware resource from the remaining hardware resources of each first slave node, it can determine a third slave node containing the target remaining computing power resource and a fourth slave node containing the target remaining hardware resource from at least two first slave nodes.

[0083] When the third and fourth slave nodes are the same slave node, it means that the remaining computing power resources of the third or fourth slave node are greater than or equal to the target computing power resources and the remaining hardware resources are greater than or equal to the target hardware resources. In this case, the third or fourth slave node can be determined as the second slave node. When the third and fourth slave nodes are different slave nodes, it means that the remaining computing power resources of the third slave node are greater than or equal to the target computing power resources and the remaining hardware resources are less than the target hardware resources, while the remaining computing power resources of the fourth slave node are less than the target computing power resources and the remaining hardware resources are greater than or equal to the target hardware resources. In this case, both the third and fourth slave nodes can be determined as the second slave node.

[0084] The task processing method provided by this invention improves the reliability and flexibility of the second slave node by determining the second slave node with surplus computing power resources and / or hardware resources from at least two first slave nodes, thus providing a reliable guarantee for the subsequent rapid and efficient processing of the target task.

[0085] based on Figure 1In a corresponding embodiment of the task processing method, in an example embodiment, when the number of second slave nodes is at least two, step 140, which distributes the target task to the second slave nodes, may specifically include:

[0086] When the remaining computing power resources of each second slave node are all greater than or equal to the target computing power resources and the remaining hardware resources are all greater than or equal to the target hardware resources, the computing power resource difference between each remaining computing power resource and the target computing power resource, and the hardware resource difference between each remaining hardware resource and the target hardware resource are determined; the computing power resource difference and the hardware resource difference are sorted respectively, and the target task is distributed to the second slave node corresponding to the minimum computing power resource difference and the minimum hardware resource difference.

[0087] Specifically, when the master node identifies at least two second slave nodes to process the target task, and each second slave node has surplus hardware and computing resources, the difference between the remaining computing resources of each second slave node and the target computing resources, as well as the difference between the remaining hardware resources of each second slave node and the target hardware resources, can be determined. These differences are then sorted either from smallest to largest or from largest to smallest. Based on the sorting results, the second slave node with the smallest difference in computing and hardware resources is selected to distribute the target task. This achieves the goal of distributing tasks to the second slave node with the most available remaining resources that best match the resources required to process the target task.

[0088] The task processing method provided by this invention involves the master node selecting from multiple second slave nodes with abundant remaining computing and hardware resources to send the target task to the second slave node whose remaining resources are closest to those required to process the target task. This avoids the resource waste that occurs when selecting the second slave node with the largest remaining resources to process the task, further improving the reliability and flexibility of determining the second slave node.

[0089] based on Figure 1 In a corresponding embodiment of the task processing method, in an example embodiment where the number of second slave nodes is at least two, step 140, which distributes the target task to the second slave nodes, may further include:

[0090] In the case where at least two second slave nodes include at least one second slave node with remaining computing power resources greater than or equal to the target computing power resources and at least one second slave node with remaining hardware resources greater than or equal to the target hardware resources, the target task is split into at least two subtasks; each subtask is distributed to the corresponding second slave node; wherein the computing power resources and hardware resources required to process each subtask are both less than or equal to the remaining computing power resources and remaining hardware resources of the corresponding second slave node.

[0091] Specifically, when the master node determines at least two second slave nodes capable of processing the target task, including at least one second slave node with surplus hardware resources and at least one second slave node with surplus computing power resources, the target task can be split into multiple subtasks, the same number as the number of second slave nodes. Each second slave node processes one subtask, and the operator resources and hardware resources required to process each subtask are less than or equal to the surplus computing power resources and surplus hardware resources of the corresponding second slave node. Furthermore, the sum of the computing power resources required to process each subtask is the target computing power resources required to process the target task; the sum of the hardware resources required to process each subtask is the target hardware resources required to process the target task.

[0092] For example, Figure 4 This is an exemplary second flowchart illustrating the task processing method provided by the present invention. Figure 4 In this setup, child nodes A and B are two secondary slave nodes. After the master node, child nodes A and B are initialized, both child nodes A and B are connected to the mesh network, enabling them to connect with their corresponding IoT devices. At this point, the master node breaks down the target task into subtask A and subtask B, sending subtask A to child node A and subtask B to child node B. After successful sending, the master node enters a waiting state. Child nodes A and B then process their respective subtasks and enter a result reporting state, reporting the processing results to the master node. Furthermore, after child node A and child node B report their processing results to the master node, they can also proactively report their remaining computing power and hardware resources to the master node. At the same time, they will also report the operating data of their connected IoT devices to the master node. For example, the operating data may include temperature data and / or humidity data reported by temperature and humidity sensors. After receiving the remaining computing power and hardware resources reported by child node A and child node B, the master node will upload them all to the network communication management in the LXD plugin for control and management. In this context, the mesh in the mesh network is just a communication channel.

[0093] Each IoT device can be one of other devices such as a robot vacuum cleaner, camera, connected air conditioner, temperature and humidity sensor, mobile phone, or VRPC / Tablet PC.

[0094] The task processing method provided by this invention improves the diversity and reliability of task distribution by the master node when there are no slave nodes with sufficient remaining hardware and computing resources among multiple second slave nodes. This is achieved by splitting the target task into multiple subtasks and distributing each subtask to the corresponding second slave node.

[0095] The task processing apparatus provided by the present invention is described below. The task processing apparatus described below and the task processing method described above can be referred to in correspondence.

[0096] The task processing device provided by this invention is applied to the master node in an intelligent network. The intelligent network includes a master node and multiple slave nodes. The master node and each slave node are connected through an LXD plugin based on an FTTR system. The LXD plugin is used to provide technical support for distributed cluster management functions and network communication management functions for the master node and each slave node, respectively. Figure 5 An exemplary schematic diagram of the task processing device provided by the present invention is shown, with reference to... Figure 5 As shown, the task processing device 500 may include:

[0097] The determination module 510 is used to determine at least two first slave nodes for processing the target task, each of which is a slave node in the intelligent network;

[0098] The acquisition module 520 is used to acquire the remaining computing power resources and remaining hardware resources of each first slave node;

[0099] The determining module 510 is also used to determine a second slave node from at least two first slave nodes based on each remaining computing power resource and each remaining hardware resource, as well as the target computing power resource and target hardware resource required to process the target task;

[0100] The task processing module 530 is used to distribute the target task to the second slave node and instruct the second slave node to process the target task and then report the processing result.

[0101] Optionally, the determining module 510 is specifically used to determine target remaining computing power resources that are greater than or equal to the target computing power resources from each remaining computing power resource, and to determine target remaining hardware resources that are greater than or equal to the target hardware resources from each remaining hardware resource; and to determine a second slave node that matches the target remaining computing power resources and / or the target remaining hardware resources from at least two first slave nodes.

[0102] Optionally, the determining module 510 is further configured to determine, from at least two first slave nodes, a third slave node containing the target remaining computing power resources and a fourth slave node containing the target remaining hardware resources; if the third slave node and the fourth slave node are the same slave node, determine the third slave node or the fourth slave node as the second slave node; if the third slave node and the fourth slave node are different slave nodes, determine that both the third slave node and the fourth slave node are the second slave node.

[0103] Optionally, when there are at least two second slave nodes, the task processing module 530 is specifically used to determine the difference between each remaining computing power resource and the target computing power resource, and the difference between each remaining hardware resource and the target hardware resource, when the remaining computing power resources of each second slave node are greater than or equal to the target computing power resources and the remaining hardware resources of each second slave node are greater than or equal to the target hardware resources; sort each difference between computing power resources and each difference between hardware resources, and distribute the target task to the second slave node corresponding to the minimum difference between computing power resources and the minimum difference between hardware resources.

[0104] Optionally, when there are at least two second slave nodes, the task processing module 530 is further configured to split the target task into at least two subtasks when the at least two second slave nodes include at least one second slave node with remaining computing power resources greater than or equal to the target computing power resources and at least one second slave node with remaining hardware resources greater than or equal to the target hardware resources; and distribute each subtask to the corresponding second slave node; wherein the computing power resources and hardware resources required to process each subtask are both less than or equal to the remaining computing power resources and remaining hardware resources of the corresponding second slave node.

[0105] Optionally, module 520 is used to call the resource management tool in the LXD plugin. The resource management tool is used to manage the used and remaining computing power resources of each slave node in the intelligent network, as well as the used and remaining hardware resources of each slave node. The remaining computing power resources and remaining hardware resources of each first slave node are obtained from the resource management tool.

[0106] Optionally, module 520 is further used to generate a processing process query command if no reporting result is received from the second slave node within a preset time period; based on the processing process query command, call the process management tool in the LXD plugin, which is used to manage the task processing process of each slave node in the intelligent network; and obtain the task processing process of the second slave node from the process management tool.

[0107] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device 600 may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640. The processor 610, communication interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions from the memory 630 to execute task processing methods. This method is applied to the master node in an intelligent network, which includes a master node and multiple slave nodes. The master node and each slave node are connected via an LXD plugin based on an FTTR system. The LXD plugin provides technical support for distributed cluster management and network communication management functions for the master node and each slave node, respectively. The method includes:

[0108] Identify at least two first slave nodes for processing the target task, each of which is a slave node in the intelligent network; obtain the remaining computing power resources and remaining hardware resources of each first slave node; based on the remaining computing power resources and remaining hardware resources, as well as the target computing power resources and target hardware resources required to process the target task, determine a second slave node from the at least two first slave nodes; distribute the target task to the second slave node, and instruct the second slave node to process the target task and then report the processing result.

[0109] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0110] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the task processing methods provided by the above methods, and is applied to the master node in an intelligent network. The intelligent network includes a master node and multiple slave nodes, and the master node and each slave node are connected through an LXD plugin based on an FTTR system. The LXD plugin is used to provide technical support for distributed cluster management functions and network communication management functions for the master node and each slave node, respectively. The method includes:

[0111] Identify at least two first slave nodes for processing the target task, each of which is a slave node in the intelligent network; obtain the remaining computing power resources and remaining hardware resources of each first slave node; based on the remaining computing power resources and remaining hardware resources, as well as the target computing power resources and target hardware resources required to process the target task, determine a second slave node from the at least two first slave nodes; distribute the target task to the second slave node, and instruct the second slave node to process the target task and then report the processing result.

[0112] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, this computer program is implemented to perform the task processing methods provided by the aforementioned methods, applied to a master node in an intelligent network. The intelligent network includes a master node and multiple slave nodes, with the master node and each slave node connected via an LXD plugin based on an FTTR system. The LXD plugin provides technical support for distributed cluster management functions and network communication management functions for the master node and each slave node, respectively. The method includes:

[0113] Identify at least two first slave nodes for processing the target task, each of which is a slave node in the intelligent network; obtain the remaining computing power resources and remaining hardware resources of each first slave node; based on the remaining computing power resources and remaining hardware resources, as well as the target computing power resources and target hardware resources required to process the target task, determine a second slave node from the at least two first slave nodes; distribute the target task to the second slave node, and instruct the second slave node to process the target task and then report the processing result.

[0114] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A task processing method, characterized in that, A master node is applied in an intelligent network, wherein the intelligent network includes the master node and multiple slave nodes, and the master node and each slave node are connected via an LXD plugin based on an FTTR system. The LXD plugin is used to provide technical support for distributed cluster management functions and network communication management functions for the master node and each slave node, respectively. The method includes: Identify at least two first slave nodes for processing the target task, each of which is a slave node in the intelligent network; Obtain the remaining computing power resources and remaining hardware resources of each of the first slave nodes; Based on the remaining computing power resources and the remaining hardware resources, as well as the target computing power resources and target hardware resources required to process the target task, a second slave node is determined from the at least two first slave nodes; The target task is distributed to the second slave node, and the second slave node is instructed to process the target task and then report the processing result.

2. The task processing method according to claim 1, characterized in that, The step of determining a second slave node from the at least two first slave nodes based on the remaining computing power resources and the remaining hardware resources, as well as the target computing power resources and target hardware resources required to process the target task, includes: Determine target remaining computing power resources that are greater than or equal to the target computing power resources from each of the remaining computing power resources, and determine target remaining hardware resources that are greater than or equal to the target hardware resources from each of the remaining hardware resources; From the at least two first slave nodes, determine a second slave node that matches the target remaining computing power resources and / or the target remaining hardware resources.

3. The task processing method according to claim 2, characterized in that, The step of determining the second slave node from the at least two first slave nodes that matches the target remaining computing power resources and / or the target remaining hardware resources includes: From the at least two first slave nodes, determine a third slave node containing the target remaining computing power resources and a fourth slave node containing the target remaining hardware resources; If the third slave node and the fourth slave node are the same slave node, then the third slave node or the fourth slave node is determined to be the second slave node; If the third slave node and the fourth slave node are different slave nodes, then both the third slave node and the fourth slave node are determined to be the second slave node.

4. The task processing method according to any one of claims 1 to 3, characterized in that, The number of the second slave nodes is at least two, and the step of distributing the target task to the second slave nodes includes: When the remaining computing power resources of each second slave node are greater than or equal to the target computing power resources and the remaining hardware resources are greater than or equal to the target hardware resources, the computing power resource difference between each remaining computing power resource and the target computing power resource, and the hardware resource difference between each remaining hardware resource and the target hardware resource are determined. The differences in computing power resources and hardware resources are sorted, and the target task is distributed to the second slave node corresponding to the smallest difference in computing power resources and the smallest difference in hardware resources.

5. The task processing method according to any one of claims 1 to 3, characterized in that, The number of the second slave nodes is at least two, and the step of distributing the target task to the second slave nodes further includes: In the case where at least two second slave nodes include at least one second slave node with remaining computing power resources greater than or equal to the target computing power resources and at least one second slave node with remaining hardware resources greater than or equal to the target hardware resources, the target task is split into at least two sub-tasks. Each subtask is distributed to a corresponding second slave node; wherein the computing power and hardware resources required to process each subtask are less than or equal to the remaining computing power and hardware resources of the corresponding second slave node.

6. The task processing method according to any one of claims 1 to 3, characterized in that, The step of obtaining the remaining computing power resources and remaining hardware resources of each of the first slave nodes includes: The resource management tool in the LXD plugin is invoked. The resource management tool is used to manage the used computing power resources and remaining computing power resources of each slave node in the intelligent network, as well as the used hardware resources and remaining hardware resources of each slave node. Obtain the remaining computing power resources and remaining hardware resources of each first slave node from the resource management tool.

7. The task processing method according to any one of claims 1 to 3, characterized in that, The method further includes: If no report result is received from the second slave node within a preset time period, a processing query instruction is generated; Based on the processing viewing command, the process management tool in the LXD plugin is invoked. The process management tool is used to manage the task processing process of each slave node in the intelligent network. Obtain the task processing procedure of the second slave node from the process management tool.

8. A task processing device, characterized in that, A master node applied in an intelligent network, the intelligent network including the master node and multiple slave nodes, the master node and each of the slave nodes being connected via an LXD plugin based on an FTTR system, the LXD plugin being used to provide technical support for distributed cluster management functions and network communication management functions for the master node and each of the slave nodes respectively, the device comprising: The determination module is used to determine at least two first slave nodes for processing the target task, each of the first slave nodes being a slave node in the intelligent network; The acquisition module is used to acquire the remaining computing power resources and remaining hardware resources of each of the first slave nodes; The determining module is further configured to determine a second slave node from the at least two first slave nodes based on each of the remaining computing power resources and each of the remaining hardware resources, as well as the target computing power resources and target hardware resources required to process the target task; The task processing module is used to distribute the target task to the second slave node and instruct the second slave node to process the target task and then report the processing result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the task processing method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the task processing method as described in any one of claims 1 to 7.