Side end equipment upgrading method and device, electronic equipment and storage medium

By obtaining and analyzing the current data and future status of edge devices, the optimal upgrade time is automatically determined, which solves the problem that the upgrade timing in the existing technology fails to consider the equipment operation status, and realizes automatic upgrades, improving efficiency and convenience.

CN119887158APending Publication Date: 2025-04-25GUANGZHOU KETENG INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411871581.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the prior art, edge equipment upgrades are usually carried out based on preset time or manual intervention, resulting in the upgrade timing failing to fully consider the equipment operation, affecting the equipment operation, and manual upgrades are cumbersome and prone to errors, increasing maintenance costs and human resource consumption.

Method used

By obtaining the current device data and operation behavior data of the target edge device, combining the pre-trained detection model, the status and duration of the device in the future time period are determined, and the optimal upgrade time that meets the preset upgrade conditions is determined based on this information, and the upgrade operation is automatically triggered.

Benefits of technology

This method can automatically determine and perform upgrade operations without affecting the operation of the equipment, improving the convenience and efficiency of equipment upgrades, and reducing maintenance costs and human resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887158A_ABST
    Figure CN119887158A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a side end equipment upgrading method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring target equipment data and operation behavior data of target side end equipment in a current time period; based on the target equipment data, the operation behavior data and a pre-trained detection model, determining at least one equipment state of the target edge equipment in a future time period and state duration of the at least one equipment state; and based on the at least one device state and the state duration, determining a target upgrading moment meeting a preset upgrading condition, so as to trigger an upgrading operation on the target edge device at the target upgrading moment. According to the technical scheme provided by the embodiment of the invention, the target upgrading moment can be determined under the condition that the equipment state is considered, so that the influence on the operation of the target side end equipment caused by upgrading operation is avoided; moreover, manual intervention is not needed, the convenience of equipment upgrading is improved, the maintenance cost is saved, and the consumption of human resources is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of power control technology, and in particular to an edge device upgrading method, device, electronic device and storage medium. Background Art

[0002] As the world pays more and more attention to energy efficiency and sustainable development, smart grid technology has gradually become an important development direction of modern power systems. In smart grids, edge devices play a vital role. With the continuous advancement of technology, edge devices need to frequently upgrade software and firmware to support new functions, fix potential vulnerabilities or improve device performance.

[0003] In the prior art, edge devices usually trigger upgrade operations according to a preset upgrade time; or, staff manually intervenes and selects an upgrade time for manual upgrade. However, in the process of implementing the present invention, it is found that the prior art has at least the following technical problems: upgrading according to the preset upgrade time does not fully consider the operation of the device at the preset upgrade time, resulting in the upgrade at the preset upgrade time affecting the operation of the device; and the manual upgrade process is cumbersome and error-prone, resulting in increased maintenance costs and greater human resource consumption. Summary of the invention

[0004] The embodiments of the present invention provide an edge device upgrade method, apparatus, electronic device and storage medium to avoid the upgrade operation affecting the operation of the target edge device; and, no manual intervention is required, which improves the convenience of equipment upgrade, helps save maintenance costs and reduces human resource consumption.

[0005] According to one aspect of the present invention, there is provided a method for upgrading an edge device, comprising:

[0006] Obtain target device data and operation behavior data of the target edge device in the current time period;

[0007] Determine at least one device state of the target edge device in a future time period and a state duration of the at least one device state based on the target device data, the operation behavior data and a pre-trained detection model;

[0008] Based on the at least one device state and the state duration, a target upgrade time that meets a preset upgrade condition is determined to trigger an upgrade operation on the target edge device at the target upgrade time.

[0009] According to another aspect of the present invention, there is provided an edge device upgrading device, the device comprising:

[0010] A data acquisition module is used to acquire target device data and operation behavior data of the target edge device in the current time period;

[0011] A device state determination module, used to determine at least one device state of the target edge device in a future time period and a state duration of the at least one device state based on the target device data, the operation behavior data and a pre-trained detection model;

[0012] The target upgrade time determination module is used to determine the target upgrade time that meets the preset upgrade conditions based on the at least one device state and the state duration, so as to trigger the upgrade operation of the target edge device at the target upgrade time.

