Data processing method and device, nonvolatile storage medium and electronic equipment

By allocating concurrent upgrade tasks in the cloud management platform in time periods, the problem of low success rate of batch operations of cloud management platform sending tasks to converged gateways in parallel is solved, and the user experience of terminal devices is improved.

CN119402349AActive Publication Date: 2025-02-07CHINA TELECOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411497000.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-07
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

The success rate of batch operations of tasks sent to the converged gateway by the cloud management platform is low, which affects the user experience of terminal devices connected to the converged gateway.

Method used

By receiving target instructions for batch upgrade of service plug-ins in the gateway managed by the cloud management platform, obtaining preset start time and preset time intervals, determining multiple time windows, and according to the status information of the gateway and service plug-ins, The time period sends upgrade instructions to the gateway to ensure that the amount of concurrent instructions in each time window is within a controllable range.

Benefits of technology

It improves the success rate of batch operations of tasks sent to the converged gateway in parallel by the cloud management platform, and improves the user experience of terminal devices connected to the converged gateway.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402349A_ABST
    Figure CN119402349A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, a nonvolatile storage medium and electronic equipment. The method comprises the following steps: receiving a target instruction used for carrying out batch upgrading on service plug-ins in a gateway managed by a cloud management platform; determining n time windows for sending a service plug-in upgrading instruction to the gateway according to a preset starting moment and a preset time interval; for the ith time window, acquiring first information of a gateway and second information of a service plug-in; according to the first information and the second information, determining a target number of gateways meeting a preset upgrading condition in the ith time window; and under the condition that the target number is smaller than the preset number, sending a service plug-in upgrading instruction to the target number of gateways. According to the method and the device, the technical problem that the use experience of the terminal equipment accessed to the fusion gateway is affected due to the fact that the success rate of batch operation of the tasks sent to the fusion gateway in parallel by the cloud management platform is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular, to a data processing method and device, a non-volatile storage medium, and an electronic device. Background Art

[0002] At present, the application of converged gateways in the field of smart homes is becoming more and more widespread. By deploying service plug-ins on the converged gateway, various smart home devices can be connected to the converged gateway in a unified manner to achieve centralized management and control. Figure 1 As shown, the fusion gateway is connected to the cloud management platform, which is managed by the cloud management platform and manages the business plug-ins on the fusion gateway, which can provide more convenient services for smart homes.

[0003] As smart home capabilities continue to expand and enhance, converged gateways distributed in a wide area need to be managed and upgraded on a large number of converged gateway devices through a cloud management platform. When the cloud management platform manages and upgrades the service plug-ins of a large number of converged gateways, the tasks sent by the platform are concurrently accumulated, and the success rate of batch operations is low, which affects the user experience of converged gateway access terminal devices.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a data processing method and device, a non-volatile storage medium, and an electronic device to at least solve the technical problem of affecting the user experience of terminal devices connected to the converged gateway due to the low success rate of batch operations of tasks sent in parallel by the cloud management platform to the converged gateway.

[0006] According to one aspect of an embodiment of the present application, a data processing method is provided, comprising: receiving a target instruction for batch upgrading service plug-ins in gateways managed by a cloud management platform; after receiving the target instruction, obtaining a preset start time and a preset time interval, and determining n time windows for sending service plug-in upgrade instructions to the gateways based on the preset start time and the preset time interval, wherein n is a positive integer greater than 1; for the i-th time window, obtaining first information of the gateway and second information of the service plug-in, wherein the first information at least includes: status information of the gateway and whether the service plug-in is installed in the gateway, and the second information at least includes: status information of the service plug-in and version information of the service plug-in, wherein i is a positive integer not greater than n; determining a target number of gateways that meet the preset upgrade conditions in the i-th time window based on the first information and the second information; and sending service plug-in upgrade instructions to the target number of gateways when the target number is less than the preset number.

[0007] Optionally, when the target number is greater than a preset number, the method further includes: randomly selecting a preset number of target gateways from the target number, and sending a service plug-in upgrade instruction to the target gateways.

[0008] Optionally, after sending the service plug-in upgrade instruction to the target number of gateways, the method also includes: determining whether the target number of gateways that meet the preset upgrade conditions in a consecutive preset number of time windows is 0, and determining that the task of batch upgrading the service plug-ins is completed when the target number of gateways that meet the preset upgrade conditions in a consecutive preset number of time windows is 0.

[0009] Optionally, after sending the service plug-in upgrade instruction to the target number of gateways or sending the service plug-in upgrade instruction to the target gateway, the method further includes: receiving status information sent by the gateway or the target gateway, wherein the status information is used to indicate whether the service plug-in is successfully upgraded.

