Data processing methods and apparatus, non-volatile storage media, electronic equipment

By executing business plugin upgrade tasks in time slots within the cloud management platform, the problem of low task success rate on the cloud management platform was solved, thus improving the user experience of terminal devices.

CN119402349BActive Publication Date: 2025-11-14CHINA TELECOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

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

Method used

After receiving the target instruction, the cloud management platform obtains the preset start time and time interval, determines multiple time windows, obtains gateway and business plugin information, determines the number of gateways that meet the preset upgrade conditions based on the information, and sends an upgrade instruction when the target number is less than the preset number, and executes the business plugin upgrade task in time periods.

Benefits of technology

This improved the success rate of batch operations when the cloud management platform sends tasks to the converged gateway in parallel, thus enhancing the user experience of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402349B_ABST
    Figure CN119402349B_ABST
Patent Text Reader

Abstract

This application discloses a data processing method and apparatus, a non-volatile storage medium, and an electronic device. The method includes: receiving target instructions for batch upgrading service plugins in gateways managed by a cloud management platform; determining n time windows for sending service plugin upgrade instructions to the gateways based on a preset start time and a preset time interval; for the i-th time window, acquiring first information of the gateways and second information of the service plugins; determining a target number of gateways that meet preset upgrade conditions in the i-th time window based on the first and second information; and sending service plugin upgrade instructions to the target number of gateways if the target number is less than a preset number. This application solves the technical problem of low success rate of batch operations for tasks sent in parallel by the cloud management platform to the converged gateway, which affects the user experience of terminal devices accessing the converged gateway.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and more specifically, to a data processing method and apparatus, a non-volatile storage medium, and an electronic device. Background Technology

[0002] The application of converged gateways in the smart home field is becoming increasingly widespread. By deploying service plugins on a converged gateway, various smart home devices can be uniformly connected to the gateway, enabling centralized management and control. For example... Figure 1 As shown, the converged gateway is connected to the cloud management platform, which manages the business plugins on the converged gateway and provides more convenient services for smart homes.

[0003] As smart home capabilities continue to expand and improve, converged gateways distributed across a wide area require unified management and upgrades of service plugins on a large number of converged gateway devices through a cloud management platform. When the cloud management platform performs management and upgrade operations on a large number of converged gateway service plugins, the platform experiences a backlog of concurrent task issuance, resulting in a low success rate for batch operations and thus affecting the user experience of the terminal devices connected to the converged gateways.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a data processing method and apparatus, a non-volatile storage medium, and an electronic device to at least solve the technical problem of the low success rate of batch operations of tasks sent in parallel by the cloud management platform to the converged gateway, which affects the user experience of terminal devices accessing the converged gateway.

[0006] According to one aspect of the embodiments of this application, a data processing method is provided, comprising: receiving a target instruction for batch upgrading business plugins 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 business plugin 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 business plugins, wherein the first information includes at least: the status information of the gateway and whether a business plugin is installed in the gateway, and the second information includes at least: the status information of the business plugin and the version information of the business plugin, wherein i is a positive integer not greater than n; determining a target number of gateways that meet preset upgrade conditions in the i-th time window based on the first information and the second information; and sending business plugin upgrade instructions to the target number of gateways if the target number is less than the preset number.

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

[0008] Optionally, after sending the service plugin upgrade instruction to the target number of gateways, the method further includes: determining whether the target number of gateways that meet the preset upgrade conditions within a consecutive preset number of time windows is 0, and if the target number of gateways that meet the preset upgrade conditions within a consecutive preset number of time windows is 0, determining that the task of batch upgrading the service plugin has ended.

[0009] Optionally, after sending a service plugin upgrade instruction to a target number of gateways or to a 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 plugin has been successfully upgraded.

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

[0011] Optionally, the gateway's status information includes at least: gateway online and gateway offline; the service plugin's status information includes at least: service plugin busy, service plugin idle, and service plugin paused.

[0012] Optionally, the preset upgrade conditions include at least the following: the gateway's status information is that the gateway is online, and the gateway has a service plugin installed, and the service plugin's status information is that the service plugin is idle, and the service plugin's version information is that the current version is the version to be upgraded; or, the gateway's status information is that the gateway is online, and the gateway has a service plugin installed, and the service plugin's status information is that the service plugin is paused, and the service plugin's version information is that the current version is the version to be upgraded.