[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the edge device upgrade method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the edge device upgrade method described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention obtains the target device data and operation behavior data of the target edge device in the current time period; and, based on the target device data, the operation behavior data and a pre-trained detection model, determines at least one device state of the target edge device in the future time period and the state duration of at least one device state; finally, based on the at least one device state and the state duration, determines the target upgrade moment that meets the preset upgrade conditions, so as to trigger the upgrade operation of the target edge device at the target upgrade moment, and through the device state and the state duration, the determined target upgrade moment meets the preset upgrade conditions, thereby determining the target upgrade moment taking into account the device state, avoiding the upgrade operation from affecting the operation of the target edge device; and, without the need for manual intervention, the convenience of equipment upgrade is improved, which is conducive to saving maintenance costs and reducing human resource consumption.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a flow chart of an edge device upgrade method provided according to an embodiment of the present invention;

[0022] Figure 2 is a flow chart of another edge device upgrade method provided according to an embodiment of the present invention;

[0023] Figure 3 It is a structural schematic diagram of an edge device upgrading device provided according to an embodiment of the present invention;

[0024] Figure 4 It is a structural schematic diagram of an electronic device that implements the edge device upgrading method of an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "etc." and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0027] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.

[0028] Figure 1 This is a flow chart of an edge device upgrade method provided according to an embodiment of the present invention. This embodiment can be applied to determine a target upgrade time of a target edge device so as to perform an upgrade operation on the target edge device at the target upgrade time. The method can be executed by an edge device upgrade device, which can be implemented in the form of hardware and / or software.

[0029] like Figure 1 As shown, the method of this embodiment may specifically include:

[0030] S110. Obtain target device data and operation behavior data of the target edge device in the current time period.

[0031] The target edge device is a device with processing capability and network connection capability; for example, the target edge device includes a smart meter, a home appliance controller, and an energy management system, etc. The current time period is a time period with the current moment as the end moment and a preset time period from the current moment.

[0032] In this embodiment, the target device data includes target time period data and target power load data. The target time period data is used to reflect the time period type included in the target edge device in the current time period; the time period type includes an idle time period type, a normal working time period type, and a busy time period type; the target power load data is used to reflect the power output and / or load fluctuation of the target edge device in the current time period, so as to reflect the user's operation intensity on the target edge device through the power output and / or load fluctuation. The operation behavior data includes target behavior data corresponding to different target behavior feature types, and the target behavior feature type includes at least one of the power on / off type, parameter adjustment type, mode switching type, and menu interaction type.

[0033] In a specific implementation, the use of the target edge device can be recorded during the use of the target edge device, and a use log can be generated. The target device data and operation behavior data can be determined by obtaining the use log and determining the log information corresponding to the current time period.

[0034] Furthermore, the environmental data of the current time period detected by the environmental detection device can also be obtained. For example, the environmental data includes temperature, humidity, light intensity and noise, etc. The user's activity scenes can be captured through environmental data to facilitate a more comprehensive understanding of the usage of the target edge device.

[0035] In order to ensure that the target upgrade time can be accurately determined, after the target device data and operation behavior data are obtained, data preprocessing operations can be performed on the target device data and operation behavior data. Exemplarily, the data preprocessing operations include operations such as outlier removal, missing value supplementation, and error data modification.

[0036] S120. Determine at least one device state of the target edge device in a future time period and a state duration of at least one device state based on the target device data, the operation behavior data, and a pre-trained detection model.

[0037] In this embodiment, a detection model for predicting the device state of the target edge device at each moment in the future time period can be pre-trained. Feature extraction is performed on the target device data and the operation behavior data respectively, and the extracted feature data is normalized. The data after normalization is used as the input data of the detection model, and the input data is input into the detection model. The output result is the device state obtained after predicting the state of the target edge device at each moment in the future time period; wherein the device state includes at least one of an idle state, a normal working state, and a busy state. Based on the correspondence between the device state and each moment in the future time period, the state duration of each device state can be determined. wherein the state duration is the time consisting of the state start time and the state end time.

[0038] S130. Based on at least one device state and state duration, determine a target upgrade time that meets a preset upgrade condition, so as to trigger an upgrade operation on the target edge device at the target upgrade time.

[0039] Optionally, the preset upgrade condition includes: the device state at this moment is an idle state. Specifically, the state duration of the device state being an idle state can be determined, and any moment in the state duration of the idle state can be used as the target upgrade moment.

[0040] Alternatively, based on at least one device state and state duration, a target upgrade time that meets preset upgrade conditions is determined to trigger an upgrade operation on the target edge device at the target upgrade time. The implementation method includes: determining the idle duration corresponding to the idle state in a future time period and the duration required for the upgrade; when the duration corresponding to the idle duration is greater than or equal to the duration required for the upgrade, determining the target upgrade duration in the idle duration, and determining the starting time of the target upgrade duration as the target upgrade time; wherein, the duration of the target upgrade duration is the same as the duration required for the upgrade.