[0010] Optionally, after receiving the status information sent by the gateway or the target gateway, the method also includes: determining a first number of gateways where successfully upgraded business plug-ins are located based on the status information; calculating a target ratio of the first number to a target number of gateways that meet preset upgrade conditions in the i-th time window; and counting and displaying the target ratio corresponding to each time window.

[0011] Optionally, the state information of the gateway includes at least: the gateway is online and the gateway is offline; the state information of the service plug-in includes at least: the service plug-in is busy, the service plug-in is idle and the service plug-in is paused.

[0012] Optionally, the preset upgrade conditions include at least: the status information of the gateway is that the gateway is online, and a business plug-in is installed in the gateway, and the status information of the business plug-in is that the business plug-in is idle, and the version information of the business plug-in is that the current version is the version to be upgraded, or, the status information of the gateway is that the gateway is online, and a business plug-in is installed in the gateway, and the status information of the business plug-in is that the business plug-in is paused, and the version information of the business plug-in is that the current version is the version to be upgraded.

[0013] According to another aspect of the embodiment of the present application, a data processing device is also provided, including: a receiving module, used to receive a target instruction for batch upgrading the service plug-ins in the gateways managed by the cloud management platform; a first determination module, used to obtain a preset start time and a preset time interval after receiving the target instruction, and determine n time windows for sending service plug-in upgrade instructions to the gateway according to the preset start time and the preset time interval, wherein n is a positive integer greater than 1; an acquisition module, used to obtain first information of the gateway and second information of the service plug-in for the i-th time window, wherein the first information at least includes: the status information of the gateway and whether the service plug-in is installed in the gateway, and the second information at least includes: the status information of the service plug-in and the version information of the service plug-in, wherein i is a positive integer not greater than n; a second determination module, used to determine the target number of gateways that meet the preset upgrade conditions in the i-th time window according to the first information and the second information; a sending module, used to send service plug-in upgrade instructions to the target number of gateways when the target number is less than the preset number.

[0014] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, the storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above data processing method.

[0015] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including: a memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the above data processing method is executed when the program is run.

[0016] According to yet another aspect of the embodiments of the present application, a computer program is further provided, wherein the above data processing method is implemented when the computer program is executed by a processor.

[0017] According to another aspect of the embodiments of the present application, a computer program product is provided, which includes a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above data processing method is implemented.

[0018] In an embodiment of the present application, a target instruction for batch upgrading the service plug-ins in the gateways managed by the cloud management platform is received; after receiving the target instruction, a preset start time and a preset time interval are obtained, and according to the preset start time and the preset time interval, n time windows for sending service plug-in upgrade instructions to the gateway are determined, wherein n is a positive integer greater than 1; for the i-th time window, first information of the gateway and second information of the service plug-in are obtained, wherein the first information at least includes: the status information of the gateway and whether the service plug-in is installed in the gateway, and the second information at least includes: the status information of the service plug-in and the version information of the service plug-in, wherein i is a positive integer not greater than n; according to the first information and the second information, it is determined in the i-th time window The target number of gateways that meet the preset upgrade conditions; when the target number is less than the preset number, a method of sending business plug-in upgrade instructions to the target number of gateways, when the cloud management platform performs management and control upgrade operations on the business plug-ins of a large number of integrated gateways, a start time and an execution time interval are given, and the batch tasks are split into multiple batches of sub-tasks in multiple time periods, thereby reducing the amount of concurrent instructions accumulated at the same time, thereby achieving the purpose of improving the batch operation success rate of tasks sent in parallel by the cloud management platform to the integrated gateway, thereby achieving the technical effect of improving the user experience of terminal devices accessing the integrated gateway, and further solving the technical problem of affecting the user experience of terminal devices accessing the integrated gateway due to the low batch operation success rate of tasks sent in parallel by the cloud management platform to the integrated gateway. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] 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:

[0020] Figure 1 An architectural diagram of a cloud management platform is shown;

[0021] Figure 2 is a flow chart of a data processing method according to an embodiment of the present application;

[0022] Figure 3 is an architecture diagram of a data processing system according to an embodiment of the present application;

[0023] Figure 4 is a flow chart of another data processing method according to an embodiment of the present application;

[0024] Figure 5 is a structural diagram of a data processing device according to an embodiment of the present application;

[0025] Figure 6It is a hardware structure block diagram of a computer terminal according to a data processing method of an embodiment of the present application. DETAILED DESCRIPTION

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

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] According to an embodiment of the present application, a method embodiment of a data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0029] Figure 2 is a flow chart of a data processing method according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0030] Step S201: receiving a target instruction for batch upgrading service plug-ins in gateways managed by a cloud management platform.