[0013] According to another aspect of the embodiments of this application, a data processing apparatus is also provided, comprising: a receiving module, configured to receive a target instruction for batch upgrading service plugins in gateways managed by a cloud management platform; a first determining module, configured to, after receiving the target instruction, acquire a preset start time and a preset time interval, and determine n time windows for sending service plugin 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; an acquiring module, configured to, for the i-th time window, acquire first information of the gateway and second information of the service plugin, wherein the first information includes at least: the status information of the gateway and whether a service plugin is installed in the gateway, and the second information includes at least: the status information of the service plugin and the version information of the service plugin, wherein i is a positive integer not greater than n; a second determining module, configured to, based on the first information and the second information, determine a target number of gateways that meet preset upgrade conditions in the i-th time window; and a sending module, configured to, if the target number is less than a preset number, send service plugin upgrade instructions to the target number of gateways.

[0014] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the storage medium including a stored program, wherein the program controls the device where the storage medium is located to execute the above data processing method when it runs.

[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, wherein the processor is configured to run a program stored in the memory, wherein the program executes the above-described data processing method when it runs.

[0016] According to another aspect of the embodiments of this application, a computer program is also provided, wherein the computer program, when executed by a processor, implements the above-described data processing method.

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

[0018] In this embodiment, a target instruction for batch upgrading business plugins in a gateway managed by a cloud management platform is received. After receiving the target instruction, a preset start time and a preset time interval are obtained. Based on the preset start time and preset time interval, n time windows for sending business plugin upgrade instructions to the gateway are determined, 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 business plugins are obtained. The first information includes at least: the status information of the gateway and whether a business plugin is installed in the gateway. The second information includes at least: the status information of the business plugin and the version information of the business plugin, where i is a positive integer not greater than n. Based on the first information and the second information, the time window for sending business plugin upgrade instructions to the gateway is determined. The target number of gateways that meet the preset upgrade conditions; when the target number is less than the preset number, the method of sending service plugin upgrade instructions to the target number of gateways, and when performing large-scale management and upgrade operations of service plugins of converged gateways through the cloud management platform, the batch tasks are split into multiple batches of sub-tasks in multiple time periods by giving a start time and execution time interval, reducing the backlog of concurrent instructions at the same time, thereby improving the batch operation success rate of tasks sent in parallel by the cloud management platform to the converged gateways, thus achieving the technical effect of improving the user experience of terminal devices connected to the converged gateways, and solving the technical problem of the low batch operation success rate of tasks sent in parallel by the cloud management platform to the converged gateways, which affects the user experience of terminal devices connected to the converged gateways. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

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

[0021] Figure 2 This is a flowchart of a data processing method according to an embodiment of this application;

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

[0023] Figure 4 This is a flowchart of another data processing method according to an embodiment of this application;

[0024] Figure 5 This is a structural diagram of a data processing apparatus according to an embodiment of this application;

[0025] Figure 6This is a hardware structure block diagram of a computer terminal according to an embodiment of the present application for a data processing method. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort 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, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

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

[0029] Figure 2 This is a flowchart of a data processing method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0030] Step S201: Receive the target instruction for batch upgrading the business plugins in the gateway managed by the cloud management platform.

[0031] The cloud management platform has one or more receiving ports specifically designed to receive batch upgrade target instructions from users, administrators, or other systems. These instructions may include specific requirements for the upgrade, such as the target version, upgrade strategy (e.g., whether time-segmented upgrades are required), and a list of specific gateways or plugins.

[0032] Step S202: After receiving the target instruction, obtain the preset start time and preset time interval, and determine n time windows for sending service plugin upgrade instructions to the gateway based on the preset start time and 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 at which the batch upgrade task is scheduled to begin, and the time interval t defines the duration of each upgrade time window. For example, T could be "10:00 AM today", and t could be "1 hour".

[0034] The extracted parameters are validated to ensure they comply with 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, avoiding excessive task dispersion or concentration.