[0041] In this embodiment, the duration required for the upgrade operation is determined. Optionally, the duration required for the upgrade is equal to the sum of the preset preprocessing duration, data transmission duration, upgrade installation duration, verification duration, and preset post-upgrade maintenance duration of the target edge device. Further, based on the device state and state duration, the idle duration corresponding to the idle state can be determined. Since the duration corresponding to the idle duration is less than the duration required for the upgrade, the upgrade operation may affect the normal operation of the target edge device; therefore, in order to leave enough time for the upgrade operation, when the duration corresponding to the idle duration is greater than or equal to the duration required for the upgrade, the time with a duration equal to the duration required for the upgrade can be intercepted from the idle duration as the target upgrade duration, and the starting time of the target upgrade duration is determined as the target upgrade time, thereby ensuring that the upgrade operation is completed during the idle duration without affecting the normal operation of the target edge device.

[0042] Furthermore, if the target edge device is determined to not have an idle state in the device status in the future time period, in order to ensure that the upgrade operation of the target edge device can be completed and improve the user's operating experience, the working duration of the device status in the future time period being a normal working state can be determined, and a moment in the working duration can be determined as the target upgrade moment.

[0043] The technical solution of the embodiment of the present invention obtains the target device data and operation behavior data of the target edge device in the current time period; and, based on the target device data, the operation behavior data and a pre-trained detection model, determines at least one device state of the target edge device in the future time period and the state duration of at least one device state; finally, based on the at least one device state and the state duration, determines the target upgrade moment that meets the preset upgrade conditions, so as to trigger the upgrade operation of the target edge device at the target upgrade moment, and through the device state and the state duration, the determined target upgrade moment meets the preset upgrade conditions, thereby determining the target upgrade moment taking into account the device state, avoiding the upgrade operation from affecting the operation of the target edge device; and, without the need for manual intervention, the convenience of equipment upgrade is improved, which is conducive to saving maintenance costs and reducing human resource consumption.

[0044] Figure 2 This is a flowchart of another edge device upgrade method provided according to an embodiment of the present invention. In this embodiment, based on the above embodiment, optionally, the method of determining at least one device state and the state duration of at least one device state includes: based on the target device data, determining the target time period data corresponding to the preset target time period feature type as the first input data, and determining the target power load data corresponding to the preset target power feature type as the second input data; based on the operation behavior data, determining the target behavior data corresponding to the preset target behavior feature type as the third input data; inputting the first input data, the second input data and the third input data into a pre-trained detection model, and determining at least one device state of the target edge device in the future time period and the state duration of at least one device state based on the output result of the detection model. Among them, the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 2 As shown, the method includes:

[0045] S210. Obtain target device data and operation behavior data of the target edge device in the current time period.

[0046] S220. Based on the target device data, determine the target time period data corresponding to the preset target time period characteristic type as the first input data, and determine the target power load data corresponding to the preset target power characteristic type as the second input data; based on the operation behavior data, determine the target behavior data corresponding to the preset target behavior characteristic type as the third input data.

[0047] In this embodiment, feature data of different device feature types can be extracted from the target device data. Exemplarily, the device feature types include time feature types and power feature types; feature extraction can be performed on the operation behavior data to extract feature data of different behavior feature types. The extracted feature data can be normalized, and the feature data can be updated based on the normalized data.

[0048] It should be noted that different feature types have different degrees of impact on the status of the target edge device. In order to improve the accuracy of determining the target upgrade time, the target time period feature types that meet the preset impact conditions can be screened out from the time period feature types, the target power feature types that meet the preset impact conditions can be screened out from the power feature types, and the target behavior feature types that meet the preset impact conditions can be screened out from the behavior feature types.

[0049] Optionally, the target time period feature type may include at least one of a normal working time period type, an idle time period type, and an operating peak time period type; the target power feature type includes at least one of a power fluctuation type, a power average value type, and a load change rate type; the target behavior feature type includes at least one of an operating frequency type, an operating duration type, and an operating distribution type.

[0050] In order to reduce the amount of data and improve data processing efficiency, the target time period data corresponding to the target time period feature type can be determined as the first input data; the target power load data corresponding to the target power feature type can be determined as the second input data; the target behavior data corresponding to the target behavior feature type can be determined as the third input data. For example, if the target power feature type is a power average value type and a load change rate type, then the power average value and load change rate of the target edge device in the current time period can be determined based on the target power load data in the target device data, and the power average value and load change amount can be used as the second input data.

