Device upgrading method, device, electronic device and storage medium

By weighted the operating performance information and business event information of the device, determine the upgrade period of the device, and upgrade it when meeting the conditions, solve the problem of higher probability of business information during the equipment upgrade process, increase the upgrade of the upgrade, and increase the upgrade of the upgrade. Accuracy and reliability.

CN114840229BActive Publication Date: 2025-01-28ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210315962.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-01-28
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

In the prior art, the probability of business information loss during equipment upgrade is high, and there is a lack of effective solutions.

Method used

By weighted the operating performance information and business event information of the target equipment in different historical periods, obtain the average historical state, determine the current upgrade period, and upgrade when the preset upgrade conditions are met.

Benefits of technology

It improves the accuracy of the statistical statistics of the equipment, and determines the accuracy of the equipment upgrade period, thereby reducing the probability of the loss of business information during the equipment upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114840229B_ABST
    Figure CN114840229B_ABST
Patent Text Reader

Abstract

The present application relates to a device upgrade method, device, electronic device and storage medium, wherein the device upgrade method includes: obtaining the average historical status of the target device in different historical periods by weighted statistics of the operating performance information and business event information of the target device in different historical periods, determining the current upgradeable period of the target device according to the average historical status of the target device in different historical periods, and upgrading the target device in the current upgradeable period when the operating status of the target device in the current upgradeable period meets the preset upgrade conditions. It combines the operating performance information and business event information of the device in the historical period to calculate the operating status of the device, improves the accuracy of the operating status statistics of the device, thereby improving the accuracy of determining the upgradeable period of the device, and further reducing the probability of business information loss during the device upgrade process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of embedded device upgrade, and in particular to a device upgrade method, device, electronic device and storage medium. Background Art

[0002] At present, the upgrade of the built-in functions of the equipment is often carried out by integrating the trends of the equipment's operating status in multiple cycles to predict the period of time when the equipment is suitable for upgrading. This method is based on the statistical data of the equipment's operating status, and the accuracy of the determined upgrade period is easily affected by other factors of the equipment, resulting in a high probability of business information loss during the upgrade process of the equipment during the upgrade period.

[0003] With regard to the problem in the related art that there is a high probability of business information loss during the device upgrade process, no effective solution has been proposed yet. Summary of the invention

[0004] In this embodiment, a device upgrade method, device, electronic device and storage medium are provided to solve the problem of a high probability of business information loss during device upgrade in the related art.

[0005] In a first aspect, a device upgrade method is provided in this embodiment, including:

[0006] Performing weighted statistics on the operation performance information and service event information of the target device in different historical periods to obtain the average value of the historical status of the target device in different historical periods;

[0007] Determine a current upgradeable period of the target device according to an average value of the historical status of the target device in different historical periods;

[0008] When the running state of the target device in the current upgradeable period meets a preset upgrade condition, the target device is upgraded in the current upgradeable period.

[0009] In some embodiments, performing weighted statistics on the operating performance information and service event information of the target device in different historical periods to obtain the average value of the historical status of the target device in different historical periods includes:

[0010] Obtaining the operating performance information and service event information of the target device in different preset historical time periods;

[0011] According to the correlation coefficient between the service event information and the operation performance information, weighting the operation performance information to obtain first weighted statistical information;

[0012] According to the preset priority of the business event information, weighting the business event information to obtain second weighted statistical information;

[0013] The average value of the historical status of the target device in different historical periods is obtained according to the first weighted statistical information and the second weighted statistical information.

[0014] In some embodiments, the obtaining of the operating performance information and service event information of the target device in different preset historical time periods includes:

[0015] Obtaining the operating performance parameter value of the target device in each preset historical period of a plurality of historical cycles, and determining it as the operating performance information of the different historical periods; wherein each of the historical cycles is divided into a plurality of preset historical periods according to a preset division rule;

[0016] The number of occurrences of the service events of the target device in each preset historical period of the plurality of historical cycles is obtained, and the number of occurrences of the service events of the target device in each preset historical period is determined as the service event information of the different historical periods.

[0017] In some embodiments, weighting the operation performance information according to the correlation coefficient between the service event information and the operation performance information to obtain the first weighted statistical information includes:

[0018] Get the Pearson correlation coefficient between the number of business event occurrences and the operating performance parameters;

[0019] Obtaining a performance weighting coefficient associated with the operating performance information according to the Pearson correlation coefficient;

[0020] The operating performance information is weighted and counted according to the performance weighting coefficient to obtain the first weighted statistical information.

[0021] In some embodiments, determining the current upgradeable period of the target device according to the average value of the historical status of the target device in different historical periods includes:

[0022] The historical status average values ​​of the target device in different historical periods are sorted according to a preset sorting rule, and the current upgradeable period of the target device is determined based on the sorting result of the historical status average values.

[0023] In some embodiments, when the running state of the target device in the current upgradeable period satisfies a preset upgrade condition, upgrading the target device in the current upgradeable period includes:

[0024] When a service event occurs to the target device within a preset duration of the current upgradeable period, obtaining an average value of the current state of the target device within the preset duration;

[0025] It is determined whether the current status average value of the target device is less than a preset status threshold value, and if so, the target device is upgraded in the current upgradeable period.

[0026] In some embodiments, obtaining the average value of the current state of the target device within the preset time period includes:

[0027] The operating performance information and service event information of the target device within the preset time period are weightedly counted to obtain the current state average value.

[0028] In some embodiments, the method further comprises:

[0029] When the current state average value is greater than a preset state threshold, the historical state average value of the target device is updated according to a preset strategy, and the upgradeable period of the target device is determined based on the updated historical state average value.

[0030] In a second aspect, in this embodiment, a device upgrade apparatus is provided, comprising: a statistical module, a calculation module, and an upgrade module; wherein:

[0031] The statistical module is used to perform weighted statistics on the operating performance information and service event information of the target device in different historical periods to obtain the average value of the historical status of the target device in different historical periods;

[0032] The calculation module is used to determine the current upgradeable period of the target device according to the average value of the historical status of the target device in different historical periods;

[0033] The upgrade module is used to upgrade the target device in the current upgradeable period if the running state of the target device in the current upgradeable period meets the preset upgrade condition.

[0034] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the device upgrade method described in the first aspect is implemented.

[0035] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the device upgrade method described in the first aspect is implemented.

[0036] Compared with the related art, the device upgrade method, device, electronic device and storage medium provided in this embodiment obtain the average historical status of the target device in different historical periods by weighted statistics of the operating performance information and business event information of the target device in different historical periods, determine the current upgradeable period of the target device according to the average historical status of the target device in different historical periods, and upgrade the target device in the current upgradeable period when the operating status of the target device in the current upgradeable period meets the preset upgrade conditions. It combines the operating performance information and business event information of the device in the historical period to calculate the operating status of the device, improves the accuracy of the operating status statistics of the device, thereby improving the accuracy of determining the upgradeable period of the device, and further reduces the probability of business information loss during the device upgrade process.

[0037] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0039] Figure 1 It is a hardware structure block diagram of a terminal of a device upgrading method of the related art;

[0040] Figure 2 is a flow chart of a device upgrading method according to an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of determining a current upgradeable period according to an embodiment of the present invention;

[0042] Figure 4 is a flow chart of a device upgrading method according to a preferred embodiment of the present invention;

[0043] Figure 5 It is a structural block diagram of a device upgrading apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0046] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the device upgrade method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0047] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the device upgrade method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0048] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0049] In this embodiment, a device upgrade method is provided. Figure 2 is a flow chart of the device upgrade method of this embodiment, such as Figure 2 As shown, the process includes the following steps:

[0050] Step S210: weighted statistics are performed on the operation performance information and service event information of the target device in different historical periods to obtain the average value of the historical status of the target device in different historical periods.

[0051] Specifically, the target device may be an embedded device on which software is deployed. The operating performance information of the target device may include information on operating performance parameters such as CPU occupancy, memory occupancy value, network delay, etc. The business event information of the target device may be relevant information when the target device generates a business event, such as the number of business events generated by the target device. Among them, the business event may specifically be an event generated when the device is running to execute its deployed functions, for example, a face detection event generated when a smart camera used for face detection detects a face, or an alarm event generated when the device is triggered to trigger an alarm function. In addition, the business event may also include event recording and event capture, etc.