[0035] Based on the verified preset start time T and preset time interval t, n time windows will be calculated to execute the upgrade tasks of the business plugins in different time periods. The starting point of each time window can be represented as T + i*t, where n is the total number of time windows to be divided.

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

[0037] Step S204: Based on the first information and the second information, determine the target number of gateways that meet the preset upgrade conditions in the i-th time window.

[0038] Suppose the received target instruction requires an upgrade operation for the business plugin to be performed every hour, starting at 10:00 AM today, for a total of 6 times. The preset start time T = 10:00 AM, the preset time interval t = 1 hour, and n = 6, meaning the period from 10:00 AM to 3:00 PM will be divided into 6 upgrade time windows: 10:00-11:00 AM, 11:00-12:00 PM, 12:00-1:00 PM, 1:00-2:00 PM, and 2:00-3:00 PM.

[0039] Within each time window, the cloud management platform will determine which gateways to send upgrade instructions to, based on the current status of the gateways and the upgrade conditions of the business plugins.

[0040] Step S205: If the target number is less than the preset number, send a service plugin upgrade instruction to the gateways of the target number.

[0041] Specifically, when the cloud management platform receives a target instruction for batch upgrading business plugins in the managed gateways, the system will enter the task preparation phase. First, the instruction issuance service will record the time when the target instruction is received, i.e., time zero T0, and obtain the preset start time T and preset time interval t.

[0042] Secondly, based on 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 represented as T + i * t, where i is a positive integer not greater than n, representing the sequence from the first 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] Within each time window T+i*t, the data collection service starts and begins collecting the first information about the gateway and the second information about the business plugins. The first information includes, but is not limited to, the gateway's status (online or offline) and whether the business plugins are installed on the gateway. The second information covers the business plugin's status (busy, idle, or paused) and version information (current version number).

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

[0045] If the target number N(i) is less than the preset number X (the concurrent command capacity supported by the cloud platform), the service plugin upgrade command is sent directly to N(i) gateways. This ensures that the upgrade operation will not fail due to too many concurrent commands within each time window, while making full use of the cloud platform's resources and improving the upgrade success rate.

[0046] For example, assuming 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, that is, the time window that starts at each hour between 8:00 AM and 1:00 PM.

[0047] Within the first time window (8:00), the data collection service found 150 gateways online, of which 120 gateways had service plugins installed. Among these 120 gateways, 80 service plugins were idle and were version V1.0, which was to be upgraded to V2.0. The decision service determined that the number of target gateways meeting the upgrade conditions, N(1) = 80, was less than the preset number X = 100. Therefore, the instruction issuance service would send service plugin upgrade instructions to these 80 gateways.

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

[0049] Through the specific implementation methods described above, the cloud management platform can intelligently plan n time windows based on the received target instructions to efficiently and orderly execute batch upgrade tasks for business plugins. This ensures that tasks are completed within the specified time while maximizing the upgrade success rate, avoiding platform performance bottlenecks and task failures caused by excessive concurrent operations. Furthermore, the cloud management platform can dynamically monitor and manage the real-time status of all gateways and business plugin information, thereby achieving efficient and stable control and upgrades of large batches of converged gateway business plugins. This method reduces the failure rate caused by the backlog of concurrent instructions and avoids omissions due to untimely changes in gateway and plugin status, significantly improving the success rate of the entire batch upgrade task and the user experience.

[0050] The following are Figure 2 The steps shown are illustrated and explained by way of example.

[0051] According to some optional embodiments of this application, when the target number is greater than the preset number, the following steps can also be performed: randomly select a preset number of target gateways from the target number, and send a service plugin upgrade instruction to the target gateways.

[0052] When, within the i-th time window, the number N(i) of gateways meeting the preset upgrade conditions exceeds the preset number of concurrent commands X supported by the cloud management platform, 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 when a large number of gateways meet the conditions, the cloud management platform can perform effective business plugin upgrade operations without exceeding its processing capacity.