[0051] S230. Input the first input data, the second input data, and the third input data into a pre-trained detection model, and determine at least one device state and the state duration of at least one device state of the target edge device in a future time period based on the output result of the detection model.

[0052] In this embodiment, the first input data, the second input data, and the third input data can be respectively input into a pre-trained detection model. Exemplarily, the detection model includes an ensemble learning model based on a gradient boosting decision tree (eXtreme Gradient Boosting, XGBoos). The output result of the detection model is the device state of the target edge device at each moment in the future time period, and the state duration of each state is determined based on the moment corresponding to each device state.

[0053] In this embodiment, the target time period data, target power load data and target behavior data are used as input data of the model, thereby reducing the amount of data processing, which is beneficial to improving processing efficiency and can quickly determine at least one device state and state duration in a future time period.

[0054] S240. Based on at least one device state and state duration, determine a target upgrade time that meets a preset upgrade condition, so as to trigger an upgrade operation on the target edge device at the target upgrade time.

[0055] Optionally, before inputting the first input data, the second input data and the third input data into the pre-trained detection model, it also includes: obtaining a current training sample set; wherein the current training sample set includes multiple sample data and real state labels corresponding to the sample data; based on the sample data, determining a first correlation value between each time period feature type and the target variable, a second correlation value between each power feature type and the target variable, and a third correlation value between each behavior feature type and the target variable; based on the first correlation value, determining a target time period feature type from multiple time period feature types, based on the second correlation value, determining a target power feature type from multiple power feature types, and based on the third correlation value, determining a target behavior feature type from multiple behavior feature types; based on the target time period sample data corresponding to the target time period feature type, the target load sample data corresponding to the target power feature type, and the target behavior sample data corresponding to the target behavior feature type, training the detection model to be trained until the training is completed when the preset training conditions are met, and obtaining the detection model after the training is completed.

[0056] The sample data include time period sample data corresponding to different time period feature types, power load sample data corresponding to different power feature types, and behavior sample data corresponding to different behavior feature types.

[0057] In a specific implementation, feature extraction can be performed on the historical device data and historical behavior data of the target edge device at each moment in the historical time period to determine the historical time period data, historical power data, and historical behavior data corresponding to each moment in the historical time period. The historical time period data at each moment is used as the time period sample data, the historical power data at each moment is used as the power load sample data, and the historical behavior data at each moment is used as the behavior sample data. The real device state corresponding to each moment in the historical time period is used as the real state label.

[0058] In this embodiment, the first correlation value is used to reflect the influence of the time period feature type on the target variable. The higher the first correlation value, the higher the influence of the time period feature type on the target variable; conversely, the lower the influence of the time period feature type on the target variable. Correspondingly, the second correlation value is used to reflect the influence of the power feature type on the target variable; the third correlation value is used to reflect the influence of the behavior feature type on the target variable. The target variable can be the device state that the detection model needs to predict. For example, the target variable can be at least one of an idle state, a normal working state, and a busy state.

[0059] In a specific implementation, a first correlation value, a second correlation value, and a third correlation value may be determined. The time period feature type with the largest first correlation value is set as the target time period feature type; the power feature type with the largest second correlation value is set as the target power feature type; and the behavior feature type with the largest third correlation value is set as the target behavior feature type. Alternatively, the time period feature type with a first correlation value greater than a first preset threshold value may be set as the target time period feature type; the power feature type with a second correlation value greater than a second preset threshold value may be determined as the target power feature type; and the behavior feature type with a third correlation value greater than a third preset threshold value may be determined as the target behavior feature type.

[0060] Further, based on the current training sample set, target time period sample data corresponding to the target time period feature type, target load sample data corresponding to the target power feature type, and target behavior sample data corresponding to the target behavior feature type are determined. The detection model to be trained is trained based on the target time period sample data, the target behavior sample data, and the target load sample data. Specifically, the target time period sample data, the target behavior sample data, and the target load sample data can be divided into multiple sample data groups; based on each sample data group, the detection model to be trained is iteratively trained until the training ends when the preset training conditions are met, and the detection model after the training is obtained. Among them, the preset training conditions include the convergence of the loss function value, and / or the number of iterations reaches a preset number threshold.

[0061] The present embodiment provides a method for screening out target power feature types, target time period feature types and target behavior feature types that have a greater impact on the target variable, and training a detection model to be trained based on the target time period sample data, target behavior sample data and target load sample data, thereby minimizing the training workload without affecting the training accuracy.