[0052] The above-mentioned historical time periods can specifically be time periods obtained by dividing the preset historical cycle according to the preset division rules. For example, when the historical status average value of the device is counted in days, the historical cycle is days, and one day is divided into n time periods, then each time period in a day is a historical time period, and a historical cycle contains several historical time periods. There are corresponding historical time periods in different historical cycles, for example, the first time period of each day. Exemplarily, weighted statistics are performed on the operating performance information and business events of the target device in different historical time periods, which can be weighted statistics of the operating performance information and business events of n time periods every day in the past m days, where the time period can be in minutes, and the duration of each time period is t minutes, then n=24*60 / t. For the convenience of description, the following will take days as the historical cycle and the time periods divided in a day as the historical time periods for explanation. It should be understood that the above-mentioned historical cycles and historical time periods can also be other time units, and this application does not make specific limitations on this.

[0053] Furthermore, weighted statistics can be performed based on the operating performance parameters of the target device in each historical period of each day in m days, such as the CPU occupancy rate, the average network delay value, the memory occupancy value, etc. of each historical period, to obtain the average value of the operating performance parameters of the target device in different historical periods. For example, if the first historical period of each day in m days is period 1, then m days correspond to m periods 1. The CPU occupancy rates of the m periods 1 are accumulated and averaged over the number of days m, and the average value of the CPU occupancy rate of the historical period period 1 in the past m days can be obtained. Similarly, the average value of the CPU occupancy rates of the historical periods period 2, period 3, ..., period n can be obtained. In addition, the network delays of the m periods 1 are accumulated and averaged over the number of days to obtain the average value of the network delay of period 1, and similarly, the average value of the network delays of period 2, period 3, ..., period n can be obtained. Similarly, the memory occupancy values ​​of the m time periods 1 are accumulated and averaged over the days to obtain the average memory occupancy value of time period 1. Similarly, the average memory occupancy values ​​of time periods 2, 3, ..., and n can be obtained. The average values ​​of the different operating performance parameters obtained in each historical period constitute the operating performance information of the target device in each historical period of each day in m days. According to the business event information of the target device in each historical period of each day in m days, such as the number of business event occurrences, weighted statistics are performed to obtain the average number of business event occurrences of the target device in different historical periods. Based on the average values ​​of the operating performance parameters corresponding to different historical periods of the target device and the average value of the number of business event occurrences, the historical state average value of the target device in different historical periods is determined. Among them, corresponding weights can be set for different business events of the target device, so as to achieve weighted statistics of different business event information. Corresponding weights are set for different operating performance parameters of the target device, so as to achieve weighted statistics of different operating performance information.

[0054] Step S220: determining the current upgradeable period of the target device according to the average value of the historical status of the target device in different historical periods.

[0055] Figure 3 A schematic diagram for determining the current upgradeable period, such as Figure 3 As shown, the n historical status average values ​​corresponding to the n historical time periods of the target device in a day are sorted, and the historical time period corresponding to the smallest historical status average value is determined as the current upgradeable time period. The historical status average value corresponding to the i-th historical time period is qi. Figure 3 As shown, q1 corresponds to the historical status average value of time period 1, q2 corresponds to the historical status average value of time period 2, q3 corresponds to the historical status average value of time period 3, and qn corresponds to the historical status average value of time period n. If the minimum historical status average value is q2, the current upgradeable time period is time period 2 of the day.

[0056] Step S230: when the running state of the target device in the current upgradeable period meets the preset upgrade condition, the target device is upgraded in the current upgradeable period.

[0057] The step of determining whether the operating state of the target device in the current upgradeable period meets the preset upgrade condition may specifically be determining whether the operating performance information and service event information of the target device in the current upgradeable period meets the preset upgrade condition. If the operating state of the target device in the current upgradeable period meets the preset upgrade condition, the target device is upgraded in the current upgradeable period. Otherwise, the current upgradeable period is abandoned, and the upgradeable period of the target device is re-determined.