[0053] Suppose that in a batch upgrade task, the preset start time is 10:00 AM, the preset time interval is 1 hour, and the preset quantity X is 50 gateways. In the first time window (10:00-11:00 AM), it is found that 120 gateways meet the upgrade conditions (e.g., the gateway is online, the business plugin is installed, the plugin is idle or paused and the version is the version to be upgraded). At this time, the target quantity N(1) = 120 is greater than the preset concurrent instruction quantity X = 50. The cloud management platform executes a random selection algorithm to randomly select 50 gateways from these 120 gateways as the target gateways for upgrade in this time window. The instruction issuance service then sends business plugin upgrade instructions to these 50 target gateways. These gateways will attempt to upgrade their business plugins 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 gateways, records the number of gateways that have been successfully upgraded, and compares it with the preset quantity X to calculate the success rate.

[0054] Preferably, after sending the service plugin upgrade instruction to the target number of gateways, the following steps can also be performed: determine whether the target number of gateways that meet the preset upgrade conditions within a consecutive preset number of time windows is 0, and if the target number of gateways that meet the preset upgrade conditions within a consecutive preset number of time windows is 0, determine that the task of batch upgrading the service plugin has ended.

[0055] Within each time window T+i*t, the decision service continuously checks and determines the number N(i) of gateway targets that meet the preset upgrade conditions. Starting from the i-th time window, if N(i) is 0 for X consecutive time windows (e.g., X=3, i.e., three consecutive time windows), it means that no gateway meets the upgrade conditions within these time windows. Once N(i) is 0 for X consecutive time windows, the decision service will determine that no gateway needs to be upgraded in the current batch upgrade task. This indicates that all eligible gateways may have already been upgraded, or that no gateway currently meets the upgrade conditions. At this point, the cloud management platform will decide to terminate the current batch upgrade task.

[0056] Through the above implementation methods, the cloud management platform can effectively monitor and evaluate the execution status of batch upgrade tasks, terminate tasks that do not meet the upgrade conditions without a gateway in a timely manner, 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 service plugin upgrade instructions or send service plugin upgrade instructions to the target gateway, the following steps can also be performed: receiving status information sent by the gateway or the target gateway, wherein the status information is used to indicate whether the service plugin has been successfully upgraded.

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

[0059] After sending the service plugin upgrade command to the target number of gateways, the cloud management platform's command delivery service will enter receive mode, waiting to receive upgrade status information from the gateways. This status information includes, but is not limited to, the upgrade result (success or failure), used to provide real-time feedback on the upgrade status of the service plugins.

[0060] Upon receiving the status information, the service will analyze this information to determine which gateway service plugins have been successfully upgraded and which have failed. The number of gateways with successfully upgraded service plugins will be recorded as the first number SN(i).

[0061] The instruction issuance 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) 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 statistically analyze and display the target ratio for each time window. This information can be presented to system administrators through a graphical interface or data reports, enabling them to intuitively understand the upgrade task execution status for each time window, including the success rate and possible reasons for failure. For example, if the target ratio R(2) is 0.85 within the time window T+2t, it means that 85% of the target gateways have successfully upgraded their business plugins within this window.

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

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

[0065] The preset upgrade conditions include at least the following: the gateway status information is that the gateway is online, and the service plugin is installed in the gateway, and the service plugin status information is that the service plugin is idle, and the service plugin version information is that the current version is the version to be upgraded; or, the gateway status information is that the gateway is online, and the service plugin is installed in the gateway, and the service plugin status information is that the service plugin is paused, and the service plugin version information is that the current version is the version to be upgraded.

[0066] For example, in a batch upgrade task, suppose 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. Within the time window T+2t (i.e., 9:30 AM to 10:00 AM), the cloud management platform's data collection service detects that 35 gateways meet the following conditions: the gateway is online, the business plugin is installed, the plugin status is idle or paused, and the current version of the plugin 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 plugin to V2.0.

[0067] Figure 3 This is an architecture diagram of a data processing system according to an embodiment of this application, such as... Figure 3 As shown, the cloud management platform includes a cloud management platform gateway information collection service, a cloud management platform batch task decision service, and a cloud management platform batch command issuance service. Among them, the cloud management platform gateway information collection service is used to collect and maintain information on converged gateways and business plugins for each time period; the cloud management platform batch task decision service is used to decide the number and scope of gateways for control and upgrade tasks in each time period; and the cloud management platform batch command issuance service is used to issue upgrade commands to gateways within a specific range in each time period and to calculate the task success rate.