[0031] The cloud management platform is equipped with one or more receiving portals specifically for receiving batch upgrade target instructions from users, administrators or other systems. These instructions may contain specific requirements for the upgrade, such as target version, upgrade strategy (for example, whether to upgrade in different time periods), specific gateway or plug-in list, etc.

[0032] Step S202, after receiving the target instruction, obtain a preset start time and a preset time interval, and determine n time windows for sending service plug-in upgrade instructions to the gateway according to the preset start time and the preset time interval, where n is a positive integer greater than 1.

[0033] Extract the preset start time T and preset time interval t from the target instruction. The start time T is the time point when the batch upgrade task plan starts, and the time interval t defines the duration of each upgrade time window. For example, T can be "10:00 am today" and t can be "1 hour".

[0034] Verify the extracted parameters to ensure that they meet the platform's upgrade strategy and time window planning requirements. For example, check whether the start time is within the platform's available time period and whether the time interval is reasonable and will not lead to excessive dispersion or concentration of tasks.

[0035] According to the verified preset start time T and preset time interval t, n time windows will be calculated to perform the upgrade task of the business plug-in in different time periods. The starting point of each time window can be expressed as T+i*t, where n is the total number of time windows required to be divided.

[0036] Step S203, for the i-th time window, obtain first information of the gateway and second information of the service plug-in, wherein the first information at least includes: the status information of the gateway and whether the service plug-in is installed in the gateway, and the second information at least includes: the status information of the service plug-in and the version information of the service plug-in, wherein i is a positive integer not greater than n.

[0037] Step S204: determining a target number of gateways that meet a preset upgrade condition in the i-th time window according to the first information and the second information.

[0038] Assume that the received target instruction requires that the business plug-in upgrade operation be performed every hour starting from 10:00 this morning, and this is performed for 6 times. Then the preset start time T = 10:00, the preset time interval t = 1 hour, and n = 6, which means that the period from 10:00 to 15:00 is divided into 6 upgrade time windows, namely 10:00-11:00, 11:00-12:00, 12:00-13:00, 13:00-14:00, and 14:00-15:00.

[0039] In each time window, the cloud management platform will decide which gateways to send upgrade instructions to based on the current status of the gateway and the upgrade conditions of the business plug-in.

[0040] Step S205: When the target number is less than the preset number, a service plug-in upgrade instruction is sent to the target number of gateways.

[0041] Specifically, when the cloud management platform receives a target instruction for batch upgrading the service plug-ins in the managed gateways, the system will enter the task preparation phase. First, the instruction delivery service will record the time of receiving the target instruction, that is, the zero time T0, and obtain the preset start time T and the preset time interval t.

[0042] Secondly, according to the preset start time T and time interval t, the cloud management platform automatically calculates n time windows for executing upgrade instructions within these windows. The start time of each time window can be expressed as T+i*t, where i is a positive integer not greater than n, representing the sequence from the 1st time window to the nth time window, and n is a positive integer greater than 1, indicating that the batch upgrade will be divided into n stages for execution.

[0043] In each time window T+i*t, the collection service starts to collect the first information of the gateway and the second information of the service plug-in. The first information includes but is not limited to the state of the gateway (online or offline) and whether the service plug-in is installed in the gateway. The second information covers the state of the service plug-in (busy, idle or paused) and version information (current version number).

[0044] According to the collected first information and second information, check whether the gateway meets the preset upgrade conditions. The upgrade conditions at least include: the gateway is online, a service plug-in is installed in the gateway, the status of the service plug-in is idle or suspended, and the version of the service plug-in is a version to be upgraded. The number of gateways that meet all conditions is determined as the target number N(i).

[0045] When the target number N(i) is less than the preset number X (the concurrent command capacity supported by the cloud platform), the service plug-in upgrade command is directly sent to N(i) gateways. This ensures that the upgrade operation will not fail due to too many concurrent commands in each time window, and can fully utilize the resources of the cloud platform to improve the upgrade success rate.

[0046] For example, assuming that the preset start time is 8:00 am and the preset time interval t is 1 hour, the batch upgrade task will be divided into n=6 time windows, ie, time windows starting at every hour during 8:00-13:00.

[0047] In the first time window (8:00), the collection service found that there were 150 gateways online, of which 120 gateways had business plug-ins installed. Among these 120 gateways, 80 business plug-ins were in the idle state and the version was V1.0 to be upgraded, with the target upgrade to V2.0. The decision service determined that the number of target gateways that met the upgrade conditions was N(1) = 80, which was less than the preset number X = 100. Therefore, the instruction delivery service would send business plug-in upgrade instructions to these 80 gateways.