[0058] Furthermore, it is possible to determine whether a business event is generated by the target device within the preset duration of the current upgradeable period. If a business event is generated, the current state average value of the target device in the preset duration of the current upgradeable period is calculated based on the number of business event generation times and the values ​​of various operating parameters. When the current state average value is less than the preset state threshold, the task that consumes a large number of resources running on the target device is stopped, and the target device is started to be upgraded. When the current state average value is greater than the state threshold, the current upgradeable period is removed, and the historical state average value of the historical period is recalculated to re-determine the upgradeable period. If the number of times the upgradeable period is reselected reaches the preset value, the task that consumes a large number of running resources of the device is directly stopped, and the target device is upgraded in the current period.

[0059] In the above steps S210 to S230, by weighted statistics of the operation performance information and business event information of the target device in different historical periods, the historical status average value of the target device in different historical periods is obtained, and the current upgradeable period of the target device is determined according to the historical status average value of the target device in different historical periods. If the operation status of the target device in the current upgradeable period meets the preset upgrade conditions, the target device is upgraded in the current upgradeable period. It combines the operation performance information and business event information of the device in the historical period to calculate the operation status of the device, improves the accuracy of the operation status statistics of the device, thereby improving the accuracy of determining the upgradeable period of the device, and further reduces the probability of business information loss during the device upgrade process.

[0060] Further, in one embodiment, based on the above step S210, weighted statistics are performed on the operation performance information and service event information of the target device in different historical periods to obtain the average historical status of the target device in different historical periods, which specifically includes the following steps:

[0061] Step S211, obtaining the operation performance information and service event information of the target device in different preset historical time periods.

[0062] Step S212: weighting the operation performance information according to the correlation coefficient between the business event information and the operation performance information to obtain first weighted statistical information.

[0063] Step S213: weighting the service event information according to the preset priority of the service event information to obtain second weighted statistical information.

[0064] Step S214: Obtain an average value of the historical status of the target device in different historical periods according to the first weighted statistical information and the second weighted statistical information.

[0065] Further, in one embodiment, based on the above step S211, obtaining the operation performance information and service event information of the target device in different preset historical time periods specifically includes the following steps:

[0066] Step S2111, obtaining the operating performance parameter value of the target device in each preset historical period of several historical cycles, and determining it as the operating performance information of different historical periods; wherein each historical cycle is divided into several preset historical periods according to a preset division rule.

[0067] Specifically, taking the average memory usage as an example, when the historical period is a period of t minutes in a day, and several historical periods are the past m days, in each historical period, the average memory usage Mem can be taken every d minutes. Among them, the average memory usage Mem is the ratio of the sum of the memory usage values ​​taken each time within t minutes to the number of times the values ​​are taken (t / d), that is, the cumulative value of memory usage within t minutes is averaged to the number of times the values ​​are taken. Similarly, the average values ​​of other performance parameters corresponding to each historical period can be obtained, such as CPU usage Cpu is the ratio of the sum of CPU usage taken within t minutes to the number of times the values ​​are taken (t / d), the average network delay Delay is the ratio of the sum of network delays taken within t minutes to the number of times the values ​​are taken (t / d), and so on.

[0068] Step S2112, obtaining the number of occurrences of business events of the target device in each preset historical period of several historical cycles, and determining it as business event information of different historical periods.

[0069] Similarly, by counting the number of business events occurring in each historical period, the business event information of the above different historical periods can be obtained.

[0070] Based on the above step S212, after obtaining the operating performance information of the target device in different historical periods, the operating performance information of each corresponding historical period of m days can be accumulated and averaged over m days. As shown in the following table:

[0071]

[0072] Among them, event 1 to event n represent n different business events generated by the target device, and the cumulative values ​​Ev1 to the cumulative values ​​Evn are the cumulative values ​​of different historical periods in m days. The cumulative value of the memory occupancy value Mem of period 1 in the historical period is the sum of the average memory occupancy value of period 1 on the first day, the average memory occupancy value of period 1 on the second day, ... the sum of the average memory occupancy value of period 1 on the mth day, that is, the sum of the average memory occupancy values ​​of m period 1s. W1, W2, Wn, A1, A2, and A3 are the weights corresponding to event 1, event 2, event n, memory occupancy value Mem, CPU occupancy rate Cpu, and network delay Delay in the table respectively. Finally, the statistical values ​​in the above table are calculated according to the following formula to obtain the historical status average value:

[0073] q(x)=((Ev1*W1+Ev2*W2+...+Evn*Wn)+(Mem*A1)+(Cpu*A2)+(Delay*A3)) / m(1)

[0074] By acquiring the operating performance information and business event information of the target device, the business requirements and operating performance of the target device can be taken into account, thereby improving the accuracy of the target device upgrade period.

[0075] Additionally, in one embodiment, based on the above step S213, the operation performance information is weighted according to the correlation coefficient between the service event information and the operation performance information to obtain the first weighted statistical information, which specifically includes the following steps:

[0076] Step S2131, obtaining the Pearson correlation coefficient between the business event occurrence frequency and the operation performance parameter.

[0077] Among them, the influencing factors of the historical status average value include two parts: the event weight determined by the priority of the business event itself, and the performance weight determined by the correlation coefficient between the business event and the operating performance parameters. The Pearson correlation coefficient is used to calculate the weight ratio of each operating performance parameter. This application uses the Pearson correlation coefficient between the number of business event occurrences and the operating performance parameters as the correlation coefficient between the business event information and the operating performance information. Among them, the Pearson correlation coefficient is used to measure the degree of correlation between two variables, and its value is between -1 and 1. The closer the value is to 1, the stronger the correlation between the two variables. Since the correlation coefficient has positive and negative directions, in order to simplify the judgment of the positive and negative directions, directly take the square. The specific calculation formula is shown as follows:

[0078] Cov(X,Y)=E[(X-μ x )(Y-μ y )] (2)

[0079]

[0080] Among them, Cov(X,Y) represents the covariance between X and Y, E represents the expectation, and μ represents the mean of the sample (which can be obtained by averaging X). x and σ y are the standard deviations of X and Y respectively. The "difference between the X value and its mean" at each moment is multiplied by the "difference between the Y value and its mean" to obtain a product, and then the products at each moment are summed up and the expectation is obtained. Since the CPU occupancy data is obtained every time t, and the data for m consecutive days are counted, the cumulative number of events in the t period of these m days is recorded as X, and the average value of an operating performance parameter is taken as Y, and the linear correlation coefficient between X and Y is calculated. Calculate the Pearson correlation coefficient between the number of business event occurrences and different operating performance parameters respectively. Specifically, it can include: calculating the Pearson correlation coefficient between the number of business event occurrences and CPU occupancy, the Pearson correlation coefficient between the number of business event occurrences and memory occupancy value, and the Pearson correlation coefficient between the number of business event occurrences and delay time.

[0081] Step S2132: Obtain a performance weighting coefficient associated with the operating performance information according to the Pearson correlation coefficient. Specifically, the performance weighting coefficient is obtained by the following formula:

[0082] R=ρ 2 (4)

[0083] Where R is the square of the Pearson coefficient.

[0084] By combining the Pearson correlation coefficient between business events and operating performance information, determining the weight ratio of each operating performance parameter according to the Pearson correlation coefficient, and determining the weight ratio of different business events according to the priority of the business event itself, the accuracy of the statistical results can be improved.

[0085] Step S2133: Perform weighted statistics on the operating performance information according to the performance weighting coefficient to obtain first weighted statistical information.

[0086] Additionally, in one embodiment, based on the above step S220, determining the current upgradeable period of the target device according to the average value of the historical status of the target device in different historical periods may specifically include the following steps:

[0087] Step S221 , sorting the historical status average values ​​of the target device in different historical periods according to a preset sorting rule, and determining the current upgradeable period of the target device based on the sorting result of the historical status average values.

[0088] Additionally, in one embodiment, based on the above step S230, when the running state of the target device in the current upgradeable period meets the preset upgrade condition, upgrading the target device in the current upgradeable period may specifically include the following steps:

[0089] Step S231: when a service event occurs on the target device within a preset duration of the current upgradeable period, an average value of the current state of the target device within the preset duration is obtained.