[0068] Figure 4 Based on Figure 3 The data processing system architecture diagram shown is followed by a flowchart of the data processing method, as follows: Figure 4 As shown, the method includes the following steps:

[0069] The concurrent command issuance capacity supported by the cloud management platform is determined through performance testing and is assumed to be X. Therefore, the maximum number of concurrent commands issued will not exceed X. The number of converged gateways managed by the cloud management platform is assumed to be Y, where Y is significantly larger than X. The cloud management platform performs management and upgrade operations on the business plugins of a large number of managed converged gateways. If the start time is T and the execution time interval is t, then the time periods are T+t, T+2t, ..., T+nt.

[0070] Step S401, within the time period T + nt, the cloud management platform acquisition service collects information of the incorporated 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 decision service counts the number of gateways M(nt) that meet the upgrade conditions. Conditions: 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 the gateways that meet the upgrade conditions are screened for batch upgrade, the success rate of the batch task within this time period is increased.

[0072] Step S403, the cloud management platform decision service decides the number and scope of the 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 consecutively reduces the omission caused by the gateway and plugin status not changing in time, and increases the success rate of the batch task.

[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 to 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 failure situation is reduced, and the success rate of the batch task 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 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 successfully upgraded gateways / 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] By selecting gateways that meet the upgrade criteria within a specific time period for batch upgrades, the success rate increases during that time period, thereby significantly improving the overall success rate of the batch upgrade task.

[0079] Step S405: After the batch upgrade task is completed in time period T+nt, wait for the time period T+(n+1)t to begin, and repeat the above process to complete the sub-tasks in subsequent time periods until the entire batch task is completed.

[0080] Through the above steps, the cloud management platform breaks down batch tasks into multiple batches of sub-tasks over multiple time periods, reducing the backlog of concurrent instructions and improving the success rate of batch tasks. Because gateway status, the presence of business plugins on the gateway, changes in gateway business plugin versions, and gateway business plugin status all vary within different time periods, the use of multiple batches of sub-tasks over multiple time periods fully considers these changes, thereby improving the success rate of sub-tasks.

[0081] The cloud management platform introduces data collection, decision-making, and command issuance services to collect gateway and business plugin information, decide on upgrade scope, issue tasks, and calculate cumulative success rates within sub-task time periods. The data collection service comprehensively gathers gateway status, gateway business plugin version, and gateway business plugin status information. The decision-making service fully considers decision-making conditions, such as meeting upgrade requirements and not exceeding the platform's concurrent command capacity, to determine the number and scope of gateways in the sub-task.

[0082] In the cloud management platform's decision service strategy, the number and range of gateways meeting upgrade conditions are counted within the subtask time period. The platform's concurrent command capacity is also considered to reduce failures and significantly improve the success rate of subtasks. If the number of gateways meeting upgrade conditions is 0 within a subtask time period, the next subtask continues. The entire batch task is stopped after three consecutive counts of 0 gateways meeting upgrade conditions. This reduces omissions due to untimely updates to gateway and plugin status, further improving the batch task success rate.

[0083] Figure 5 This is a structural diagram of a data processing apparatus according to an embodiment of this application, such as... Figure 5 As shown, the device includes:

[0084] The receiving module 51 is used to receive target instructions for batch upgrading business plugins in the gateway managed by the cloud management platform.

[0085] The first determining 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 plugin upgrade instructions to the gateway based on the preset start time and preset time interval, where n is a positive integer greater than 1.

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

[0087] The second determining module 54 is used to determine the 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.

[0088] The sending module 55 is used to send service plugin 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 also used to perform the following steps when the target number is greater than the preset number: randomly select a preset number of target gateways from the target number, and send a service plugin upgrade instruction to the target gateways.

[0090] Optionally, the data processing device is further configured to, after sending the service plugin upgrade instruction to the target number of gateways, perform the following steps: determine whether the target number of gateways that meet the preset upgrade conditions within a consecutive preset number of time windows is 0, and if the target number of gateways that meet the preset upgrade conditions within a consecutive preset number of time windows is 0, determine that the task of batch upgrading the service plugin has ended.

