Node scheduling method, system and device
The node scheduling method of fog node management equipment solves business needs when the equipment does not have computing capabilities. Through offline recommendation and dynamic selection of idle fog nodes, it ensures the execution of computing tasks and improves efficiency and success rate.
Patent Information
- Application Number
- CN202110926261.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-12
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-08-12
AI Technical Summary
In some application scenarios, when the device itself does not have certain computing capabilities (such as face recognition capabilities), it cannot meet business needs, especially when computing tasks need to be performed during emergencies but the device itself cannot complete them.
Through the node scheduling method, the fog node management device is used to receive scheduling requests, find and select available or idle fog nodes to perform computing tasks, and ensure that the computing tasks can be successfully completed. The method includes offline recommendation strategies and dynamic selection of idle fog nodes to ensure effective execution of tasks.
It effectively solves business needs when the device does not have computing capabilities, improves scheduling efficiency and task success rate, and ensures the smooth execution of computing tasks.
Smart Images

Figure CN113608856B
Abstract
Description
Technical Field
[0001] The present application relates to data computing technology, and in particular to a node scheduling method, system and device. Background Art
[0002] In some application scenarios, the following situations often occur: a device itself does not have certain computing capabilities, such as face recognition capabilities, but the device is currently required to perform calculations corresponding to the computing capabilities. Taking face recognition capabilities as an example, if the camera itself does not have face recognition capabilities, but currently receives an alarm and requires the camera to further perform face recognition. Once the above situation occurs, it will lead to failure to meet business needs. Summary of the invention
[0003] The embodiments of the present application provide a node scheduling method, system and apparatus to achieve meeting business needs by scheduling fog nodes to perform the above-mentioned calculations when the device itself does not have the ability to perform certain calculations.
[0004] The embodiment of the present application provides a first node scheduling method, which is applied to a node management device, wherein the node management device is used to manage fog nodes in a fog network, and the method includes:
[0005] Receiving a fog node scheduling request; the fog node scheduling request is sent by a source node when the source node does not currently have the ability to execute the acquired computing task;
[0006] Searching for a set of candidate fog nodes associated with the source node that has been determined according to an offline recommendation strategy; if the set of candidate fog nodes is found and there are currently available candidate fog nodes in the set of candidate fog nodes for executing the computing task, selecting a target fog node from the available candidate fog nodes to execute the computing task; otherwise, selecting a target fog node that is currently in an idle state according to the current working state of the fog nodes in the fog network for executing the computing task to execute the computing task;
[0007] The target fog node is fed back to the source node so that the source node sends the computing task to the target fog node for execution.
[0008] Optionally, determining a set of candidate fog nodes associated with the source node according to an offline recommendation strategy includes:
[0009] Determine a reference fog node that is scheduled to execute the historical computing task of the source node within a first historical time period;
[0010] Obtaining characteristic information of each reference fog node being scheduled to execute the historical computing task of the source node; the characteristic information at least includes: a task execution result; the task execution result is: task execution success or task execution failure;
[0011] A set of candidate fog nodes associated with the source node is determined according to the obtained feature information of each reference fog node and a trained recommendation learning algorithm; the set of candidate fog nodes includes at least one reference fog node.
[0012] Optionally, the available candidate fog nodes currently existing in the candidate fog node set for executing the computing task are determined by the following steps:
[0013] The current working state of the candidate fog node in the obtained candidate fog node set is checked, and if the current working state is idle, the candidate fog node is determined to be an available candidate fog node for executing the computing task.
[0014] Optionally, selecting a target fog node that is currently in an idle state to perform the computing task according to the current working state of the fog node in the fog network for performing the computing task includes:
[0015] Selecting a set of fog nodes from the fog network for performing the computing task;
[0016] According to the obtained quality scores of each fog node in the fog node set, at least one fog node whose current working state is idle and whose quality score is higher than a set value is selected from the fog node set as the target fog node to perform the computing task, wherein the quality score is determined based on the record that the fog node is scheduled to perform the historical computing task in the second historical time period.
[0017] Optionally, selecting at least one fog node whose current working state is idle and whose quality score is higher than a set value from the fog node set as the target fog node to perform the computing task includes:
[0018] Determine the current geographical location of the source node and the operator to which the source node belongs;
[0019] Select from the fog network a fog node that belongs to an operator in the same city or province as the source node and is used to execute the computing task, and obtain the fog node set; or, when there is no fog node that belongs to an operator in the same city or province as the source node in the fog network, or when there is a fog node that belongs to an operator in the same city or province as the source node in the fog network but the quality score of the existing fog node is lower than a set score threshold, select from the fog network a fog node that belongs to the same city or province as the source node and is used to execute the computing task, and obtain the fog node set.
[0020] Optionally, the quality score of the fog node is determined by the following steps:
[0021] Obtain the total number of times the fog node is scheduled to perform historical computing tasks in the second historical time period;
[0022] If the total number of scheduling times is less than a preset number threshold, determining the quality score of the fog node to be a first value;
[0023] If the total number of scheduling times is greater than or equal to a preset number threshold, then when the failure rate of establishing a network connection between the fog node and the source node is greater than the preset failure rate threshold, the quality score of the fog node is determined to be a second value; otherwise, the quality score of the fog node is determined based on the number of times the fog node is successfully scheduled to perform historical computing tasks in the second historical time period and the total number of scheduling times.
[0024] The embodiment of the present application provides a second node scheduling method, which is applied to any node device, including:
[0025] When receiving a computing task, if it is determined that the computing task is not currently capable of being performed, the source node sends a fog node scheduling request to a node management device so that the node management device determines a target fog node for performing the computing task;
[0026] Upon receiving the target fog node for executing the computing task fed back by the node management device, a connection is established with the target fog node, and the computing task is sent to the target fog node for execution through the established connection, and the computing result returned by the target fog node after executing the computing task is received through the connection.
[0027] A node scheduling system, the system comprising a node management device, a source node, and a fog node managed by the node management device;
[0028] The node management device executes the first method as above;
[0029] The source node is used to execute the second method as above.
[0030] A node scheduling device, which is applied to a node management device, wherein the node management device is used to manage fog nodes in a fog network; the device comprises:
[0031] A scheduling request unit, configured to receive a fog node scheduling request sent from a source node; the fog node scheduling request is sent by the source node when the source node currently does not have the ability to execute the acquired computing task;
[0032] a scheduling unit, configured to search for a set of candidate fog nodes associated with the source node determined according to an offline recommendation strategy; if the set of candidate fog nodes is found and there are currently available candidate fog nodes in the set of candidate fog nodes for executing the computing task, a target fog node is selected from the available candidate fog nodes to execute the computing task; otherwise, a target fog node that is currently in an idle state is selected to execute the computing task according to the current working state of the fog nodes in the fog network for executing the computing task;
[0033] The node feedback unit is used to feed back the target fog node to the source node so that the source node sends the computing task to the target fog node for execution.
[0034] The embodiment of the present application also provides an electronic device. The electronic device includes: a processor and a machine-readable storage medium;
[0035] The machine-readable storage medium stores machine-executable instructions that can be executed by the processor;
[0036] The processor is used to execute machine executable instructions to implement the steps of the above disclosed method.
[0037] It can be seen from the above technical solutions that in this embodiment, when scheduling a target fog node for a source node, the offline recommendation strategy is first tried, that is, the target fog node that has successfully executed the historical computing task of the source node is determined according to the historical work records of the source node and the fog node. This can avoid reselecting the fog node to be scheduled for the source node, saving time and improving scheduling efficiency.
[0038] Furthermore, in this embodiment, when the attempt to schedule the fog node using the offline recommendation strategy fails, the target fog node that is currently in an idle state is dynamically selected based on the current working state of the fog node in the fog network to execute the computing task of the source node. This can ensure that the computing task of the source node reaches the fog node as much as possible and is successfully executed in the fog node, thereby ensuring business needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0040] Figure 1 A flow chart of the method provided in the embodiment of the present application;
[0041] Figure 2 A flowchart for determining a set of candidate fog nodes associated with a source node provided in an embodiment of the present application;
[0042] Figure 3A flowchart of selecting a target fog node that is currently in an idle state according to the current working state of a fog node for performing a computing task in a fog network provided in an embodiment of the present application;
[0043] Figure 4 Another method flow chart provided for an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the network configuration of the embodiment provided in this application;
[0045] Figure 6 A system structure diagram provided for an embodiment of the present application;
[0046] Figure 7 A structural diagram of a device provided in an embodiment of the present application;
[0047] Figure 8 Another device structure diagram provided for an embodiment of the present application;
[0048] Fig. 9 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0050] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0051] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0052] See also Figure 1 , Figure 1 A flowchart of the first method provided in an embodiment of the present application. The process is applied to a node management device. As an embodiment, the node management device here can be deployed on a cloud platform (also known as a cloud computing platform, which can provide computing, network, storage and other services based on hardware resources and software resources).
[0053] In this embodiment, the node management device can be used to manage fog nodes (also called fog computing nodes) in the fog network. The so-called fog network is between the access network layer and the core network layer, also known as the fog layer. Deploying high-density computing devices close to users in the fog network can greatly reduce the latency of traditional cloud computing, while also providing user mobility support. These computing devices are called fog nodes. In applications, fog nodes can be divided into three categories according to their deployment location and function: fog edge node, foglet, and fog server. This embodiment does not specifically limit the specific implementation form of fog nodes, which are collectively referred to as fog nodes.
[0054] like Figure 1 As shown, the process may include the following steps:
[0055] Step 101: The node management device sends a fog node scheduling request.
[0056] Optionally, the fog node scheduling request here may be sent by the source node when it does not currently have the ability to execute the acquired computing task. In the application, the source node here may be a network device in the access layer, or other nodes with computing capabilities such as network cameras, etc., which can be collectively referred to as source nodes, and this embodiment is not limited.
[0057] When some emergencies occur, some nodes often need to perform computing tasks, but they do not have the ability to perform the computing tasks due to limited capabilities. Take the camera installed in a campus as an example. The camera detects people entering the campus in real time. Once a suspicious person is found, an alarm will be triggered. For this alarm, further face recognition is required to determine whether the suspicious person is really suspicious. However, the current camera is a low-end product, which is only used for monitoring and does not have the ability to recognize faces. This is the above situation: the camera detects the computing task that needs to be performed, but currently does not have the ability to perform the computing task.
[0058] Once a node such as the above-mentioned camera detects a computing task but currently does not have the ability to perform the computing task, it will send a fog node scheduling request to the above-mentioned node management device as a source node, that is, as described in step 101, the node management device will eventually receive the fog node scheduling request sent by the source node.
[0059] Step 102, the node management device searches for a set of candidate fog nodes associated with the source node that has been determined according to the offline recommendation strategy. If the set of candidate fog nodes is found and there are currently available candidate fog nodes in the set of candidate fog nodes for performing the above-mentioned computing task, a target fog node is selected from the available candidate fog nodes to perform the above-mentioned computing task. Otherwise, a target fog node that is currently in an idle state is selected to perform the above-mentioned computing task based on the current working state of the fog nodes in the fog network for performing the above-mentioned computing task.
[0060] It can be seen from step 102 that when the node management device receives the fog node scheduling request, it first attempts offline recommendation strategy scheduling, that is, searching for a set of candidate fog nodes associated with the source node that has been determined according to the offline recommendation strategy. Once the candidate fog node set is found, an atomic operation is performed on the candidate fog node set to find a candidate fog node (also referred to as an available candidate fog node) that is idle and is used to perform the above-mentioned computing task from the candidate fog node set. In this embodiment, the candidate fog node set is implemented based on the record of the fog node's previous execution of the above-mentioned source node's historical computing task (that is, the offline matching record between the source node and the fog node). The candidate fog node set will be described in detail below, and will not be repeated here.
[0061] As an embodiment, the above-mentioned searching for an idle candidate fog node (also referred to as an available candidate fog node) for executing the above-mentioned computing task from the candidate fog node set may include: checking the current working status of the candidate fog node in the obtained candidate fog node set; if the current working status is idle, determining that the candidate fog node is an available candidate fog node for executing the above-mentioned computing task.
[0062] In this embodiment, the fog node will report the status to the node management device when its working state switches. Initially, the working state of the fog node itself is idle, and the idle working state will be reported to the node management device. In this embodiment, the working state switching refers to changing from idle to working, or from working to idle. In this embodiment, for the fog node whose working state is reported as idle, the node management device will record it in the global idle fog node list, such as recording the node identifier of the fog node whose working state is idle in the global idle fog node list, so as to facilitate the subsequent query of the fog node whose working state is idle.
[0063] Based on this, in the present embodiment, checking the current working state of the candidate fog nodes in the obtained candidate fog node set may include: for each candidate fog node in the candidate fog node set, checking whether the candidate fog node has been recorded in the global idle fog node list; if so, determining that the current working state of the candidate fog node is idle, and the candidate fog node can be used as an available candidate fog node for executing computing tasks; otherwise, determining that the current working state of the candidate fog node is working, and the candidate fog node cannot be used as an available candidate fog node for executing computing tasks.
[0064] As an embodiment, in this embodiment, the candidate fog node set may arrange the candidate fog nodes in order. The order here may be the order of quality score from high to low (how to calculate the quality score will be described below), etc., which is not specifically limited in this embodiment. The candidate fog nodes are arranged in the candidate fog node set in order from high to low according to the quality score. In this embodiment, the first candidate fog node in the sequence may be used as the current candidate fog node in order, and it is checked whether the current candidate fog node has been recorded in the global idle fog node list. If so, it is determined that the current working state of the current candidate fog node is idle, and the current candidate fog node can be used as an available candidate fog node for executing computing tasks, and the current process is terminated. Otherwise, if the current candidate fog node is not the last candidate fog node in the sequence, the next candidate fog node of the current candidate fog node in the sequence is used as the current candidate fog node, and the step of checking whether the current candidate fog node has been recorded in the global idle fog node list is returned.
[0065] In this embodiment, if the above-mentioned candidate fog node set cannot be found, or the above-mentioned candidate fog node set is found but the above-mentioned available candidate fog node does not exist in the candidate fog node set, then try to schedule according to the static rule strategy, that is, as described in the above step 102, select the target fog node that is currently in an idle state to perform the above-mentioned computing task according to the current working state of the fog node used to perform the above-mentioned computing task in the fog network. The following will focus on how to select the target fog node that is currently in an idle state to perform the above-mentioned computing task according to the current working state of the fog node used to perform the above-mentioned computing task in the fog network, which will not be repeated here.
[0066] Finally, through the above step 102, the node management device selects the target fog node for executing the above computing task. Once the node management device selects the target fog node for executing the above computing task, the following step 103 is executed.
[0067] Step 103: The node management device feeds back the target fog node to the source node so that the source node sends the computing task to the target fog node for execution.
[0068] So far, completed Figure 1 The process shown.
[0069] pass Figure 1 It can be seen from the process shown that in this embodiment, when scheduling the target fog node for the source node, the offline recommendation strategy is first tried, that is, the target fog node that has successfully executed the historical computing task of the source node is determined according to the historical work records of the source node and the fog node. This can avoid reselecting the fog node to be scheduled for the source node, saving time and improving scheduling efficiency.
[0070] Furthermore, in this embodiment, when the attempt to schedule the fog node using the offline recommendation strategy fails, the target fog node that is currently in an idle state is dynamically selected based on the current working state of the fog node in the fog network to execute the computing task of the source node. This can ensure that the computing task of the source node reaches the fog node as much as possible and is successfully executed in the fog node, thereby ensuring business needs.
[0071] Below through Figure 2 Describe how to determine the set of candidate fog nodes associated with the source node according to the offline recommendation strategy in the above step 102.
[0072] See also Figure 2 , Figure 2 The flowchart of determining a set of candidate fog nodes associated with a source node provided in an embodiment of the present application. Figure 2 As shown, the process may include the following steps:
[0073] Step 201, determining a reference fog node that is scheduled to execute the historical computing task of the source node in a first historical time period.
[0074] Optionally, in this embodiment, the first historical time period can be set according to actual needs, such as being set to 7 historical days.
[0075] Step 202: Obtain characteristic information of each reference fog node that is scheduled to execute the historical computing task of the source node.
[0076] Optionally, the characteristic information here at least includes: task execution result. For example, the task execution result may include task execution success, or task execution failure, etc., which is not specifically limited in this embodiment. Of course, the above characteristic information may also include: task execution time, etc., which will not be explained one by one here.
[0077] Step 203: Determine a set of candidate fog nodes associated with the source node according to the obtained feature information of each reference fog node and the trained recommendation learning algorithm; the set of candidate fog nodes includes at least one reference fog node.
[0078] Taking the example that the characteristic information includes the task execution result, optionally, in this step 203, the reference fog node that successfully executes the task can be determined as the set of candidate fog nodes associated with the source node according to the trained recommendation learning algorithm.
[0079] Taking the example that the characteristic information includes the task execution result and the task execution time, optionally, in this step 203, the reference fog nodes whose task execution is successful and whose task execution time is less than the set time can be determined as the set of candidate fog nodes associated with the source node based on the trained recommendation learning algorithm.
[0080] So far, through the above steps 201 to 203, how to determine the candidate fog node set associated with the source node is finally realized. It should be noted that the candidate fog node set associated with the source node can be determined according to the timing Figure 2 Update the process shown.
[0081] In this embodiment, once the candidate fog node set associated with the source node is determined, the source node identifier (ID) may be associated with the candidate fog node set and recorded. In addition, the fog node scheduling request may also carry the source node identifier. Based on this, searching for the candidate fog node set associated with the source node determined according to the offline recommendation strategy in the above step 102 may include: searching for the candidate fog node set associated with the source node identifier carried by the fog node scheduling request in the local record.
[0082] The following describes how to select a target fog node that is currently in an idle state to perform the above computing task according to the current working state of the fog node in the fog network used to perform the above computing task in the above step 102:
[0083] See also Figure 3 , Figure 3 The flowchart of selecting a target fog node that is currently in an idle state according to the current working state of a fog node used to perform a computing task in a fog network provided in an embodiment of the present application. Figure 3 As shown, the process may include the following steps:
[0084] Step 301: Select a set of fog nodes from the fog network for executing the above computing task.
[0085] Optionally, in this embodiment, when selecting a fog node set for executing the above computing task from the fog network, the current geographical location of the source node and the operator to which the source node belongs are first determined. Optionally, in this embodiment, the current geographical location of the source node and the operator to which the source node belongs can be resolved based on the IP address of the source node carried in the fog node scheduling request.
[0086] Afterwards, as an embodiment, fog nodes that belong to the same city operator or the same province operator as the source node and are used to perform the above-mentioned computing tasks can be preferentially selected from the fog network, that is, the above-mentioned fog node set is obtained.
[0087] As another embodiment, when there is no fog node in the fog network that belongs to the same city operator or the same province operator as the source node, a fog node that belongs to the same city or the same province as the source node and is used to perform the above-mentioned computing task is selected from the fog network, and the above-mentioned fog node set is obtained. Alternatively, there are fog nodes in the fog network that belong to the same city operator or the same province operator as the source node, but at this time, the quality scores of the fog nodes that belong to the same city operator or the same province operator as the source node are all lower than the set score threshold, such as 60 points, then a fog node that belongs to the same city or the same province as the source node and is used to perform the above-mentioned computing task is selected from the fog network, and the above-mentioned fog node set is obtained. The quality score of the fog node will be described below, and will not be repeated here.
[0088] Step 302: According to the obtained quality scores of each fog node in the fog node set, at least one fog node whose current working state is idle and whose quality score is higher than a set value is selected from the fog node set as the target fog node to execute the computing task.
[0089] In this embodiment, the quality score of the fog node is determined based on the record of the fog node being scheduled to perform historical computing tasks in the second historical time period. Optionally, the following steps a1 to a2 are used to describe how to obtain the quality score of the fog node:
[0090] Step a1, obtaining the total number of times the fog node is scheduled to perform historical computing tasks in the second historical time period.
[0091] In this embodiment, the second historical time period can be set according to actual needs, such as 14 days, etc., which is not specifically limited in this embodiment.
[0092] Step a2: If the total number of scheduling times is less than the preset number threshold, the quality score of the fog node is determined to be a first value; if the total number of scheduling times is greater than or equal to the preset number threshold, when the failure rate of establishing a network connection with the source node is greater than the preset failure rate threshold, the quality score of the fog node is determined to be a second value; otherwise, the quality score of the fog node is determined based on the number of times the fog node is successfully scheduled to perform historical computing tasks in the second historical time period and the total number of scheduling times.
[0093] In this embodiment, the preset number threshold can be set according to actual needs, such as being set to 10 times, etc., and this embodiment does not specifically limit it.
[0094] When the total number of scheduling times is less than the preset number threshold, it means that the fog node is not frequently used. At this time, the quality score of the fog node can be directly determined to be a first value, such as 60 points.
[0095] When the total number of scheduling times is greater than or equal to the preset number threshold, if the network connection establishment failure rate between the fog node and the source node is greater than the preset failure rate threshold, it means that the probability of the fog node being scheduled is very small. In view of load balancing, in order to improve the utilization rate of the fog node, the quality score of the fog node can be set to a relatively large value (recorded as the second value), such as 100 points. Of course, if the network connection establishment failure rate between the fog node and the source node is less than or equal to the preset failure rate threshold, the quality score of the fog node can be determined based on the number of times the fog node is successfully scheduled to perform historical computing tasks in the second historical time period and the total number of scheduling times, for example, by the following formula:
[0096] Quality score = the number of times fog nodes successfully schedule historical computing tasks / total number of scheduling times
[0097] Finally, through the above steps a1 to a2, how to determine the quality score of each fog node in the fog node set is realized. It should be noted that the quality score of each fog node in the fog node set will also be updated regularly, and the specific update process can refer to the above steps a1 to a2.
[0098] Optionally, in this embodiment, when executing step 303, for the fog node set, first arrange the fog nodes in order from high to low according to the quality score, then take the first fog node in the sequence as the current fog node, check whether the current fog node has been recorded in the global idle fog node list, if yes, determine that the current working state of the current fog node is idle, and use the current fog node as the target fog node to perform the above calculation task, otherwise, if the current fog node is not the last fog node in the sequence, then take the fog node after the current fog node in the sequence as the current fog node, and return to execute the step of checking whether the current fog node has been recorded in the global idle fog node list. It should be noted that when selecting the target fog node according to this method, if it is found that there is a fog node with an idle working state, but the quality score of the fog node is lower than the set score threshold, at this time, as an embodiment, it can be considered that there is no target fog node, and a prompt that there is no target fog node is output; or, as another embodiment, in order to ensure business needs, an idle fog node with a quality score lower than the set score threshold is used as the target fog node, which is not specifically limited in this embodiment.
[0099] It should be noted that, in this embodiment, once the target fog node is selected, the target fog node is deleted from the global idle fog node list through an atomic operation.
[0100] The above is a description of the method provided in the embodiment of the present application from the perspective of the node management device. The following is a description from the perspective of the source node:
[0101] See also Figure 4 , Figure 4Another method flow chart provided in an embodiment of the present application. The method is applied to any node device. The node device here can refer to the source node described above, which will not be repeated here.
[0102] like Figure 4 As shown, the process may include the following steps:
[0103] Step 401, when receiving a computing task, if it is determined that the computing task is not currently capable of being performed, the source node sends a fog node scheduling request to the node management device so that the node management device determines a target fog node for performing the computing task.
[0104] After sending a fog node scheduling request to the node management device, the node management device will follow the following steps after receiving the fog node scheduling request: Figure 1 The process shown is executed to finally determine the target fog node for executing the above computing task.
[0105] Step 402, upon receiving the target fog node for executing the computing task fed back by the node management device, establish a connection with the target fog node, send the computing task to the target fog node for execution through the established connection, and receive the computing result returned by the target fog node after executing the computing task through the connection.
[0106] So far, completed Figure 4 The process shown.
[0107] pass Figure 4 The process shown implements that when the source node detects a computing task that needs to be executed but does not currently have the ability to execute the computing task, it requests the node management device to schedule and select a target fog node for executing the above computing task. The target fog node helps the source node to execute the above computing task, realizing a distributed computing method for computing tasks to meet business needs.
[0108] The following is an example description of an embodiment of the present application in conjunction with a networking:
[0109] See also Figure 5 , Figure 5 This is a network diagram of the embodiment provided in this application. Figure 5 In the networking of the embodiment shown, when the node 500 detects a computing task and finds that it does not have the ability to perform the computing task, the node 500, as a source node (hereinafter described as a source node), sends a fog node scheduling request to the node management device. The fog node scheduling request carries the identifier of the source node.
[0110] The node management device searches for a candidate fog node set associated with the source node identifier in the offline recommended candidate fog node set record according to the source node identifier carried in the fog node scheduling request. The number of candidate fog nodes in the candidate fog node set is limited, for example, a maximum of 100.
[0111] The node management device compares the candidate fog nodes in the candidate fog node set with the obtained global idle fog node list one by one. If the global idle fog node list contains a candidate fog node, the candidate fog node is made available and deleted from the global idle fog node list. Then, a target fog node for executing the computing task is selected from the available candidate fog nodes to execute the computing task.
[0112] When the node management device cannot select the target fog node from the candidate fog node set (i.e., the offline recommendation of the candidate fog node fails), it tries the static rule scheduling strategy, which is as follows:
[0113] First, according to the IP address of the source node, the operator to which the source node belongs and the geographical location of the source node are analyzed.
[0114] After that, the local search engine is enabled, and idle fog nodes in the same city, province, and operator as the source node are preferentially searched in the fog network according to the operator to which the source node belongs and the geographical location of the source node. The idle fog node set found is sorted according to the quality score, and the idle fog node with the highest quality score is obtained.
[0115] If the quality score of the idle fog node with the highest quality score is greater than or equal to the set score threshold, such as 60 points, the idle fog node with the highest quality score is used as the target fog node to perform the above-mentioned computing task, and the target fog node is deleted from the global idle fog node list. Otherwise, continue to try to find idle fog nodes of different operators in the same city and province, sort the found idle fog node set according to the quality score, and obtain the idle fog node with the highest quality score. If the quality score of the idle fog node with the highest quality score is greater than or equal to the set score threshold, such as 60 points, the idle fog node with the highest quality score is used as the target fog node to perform the above-mentioned computing task, and the target fog node is deleted from the global idle fog node list, otherwise, return an empty message or a message that the fog node cannot be found to the source node. This embodiment takes finding the target fog node as an example.
[0116] The node management device feeds the target fog node back to the above source node. Figure 5 The fog node 501_1 in the network is taken as an example.
[0117] The source node attempts to establish a connection with the fog node 501_1, and sends the computing task to the fog node 501_1 for execution through the established connection, and receives the computing result returned by the fog node 501_1 after executing the computing task through the connection.
[0118] In this embodiment, when the fog node 501 receives a computing task, it indicates that it starts to switch from the idle state to the working state, and reports the message of the current switch to the working state to the node management device. When the fog node 501 completes the computing task and sends the computing result to the source node, it indicates that it starts to switch from the working state to the idle state, and reports the message of the current switch to the idle state to the node management device. After receiving the message that the fog node switches to the idle state, the node management device records the fog node in the global idle fog node list.
[0119] This completes the description of the embodiment.
[0120] The method provided in the embodiment of the present application is described above. The system and device provided in the embodiment of the present application are described below:
[0121] See also Figure 6 , Figure 6 A system structure diagram provided for an embodiment of the present application. The system may include: a node management device, a source node, and a fog node managed by the node management device;
[0122] The node management device performs the following operations: Figure 1 The method shown;
[0123] The source node is used to execute Figure 4 The method shown.
[0124] Correspondingly, the present application embodiment also provides Figure 7 See the device structure diagram shown in Figure 7 , Figure 7 This is a structural diagram of the first device provided in the embodiment of the present application. The device is applied to a node management device, suitable for Figure 1 The process shown.
[0125] like Figure 7 As shown, the device may include:
[0126] A scheduling request unit, configured to receive a fog node scheduling request; the fog node scheduling request is sent by a source node when the source node currently does not have the ability to execute the acquired computing task;
[0127] a scheduling unit, configured to search for a set of candidate fog nodes associated with the source node determined according to an offline recommendation strategy; if the set of candidate fog nodes is found and there are currently available candidate fog nodes in the set of candidate fog nodes for executing the computing task, a target fog node is selected from the available candidate fog nodes to execute the computing task; otherwise, a target fog node that is currently in an idle state is selected to execute the computing task according to the current working state of the fog nodes in the fog network for executing the computing task;
[0128] The node feedback unit is used to feed back the target fog node to the source node so that the source node sends the computing task to the target fog node for execution.
[0129] Optionally, the scheduling unit determines the set of candidate fog nodes associated with the source node according to the offline recommendation strategy, including:
[0130] Determine a reference fog node that is scheduled to execute the historical computing task of the source node within a first historical time period;
[0131] Obtaining characteristic information of each reference fog node being scheduled to execute the historical computing task of the source node; the characteristic information at least includes: a task execution result; the task execution result is: task execution success or task execution failure;
[0132] A set of candidate fog nodes associated with the source node is determined according to the obtained feature information of each reference fog node and a trained recommendation learning algorithm; the set of candidate fog nodes includes at least one reference fog node.
[0133] Optionally, the available candidate fog nodes currently existing in the candidate fog node set for executing the computing task are determined by the following steps:
[0134] The current working state of the candidate fog node in the obtained candidate fog node set is checked, and if the current working state is idle, the candidate fog node is determined to be an available candidate fog node for executing the computing task.
[0135] Optionally, the scheduling unit selects a target fog node that is currently in an idle state to perform the computing task according to the current working state of the fog node for performing the computing task in the fog network, including:
[0136] Selecting a set of fog nodes from the fog network for performing the computing task;
[0137] According to the obtained quality scores of each fog node in the fog node set, at least one fog node whose current working state is idle and whose quality score is higher than a set value is selected from the fog node set as the target fog node to perform the computing task, wherein the quality score is determined based on the record that the fog node is scheduled to perform the historical computing task in the second historical time period.
[0138] Optionally, the scheduling unit selecting at least one fog node whose current working state is idle and whose quality score is higher than a set value from the fog node set as the target fog node to perform the computing task includes:
[0139] Determine the current geographical location of the source node and the operator to which the source node belongs;
[0140] Select from the fog network a fog node that belongs to an operator in the same city or province as the source node and is used to execute the computing task, and obtain the fog node set; or, when there is no fog node that belongs to an operator in the same city or province as the source node in the fog network, or when there is a fog node that belongs to an operator in the same city or province as the source node in the fog network but the quality score of the existing fog node is lower than a set score threshold, select from the fog network a fog node that belongs to the same city or province as the source node and is used to execute the computing task, and obtain the fog node set.
[0141] Optionally, the quality score of the fog node is determined by the following steps:
[0142] Obtain the total number of times the fog node is scheduled to perform historical computing tasks in the second historical time period;
[0143] If the total number of scheduling times is less than a preset number threshold, determining the quality score of the fog node to be a first value;
[0144] If the total number of scheduling times is greater than or equal to a preset number threshold, then when the failure rate of establishing a network connection between the fog node and the source node is greater than the preset failure rate threshold, the quality score of the fog node is determined to be a second value; otherwise, the quality score of the fog node is determined based on the number of times the fog node is successfully scheduled to perform historical computing tasks in the second historical time period and the total number of scheduling times.
[0145] So far, completed Figure 7 Structural diagram of the device shown.
[0146] Correspondingly, the embodiment of the present application also provides Figure 8 Structural diagram of the device shown.
[0147] See also Figure 8 , Figure 8This is a structural diagram of a second device provided in an embodiment of the present application. The device is applied to any node device, corresponding to Figure 4 The process shown.
[0148] like Figure 8 As shown, the device may include:
[0149] A request unit, configured to, when receiving a computing task, send a fog node scheduling request to a node management device using the node device as a source node if it is determined that the node device does not currently have the ability to execute the computing task, so that the node management device determines a target fog node for executing the computing task;
[0150] The processing unit is used to establish a connection with the target fog node for executing the computing task when receiving the target fog node for executing the computing task fed back by the node management device, and send the computing task to the target fog node for execution through the established connection, and receive the computing result returned by the target fog node after executing the computing task through the connection.
[0151] The present application also provides Figure 7 or Figure 8 The hardware structure of the device shown. Fig. 9 , Fig. 9 This is a structural diagram of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.
[0152] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented.
[0153] Exemplarily, the above-mentioned machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0154] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0155] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0156] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0157] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0158] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0159] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0160] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A node scheduling method, characterized in that: The method is applied to a node management device, and the node management device is used to manage fog nodes in a fog network; the method comprises: Receiving a fog node scheduling request; the fog node scheduling request is sent by a source node when the source node does not currently have the ability to execute the acquired computing task; Searching for a set of candidate fog nodes associated with the source node determined according to an offline recommendation strategy; if the set of candidate fog nodes is found and there are currently available candidate fog nodes in the set of candidate fog nodes for executing the computing task, selecting a target fog node from the available candidate fog nodes to execute the computing task; otherwise, selecting a target fog node that is currently in an idle state to execute the computing task according to the current working state of the fog nodes in the fog network for executing the computing task; wherein the offline recommendation strategy at least includes the historical working records of the source node and each fog node; the fog nodes included in the set of candidate fog nodes are fog nodes that have successfully executed the historical computing tasks of the source node before; The target fog node is fed back to the source node so that the source node sends the computing task to the target fog node for execution.
2. The method according to claim 1, characterized in that The step of determining a set of candidate fog nodes associated with the source node according to the offline recommendation strategy includes: Determine a reference fog node that is scheduled to execute the historical computing task of the source node within a first historical time period; Obtaining characteristic information of each reference fog node being scheduled to execute the historical computing task of the source node; the characteristic information at least includes: a task execution result; the task execution result is: task execution success or task execution failure; A set of candidate fog nodes associated with the source node is determined according to the obtained feature information of each reference fog node and a trained recommendation learning algorithm; the set of candidate fog nodes includes at least one reference fog node.
3. The method according to claim 1, characterized in that The available candidate fog nodes currently existing in the candidate fog node set for executing the computing task are determined by the following steps: The current working state of the candidate fog node in the obtained candidate fog node set is checked, and if the current working state is idle, the candidate fog node is determined to be an available candidate fog node for executing the computing task.
4. The method according to claim 1, characterized in that The step of selecting a target fog node that is currently in an idle state to perform the computing task according to the current working state of the fog node in the fog network for performing the computing task comprises: Selecting a set of fog nodes from the fog network for performing the computing task; According to the obtained quality scores of each fog node in the fog node set, at least one fog node whose current working state is idle and whose quality score is higher than a set value is selected from the fog node set as the target fog node to perform the computing task, wherein the quality score is determined based on the record that the fog node is scheduled to perform the historical computing task in the second historical time period.
5. The method according to claim 4, characterized in that The step of selecting at least one fog node whose current working state is idle and whose quality score is higher than a set value from the fog node set as the target fog node to perform the computing task comprises: Determine the current geographical location of the source node and the operator to which the source node belongs; Select from the fog network a fog node that belongs to an operator in the same city or province as the source node and is used to execute the computing task, and obtain the fog node set; or, when there is no fog node that belongs to an operator in the same city or province as the source node in the fog network, or when there is a fog node that belongs to an operator in the same city or province as the source node in the fog network but the quality score of the existing fog node is lower than a set score threshold, select from the fog network a fog node that belongs to the same city or province as the source node and is used to execute the computing task, and obtain the fog node set.
6. The method according to claim 4, characterized in that The quality score of the fog node is determined by the following steps: Obtain the total number of times the fog node is scheduled to perform historical computing tasks in the second historical time period; If the total number of scheduling times is less than a preset number threshold, determining the quality score of the fog node to be a first value; If the total number of scheduling times is greater than or equal to a preset number threshold, then when the failure rate of establishing a network connection between the fog node and the source node is greater than the preset failure rate threshold, the quality score of the fog node is determined to be a second value; otherwise, the quality score of the fog node is determined based on the number of times the fog node is successfully scheduled to perform historical computing tasks in the second historical time period and the total number of scheduling times.
7. A node scheduling method, characterized in that: The method is applied to any node device, including: When receiving a computing task, if it is determined that the computing task is not currently capable of being performed, the node sends a fog node scheduling request to a node management device as a source node, so that the node management device determines a target fog node for performing the computing task according to any one of the methods of claims 1 to 6; Upon receiving the target fog node for executing the computing task fed back by the node management device, a connection is established with the target fog node, and the computing task is sent to the target fog node for execution through the established connection, and the computing result returned by the target fog node after executing the computing task is received through the connection.
8. A node scheduling system, characterized in that: The system includes a node management device, a source node, and a fog node managed by the node management device; The node management device executes the method according to any one of claims 1 to 6; The source node is configured to execute the method according to claim 7.
9. A node scheduling device, characterized in that: The device is applied to a node management device, and the node management device is used to manage fog nodes in a fog network; the device comprises: A scheduling request unit, configured to receive a fog node scheduling request; the fog node scheduling request is sent by a source node when the source node currently does not have the ability to execute the acquired computing task; A scheduling unit, used for searching for a set of candidate fog nodes associated with the source node determined according to an offline recommendation strategy; if the set of candidate fog nodes is found and there are currently available candidate fog nodes in the set of candidate fog nodes for executing the computing task, a target fog node is selected from the available candidate fog nodes to execute the computing task; otherwise, a target fog node that is currently in an idle state is selected to execute the computing task according to the current working state of the fog nodes in the fog network for executing the computing task; wherein the offline recommendation strategy at least includes the historical working records of the source node and each fog node; the fog nodes included in the set of candidate fog nodes are fog nodes that have successfully executed the historical computing tasks of the source node before; The node feedback unit is used to feed back the target fog node to the source node so that the source node sends the computing task to the target fog node for execution.
10. An electronic device, characterized in that: The electronic device includes: a processor and a machine-readable storage medium; The machine-readable storage medium stores machine-executable instructions that can be executed by the processor; The processor is used to execute machine executable instructions to implement the method steps of any one of claims 1-7.
