Edge node availability prediction method, device, storage medium and system
By allowing edge nodes to use pre-established sample sets and sub-prediction models to perform autonomous availability prediction, the problem of task segmentation in the prior art does not take into account the processing capabilities of edge nodes, reducing the cost of managing nodes and improving processing efficiency and prediction accuracy.
Patent Information
- Application Number
- CN202111439702.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In the existing edge computing system, the task segmentation method does not consider the processing capacity of each edge node, resulting in low processing efficiency of nodes with poor capabilities, affecting the overall data processing efficiency; while the method of considering processing capacity increases the storage and computing costs of management nodes.
Each edge node predicts its own availability based on a pre-established sample set and multiple sub-prediction models, obtains the final availability prediction result, and sends the result to the management node. The management nodes segment and assign tasks to be processed based on these prediction results.
Autonomous prediction of their availability by edge nodes reduces the cost of managing nodes, and improves task processing efficiency and prediction accuracy.
Smart Images

Figure CN113962490B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computer technology, and more specifically, to an edge node availability prediction method, device, storage medium, and system. Background Art
[0002] With the continuous development of Internet technology, the processing tasks that computers need to carry out are becoming more and more numerous and complex. Therefore, edge computing systems that use multiple computers to collaborate to complete processing tasks have emerged.
[0003] At present, in edge computing systems, management nodes usually allocate subtasks to be processed to edge nodes based on the following two methods: Method 1, the management node can distribute the tasks to be processed evenly to each edge node; Method 2, determine the processing capacity of each edge node, and then allocate corresponding subtasks to each edge node based on the processing capacity of each edge node.
[0004] However, the task division method of method 1 does not take into account the processing capacity of each edge node, resulting in lower processing efficiency of edge nodes with poor capabilities, which will affect the overall data processing efficiency; the task division method of method 2 places higher storage and computing capacity requirements on the management node, increasing the cost of the management node. Summary of the invention
[0005] The embodiments of the present application provide an edge node availability prediction method, device, storage medium, and system, which improve the overall data processing efficiency on the one hand, and save the cost of managing nodes on the other hand.
[0006] In a first aspect, a method for predicting the availability of an edge node is provided, comprising: the edge node determines a first sample set from a pre-established sample set according to an inquiry sample, the inquiry sample is used to characterize the resource usage of the edge node at a first moment, the first sample set includes a plurality of sampling samples similar to the inquiry sample, the sampling samples are used to characterize the resource usage of the edge node at a second moment, the first moment being later than the second moment; the edge node predicts the availability of the edge node based on the inquiry sample through n sub-prediction models to obtain initial prediction results of n feature dimensions, the sub-prediction models are trained based on the first sample set, and n is an integer greater than 1; the edge node performs weighted processing on the initial prediction results of the n feature dimensions to obtain an availability prediction result of the edge node.
[0007] In a second aspect, a method for predicting the availability of an edge node is provided, comprising: a management node receives an availability prediction result sent by at least one edge node; the management node divides the task to be processed according to the availability prediction result sent by the at least one edge node to obtain the subtasks to be processed corresponding to the at least one edge node; the management node sends the subtasks to be processed corresponding to the at least one edge node to the corresponding edge node.
[0008] In a third aspect, an electronic device is provided, comprising: a sample processing unit, configured to determine a first sample set from a pre-established sample set according to an inquiry sample, the inquiry sample being used to characterize resource usage of the edge node at a first moment, the first sample set comprising a plurality of sampling samples similar to the inquiry sample, the sampling samples being used to characterize resource usage of the edge node at a second moment, the first moment being later than the second moment; a prediction unit, configured to predict the availability of the edge node based on the inquiry sample using n sub-prediction models to obtain initial prediction results of n feature dimensions, the sub-prediction models being trained based on the first sample set, and n being an integer greater than 1; the prediction unit is further configured to perform weighted processing on the initial prediction results of the n feature dimensions to obtain an availability prediction result of the edge result.
[0009] In a fourth aspect, an electronic device is provided, comprising a receiving unit for receiving availability prediction results respectively sent by at least one edge node; a processing unit for dividing the tasks to be processed according to the availability prediction results respectively sent by the at least one edge node to obtain the subtasks to be processed respectively corresponding to the at least one edge node; and a sending unit for sending the subtasks to be processed respectively corresponding to the at least one edge node to the corresponding edge nodes.
[0010] In a fifth aspect, an electronic device is provided, comprising a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the method in the first aspect, the second aspect or their respective implementations.
[0011] In a sixth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute a method as in the first aspect, the second aspect, or any of their implementations.
[0012] In a seventh aspect, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions enable a computer to execute the method in the first aspect, the second aspect or any implementation thereof.
[0013] In an eighth aspect, a computer program is provided, which enables a computer to execute the method in the first aspect, the second aspect or each implementation manner thereof.
[0014] In the embodiment of the present application, each edge node predicts its own availability, and there is no need for the management node to predict the availability of each edge node, thereby reducing the cost of associated nodes. The management node can then assign subtasks applicable to each edge node to each edge node based on the prediction results, thereby improving the processing efficiency of the tasks to be processed.
[0015] Furthermore, the edge node predicts its own availability based on the n sub-prediction models, and then weights the initial prediction results of the n feature dimensions output by the n sub-prediction models to obtain the final availability prediction result of the edge node, thereby improving the accuracy of the availability prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of the structure of a data processing system provided in an embodiment of the present application;
[0017] Figure 2 A schematic diagram of a flow chart of an edge node availability prediction method provided in an embodiment of the present application;
[0018] Figure 3a A schematic diagram of collecting inquiry samples provided in an embodiment of the present application;
[0019] Figure 3b A schematic diagram of collecting and sampling samples provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of a training process of a sub-prediction model provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of a flow chart of an edge node availability prediction method provided in an embodiment of the present application;
[0022] Figure 6 A schematic block diagram of an electronic device provided in an embodiment of the present application;
[0023] Figure 7 A schematic block diagram of an electronic device provided in an embodiment of the present application;
[0024] Figure 8 A schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. For the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] With the continuous development of Internet technology, the processing tasks that computers need to carry out are becoming more and more numerous and complex, so edge computing systems that use multiple computers to collaborate to complete processing tasks have emerged.
[0027] Figure 1 A schematic diagram of the structure of a data processing system provided in an embodiment of the present application. Figure 1 As shown, the data processing system 100 is an example of an edge computing system. It includes a management node 110 and at least one edge node 120. The management node 110 and at least one edge node 120 are connected by wire or wireless means to form a local network of edge computing. It can be understood that the edge node 120 can be a node connected to the management node 110, or the edge node 120 can be a node indirectly connected to the management node through other edge nodes 120.
[0028] At present, the management node 110 divides the tasks to be processed, such as streaming data tasks (including processing tasks such as video, voice, etc. recognition and optimization), into multiple subtasks, and assigns the multiple subtasks to at least one edge node 120 for data processing. The processed task data is sent to the management node 110 by each edge node 120, and the management node 110 integrates the task data returned by each edge node 120 to obtain the final processing result. In the process of task allocation by the management node, there are usually the following two methods:
[0029] Method 1: The management node 110 evenly distributes the tasks to be processed to each edge node 120 ; Method 2: The management node 110 determines the processing capacity of each edge node 120 , and divides the corresponding subtasks for each edge node 120 according to the processing capacity of each edge node.
[0030] However, the task splitting method of method 1 does not take into account the processing capabilities of each edge node, resulting in lower processing efficiency of edge nodes with poor capabilities, which will affect the overall data processing efficiency; the task splitting method of method 2 places higher storage and computing power requirements on the management node 110, increasing the cost of the management node 110.
[0031] In response to the above technical problems, an embodiment of the present application provides a solution for predicting the availability of edge nodes, in which each edge node predicts its own availability. There is no need for a management node to predict the availability of each edge node, thereby reducing the cost of associated nodes. The management node can then assign subtasks applicable to each edge node to each edge node based on the prediction results, thereby improving the processing efficiency of tasks to be processed.
[0032] Furthermore, the edge node predicts its own availability based on the n sub-prediction models, and then weights the initial prediction results of the n feature dimensions output by the n sub-prediction models to obtain the final availability prediction result of the edge node, thereby improving the accuracy of the availability prediction.
[0033] It should be noted that the edge node availability prediction method provided in the embodiment of the present application can be applied to any data processing scenario where edge nodes are deployed, but is particularly suitable for edge computing network scenarios of the Internet of Things.
[0034] It should be noted that in the embodiments of the present application Figure 1 The management node 110 and the edge node 120 may be the same electronic device, and the same computing unit mentioned here may be understood as an electronic device with the same processing capability and / or the same storage capability.
[0035] Among them, the electronic device can be, for example, a terminal device, such as a mobile phone, a tablet computer, a computer, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a terminal device in industrial control, a terminal device in self-driving, a terminal device in remote medical, a terminal device in a smart city, or a terminal device in a smart home, etc. The terminal device in the embodiment of the present application can also be a wearable device, which can also be called a wearable smart device, which is a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. The terminal device can be fixed or mobile.
[0036] Exemplarily, the electronic device in the embodiment of the present application may also be a server.
[0037] The method provided in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0038] It should be understood that the following is only for the convenience of understanding and explanation, and mainly uses the electronic device as the execution subject to illustrate the method provided in the embodiment of the present application. For example, the electronic device can be Figure 1 One of the management nodes 110 or at least one edge node 120 in.
[0039] Figure 2 A schematic diagram of a method for predicting the availability of an edge node provided in an embodiment of the present application. Figure 2 As shown, the method 200 specifically includes some or all of the following steps:
[0040] S210, the edge node determines a first sample set from a pre-established sample set according to the query sample, where the first sample set includes a plurality of sampling samples similar to the query sample;
[0041] S220, the edge node predicts the availability of the edge node based on the query sample through n sub-prediction models to obtain initial prediction results of n feature dimensions, where the sub-prediction models are trained based on the first sample set, and n is an integer greater than 1;
[0042] S230: The edge node performs weighted processing on the initial prediction results of the n feature dimensions to obtain an availability prediction result of the edge node.
[0043] It should be noted that the edge node can perform availability prediction periodically or in response to a task request from the management node. The task request can be a request sent by the management node to the edge node after receiving the data processing task, for requesting the edge node to report the availability prediction result to the management node.
[0044] The query sample is used to characterize the resource usage of the edge node at the first moment. The query sample may be generated by the edge node at the first moment, and the first moment may be understood as the moment when the availability prediction needs to be performed. For example, the first moment may be the triggering moment of each availability prediction cycle of the edge node, or the first moment may be the response moment of the edge node to the task request sent by the management node.
[0045] Combination Figure 3a As shown, exemplarily, the query sample includes the resource usage information X1 (for example, including Figure 3a m1 to m N ), the resource usage information includes central processing unit (CPU) usage and / or memory occupancy.
[0046] The pre-established sample set includes multiple sampling samples. It should be noted that the sampling samples are used to characterize the resource usage of the edge node at the second moment. The sampling samples can be obtained from the historical data of the edge node at multiple second moments. Exemplarily, the edge node records a sampling sample once at each second moment, and the second moment is the response moment of the edge node to the management node sending a historical task request, or the second moment can be the triggering moment of each availability prediction cycle of the edge node within the historical time period, and the historical task request is the task request sent by the management node in the previous data processing task and the data processing task before the previous one; in other words, the edge node records a sampling sample once after each processing of the subtask of the data processing task assigned by the management node.
[0047] It is understandable that the first moment is later than the second moment.
[0048] Combination Figure 3b As shown, each sample may include: the resource usage information X2 (for example, including Figure 3b m′1 to m′ N ), and the mean value Y of the resource usage information collected by the edge node during a data processing process after the second moment.
[0049] It should be noted that for the above S210, the edge node can determine the similarity between X1 in the query sample and X2 of each sampling sample, and determine whether the similarity is greater than a similarity threshold. When the similarity is greater than the similarity threshold, it is determined that the sampling sample is similar to the query sample.
[0050] Optionally, the edge node may determine whether the query sample and the sampling sample are similar based on the distance between the two in the feature vector space. For example, when the distance between the two is less than a preset distance, it is determined that the sampling sample is similar to the query sample.
[0051] Optionally, the edge node may determine, from a pre-established sample set, a sampling sample whose Mahalanobis distance to the query sample is less than or equal to a preset distance.
[0052] Through the above S210 method, the number of samples is reduced and the environmental changes can be better coped with.
[0053] Regarding the above S220, it is necessary to explain:
[0054] Considering that the process migration of the software environment and the use environment on the edge node side is relatively fast, a single model is likely to cause poor robustness of the model. In order to improve the prediction of random reporting functionality, the query sample is predicted by multiple sub-prediction models in the embodiment of the present application.
[0055] The sub-prediction model is trained based on the first sample set. In some embodiments, the sub-prediction model can be obtained by optimizing the first sample set, that is, each time the edge device receives a task request, it can first optimize the n sub-prediction models based on the first sample set.
[0056] Optionally, the sub-prediction model may be a machine learning model, and the machine model may be a Gaussian Process Regression (GPR) model trained in a Gaussian Process Regression (GPR) manner.
[0057] As an example, the above S220 may specifically include the following process:
[0058] S221, the edge node performs feature grouping on the query sample to obtain n features of the query sample, and the n features correspond one-to-one to the above n sub-prediction models;
[0059] S222, the edge node inputs the n features of the query sample into n sub-prediction models respectively to obtain initial prediction results of the n feature dimensions of the query sample.
[0060] Exemplarily, the edge node may perform feature grouping on the query samples through an independent component analysis (ICA) algorithm to obtain n features of the query samples.
[0061] Furthermore, the edge node inputs different features of each query sample into the corresponding sub-prediction model, and the sub-prediction model outputs the initial prediction result of each feature.
[0062] In the above S230, the edge node needs to combine the initial prediction results of the n feature dimensions output by the n sub-prediction models to comprehensively determine the availability prediction result of the edge node itself.
[0063] It should be noted that each of the initial prediction results of the n feature dimensions corresponds to a weight, and the weight is the weight corresponding to the sub-prediction model that outputs the initial prediction result.
[0064] Optionally, the weight corresponding to each sub-prediction model can be determined based on process data of training the sub-prediction model or optimizing the training of the sub-prediction model.
[0065] Exemplarily, the edge node determines the weight of the sub-prediction model based on preset parameters and the relative prediction error of each sample in w samples under each sub-prediction model. Furthermore, the edge node weights the initial prediction results of n feature dimensions according to the weights corresponding to the n sub-prediction models, so as to obtain the availability prediction result of the edge node.
[0066] For example, the weight of the sub-prediction model P(x|M i ) satisfies the following formula:
[0067]
[0068] Among them, x represents the test sample, M i represents the ith sub-prediction model among n sub-prediction models, γ is the preset parameter, and v j is the relative prediction error of the jth sample in the w sampled samples used for testing, that is, the test subset (the test subset will be explained below).
[0069] Figure 4 A schematic diagram of a training process of a sub-prediction model provided in an embodiment of the present application. Figure 4 As shown, the edge node can perform part or all of the processes of initial training, optimization training, evaluation, testing, etc. on n sub-prediction models.
[0070] During the process of the edge node performing initial training or optimization training on each sub-prediction model, the edge node may determine p sampling samples from the first sample set to form a training sample subset, and the p sampling samples may be part of or all of the sampling samples in the first sample set.
[0071] Further, the edge node performs initial training or optimization training on the n sub-prediction models according to the training sample subset. Exemplarily, for each of the p sampling samples in the training sample subset, the edge node performs feature grouping on the sampling sample, for example, by performing feature grouping using an ICA algorithm, and obtains n features of the sampling sample (e.g. Figure 4 The n features correspond to the n sub-prediction models (such as sub-prediction model 1 to sub-prediction model n) in a one-to-one manner, and p is a positive integer; the edge node inputs the n features of the sampled sample into the n sub-prediction models respectively, and trains the n sub-prediction models, that is, the edge node inputs the features of a feature type of multiple sampled samples into the corresponding sub-prediction model, and performs initial training or optimization training on the sub-prediction model.
[0072] In the process of the edge node evaluating each sub-prediction model, the edge node can determine q sampling samples from the first sample set to form an evaluation sample subset, where q is a positive integer. The q sampling samples can be part of or all of the sampling samples in the first sample set.
[0073] Further, the edge node evaluates the n sub-prediction models respectively according to the evaluation sample subset. Exemplarily, for each of the q sampling samples in the evaluation sample subset, the edge node performs feature grouping on the sampling sample, for example, by performing feature grouping using an ICA algorithm, and obtains n features of the sampling sample (e.g. Figure 4 , the n features are combined with n sub-prediction models (such as Figure 4 The edge node inputs the n features of the sample into the trained n sub-prediction models respectively, evaluates the n sub-prediction models, and obtains the evaluation results of each sub-prediction model.
[0074] Then, the edge node determines whether the training of each sub-prediction model is completed according to the evaluation result corresponding to each sub-prediction model in the n sub-prediction models. Optionally, the evaluation result can be reflected by a specific value of the evaluation parameter, for example, when the value of the evaluation parameter is within a preset range, the corresponding sub-prediction model training is completed.
[0075] When the edge node tests each sub-prediction model, the edge node may determine w sample samples from the first sample set to form a test sample subset, where w is a positive integer. The w sample samples may be part of or all of the sample samples in the first sample set.
[0076] Further, the edge node tests the n sub-prediction models respectively according to the test sample subset. Exemplarily, for each of the q sample samples in the test sample subset, the edge node performs feature grouping on the sample sample, for example, by performing feature grouping using an ICA algorithm, and obtains n features of the sample sample (e.g. Figure 4 , the n features are combined with n sub-prediction models (such as Figure 4 The edge node inputs the n features of the sample into the n sub-prediction models respectively, tests the n sub-prediction models, and obtains the test results of each sub-prediction model. In some embodiments, the test results of the n sub-prediction models can be obtained by weighting the results output by the n sub-prediction models, and the weighted processing process has been described above. It should be noted that the final output result is obtained after weighting the results output by the n sub-prediction models, and the n sub-prediction models can be considered to form an integrated model.
[0077] Furthermore, the edge node determines whether to use the corresponding sub-prediction model based on the test results. Optionally, the edge node can choose not to use any of the n sub-prediction models when at least one sub-prediction model fails the test, or the edge node can choose to use a sub-prediction model that passes the test.
[0078] It should be noted that at least two of the above-mentioned training sample subsets, evaluation sample subsets and test sample subsets may include the same or different sampling samples, and every two subsets may intersect or be mutually exclusive.
[0079] Figure 5 A schematic diagram of a method for predicting the availability of an edge node provided in an embodiment of the present application. Figure 5 As shown, the method 300 specifically includes some or all of the following steps:
[0080] S270, the management node sends a task request to at least one edge node respectively, and correspondingly, each edge node in the at least one edge node receives the task request;
[0081] S210, each edge node of at least one edge node determines a first sample set from a pre-established sample set according to a query sample, where the first sample set includes a plurality of sampling samples similar to the query sample;
[0082] S220, each edge node of the at least one edge node predicts the query sample by using n sub-prediction models to obtain initial prediction results of n feature dimensions, where the sub-prediction models are trained based on the first sample set, and n is an integer greater than 1;
[0083] S230: Each edge node of the at least one edge node performs weighted processing on the initial prediction results of the n feature dimensions to obtain an availability prediction result of the edge node.
[0084] S240, each edge node of the at least one edge node sends an availability prediction result to the management node respectively, and correspondingly, the management node receives the availability prediction result sent by the at least one edge node respectively;
[0085] S250, the management node divides the task to be processed according to the availability prediction result respectively sent by at least one edge node, and obtains the subtask to be processed corresponding to at least one edge node;
[0086] S260: The management node sends a corresponding subtask to be processed to each edge node in at least one edge node. Accordingly, each edge node in at least one edge node receives the subtask to be processed.
[0087] The task request in S270 is Figure 2 As has been described in the relevant embodiments, it will not be repeated here. With respect to the above S270, it should be noted that the task request sent by the management node to each edge node may be a character request generated based on the same task to be processed.
[0088] The above S210 to S230 are Figure 2 This has been explained in the illustrated embodiment and will not be described again here.
[0089] In the above S240 to S260, the management node receives the availability prediction results sent by each edge node, obtains the data processing capability and / or data storage capability of each edge node, determines the subtasks to be processed assigned to each edge node based on the availability prediction results, makes full use of the data processing capability and / or data storage capability of each edge node, and avoids the assigned subtasks exceeding the carrying capacity of the edge node.
[0090] Therefore, in an embodiment of the present application, each edge node predicts its own availability, and there is no need for the management node to predict the availability of each edge node, thereby reducing the cost of associated nodes, and enabling the management node to assign subtasks applicable to each edge node to each edge node based on the prediction results, thereby improving the processing efficiency of the tasks to be processed.
[0091] Furthermore, the edge node predicts its own availability based on the n sub-prediction models, and then weights the initial prediction results of the n feature dimensions output by the n sub-prediction models to obtain the final availability prediction result of the edge node, thereby improving the accuracy of the availability prediction.
[0092] Figure 6 A schematic block diagram of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device 400 includes:
[0093] The sample processing unit 410 is configured to determine a first sample set from a pre-established sample set according to the query sample, the query sample being used to characterize the resource usage of the edge node at a first moment, the first sample set comprising a plurality of sampling samples similar to the query sample, the sampling samples being used to characterize the resource usage of the edge node at a second moment, the first moment being later than the second moment;
[0094] A prediction unit 420 is configured to predict the availability of the electronic device based on the query sample using n sub-prediction models to obtain initial prediction results of n feature dimensions, wherein the sub-prediction models are trained based on the first sample set, and n is an integer greater than 1;
[0095] The prediction unit 420 is further configured to perform weighted processing on the initial prediction results of the n feature dimensions to obtain an availability prediction result of the edge result.
[0096] In some embodiments, the prediction unit 420 is specifically used to: perform feature grouping on the query sample to obtain n features of the query sample, wherein the n features correspond one-to-one to the n sub-prediction models; and input the n features of the query sample into the n sub-prediction models respectively to obtain initial prediction results of the n feature dimensions of the query sample.
[0097] In some embodiments, the prediction unit 420 is specifically used to: perform feature grouping on the query sample through an independent component analysis (ICA) algorithm to obtain n features of the query sample.
[0098] In some embodiments, the inquiry sample includes the electronic device's own resource usage information collected in N sampling periods before a first moment, the resource usage information includes the central processing unit CPU usage rate and / or memory occupancy rate, and the first moment is the moment when the electronic device responds to the task request sent by the management node.
[0099] In some embodiments, the sampling sample includes: the electronic device's own resource usage information collected in N sampling periods before a second moment, and the average of the resource usage information collected by the electronic device during a data processing process after the second moment, the resource usage information includes CPU usage rate and / or memory occupancy rate, and the second moment is the moment when the electronic device responds to the management node to send a historical task request.
[0100] In some embodiments, the sample processing unit 410 is further used to: determine p sampling samples from the first sample set to form a training sample subset, where p is a positive integer; and train the n sub-prediction models according to the training sample subset.
[0101] In some embodiments, the sample processing unit 410 is specifically used to: for each of the p sampling samples in the training sample subset, perform feature grouping on the sampling sample to obtain n features of the sampling sample, and the n features correspond one-to-one to the n sub-prediction models; input the n features of the sampling sample into the n sub-prediction models respectively, and train the n sub-prediction models.
[0102] In some embodiments, the sample processing unit 410 is also used to: determine q sampling samples from the first sample set to form an evaluation sample subset, where q is a positive integer; evaluate the n sub-prediction models respectively according to the evaluation sample subset; and determine whether the training of the sub-prediction model is completed according to the evaluation results corresponding to the sub-prediction model.
[0103] In some embodiments, the sample processing unit 410 is also used to: determine w sampling samples from the first sample set to form a test sample subset, where w is a positive integer; test the n sub-prediction models respectively according to the test sample subset; and determine whether to use the sub-prediction model according to the test results corresponding to the sub-prediction model.
[0104] In some embodiments, the prediction unit 420 is specifically used to: determine the weight of the sub-prediction model according to preset parameters and the relative prediction error of each sample in the w samples under each sub-prediction model; perform weighted processing on the initial prediction results of the n feature dimensions according to the weights corresponding to the n sub-prediction models, so as to obtain the availability prediction result of the electronic device.
[0105] In some embodiments, the electronic device 400 further includes: a transceiver unit 430, configured to send the availability prediction result to a management node.
[0106] The electronic device provided in the above embodiment can execute the technical solution on the edge node side in the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0107] Figure 7 A schematic block diagram of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 500 includes:
[0108] A receiving unit 510, configured to receive an availability prediction result respectively sent by at least one edge node;
[0109] The processing unit 520 is configured to divide the task to be processed according to the availability prediction results respectively sent by the at least one edge node, and obtain the subtasks to be processed respectively corresponding to the at least one edge node;
[0110] The sending unit 530 is configured to send the to-be-processed subtasks corresponding to the at least one edge node to the corresponding edge nodes.
[0111] The electronic device provided in the above embodiment can execute the technical solution of the management node side in the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0112] Figure 8 This is a schematic structural diagram of an electronic device provided in an embodiment of the present application. Figure 8 The electronic device shown includes a processor 610, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.
[0113] Alternatively, if Figure 8As shown, the electronic device 600 may further include a memory 620. The processor 610 may call and run a computer program from the memory 620 to implement the method in the embodiment of the present application.
[0114] The memory 620 may be a separate device independent of the processor 610 , or may be integrated into the processor 610 .
[0115] Alternatively, if Figure 8 As shown, the electronic device 600 may further include a transceiver 630, and the processor 610 may control the transceiver 630 to communicate with other devices, specifically, may send information or data to other devices, or receive information or data sent by other devices.
[0116] The transceiver 630 may include a transmitter and a receiver. The transceiver 630 may further include an antenna, and the number of the antennas may be one or more.
[0117] Optionally, the electronic device 600 can implement the corresponding processes in the various methods of the embodiments of the present application, which will not be described here for the sake of brevity.
[0118] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0119] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0120] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
[0121] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program.
[0122] Optionally, the computer-readable storage medium can be applied to the electronic device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes in the various methods in the embodiments of the present application. For the sake of brevity, they are not repeated here.
[0123] An embodiment of the present application also provides a computer program product, including computer program instructions.
[0124] Optionally, the computer program product can be applied to the electronic device in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes in the various methods in the embodiments of the present application, which will not be described in detail here for the sake of brevity.
[0125] The embodiment of the present application also provides a computer program.
[0126] Optionally, the computer program may be applied to the electronic device in the embodiments of the present application. When the computer program runs on a computer, the computer executes the corresponding processes in the various methods in the embodiments of the present application. For the sake of brevity, they are not described here.
[0127] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0129] In the several embodiments provided in the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0132] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. In view of such an understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0133] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for predicting the availability of an edge node, characterized in that: include: The edge node determines a first sample set from a pre-established sample set according to an inquiry sample, the inquiry sample is used to characterize resource usage of the edge node at a first moment, the first sample set includes a plurality of sampling samples similar to the inquiry sample, the sampling samples are used to characterize resource usage of the edge node at a second moment, the first moment is later than the second moment, the inquiry sample includes resource usage information of the edge node itself collected in N sampling periods before the first moment, the resource usage information includes a CPU usage rate and / or a memory occupancy rate, and the first moment is a response moment of the edge node to a task request sent by a management node; The edge node performs feature grouping on the query sample to obtain n features of the query sample, wherein the n features correspond one-to-one to the n sub-prediction models; The edge node inputs the n features of the query sample into the n sub-prediction models respectively to obtain initial prediction results of the n feature dimensions of the query sample, where the sub-prediction models are trained based on the first sample set, and n is an integer greater than 1; The edge node performs weighted processing on the initial prediction results of the n feature dimensions to obtain an availability prediction result of the edge node.
2. The method according to claim 1, characterized in that: The edge node performs feature grouping on the query sample to obtain n features of the query sample, including: The edge node performs feature grouping on the query samples through an independent component analysis (ICA) algorithm to obtain n features of the query samples.
3. The method according to claim 1 or 2, characterized in that: The sampling samples include: resource usage information of the edge node itself collected in N sampling periods before a second moment, and an average value of resource usage information collected by the edge node in a data processing process after the second moment, the resource usage information includes CPU usage rate and / or memory occupancy rate, the second moment is the response moment of the edge node to the historical task request sent by the management node, and the data processing process is the process of executing the task requested by the historical task request.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: The edge node determines p sampling samples from the first sample set to form a training sample subset, where p is a positive integer; The edge node trains the n sub-prediction models according to the training sample subset.
5. The method according to claim 4, characterized in that The edge node trains the n sub-prediction models according to the training sample subset, including: For each of the p sampled samples in the training sample subset, the edge node performs feature grouping on the sampled sample to obtain n features of the sampled sample, where the n features correspond one-to-one to the n sub-prediction models; The edge node inputs the n features of the sampled samples into the n sub-prediction models respectively, and trains the n sub-prediction models.
6. The method according to claim 4, characterized in that The method further comprises: The edge node determines q sampling samples from the first sample set to form an evaluation sample subset, where q is a positive integer; The edge node evaluates the n sub-prediction models respectively according to the evaluation sample subset; The edge node determines whether the sub-prediction model is trained according to the evaluation result corresponding to the sub-prediction model.
7. The method according to claim 6, characterized in that The method further comprises: The edge node determines w sampling samples from the first sample set to form a test sample subset, where w is a positive integer; The edge node tests the n sub-prediction models respectively according to the test sample subset to determine the accuracy of the sub-prediction models; The edge node determines whether to use the sub-prediction model according to the accuracy of the sub-prediction model.
8. The method according to claim 7, characterized in that The edge node performs weighted processing on the initial prediction results of the n feature dimensions to obtain the availability prediction results of the edge results, including: The edge node determines the weight of the sub-prediction model according to the weight intensity modulation parameter and the relative prediction error of each sample in the w samples under each sub-prediction model; The edge node performs weighted processing on the initial prediction results of the n feature dimensions according to the weights corresponding to the n sub-prediction models, so as to obtain the availability prediction result of the edge node.
9. The method according to claim 1 or 2, characterized in that: The method further comprises: The edge node sends the availability prediction result to the management node.
10. A method for predicting the availability of an edge node, characterized in that: include: The management node receives an availability prediction result respectively sent by at least one edge node, wherein the availability prediction result is obtained based on the availability prediction method for edge nodes according to any one of claims 1 to 9; The management node divides the task to be processed according to the availability prediction results respectively sent by the at least one edge node to obtain the subtasks to be processed respectively corresponding to the at least one edge node; The management node sends the to-be-processed subtasks corresponding to the at least one edge node to the corresponding edge nodes respectively.
11. An electronic device, characterized in that: include: a sample processing unit, configured to determine a first sample set from a pre-established sample set according to an inquiry sample, wherein the inquiry sample is used to characterize resource usage of the electronic device at a first moment, the first sample set includes a plurality of sampling samples similar to the inquiry sample, the sampling samples are used to characterize resource usage of the edge node at a second moment, the first moment is later than the second moment, the inquiry sample includes resource usage information of the edge node itself collected in N sampling periods before the first moment, the resource usage information includes a CPU usage rate and / or a memory occupancy rate, and the first moment is a response time of the edge node to a task request sent by a management node; a prediction unit, configured to predict the availability of the electronic device based on the query sample by using n sub-prediction models to obtain initial prediction results of n feature dimensions, wherein the sub-prediction models are obtained by training based on the first sample set, and n is an integer greater than 1; The prediction unit is further used to perform weighted processing on the initial prediction results of the n feature dimensions to obtain the availability prediction result of the edge result; The prediction unit is specifically used for the edge node to perform feature grouping on the query sample to obtain n features of the query sample, where the n features correspond one-to-one to the n sub-prediction models; The edge node inputs the n features of the query sample into the n sub-prediction models respectively to obtain initial prediction results of the n feature dimensions of the query sample.
12. An electronic device, characterized in that: include A receiving unit, configured to receive an availability prediction result respectively sent by at least one edge node, wherein the availability prediction result is obtained based on the edge node availability prediction method according to any one of claims 1 to 9; A processing unit, configured to divide the task to be processed into subtasks to be processed corresponding to the at least one edge node according to the availability prediction results respectively sent by the at least one edge node; The sending unit is used to send the to-be-processed subtasks corresponding to the at least one edge node to the corresponding edge nodes respectively.
13. An electronic device, characterized in that: include: Memory and processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 9.
14. An electronic device, characterized in that: include: Memory and processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 10.
15. A storage medium, characterized in that: include: A readable storage medium and a computer program, wherein the computer program is used to implement the method according to any one of claims 1 to 10.
16. A data processing system, characterized in that: include: A management node and at least one edge node connected to the management node; Each edge node of the at least one edge node is used to perform the method according to any one of claims 1 to 9; The management node is used to execute the method according to claim 10.
Citation Information
Patent Citations
Multi-edge collaborative load balancing task scheduling method based on reinforcement learning
CN113672372A