[0091] Optionally, the data processing device is further configured to perform the following steps after sending a service plugin upgrade instruction to a target number of gateways or to a target gateway: receiving status information sent by the gateway or the target gateway, wherein the status information is used to characterize whether the service plugin has been successfully upgraded.

[0092] Optionally, the data processing device is further configured 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 service plugins are located based on the status information; calculate the target ratio between the first number and the target number of gateways that meet the preset upgrade conditions in the i-th time window; and statistically analyze and display the target ratio corresponding to each time window.

[0093] Optionally, the gateway's status information includes at least: gateway online and gateway offline; the service plugin's status information includes at least: service plugin busy, service plugin idle, and service plugin paused.

[0094] Optionally, the preset upgrade conditions include at least the following: the gateway's status information is that the gateway is online, and the gateway has a service plugin installed, and the service plugin's status information is that the service plugin is idle, and the service plugin's version information is that the current version is the version to be upgraded; or, the gateway's status information is that the gateway is online, and the gateway has a service plugin installed, and the service plugin's status information is that the service plugin is paused, and the service plugin's version information 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 above can be program modules (e.g., a set of program instructions that implement a specific function) or hardware modules. For the latter, they can be represented in the following forms, but are not limited to these: each of the above modules is represented by a processor, or the functions of each of the above modules are implemented by a processor.

[0096] It should be noted that, Figure 5 Preferred embodiments of the shown examples can be found in [reference needed]. Figure 2 The relevant descriptions of the embodiments shown will not be repeated here.

[0097] Figure 6 A hardware structure block diagram of a computer terminal for implementing a data processing method is shown. Figure 6 As shown, the computer terminal 60 may include one or more processors 602 (shown as 602a, 602b, ..., 602n in the figure) 602 (processor 602 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), 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 a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 6 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, the computer terminal 60 may also include... Figure 6 The more or fewer components shown, or having the same Figure 6 The different configurations shown.

[0098] It should be noted that the aforementioned one or more processors 602 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 60. As involved in the embodiments of this application, the data processing circuits serve as a form of processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0099] The memory 604 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the data processing method in this embodiment. The processor 602 executes various functional applications and data processing by running the software programs and modules stored in the memory 604, thereby implementing the aforementioned data processing method. The memory 604 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 604 may further include memory remotely located relative to the processor 602, and these remote memories can be connected to the computer terminal 60 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0100] The transmission module 606 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 60. In one example, the transmission module 606 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 606 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

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

[0102] It should be noted here that, in some optional embodiments, the above... Figure 6 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 6 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.

[0103] It should be noted that, Figure 6 The computer terminal shown is used to execute Figure 2 The data processing method shown above is also applicable to this electronic device, and will not be repeated here.

[0104] This application also provides a non-volatile storage medium, which includes a stored program, wherein the program controls the device where the storage medium is located to execute the above data processing method when it runs.

[0105] A non-volatile storage medium performs the following functions: receiving target instructions for batch upgrading service plugins in gateways managed by the cloud management platform; after receiving the target instructions, obtaining a preset start time and a preset time interval, and determining n time windows for sending service plugin upgrade instructions to the gateways based on the preset start time and preset time interval, where 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 plugins, where the first information includes at least: the status information of the gateway and whether the service plugin is installed in the gateway, and the second information includes at least: the status information of the service plugin and the version information of the service plugin, where i is a positive integer not greater than n; determining the 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; if the target number is less than the preset number, sending service plugin upgrade instructions to the target number of gateways.

[0106] This application also 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 program executes the above-described data processing method during runtime.

[0107] The processor is used to run a program that performs the following functions: receiving target instructions for batch upgrading service plugins in gateways managed by the cloud management platform; after receiving the target instructions, obtaining a preset start time and a preset time interval, and determining n time windows for sending service plugin upgrade instructions to the gateways based on the preset start time and preset time interval, where 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 plugins, where the first information includes at least: the status information of the gateway and whether the gateway has a service plugin installed, and the second information includes at least: the status information of the service plugin and the version information of the service plugin, where i is a positive integer not greater than n; determining the 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 plugin upgrade instructions to the target number of gateways if the target number is less than the preset number.