[0062] In this embodiment, based on the sample data, the first correlation value between each time period feature type and the target variable is determined, including: based on the sample data, determining the time period sample data corresponding to each time period feature type; for each time period feature type, based on the time period sample data corresponding to the time period feature type, determining the mutual information between the time period feature type and the target variable, and determining the mutual information as the first correlation value.

[0063] It should be noted that in the case of real-time data stream, in order to ensure the prediction accuracy of the detection model, the target time period feature type, target power feature type and target behavior feature type can be periodically determined based on the set time window, and the detection model can be retrained based on the latest determined target time period feature type, target power feature type and target behavior feature type.

[0064] Exemplarily, based on the historical equipment data and historical behavior data corresponding to the historical time window closest to the current moment, the first degree of correlation, the second degree of correlation and the third degree of correlation can be used to determine the target time period feature type, target power feature type and target behavior feature type corresponding to the historical time window.

[0065] In a specific implementation, the time period sample data corresponding to each time period feature type may be determined based on the sample data corresponding to the historical time window; for each time period feature type, the specific implementation method of determining the mutual information between the time period feature type and the target variable based on the time period sample data corresponding to the time period feature type may be:

[0066]

[0067] Among them, I t Represents the sample data X in the historical time window i Mutual information with the target variable; X i (t) represents the time period sample data X corresponding to the time feature type i at time t in the historical time window i ; Y(t) represents the true state label corresponding to time t; I(X i (t); Y(t)) represents X at time t i The time mutual information between T (t) and Y (t); w Indicates the length of the historical time window.