[0048] In the second time window (9:00), if the number of gateways that meet the upgrade conditions N(2) is 75, which is also less than X=100, the instruction delivery service will send upgrade instructions to 75 target gateways. This process will be repeated in each time window until the entire batch upgrade task is completed.

[0049] Through the above-mentioned specific implementation methods, the cloud management platform can intelligently plan n time windows according to the received target instructions, which are used to efficiently and orderly execute the batch upgrade tasks of business plug-ins, ensuring that the tasks can be completed within the specified time and maximizing the upgrade success rate, avoiding platform performance bottlenecks and task failures caused by too many concurrent operations. In addition, the cloud management platform can dynamically monitor and manage the real-time status and business plug-in information of all gateways, thereby realizing efficient and stable management and upgrade of large-scale integrated gateway business plug-ins. This method reduces the failure rate caused by concurrent instruction accumulation, and also avoids omissions caused by untimely changes in gateway and plug-in status, significantly improving the success rate and user experience of the entire batch upgrade task.

[0050] The following Figure 2 The steps shown are exemplary and explanatory.

[0051] According to some optional embodiments of the present application, when the target number is greater than the preset number, the following steps may also be performed: randomly selecting a preset number of target gateways from the target number, and sending service plug-in upgrade instructions to the target gateways.

[0052] When the number of gateways N(i) that meet the preset upgrade conditions is determined to be greater than the preset number of concurrent commands X supported by the cloud management platform in the i-th time window, the system implements a random selection algorithm to randomly select X gateways from the N(i) gateways that meet the upgrade conditions as target gateways. This selection process ensures that even if a large number of gateways meet the conditions, the cloud management platform can perform effective business plug-in upgrade operations without exceeding its processing capacity.

[0053] Assume that in a batch upgrade task, the preset start time is 10:00 am, the preset time interval is 1 hour, and the preset number X is 50 gateways. In the first time window (10:00-11:00), statistics show that 120 gateways meet the upgrade conditions (for example, the gateway is online, the service plug-in has been installed, the plug-in is idle or suspended, and the version is to be upgraded). At this time, the target number N(1) = 120 is greater than the preset concurrent instruction number X = 50. The cloud management platform executes a random selection algorithm to randomly select 50 gateways from these 120 gateways as the target gateways to be upgraded in this time window. The instruction issuance service then sends the service plug-in upgrade instruction to these 50 target gateways. These gateways will try to upgrade their service plug-ins to the target version in the current time window. After the instruction is issued, the cloud management platform continuously monitors the upgrade status of the target gateway, records the number of gateways that have successfully upgraded, and compares it with the preset number X to calculate the success rate.

[0054] Preferably, after sending the service plug-in upgrade instruction to the target number of gateways, the following steps can also be executed: determine whether the target number of gateways that meet the preset upgrade conditions in a consecutive preset number of time windows is 0, and when the target number of gateways that meet the preset upgrade conditions in a consecutive preset number of time windows is 0, determine that the task of batch upgrading the service plug-ins is completed.

[0055] In each time window T+i*t, the decision service will continuously check and determine the target number of gateways N(i) that meet the preset upgrade conditions. Starting from the i-th time window, if it is detected that N(i) is 0 in X consecutive time windows (for example, X=3, that is, three consecutive time windows), this means that no gateway meets the upgrade conditions in these time windows. Once N(i) is 0 in X consecutive time windows, the decision service will determine that there are no gateways that need to be upgraded in the current batch upgrade task, which indicates that all eligible gateways may have completed the upgrade, or no gateway currently meets the upgrade conditions. At this time, the cloud management platform will decide to end the current batch upgrade task.

[0056] Through the above implementation, the cloud management platform can effectively monitor and evaluate the execution status of batch upgrade tasks, promptly terminate tasks that do not meet the upgrade conditions for gateways, avoid unnecessary resource consumption and invalid operations, and improve the overall upgrade efficiency and management effect.

[0057] Preferably, after the target number of gateways send the service plug-in upgrade instruction or send the service plug-in upgrade instruction to the target gateway, the following steps may be performed: receiving status information sent by the gateway or the target gateway, wherein the status information is used to indicate whether the service plug-in is successfully upgraded.

[0058] Furthermore, after receiving the status information sent by the gateway or the target gateway, the following steps can also be performed: determine the first number of gateways where the successfully upgraded business plug-ins are located based on the status information; calculate the target ratio of the first number to the target number of gateways that meet the preset upgrade conditions in the i-th time window; count and display the target ratio corresponding to each time window.

[0059] After sending the service plug-in upgrade command to the target number of gateways, the command issuing service of the cloud management platform will start the receiving mode and wait for the upgrade status information from the gateway. This status information includes but is not limited to the upgrade result (success or failure), which is used to feedback the upgrade status of the service plug-in in real time.