[0108] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0109] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0110] In the above embodiments of this application, the information collected 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 all comply with relevant laws, regulations and standards, take necessary protective measures, do not violate public order and good morals, and provide corresponding operation entry points 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. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

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

[0113] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0114] If the integrated unit is implemented as 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 this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0115] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A data processing method, characterized in that, include: Receive target instructions for batch upgrading business plugins in gateways managed by the cloud management platform; After receiving the target instruction, a preset start time and a preset time interval are obtained, and based on the preset start time and the preset time interval, n time windows for sending service plugin upgrade instructions to the gateway are determined, where n is a positive integer greater than 1; For the i-th time window, obtain the first information of the gateway and the second information of the service plugin, wherein the first information includes at least: the status information of the gateway and whether the service plugin is installed in the gateway, and the second information includes at least: the status information of the service plugin and the version information of the service plugin, wherein i is a positive integer not greater than n; Based on the first information and the second information, determine the target number of gateways that meet the preset upgrade conditions in the i-th time window; If the target number is less than the preset number, a service plugin upgrade instruction is sent to the gateways of the target number. If the target number is greater than the preset number, the method further includes: randomly selecting the preset number of target gateways from the target number, and sending the service plugin upgrade instruction to the target gateway.

2. The method according to claim 1, characterized in that, After sending service plugin upgrade instructions to the target number of gateways, the method further includes: If the target number of gateways that meet the preset upgrade conditions within a consecutive preset number of time windows is 0, then the task of batch upgrading the service plugin is determined to be completed.

3. The method according to claim 1, characterized in that, After sending a service plugin upgrade instruction to the target number of gateways or sending the service plugin 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 characterize whether the service plugin has been successfully upgraded.

4. The method according to claim 2, characterized in that, After receiving the status information sent by the gateway or the target gateway, the method further includes: Based on the status information, determine the first number of gateways where the successfully upgraded service plugins are located; Calculate the target ratio between the first quantity and the target number of gateways that meet the preset upgrade conditions in the i-th time window; The target ratio for each time window is statistically analyzed and displayed.

5. The method according to claim 1, characterized in that, The status information of the gateway includes at least: gateway online and gateway offline; the status information of the service plugin includes at least: service plugin busy, service plugin idle and service plugin paused.

6. The method according to claim 5, characterized in that, The preset upgrade conditions include at least the following: the gateway's status information is that the gateway is online, and the service plugin is installed in the gateway, and the service plugin's status information is that the service plugin is idle, and the service plugin's version information is that the current version is the version to be upgraded; or, the gateway's status information is that the gateway is online, and the service plugin is installed in the gateway, and the service plugin's status information is that the service plugin is paused, and the service plugin's version information is that the current version is the version to be upgraded.

7. A data processing apparatus, characterized in that, include: The receiving module is used to receive target instructions for batch upgrading business plugins in the gateway managed by the cloud management platform. The first determining module is used to, after receiving the target instruction, obtain a preset start time and a preset time interval, and determine n time windows for sending service plugin upgrade instructions to the gateway based on the preset start time and the preset time interval, where n is a positive integer greater than 1; The acquisition module is used to acquire, for the i-th time window, the first information of the gateway and the second information of the service plugin, wherein the first information includes at least: the status information of the gateway and whether the service plugin is installed in the gateway, and the second information includes at least: the status information of the service plugin and the version information of the service plugin, wherein i is a positive integer not greater than n; The second determining module is used to determine the 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. The sending module is used to send a service plugin upgrade instruction to the target number of gateways when the target number is less than a preset number. The data processing device is further configured to, when the target number is greater than the preset number, randomly select the preset number of target gateways from the target number and send the service plugin upgrade instruction to the target gateway.

8. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the non-volatile storage medium to perform the data processing method according to any one of claims 1 to 6.

9. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, performs the data processing method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Home gateway intelligent upgrading device and upgrading method

    CN103281373A

  • Firmware upgrade method and device of Zigbee equipment

    CN107104836A