[0068] Furthermore, I(X i The determination method of Y(t) is as follows:

[0069]

[0070] Among them, P(x,y) represents the sample data of the time period X i and the joint probability distribution of the true state label Y(t) corresponding to time t; P(x) represents the sample data X i The marginal probability distribution of P(y) represents the marginal probability distribution of the true state label Y(t); P max (Y) is the probability of the most frequently occurring temporal feature type in the true state label Y(t).

[0071] In this embodiment, the mutual information between the determined time period feature type and the target variable can be determined as the first correlation value. It should be noted that the mutual information between the power feature type and the target variable can be determined accordingly in the above manner as the second correlation value; the mutual information between the behavior feature type and the target variable can be determined as the third correlation value. Furthermore, a correlation matrix is ​​constructed based on the first correlation value of each time period feature type, the second correlation value of each power feature type, and the third correlation value of each behavior feature type.

[0072] This embodiment provides a method for determining the amount of mutual information, and in the case of real-time data flow, dynamically and periodically executes the process of determining the amount of mutual information based on a set time window, thereby continuously adjusting the target time period feature type, target power feature type, and target behavior feature type through a dynamic adjustment mechanism, thereby improving the accuracy of model training and the accuracy of determining future upgrade moments, so that the detection model can adapt to different usage scenarios more flexibly and avoid prediction errors caused by feature mismatch or untimely data updates. In addition, through the feature data corresponding to each moment in the time window, the detection model can capture the timing regularity of the use of the target edge device and the periodic changes in user behavior, thereby improving the timeliness and accuracy of the prediction results, and in a dynamic environment, it can more accurately judge the changing trend of the operating behavior.

[0073] Optionally, the detection model includes an integrated learning (XGBoost) model based on a gradient boosting decision tree; based on the target time period sample data corresponding to the target time period feature type, the target load sample data corresponding to the target power feature type, and the target behavior sample data corresponding to the target behavior feature type, the detection model to be trained is trained until the training is terminated when a preset training condition is met, including: based on the target time period sample data corresponding to the target time period feature type, the target load sample data corresponding to the target power feature type, and the target behavior sample data corresponding to the target behavior feature type, the weight of the leaf node corresponding to the detection model to be trained in the current iteration round is determined, based on the weight of the leaf node and the true state label, the loss function value of the detection model to be trained in the current iteration round is determined; when the loss function value obtained in each iteration meets the preset training condition, the training is terminated; wherein the preset training condition is that the loss function value converges.

[0074] Specifically, during the training process of the detection model to be trained, the target period sample data, target load sample data, and target behavior sample data need to be converted into a DMatrix format that can be used by the XGBoost model, and the target period sample data, target load sample data, and target behavior sample data are updated based on the data after format conversion. In each iteration, the XGBoost model will build a new tree to reduce the residual error of the XGBoost model. The node of each tree measures the split quality through the gain. The formula for determining the gain is as follows:

[0075]

[0076] Among them, G L and G R represents the gradient sum of the left subtree and the right subtree; H L and H R represents the sum of the second-order gradients of the left subtree and the right subtree; λ(l) represents the regularization parameter that is dynamically adjusted with the number of iterations l, and the regularization parameter gradually increases as the training progresses.

[0077] Furthermore, after the structure of the tree is determined, the weight of the leaf node corresponding to the detection model to be trained in the current iteration round can be determined. The weight calculation formula is as follows:

[0078]

[0079] Where: w j represents the weight of the jth leaf node; G j represents the gradient sum of the jth leaf node; H j represents the second-order gradient sum of the j-th leaf node, and γ represents the regularization parameter.

[0080] Optionally, during the training process, the learning rate corresponding to each round of training can be dynamically adjusted, and the η(l) learning rate of the current iteration round is determined as follows:

[0081]

[0082] Among them, η0 is the preset initial learning rate, β represents the prediction adjustment factor, and l represents the number of current iteration rounds.

[0083] In the specific implementation, after each round of iteration, the XGBoost model obtains multiple trees. The results output by each tree are weighted combined according to the learning rate of the current iteration round, and the combined result is used as the final prediction value of the device status.

[0084] Furthermore, the loss function value corresponding to the detection model to be trained obtained in each iteration can be determined. The loss function value L is determined as follows:

[0085]

[0086] Where a represents the ath sample data, n represents the total amount of sample data, c represents the cth device status, C represents the total amount of device status, y a,c represents the true state label corresponding to the a-th sample data, represents the model's predicted probability that the a-th sample data belongs to the c-th device state, k represents the k-th tree, K represents the total number of trees, γ represents the regularization parameter, T represents the number of leaf nodes in each tree, j represents the j-th leaf node, and w j represents the weight of the jth leaf node.

[0087] In this embodiment, when the loss function value obtained in each iteration converges, the training ends and the final detection model is obtained.

[0088] In order to avoid the problem of unbalanced feature types encountered in classification problems, that is, the frequency of occurrence of some states or events is low, which affects the prediction accuracy of the detection model; this embodiment proposes a type weighting mechanism, which gives a higher weight to low-frequency states by updating the weights of leaf nodes, so that the detection model can balance the prediction accuracy of various types when processing unbalanced data, thereby reducing the risk of misjudgment or missed disks and improving upgrade stability.

[0089] Figure 3 1 is a schematic diagram of the structure of an edge device upgrade device provided according to an embodiment of the present invention, and the device is used to execute the edge device upgrade method provided in any of the above embodiments. The device and the edge device upgrade method of each of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the edge device upgrade device, reference can be made to the embodiment of the above edge device upgrade method. Figure 3 As shown, the device comprises:

[0090] A data acquisition module 10 is used to acquire target device data and operation behavior data of a target edge device in a current time period;

[0091] A device state determination module 11 is used to determine at least one device state of a target edge device in a future time period and a state duration of at least one device state based on target device data, operation behavior data and a pre-trained detection model;

[0092] The target upgrade time determination module 12 is used to determine a target upgrade time that meets a preset upgrade condition based on at least one device state and state duration, so as to trigger an upgrade operation on a target edge device at the target upgrade time.

[0093] Based on any optional technical solution in the embodiment of the present invention, optionally, the device state determination module 11 includes:

[0094] A first data determination submodule, configured to determine, based on the target device data, target period data corresponding to a preset target period characteristic type as first input data, and target power load data corresponding to a preset target power characteristic type as second input data;

[0095] A second data determination submodule is used to determine target behavior data corresponding to a preset target behavior feature type based on the operation behavior data as third input data;

[0096] The data input submodule is used to input the first input data, the second input data and the third input data into a pre-trained detection model, and based on the output result of the detection model, determine at least one device state of the target edge device in a future time period and the state duration of at least one device state.

[0097] Based on any optional technical solution in the embodiments of the present invention, optionally, the method further includes:

[0098] A current training sample set acquisition module is used to acquire a current training sample set before inputting the first input data, the second input data and the third input data into a pre-trained detection model; wherein the current training sample set includes a plurality of sample data and real state labels corresponding to the sample data; the sample data includes time period sample data corresponding to different time period feature types, power load sample data corresponding to different power feature types and behavior sample data corresponding to different behavior feature types;

[0099] A correlation value determination module, used to determine, based on the sample data, a first correlation value between each time period feature type and the target variable, a second correlation value between each power feature type and the target variable, and a third correlation value between each behavior feature type and the target variable;

[0100] a type determination module, configured to determine a target time period feature type from a plurality of time period feature types based on a first correlation value, determine a target power feature type from a plurality of power feature types based on a second correlation value, and determine a target behavior feature type from a plurality of behavior feature types based on a third correlation value;

[0101] The model training module is used to train the detection model to be trained based on the target time period sample data corresponding to the target time period feature type, the target load sample data corresponding to the target power feature type, and the target behavior sample data corresponding to the target behavior feature type, until the training is completed when the preset training conditions are met, and the detection model after the training is obtained.

[0102] Based on any optional technical solution in the embodiments of the present invention, optionally, the correlation value determination module includes:

[0103] A sample data determination submodule is used to determine the time period sample data corresponding to each time period feature type based on the sample data;

[0104] The mutual information determination submodule is used to determine the mutual information between the time period feature type and the target variable for each time period feature type based on the time period sample data corresponding to the time period feature type, and determine the mutual information as a first correlation value.

[0105] On the basis of any optional technical solution in the embodiments of the present invention, optionally, the detection model includes an integrated learning model based on a gradient boosting decision tree;

[0106] Model training module, including:

[0107] A weight determination submodule, for determining the weight of the leaf node corresponding to the detection model to be trained in the current iteration round based on the target period sample data corresponding to the target period feature type, the target load sample data corresponding to the target power feature type, and the target behavior sample data corresponding to the target behavior feature type, and determining the loss function value of the detection model to be trained in the current iteration round based on the weight of the leaf node and the true state label;

[0108] The training submodule is used to end the training when the loss function value obtained in each iteration meets the preset training condition; wherein the preset training condition is the convergence of the loss function value.

[0109] On the basis of any optional technical solution in the embodiment of the present invention, optionally, the device state includes at least one of an idle state, a normal working state and a busy state; the target upgrade time determination module 12 includes:

[0110] The duration determination submodule is used to determine the idle duration corresponding to the idle state in the future time period and the duration required for upgrading;

[0111] A target upgrade time determination submodule is used to determine a target upgrade time duration in the idle time duration when the duration corresponding to the idle time duration is greater than or equal to the duration required for the upgrade, and determine the start time of the target upgrade time duration as the target upgrade time;

[0112] The target upgrade duration is the same as the duration required for the upgrade.

[0113] Based on any optional technical solution in the embodiments of the present invention, optionally, the time required for the upgrade is equal to the sum of the preset preprocessing time, data transmission time, upgrade installation time, verification time and preset post-upgrade maintenance time of the target edge device.

[0114] The technical solution of the embodiment of the present invention obtains the target device data and operation behavior data of the target edge device in the current time period; and, based on the target device data, the operation behavior data and a pre-trained detection model, determines at least one device state of the target edge device in the future time period and the state duration of at least one device state; finally, based on the at least one device state and the state duration, determines the target upgrade moment that meets the preset upgrade conditions, so as to trigger the upgrade operation of the target edge device at the target upgrade moment, and through the device state and the state duration, the determined target upgrade moment meets the preset upgrade conditions, thereby determining the target upgrade moment taking into account the device state, avoiding the upgrade operation from affecting the operation of the target edge device; and, without the need for manual intervention, the convenience of equipment upgrade is improved, which is conducive to saving maintenance costs and reducing human resource consumption.

[0115] It is worth noting that in the embodiment of the above-mentioned edge device upgrading device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0116] Figure 4 1 is a schematic diagram of the structure of an electronic device that implements the edge device upgrade method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0117] like Figure 4As shown, the electronic device 20 includes at least one processor 21, and a memory connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 to the random access memory (RAM) 23. In RAM23, various programs and data required for the operation of the electronic device 20 can also be stored. The processor 21, ROM22 and RAM23 are connected to each other through a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.