[0060] After receiving the status information, the service will analyze the information to determine which gateways' service plug-ins have been successfully upgraded and which have failed to upgrade. The number of gateways where the service plug-ins have been successfully upgraded will be recorded as the first number SN(i).

[0061] The instruction delivery service will calculate the target ratio R(i) between the first number SN(i) and the target number N(i) of gateways that meet the preset upgrade conditions in the i-th time window. The target ratio R(i) = SN(i) / N(i). The target ratio reflects the upgrade success rate within a specific time window and is a key indicator for evaluating the efficiency and effectiveness of the upgrade task.

[0062] The cloud management platform will count and display the target ratio corresponding to each time window. This information can be presented to system administrators in the form of a graphical interface or data report, allowing them to intuitively understand the execution status of the upgrade task in each time window, including the success rate and possible reasons for failure. For example, in the time window T+2t, if the target ratio R(2) is 0.85, it means that 85% of the target gateways have successfully upgraded their business plug-ins in this window.

[0063] Through the above implementation method, the cloud management platform can monitor and evaluate the execution of business plug-in upgrade tasks in real time. By calculating the target ratio of each time window, the system administrator can clearly understand the success rate and efficiency of the upgrade task, providing data support for optimizing the upgrade strategy and improving the overall upgrade success rate.

[0064] In some optional embodiments of the present application, the status information of the gateway includes at least: gateway online and gateway offline; the status information of the service plug-in includes at least: service plug-in busy, service plug-in idle and service plug-in paused.

[0065] The preset upgrade conditions include at least: the status information of the gateway is that the gateway is online, and a business plug-in is installed in the gateway, and the status information of the business plug-in is that the business plug-in is idle, and the version information of the business plug-in is that the current version is the version to be upgraded, or the status information of the gateway is that the gateway is online, and a business plug-in is installed in the gateway, and the status information of the business plug-in is that the business plug-in is paused, and the version information of the business plug-in is that the current version is the version to be upgraded.

[0066] For example, in a batch upgrade task, assume that the preset start time T is 9:00 am, the execution time interval t is half an hour, the preset number of concurrent instructions X is 20, and the target version is V2.0. In the time window T+2t (i.e., 9:30 to 10:00 am), the collection service of the cloud management platform detects that there are 35 gateways that meet the following conditions: the gateway is online, the business plug-in has been installed, the plug-in status is idle or suspended, and the current version of the plug-in is V1.0 (the version to be upgraded). At this time, the decision service will randomly select 20 gateways from these 35 gateways and send them instructions to upgrade the business plug-in to V2.0.

[0067] Figure 3 is an architecture diagram of a data processing system according to an embodiment of the present application, such as Figure 3 As shown, the cloud management platform includes the cloud management platform gateway information collection service, the cloud management platform batch task decision service and the cloud management platform batch instruction issuance service. Among them, the cloud management platform gateway information collection service is used to collect and maintain the integrated gateway and business plug-in information in each time period; the cloud management platform batch task decision service is used to decide the number and scope of gateways for management and upgrade tasks in each time period; the cloud management platform batch instruction issuance service is used to issue upgrade instructions to gateways in a specific range in each time period and count the task success rate.

[0068] Figure 4 is based on Figure 3 The flowchart of the data processing method of the architecture diagram of the data processing system shown in FIG. Figure 4 As shown, the method comprises the following steps:

[0069] The capacity of concurrently issuing instructions supported by the cloud management platform is obtained through performance testing. Assuming it is X, the maximum number of concurrently issuing instructions does not exceed X; the number of integrated gateways managed by the cloud management platform is assumed to be Y, which is much larger than X. The cloud management platform performs management and control upgrades on the large number of integrated gateways managed by the cloud management platform. The start time is confirmed to be T, and the execution time interval is t. The time period is T+t, T+2t, ..., T+nt.

[0070] Step S401, within the time period T + nt, the cloud management platform's collection service collects information about the included network gateways, including gateway status, such as online or offline; whether there are business plugins on the gateway; the current version of the business plugins on the gateway, such as V1.0, V2.0, etc.; the status of the gateway business plugins, such as busy, idle, paused, etc.

[0071] Step S402, the cloud management platform's decision-making service counts the number of gateways M(nt) that meet the upgrade conditions. The conditions are as follows: the gateway is online, there are business plugins on the gateway, the current version of the business plugin is the version to be upgraded (for example, the current version is V1.0 and needs to be upgraded to V2.0), and the plugin status is idle or paused. Since gateways that meet the upgrade conditions are screened for batch upgrade, the success rate of batch tasks within this time period is increased.