[0090] Step S232, determining whether the current status average value of the target device is less than a preset status threshold, if so, upgrading the target device in the current upgradeable period.

[0091] Further, in one embodiment, based on the above step S231, the current state average value of the target device within a preset time period is obtained, specifically including: performing weighted statistics on the operating performance information and business event information of the target device within the preset time period to obtain the current state average value.

[0092] Similarly, the method for solving the current state average value can refer to the method for solving the historical state average value in the above steps. The present application can solve the current state average value based on the data information obtained in the first z minutes of the current upgradeable period. Taking the CPU occupancy rate as an example, if the first z minutes are taken every one minute, the average CPU occupancy rate of the z minutes is the ratio of the sum of the CPU occupancy rates obtained z times to z.

[0093] Additionally, in one embodiment, based on the above steps, when the current state average is greater than a preset state threshold, the historical state average of the target device is updated according to a preset strategy, and the upgradeable period of the target device is determined based on the updated historical state average.

[0094] When the current state average value is greater than the preset state threshold, it means that the current time period is not suitable for upgrading the target device. Therefore, the current upgradeable time period can be removed, the historical state average value of the historical time period can be recalculated, and the upgradeable time period can be reconfirmed. Among them, if the number of times the upgradeable time period is reconfirmed reaches the preset number of times, the task that consumes a large amount of target device resources can be directly closed, and the current time period can be selected for upgrading. In the case where the current state average value is greater than the preset state threshold, the present application reselects the upgradeable time period according to the preset strategy, thereby achieving a stable response to sudden disturbances, thereby avoiding the impact of sudden disturbances on equipment upgrades and improving the stability of equipment upgrades.

[0095] The present embodiment is described and illustrated below through preferred embodiments.

[0096] Figure 4 is a flow chart of the device upgrade method of this preferred embodiment, such as Figure 4 As shown, the device upgrade method includes the following steps:

[0097] Step S401, divide a day into n time periods, each time period is t minutes, n = 24 * 60 / t;

[0098] Step S402, in each time period, taking the average memory usage, the average CPU usage, and the average network delay every d minutes, calculating the average value of each time period in m days, multiplying it by the weight, and obtaining the first weighted statistical information;

[0099] Step S403, counting the number of business events occurring in each time period, with different business events corresponding to different weights, calculating the weighted value of the number of business events, counting continuously for m days, obtaining the average weighted value of the number of events in each time period in m days, and obtaining the second weighted statistical information;

[0100] Step S404, adding the first weighted statistical information and the second weighted statistical information to obtain a historical state average value;

[0101] Step S405, sorting the historical status average values ​​of different time periods, and determining the time period corresponding to the smallest historical status average value as the upgrade period of the day;

[0102] Step S406, when a service event occurs in the first z minutes of the current upgrade period, calculate the current status average value of the current z minutes;

[0103] Step S407, when the current state average value does not exceed the preset threshold, stop the task that consumes more resources and upgrade the target device; otherwise, remove the current period, recalculate the historical state average value, and determine the upgrade period in a day;

[0104] Step S408: When the historical status average value is recalculated for a cumulative y times, the task consuming large resources is directly closed, and the current period is selected for upgrading.

[0105] In this embodiment, a device upgrade apparatus is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0106] Figure 5 is a structural block diagram of the device upgrading apparatus 50 of this embodiment, such as Figure 5As shown, the device upgrade device 50 includes: a statistical module 52, a calculation module 54, and an upgrade module 56; wherein:

[0107] A statistical module 52 is used to perform weighted statistics on the operation performance information and service event information of the target device in different historical periods to obtain the historical status average value of the target device in different historical periods;

[0108] A calculation module 54, used to determine a current upgradeable period of the target device according to an average value of the historical status of the target device in different historical periods;

[0109] The upgrading module 56 is used to upgrade the target device in the current upgradeable period if the running state of the target device in the current upgradeable period meets the preset upgrading condition.

[0110] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0111] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0112] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0113] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0114] Perform weighted statistics on the operating performance information and business event information of the target device in different historical periods to obtain the average historical status of the target device in different historical periods;