[0118] A number of components in the electronic device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a disk, an optical disk, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0119] The processor 21 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 21 executes the various methods and processes described above, such as the edge device upgrade method.

[0120] In some embodiments, the edge device upgrade method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 28. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 20 via the ROM 22 and / or the communication unit 29. When the computer program is loaded into the RAM 23 and executed by the processor 21, one or more steps of the edge device upgrade method described above may be performed. Alternatively, in other embodiments, the processor 21 may be configured to execute the edge device upgrade method in any other appropriate manner (e.g., by means of firmware).

[0121] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0122] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0123] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0124] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0125] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0126] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0127] This embodiment also provides a computer program product, including a computer program, which, when executed by a processor, implements the edge device upgrade method provided in any embodiment of the present application.

[0128] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0129] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0130] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for upgrading an edge device, characterized in that: include: Obtain target device data and operation behavior data of the target edge device in the current time period; Determine at least one device state of the target edge device in a future time period and a state duration of the at least one device state based on the target device data, the operation behavior data and a pre-trained detection model; Based on the at least one device state and the state duration, a target upgrade time that meets a preset upgrade condition is determined to trigger an upgrade operation on the target edge device at the target upgrade time.

2. The method according to claim 1, characterized in that: The determining, based on the target device data, the operation behavior data, and the pre-trained detection model, at least one device state of the target edge device in a future time period and a state duration of the at least one device state includes: Based on the target device data, determining target time period data corresponding to a preset target time period characteristic type as first input data, and determining target power load data corresponding to a preset target power characteristic type as second input data; Based on the operation behavior data, target behavior data corresponding to a preset target behavior feature type is determined as third input data; The first input data, the second input data and the third input data are input into a pre-trained detection model, and based on the output result of the detection model, at least one device state of the target edge device in a future time period and the state duration of the at least one device state are determined.