[0072] Step S403, the cloud management platform's decision-making service decides the number and scope of gateways to be upgraded. When M(nt) = 0, it is judged whether M(nt) = 0 for three consecutive time periods: if M(nt) = 0 for three consecutive time periods, the batch task ends; otherwise, wait for the next time period and repeat the above process. Counting that the number of gateways meeting the upgrade conditions is 0 three times in a row reduces omissions caused by the failure of the gateway and plugin status to change in a timely manner and increases the success rate of batch tasks.

[0073] When M(nt)!= 0, judge the relationship with X: when M(nt) < X, N(nt) = M(nt), and the scope is all gateways that meet the condition requirements;

[0074] When M(nt) > X, N(nt) = X, and the scope is randomly select X gateways from the gateways that meet the condition requirements. Since the concurrent instruction capacity supported by the cloud management platform is considered, the number of failures is reduced, and the success rate of batch tasks within this time period is increased.

[0075] The number of gateways to be upgraded within this time period is N(nt) and the scope {Ea(nt), Eb(nt), Ec(nt)……}.

[0076] Step S404, the cloud management platform's distribution service issues upgrade instructions to the gateways {Ea(nt), Eb(nt), Ec(nt)……}, and receives the success or failure of the upgrade status of each gateway, and counts the number of gateways SN(nt) that are upgraded successfully.

[0077] After the upgrade is completed within the time period T + t, calculate the cumulative upgrade success rate = the total number of gateways upgraded successfully / the total number of gateways to which the upgrade instructions are issued, that is, S = ∑(SN(t) + SN(2t) + …… + SN(nt)) / ∑(N(t) + N(2t) + …… + N(nt)).

[0078] Since gateways meeting the upgrade conditions are screened for batch upgrade within a time period, the success rate within the time period is improved, thereby significantly improving the success rate of the entire batch upgrade task.

[0079] Step S405, after the batch upgrade task is completed in the time period T+nt, wait to enter the time period T+(n+1)t, repeat the above process to complete the subtasks in the subsequent time periods until the entire batch task is completed.

[0080] Through the above steps, the cloud management platform splits batch tasks into multiple batches of subtasks in multiple time periods, reduces the concurrent accumulation of instructions at the same time, and improves the success rate of batch tasks. Due to the gateway status in different time periods, whether the gateway has business plug-ins, changes in the version of the gateway business plug-in, and changes in the status of the gateway business plug-in, the multi-time period multi-batch subtask method is adopted to fully consider the changes in the gateway status and plug-in status to improve the success rate of subtasks.

[0081] The cloud management platform introduces collection services, decision services, and command delivery services to collect gateway and business plug-in information, decide on upgrade scope, deliver tasks, and calculate cumulative success rates during subtask time periods. The collection service fully collects gateway status, gateway business plug-in version, and gateway business plug-in status information. The decision service fully considers decision conditions, such as meeting upgrade conditions, not exceeding the platform's concurrent command capacity, and other decision subtask gateway quantity and scope.

[0082] In the cloud management platform decision service strategy, the number and range of gateways that meet the upgrade conditions are counted within the subtask time period, and the platform concurrent command capacity is considered to reduce failures and fully improve the success rate of subtasks. In the cloud management platform decision service strategy, when the number of gateways that meet the upgrade conditions within the subtask time period is 0, continue to the next subtask. When the number of gateways that meet the upgrade conditions is 0 for three consecutive times, stop the entire batch task, reduce omissions due to the failure to change the status of gateways and plug-ins in a timely manner, and improve the success rate of batch tasks.

[0083] Figure 5 is a structural diagram of a data processing device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:

[0084] The receiving module 51 is used to receive a target instruction for batch upgrading the service plug-ins in the gateways managed by the cloud management platform.

[0085] The first determination module 52 is used to obtain a preset start time and a preset time interval after receiving the target instruction, and determine n time windows for sending service plug-in upgrade instructions to the gateway according to the preset start time and the preset time interval, where n is a positive integer greater than 1.

[0086] The acquisition module 53 is used to obtain the first information of the gateway and the second information of the service plug-in for the i-th time window, wherein the first information includes at least: the status information of the gateway and whether the service plug-in is installed in the gateway, and the second information includes at least: the status information of the service plug-in and the version information of the service plug-in, wherein i is a positive integer not greater than n.

[0087] The second determining module 54 is configured to determine a target number of gateways that meet a preset upgrade condition in the i-th time window according to the first information and the second information.

[0088] The sending module 55 is used to send service plug-in upgrade instructions to the target number of gateways when the target number is less than the preset number.

[0089] Optionally, the data processing device is further configured to, when the target number is greater than a preset number, execute the following steps: randomly selecting a preset number of target gateways from the target number, and sending service plug-in upgrade instructions to the target gateways.