[0115] Determine the current upgradeable period of the target device according to the historical status average value of the target device in different historical periods;

[0116] When the running state of the target device in the current upgradeable period meets the preset upgrade condition, the target device is upgraded in the current upgradeable period.

[0117] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0118] In addition, in combination with the device upgrade method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the device upgrade method. The storage medium stores a computer program; when the computer program is executed by a processor, any device upgrade method in the above embodiments is implemented.

[0119] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0120] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0121] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0122] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A device upgrading method, characterized in that: include: Performing weighted statistics on the operating performance information and service event information of the target device in different historical periods to obtain an average value of the historical status of the target device in different historical periods; Determine a current upgradeable period of the target device according to an average value of the historical status of the target device in different historical periods; In the case where the target device generates a service event within the preset duration of the current upgradeable period, weighted statistics are performed on the operation performance information and service event information of the target device within the preset duration to obtain an average value of the current state of the target device within the preset duration; Determine whether the current status average value of the target device is less than a preset status threshold, and if so, upgrade the target device in the current upgradeable period; When the current state average value is greater than a preset state threshold, the historical state average value of the target device is updated according to a preset strategy, and the upgradeable period of the target device is determined based on the updated historical state average value.

2. The device upgrade method according to claim 1, characterized in that: The weighted statistics of the operation performance information and service event information of the target device in different historical periods are performed to obtain the average value of the historical status of the target device in different historical periods, including: Obtaining the operating performance information and service event information of the target device in different preset historical time periods; According to the correlation coefficient between the service event information and the operation performance information, weighting the operation performance information to obtain first weighted statistical information; According to the preset priority of the business event information, weighting the business event information to obtain second weighted statistical information; The average value of the historical status of the target device in different historical periods is obtained according to the first weighted statistical information and the second weighted statistical information.

3. The device upgrade method according to claim 2, characterized in that: The obtaining of the operating performance information and service event information of the target device in different preset historical time periods includes: Obtaining the operating performance parameter value of the target device in each preset historical period of a plurality of historical cycles, and determining it as the operating performance information of the different historical periods; wherein each of the historical cycles is divided into a plurality of preset historical periods according to a preset division rule; The number of occurrences of the service events of the target device in each preset historical period of the plurality of historical cycles is obtained, and the number of occurrences of the service events of the target device in each preset historical period is determined as the service event information of the different historical periods.

4. The device upgrade method according to claim 2, characterized in that: The step of weighting the operation performance information to obtain first weighted statistical information according to the correlation coefficient between the service event information and the operation performance information includes: Get the Pearson correlation coefficient between the number of business event occurrences and the operating performance parameters; Obtaining a performance weighting coefficient associated with the operation performance information according to the Pearson correlation coefficient; The operating performance information is weighted and counted according to the performance weighting coefficient to obtain the first weighted statistical information.

5. The device upgrading method according to claim 1, characterized in that: The determining, according to the average value of the historical status of the target device in different historical periods, the current upgradeable period of the target device comprises: The historical status average values ​​of the target device in different historical periods are sorted according to a preset sorting rule, and the current upgradeable period of the target device is determined based on the sorting result of the historical status average values.

6. A device upgrading device, characterized in that: include: Statistics module, calculation module, and upgrade module; among them: The statistical module is used to perform weighted statistics on the operating performance information and service event information of the target device in different historical periods to obtain the average value of the historical status of the target device in different historical periods; The calculation module is used to determine the current upgradeable period of the target device according to the average value of the historical status of the target device in different historical periods; The upgrade module is used to perform weighted statistics on the operating performance information and business event information of the target device within the preset time period to obtain the current state average value of the target device within the preset time period when a business event occurs to the target device within the preset time period; determine whether the current state average value of the target device is less than a preset state threshold, and if so, upgrade the target device within the current upgradeable time period; and update the historical state average value of the target device according to a preset strategy when the current state average value is greater than the preset state threshold, and determine the upgradeable time period of the target device based on the updated historical state average value.

7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the device upgrading method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the device upgrading method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Firmware upgrading method, device and equipment and storage medium

    CN112328289A