3. The method according to claim 2, characterized in that Before inputting the first input data, the second input data and the third input data into the pre-trained detection model, the method further includes: Acquire a current training sample set; wherein the current training sample set includes a plurality of sample data and real state labels corresponding to the sample data; the sample data includes time period sample data corresponding to different time period feature types, power load sample data corresponding to different power feature types, and behavior sample data corresponding to different behavior feature types; Based on the sample data, determining a first correlation value between each of the time period feature types and the target variable, a second correlation value between each of the power feature types and the target variable, and a third correlation value between each of the behavior feature types and the target variable; Based on the first correlation value, a target time period feature type is determined from the plurality of time period feature types; based on the second correlation value, a target power feature type is determined from the plurality of power feature types; based on the third correlation value, a target behavior feature type is determined from the plurality of behavior feature types; Based on the target time period sample data corresponding to the target time period feature type, the target load sample data corresponding to the target power feature type, and the target behavior sample data corresponding to the target behavior feature type, the detection model to be trained is trained until the training is completed when the preset training conditions are met, and the detection model after the training is obtained.

4. The method according to claim 3, characterized in that The determining, based on the sample data, a first correlation value between each of the time period feature types and the target variable comprises: Based on the sample data, determine the time period sample data corresponding to each time period feature type; For each time period feature type, based on the time period sample data corresponding to the time period feature type, the mutual information between the time period feature type and the target variable is determined, and the mutual information is determined as the first correlation degree value.

5. The method according to claim 3, characterized in that: The detection model includes an integrated learning model based on a gradient boosting decision tree; The method of training the detection model to be trained based on the target period sample data corresponding to the target period feature type, the target load sample data corresponding to the target power feature type, and the target behavior sample data corresponding to the target behavior feature type until the training ends when a preset training condition is met includes: Determine the weight of the leaf node corresponding to the detection model to be trained in the current iteration round based on the target period sample data corresponding to the target period feature type, the target load sample data corresponding to the target power feature type, and the target behavior sample data corresponding to the target behavior feature type, and determine the loss function value of the detection model to be trained in the current iteration round based on the weight of the leaf node and the true state label; When the loss function value obtained in each iteration satisfies the preset training condition, the training ends; wherein the preset training condition is that the loss function value converges.

6. The method according to claim 1, characterized in that The device state includes at least one of an idle state, a normal working state, and a busy state; and determining a target upgrade time that meets a preset upgrade condition based on the at least one device state and the state duration, so as to trigger an upgrade operation on the target edge device at the target upgrade time, includes: Determine the idle duration corresponding to the idle state in the future time period and the duration required for upgrading; In a case where the duration corresponding to the idle duration is greater than or equal to the duration required for the upgrade, a target upgrade duration is determined from the idle duration, and a start time of the target upgrade duration is determined as the target upgrade time; The target upgrade duration is the same as the duration required for the upgrade.

7. The method according to claim 6, characterized in that The time required for the upgrade is equal to the sum of the preset preprocessing time, data transmission time, upgrade installation time, verification time and preset post-upgrade maintenance time of the target edge device.

8. An edge device upgrade device, characterized in that: include: A data acquisition module is used to acquire target device data and operation behavior data of the target edge device in the current time period; A device state determination module, used to determine at least one device state of the target edge device in a future time period and a state duration of the at least one device state based on the target device data, the operation behavior data and a pre-trained detection model; The target upgrade time determination module is used to determine the target upgrade time that meets the preset upgrade conditions based on the at least one device state and the state duration, so as to trigger the upgrade operation of the target edge device at the target upgrade time.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the edge device upgrading method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the edge device upgrade method described in any one of claims 1-7 when executed.