[0090] Optionally, the data processing device is also used to execute the following steps after sending the service plug-in upgrade instruction to the target number of gateways: determine whether the target number of gateways that meet the preset upgrade conditions in a consecutive preset number of time windows is 0, and determine that the task of batch upgrading the service plug-ins is completed when the target number of gateways that meet the preset upgrade conditions in a consecutive preset number of time windows is 0.

[0091] Optionally, the data processing device is also used to perform the following steps after sending service plug-in upgrade instructions to the target number of gateways or sending service plug-in upgrade instructions to the target gateway: receiving status information sent by the gateway or the target gateway, wherein the status information is used to indicate whether the service plug-in is successfully upgraded.

[0092] Optionally, the data processing device is also used to perform the following steps after receiving status information sent by the gateway or the target gateway: determine the first number of gateways where the successfully upgraded business plug-ins are located based on the status information; calculate the target ratio of the first number to the target number of gateways that meet the preset upgrade conditions in the i-th time window; and count and display the target ratio corresponding to each time window.

[0093] Optionally, the state information of the gateway includes at least: the gateway is online and the gateway is offline; the state information of the service plug-in includes at least: the service plug-in is busy, the service plug-in is idle and the service plug-in is paused.

[0094] Optionally, the preset upgrade conditions include at least: the status information of the gateway is that the gateway is online, and a business plug-in is installed in the gateway, and the status information of the business plug-in is that the business plug-in is idle, and the version information of the business plug-in is that the current version is the version to be upgraded, or, the status information of the gateway is that the gateway is online, and a business plug-in is installed in the gateway, and the status information of the business plug-in is that the business plug-in is paused, and the version information of the business plug-in is that the current version is the version to be upgraded.

[0095] It should be noted that the above Figure 5 The modules in the embodiment may be program modules (e.g., a set of program instructions for implementing a specific function) or hardware modules. For the latter, they may be expressed in the following forms, but are not limited thereto: the expression form of the above modules is a processor, or the functions of the above modules are implemented by a processor.

[0096] It should be noted that Figure 5 The preferred implementation of the illustrated embodiment can be found in Figure 2 The relevant description of the illustrated embodiment will not be repeated here.

[0097] Figure 6 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a data processing method. Figure 6 As shown, the computer terminal 60 may include one or more (602a, 602b, ..., 602n are used to illustrate) processors 602 (the processor 602 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 604 for storing data, and a transmission module 606 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 6 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 6 More or fewer components as shown, or with Figure 6 Different configurations are shown.

[0098] It should be noted that the one or more processors 602 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 60. As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0099] The memory 604 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data processing method in the embodiment of the present application. The processor 602 executes various functional applications and data processing by running the software programs and modules stored in the memory 604, that is, realizing the above-mentioned data processing method. The memory 604 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 604 may further include a memory remotely arranged relative to the processor 602, and these remote memories may be connected to the computer terminal 60 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.

[0100] The transmission module 606 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 60. In one example, the transmission module 606 includes a network adapter (Network Interface Controller, 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 module 606 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0101] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 60 .

[0102] It should be noted that, in some optional embodiments, the above Figure 6 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 6 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.

[0103] It should be noted that Figure 6 The computer terminal shown is used to execute Figure 2 The data processing method shown, therefore the relevant explanations in the execution method of the above command are also applicable to the electronic device and will not be repeated here.

[0104] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above data processing method.

[0105] A program for executing the following functions on a non-volatile storage medium: receiving a target instruction for batch upgrading service plug-ins in gateways managed by a cloud management platform; after receiving the target instruction, obtaining a preset start time and a preset time interval, and determining n time windows for sending service plug-in upgrade instructions to the gateways according to the preset start time and the preset time interval, wherein n is a positive integer greater than 1; for the i-th time window, obtaining first information of the gateway and second information of the service plug-in, wherein the first information at least includes: status information of the gateway and whether the service plug-in is installed in the gateway, and the second information at least includes: status information of the service plug-in and version information of the service plug-in, wherein i is a positive integer not greater than n; determining a target number of gateways that meet the preset upgrade conditions in the i-th time window according to the first information and the second information; and sending service plug-in upgrade instructions to the target number of gateways when the target number is less than the preset number.

[0106] An embodiment of the present application further provides an electronic device, including: a memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the above data processing method is executed when the program is run.

[0107] The processor is used to run a program that performs the following functions: receiving a target instruction for batch upgrading the service plug-ins in the gateways managed by the cloud management platform; after receiving the target instruction, obtaining a preset start time and a preset time interval, and determining n time windows for sending service plug-in upgrade instructions to the gateways according to the preset start time and the preset time interval, wherein n is a positive integer greater than 1; for the i-th time window, obtaining first information of the gateway and second information of the service plug-in, wherein the first information at least includes: the status information of the gateway and whether the service plug-in is installed in the gateway, and the second information at least includes: the status information of the service plug-in and the version information of the service plug-in, wherein i is a positive integer not greater than n; determining a target number of gateways that meet the preset upgrade conditions in the i-th time window according to the first information and the second information; and sending service plug-in upgrade instructions to the target number of gateways when the target number is less than the preset number.

[0108] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0109] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0110] In the above-mentioned embodiments of the present application, the collected information is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary protection measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0113] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0114] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0115] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: include: Receiving a target instruction for batch upgrading service plug-ins in gateways managed by a cloud management platform; After receiving the target instruction, obtaining a preset start time and a preset time interval, and determining n time windows for sending a service plug-in upgrade instruction to the gateway according to the preset start time and the preset time interval, where n is a positive integer greater than 1; For the i-th time window, first information of the gateway and second information of the service plug-in are obtained, wherein the first information includes at least: status information of the gateway and whether the service plug-in is installed in the gateway, and the second information includes at least: status information of the service plug-in and version information of the service plug-in, wherein i is a positive integer not greater than n; Determine, according to the first information and the second information, a target number of gateways that meet a preset upgrade condition in the i-th time window; When the target number is less than a preset number, a service plug-in upgrade instruction is sent to the target number of gateways.

2. The method according to claim 1, characterized in that When the target quantity is greater than the preset quantity, the method further includes: The preset number of target gateways are randomly selected from the target number, and the service plug-in upgrade instruction is sent to the target gateways.

3. The method according to claim 2, characterized in that After sending the service plug-in upgrade instructions to the target number of gateways, the method further includes: Determine whether the target number of gateways that meet the preset upgrade conditions in a continuous preset number of time windows is all 0, and if the target number of gateways that meet the preset upgrade conditions in a continuous preset number of time windows is all 0, determine that the task of batch upgrading the business plug-ins is completed.

4. The method according to claim 2, characterized in that: After sending the service plug-in upgrade instruction to the target number of gateways or sending the service plug-in upgrade instruction to the target gateway, the method further includes: Receive status information sent by the gateway or the target gateway, wherein the status information is used to indicate whether the service plug-in is successfully upgraded.

5. The method according to claim 3, characterized in that: After receiving the status information sent by the gateway or the target gateway, the method further includes: Determine, according to the status information, a first number of gateways where the successfully upgraded service plug-ins are located; Calculating a target ratio of the first number to a target number of gateways that meet a preset upgrade condition in the i-th time window; The target ratio corresponding to each time window is counted and displayed.

6. The method according to claim 1, characterized in that The state information of the gateway includes at least: gateway online and gateway offline; the state information of the service plug-in includes at least: service plug-in busy, service plug-in idle and service plug-in paused.

7. The method according to claim 6, characterized in that The preset upgrade condition at least includes: the status information of the gateway is that the gateway is online, the service plug-in is installed in the gateway, the status information of the service plug-in is that the service plug-in is idle, and the version information of the service plug-in is that the current version is the version to be upgraded, or the status information of the gateway is that the gateway is online, the service plug-in is installed in the gateway, the status information of the service plug-in is that the service plug-in is paused, and the version information of the service plug-in is that the current version is the version to be upgraded.

8. A data processing device, characterized in that: include: A receiving module, used to receive a target instruction for batch upgrading the service plug-ins in the gateways managed by the cloud management platform; A first determination module is used to obtain a preset start time and a preset time interval after receiving the target instruction, and determine n time windows for sending a service plug-in upgrade instruction to the gateway according to the preset start time and the preset time interval, where n is a positive integer greater than 1; an acquisition module, configured to acquire, for an i-th time window, first information of the gateway and second information of the service plug-in, wherein the first information includes at least: status information of the gateway and whether the service plug-in is installed in the gateway, and the second information includes at least: status information of the service plug-in and version information of the service plug-in, wherein i is a positive integer not greater than n; A second determining module, configured to determine a target number of gateways that meet a preset upgrade condition in the i-th time window according to the first information and the second information; The sending module is used to send a service plug-in upgrade instruction to the target number of gateways when the target number is less than a preset number.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the data processing method according to any one of claims 1 to 7 when running.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Home gateway intelligent upgrading device and upgrading method

    CN103281373A

  • Firmware upgrade method and device of Zigbee equipment

    CN107104836A

  • Remote firmware upgrading method and device for batch equipment, electronic equipment and medium

    CN114448798A

  • Constraint-based upgrade and deployment

    US20190369980A1

  • Method and device for upgrading firmware of zigbee devices

    WO2018202177A1