CN115473808A - Task execution method and related device - Google Patents

Task execution method and related device Download PDF

Info

Publication number
CN115473808A
CN115473808A CN202211027473.1A CN202211027473A CN115473808A CN 115473808 A CN115473808 A CN 115473808A CN 202211027473 A CN202211027473 A CN 202211027473A CN 115473808 A CN115473808 A CN 115473808A
Authority
CN
China
Prior art keywords
equipment
devices
task
ota
upgraded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211027473.1A
Other languages
Chinese (zh)
Other versions
CN115473808B (en
Inventor
苏祺云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kaadas Intelligent Technology Co Ltd
Original Assignee
Shenzhen Kaadas Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kaadas Intelligent Technology Co Ltd filed Critical Shenzhen Kaadas Intelligent Technology Co Ltd
Priority to CN202211027473.1A priority Critical patent/CN115473808B/en
Publication of CN115473808A publication Critical patent/CN115473808A/en
Application granted granted Critical
Publication of CN115473808B publication Critical patent/CN115473808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a task execution method and a related device, wherein the method comprises the following steps: determining a first device set, wherein devices in the first device set are part or all of devices in a device set to be upgraded; sending an OTA upgrade task to devices of the first set of devices to instruct the devices of the first set of devices to perform the OTA upgrade task; acquiring an execution result of an OTA (over the air) upgrading task of the equipment in the first equipment set; according to the execution result of the OTA upgrade tasks sent by the equipment in the first equipment set, the OTA upgrade tasks are sent to the equipment in the equipment set to be upgraded except the equipment set, the OTA upgrade tasks can be sent to the equipment in the equipment set to be upgraded in batches, and the OTA upgrade tasks are sent to subsequent equipment according to the execution result of the tasks in the previous batch, so that the reliability of the OTA upgrade tasks during execution is improved.

Description

Task execution method and related device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a task execution method and a related apparatus.
Background
In a conventional internet of things Over-the-Air Technology (OTA) upgrading task, the OTA upgrading task is sent to all users of the corresponding equipment, and once a firmware program is wrong and the equipment cannot be normally used, disastrous results can be caused; in the traditional model, the firmware can be guaranteed not to have the risk as far as possible only by means of the OTA firmware quality management process, but the quality control process is also limited by human factors because the firmware program is written by developers. In the traditional OTA upgrading model, problems occur under extreme conditions, a terminal user often finds the problems, the system cannot automatically intervene, the user needs to obtain information communication with an Internet of things equipment provider, the equipment operation and maintenance person of the provider can find the problems, the period is very long, and therefore the reliability of the OTA upgrading task in execution is low.
Disclosure of Invention
The embodiment of the application provides a task execution method and a related device, which can send OTA (over the air) upgrade tasks to devices in a device set to be upgraded in batches and send the OTA upgrade tasks to subsequent devices according to the task execution results of the previous batch, so that the reliability of the OTA upgrade tasks during execution is improved.
A first aspect of an embodiment of the present application provides a task execution method, where the method includes:
determining a first device set, wherein devices in the first device set are part or all of devices in a device set to be upgraded;
sending an OTA upgrade task to devices in the first set of devices to instruct the devices in the first set of devices to perform the OTA upgrade task;
acquiring an execution result of an OTA (over the air) upgrading task of the equipment in the first equipment set;
and sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded according to the execution result of the OTA upgrading task sent by the equipment in the first equipment set.
In a possible implementation manner, the sending, according to an execution result of an OTA upgrade task sent by a device in the first device set, the OTA upgrade task to a device in the device set to be upgraded, other than the first device set, includes:
determining a first number of successfully upgraded devices in the first device set according to an execution result of an OTA upgrade task sent by the devices in the first device set;
and if the first quantity is higher than or equal to a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
In a possible implementation manner, if the first number is smaller than a preset number, the OTA upgrade task is prohibited from being sent to the devices in the device set to be upgraded except the first device set, and the alarm information is determined;
and displaying the alarm information.
In a possible implementation manner, if the first number is smaller than a preset number, obtaining execution progress information of an OTA upgrade task of a device in a second device set, where the device in the second device set is a device whose execution result is that the upgrade is not successful in the first execution set;
determining a second number of successful OTA upgrading tasks of the equipment in the second equipment set after a preset time interval according to the execution progress information of the OTA upgrading tasks of the equipment in the second equipment set;
and if the sum of the second quantity and the first quantity is greater than a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
In one possible implementation, the method further includes:
acquiring state information of equipment in a second equipment set, wherein the equipment in the second equipment set is equipment with an execution result of unsuccessful upgrading in the first execution set;
determining abnormal information of the devices in the second device set according to the state information of the devices in the second device set;
and displaying the abnormal information of the devices in the second device set.
In one possible implementation manner, the obtaining of the execution result of the OTA upgrade task of the devices in the first device set includes:
acquiring state information of the devices in the first device set;
and determining an execution result of the OTA upgrade task of the equipment in the first equipment set according to the state information of the equipment in the first equipment set.
A second aspect of an embodiment of the present application provides a task execution apparatus, including:
the device comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a first device set, and devices in the first device set are part or all of devices in a device set to be upgraded;
a first sending unit, configured to send an OTA upgrade task to devices in the first device set to instruct the devices in the first device set to perform the OTA upgrade task;
an obtaining unit, configured to obtain an execution result of an OTA upgrading task of a device in the first device set;
and the second sending unit is used for sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded according to the execution result of the OTA upgrading task sent by the equipment in the first equipment set.
In one possible implementation manner, the second sending unit is configured to:
determining a first number of successfully upgraded devices in the first device set according to an execution result of an OTA upgrade task sent by the devices in the first device set;
and if the first quantity is higher than or equal to a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
In one possible implementation manner, the second sending unit is configured to:
if the first number is smaller than the preset number, forbidding sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded, and determining alarm information;
and displaying the alarm information.
In one possible implementation manner, the second sending unit is configured to:
if the first number is smaller than the preset number, acquiring execution progress information of OTA (over the air) upgrading tasks of equipment in a second equipment set, wherein the equipment in the second equipment set is equipment which has an execution result of unsuccessful upgrading in the first execution set;
determining a second number of successful OTA upgrading tasks of the equipment in the second equipment set after a preset time interval according to the execution progress information of the OTA upgrading tasks of the equipment in the second equipment set;
and if the sum of the second quantity and the first quantity is greater than a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
In one possible implementation, the apparatus is further configured to:
acquiring state information of equipment in a second equipment set, wherein the equipment in the second equipment set is equipment with an execution result of unsuccessful upgrading in the first execution set;
determining abnormal information of the devices in the second device set according to the state information of the devices in the second device set;
and displaying the abnormal information of the devices in the second device set.
In one possible implementation manner, the obtaining unit is configured to:
acquiring state information of the devices in the first device set;
and determining an execution result of the OTA upgrade task of the equipment in the first equipment set according to the state information of the equipment in the first equipment set.
A third aspect of embodiments of the present application provides a server, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the step instructions in the first aspect of embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps as described in the first aspect of embodiments of the present application.
A fifth aspect of embodiments of the present application provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has at least the following beneficial effects:
the method comprises the steps of determining a first device set, wherein devices in the first device set are part or all of devices in a device set to be upgraded, sending an OTA upgrade task to the devices in the first device set to instruct the devices in the first device set to execute the OTA upgrade task, obtaining an execution result of the OTA upgrade task of the devices in the first device set, sending the OTA upgrade task to the devices, except the first device set, in the device set to be upgraded according to the execution result of the OTA upgrade task sent by the devices in the first device set, and therefore the OTA upgrade task can be sent to the devices in the device set to be upgraded in batches, the OTA upgrade task can be sent to a subsequent device according to the execution result of the task in the previous batch, and the reliability of the OTA upgrade task in execution is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a task execution system according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a task execution method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating another task execution method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a task execution device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the foregoing drawings are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to better understand the task execution method provided in the embodiment of the present application, a brief description is first given below of a task execution system to which the task execution method is applied. As shown in fig. 1, the task execution system includes a server and a device to be upgraded, where there are multiple devices to be upgraded and the device to be upgraded needs to be upgraded, and therefore, the server may determine a first device set from the device set to be upgraded, where the first device set is part or all of the devices in the device set to be upgraded, and send the OTA upgrade task to the devices in the first device set, and the devices in the first device set receive the OTA upgrade task and execute the OTA upgrade task, and if the OTA upgrade task is successfully executed, the devices may be reconnected to the server, so that the server may obtain an execution result (successful execution or failed) of the devices, and send the OTA upgrade task to subsequent devices to be upgraded according to the execution result, and therefore, the OTA upgrade task may be sent to the devices in the device set to be upgraded in batches, and send the OTA upgrade task to the subsequent devices according to the execution result of the previous batch, thereby improving reliability of the OTA upgrade task.
Referring to fig. 2, fig. 2 is a flowchart illustrating a task execution method according to an embodiment of the present disclosure. As shown in fig. 2, the task execution method applied to the server includes:
201. determining a first device set, wherein the devices in the first device set are part or all of the devices in the device set to be upgraded.
Before the device set to be upgraded is determined, an OTA upgrade task needs to be acquired, and the OTA upgrade task can correspond to different types of devices, so that the device set to be upgraded can be determined.
The method for acquiring the OTA upgrade task may be to receive the uploaded firmware file and create the OTA upgrade task according to the firmware file. Specifically, for example, the administrator or the like may upload a firmware file to the server, and the server creates an OTA upgrade task according to the firmware file.
The first device set may be a first device set formed by randomly selecting devices to be upgraded from a device set to be upgraded. When randomly selecting, the number may be randomly selected, for example, the number is selected according to the percentage of the elements in the device set to be upgraded, specifically, for example, 1% of the elements may be selected and determined as the elements in the first device set. The distance is merely illustrative and is not particularly limited.
202. Sending an OTA upgrade task to devices in the first set of devices to instruct the devices in the first set of devices to perform the OTA upgrade task.
The OTA upgrade method may be to immediately send the OTA upgrade task to the devices in the first device set after the first device set is determined, certainly, the OTA upgrade task may also be sent to the devices in the first device set after a preset time interval is delayed after the first device set is determined, or the OTA upgrade task may also be sent to the devices in the first device set after a preset condition is met, where the preset condition is set by an empirical value or historical data.
203. And acquiring an execution result of the OTA upgrade task of the equipment in the first equipment set.
Task execution results for the devices in the first set of devices may be determined from status information for the devices in the first set of devices.
204. And according to the execution result of the OTA upgrading task sent by the equipment in the first equipment set, sending the OTA upgrading task to the equipment in the equipment set to be upgraded except the equipment in the first equipment set.
The OTA upgrade tasks may be sent to devices in the set of devices to be upgraded, other than the first set of devices, according to a first number of successfully upgraded devices in the first set of devices. For example, when the first number exceeds a preset number, sending the OTA upgrade task to the devices in the device set to be upgraded except the first device set.
In this example, a first device set is determined, where devices in the first device set are part or all of devices in a device set to be upgraded, an OTA upgrade task is sent to the devices in the first device set to instruct the devices in the first device set to execute the OTA upgrade task, an execution result of the OTA upgrade task of the devices in the first device set is obtained, the OTA upgrade task is sent to the devices in the device set to be upgraded except the first device set according to the execution result of the OTA upgrade task sent by the devices in the first device set, and therefore, the OTA upgrade tasks can be sent to the devices in the device set to be upgraded in batches, and the OTA upgrade task is sent to subsequent devices according to a task execution result of a previous batch, so that reliability of the OTA upgrade task in execution is improved.
In one possible implementation manner, a possible method for sending an OTA upgrade task to a device in the set of devices to be upgraded, other than the first device set, according to an execution result of the OTA upgrade task sent by the device in the first device set includes:
a1, determining a first number of successfully upgraded devices in the first device set according to an execution result of an OTA upgrade task sent by the devices in the first device set;
and A2, if the first quantity is higher than or equal to a preset quantity, sending the OTA upgrading task to the devices except the first device set in the device set to be upgraded.
The task execution result may indicate whether the task was successfully executed, such that a first number of successfully upgraded devices of the first set of devices may be determined based on the execution result.
The preset number is set by empirical values or historical data. The method for sending the OTA upgrade task to the devices in the device set to be upgraded except the first device set may be: determining a second device set from devices except the first device set in the device set to be upgraded, sending the OTA upgrade task to the devices in the second device set, obtaining an execution result of the OTA upgrade task of the devices in the second device set, sending the OTA upgrade task to the devices except the devices in the second device set in the device set to be upgraded according to the execution result of the OTA upgrade task, and repeatedly executing the steps until all the devices in the device set to be upgraded are sent with the OTA upgrade task or the execution fails. Execution failure may be understood as determining that execution has failed if the number of successful executions of subsequent devices continues for a first predetermined number, which may be set by empirical values or historical data.
In this example, the first number of devices successfully upgraded in the first device set is greater than or equal to the preset number or the OTA upgrade task is sent to the devices in the device set to be upgraded except for the first device set, so that when the OTA upgrade task is sent to all the devices to be upgraded at the same time, the risk that most of OTA upgrade tasks are not executed successfully is avoided, and the reliability of the OTA upgrade task during execution is improved.
In a possible implementation manner, if the first number is smaller than a preset number, sending the OTA upgrade task to the devices in the device set to be upgraded except the first device set is prohibited, and an alarm message is determined and displayed.
The alarm information may be determined according to the first quantity, the first quantity may be in different quantity intervals, and different quantity intervals may correspond to different alarm information, so that the alarm information corresponding to the first quantity may be determined. When the alarm information is displayed, the alarm information may be displayed in a manner of executing a background notification message, the alarm information may be displayed in a manner of an email, the alarm information may be displayed in a manner of a short message or an automatic telephone alarm, and of course, other methods for displaying the alarm information may be provided, which are not described herein again.
In a possible implementation manner, the task sending may also be checked, which specifically includes the following steps:
b1, if the first number is smaller than the preset number, obtaining the execution progress information of OTA upgrade tasks of the devices in a second device set, wherein the devices in the second device set are devices of which the execution results are not upgraded successfully in the first execution set;
b2, determining a second number of successfully executed OTA upgrading tasks of the equipment in the second equipment set after a preset time interval according to the execution progress information of the OTA upgrading tasks of the equipment in the second equipment set;
and B3, if the sum of the second quantity and the first quantity is larger than a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
When the first number is smaller than the preset number, verification may be performed, specifically, for example, the execution progress information of the OTA upgrade task sent to the devices in the device set to be upgraded except for the first device set may be obtained, and the execution progress information may be understood as a completion rate of the OTA upgrade task in execution. Whether the OTA upgrade task is successfully executed may be predicted according to the execution progress, for example, a device whose execution progress is higher than a preset execution progress may be determined as a device that can be successfully executed after a preset time interval, so that the second number may be obtained. Of course, it may also be that after the preset time interval is determined according to the execution progress information and the current state of the devices in the second device set, whether the OTA upgrade task is successfully executed may be determined, specifically, for example, a device whose execution progress is higher than the preset execution progress and whose current state is the preset state may be determined as a device that can be successfully executed after the preset time interval, so that the second number may be obtained, and the preset state is set by an experience value or historical data.
In this example, when the sum of the second number and the first number is greater than a preset number, the OTA upgrade task is sent to the devices in the device set to be upgraded, except for the first device set, so that verification processing can be performed when the task is sent, and the reliability of the OTA upgrade task during execution is further improved.
In a possible implementation manner, the display of the abnormal information may also be performed on the device that is not successfully upgraded, which specifically includes the following steps:
c1, acquiring state information of equipment in a second equipment set, wherein the equipment in the second equipment set is equipment with an execution result of being not upgraded successfully in the first execution set;
c2, determining abnormal information of the equipment in the second equipment set according to the state information of the equipment in the second equipment set;
and C3, displaying the abnormal information of the equipment in the second equipment set.
The device state information may include a connection state and a non-connection state, and when the device state information is in the connection state, the device state information may include a state in which the task is successfully executed, a state in which the task is not successfully executed, and the like.
Since the devices in the second device set are devices whose task execution fails, the status information may include a non-connection status and a status of connection but not successful execution of the upgrade task.
Therefore, the exception information can be determined according to the state information, for example, if the state information is in a non-connection state, the exception information can be a firmware upgrade exception, a firmware exception, and the like. When the status information is connected but the upgrade task is not successfully executed, the current status of the device can be further acquired, the abnormal information is determined according to the current status, and different statuses can correspond to different abnormal information, so that the abnormal information can be determined according to the status information.
In this example, after the upgrade task fails to be executed, the abnormal information may be determined according to the state information of the device, and the abnormal information may be displayed, so that an administrator and the like may be informed of the abnormal execution condition of the upgrade task, and the efficiency of subsequently processing the abnormal is improved.
In one possible implementation, a possible method of obtaining a result of performing an OTA upgrade task for a device in the first set of devices includes:
d1, acquiring state information of the equipment in the first equipment set;
and D2, determining an execution result of the OTA upgrade task of the equipment in the first equipment set according to the state information of the equipment in the first equipment set.
Different state information may correspond to different execution results, for example, the task state includes a connection state and a non-connection state, and the connection state may include a state in which the task is successfully executed, a state in which the task is not successfully executed, and the like. And in the non-connection state, determining that the execution result is execution failure, and in the non-connection state, determining whether the execution is successful or not according to the state information, wherein different states correspond to different execution results, so that the execution result of the OTA upgrading task can be determined.
In a specific implementation manner, an embodiment of the present application further provides a specific task execution method, which is specifically as follows:
adjusting an OTA upgrading task issuing rule into a rule of a superposed OTA upgrading strategy, wherein the superposed OTA upgrading strategy comprises four strategies, and the four strategies comprise: splitting strategy, executing strategy, relying strategy and fusing strategy. Whether the OTA upgrading is continuously executed on the equipment of the subsequent upgrading batch is decided according to the equipment state grading result, and meanwhile, the system can set the trigger condition according to the requirement to provide an alarm mechanism, so that the service related party can sense the existence of the problem and perform manual intervention on the problem. The splitting strategy, the executing strategy, the relying strategy and the fusing strategy are specifically as follows:
a splitting strategy, which correspondingly splits the OTA upgrading task into a plurality of upgrading batches, such as an inverted pyramid splitting model, wherein the first batch of user equipment samples accounts for about 1%, the second batch of user equipment samples accounts for 2%, the third batch of user equipment samples accounts for 4%, and the fourth batch of user equipment samples accounts for 8%, and sample expansion models are sequentially deduced until the range of the full amount of user samples is covered by 100%; the batch number and the quantity of each batch can be completely customized, and some common splitting models are preset under general conditions, so that OTA upgrading tasks are quickly constructed. Here, for example, a percentage of the user population is used, the front lot uses a fixed number of samples, and the rear lot can also use a percentage to split the lots.
Executing a strategy, wherein the OTA upgrading task is already split into a plurality of batch models; the time for executing the task for the first time in the execution strategy can be immediately executed, delayed to be executed or started to be executed under a specific condition; setting the interval time after the execution of the batches is completed, or whether the dependent strategies need to be superposed between the batches, and the like.
Depending on the strategy, after the OTA upgrade succeeds under the normal condition, the device can automatically recover the MQTT to be connected with the IoT server, the device server can sense that the device upgrade succeeds and has reentered, and the detection of index data such as the heartbeat of the device is normal. At this time, the feedback data can act on the dependency policy conditions of the OTA upgrade task in batches, and when the OTA upgrade task in the current batch is successfully upgraded and the state is recovered to be normal, and the batch success rate reaches a certain index threshold, the system program automatically puts in the next OTA upgrade task in the next batch. And if the index threshold value is not reached, the OTA upgrading task is suspended from being continuously launched, and a fusing strategy can be superposed on the dependence strategy and is used for judging and executing the action when the abnormity occurs.
And the fusing strategy is to ensure that fusing operation can be triggered under specific conditions when the next batch cannot be executed by depending on strategy blocking. For example, in the batch execution process, the dependence policy cannot meet the condition of triggering the execution of the next batch all the time, and the OTA upgrade task is in a stagnation state all the time; for example, 100 devices in the first batch cannot reach the index threshold value for successful update recovery online of less than 30%, and the system cannot release the OTA update task in the second batch. The fusing strategy is to set a task fusing operation or a notification alarm operation after a time exceeding a long time. For example, the background system message notification is executed for more than 30 minutes and less than 10% among online user batches, the email warning is executed for more than 1 hour and less than 10% success rate, and the short message or automatic telephone warning is performed for more than 3 hours and less than 10%; and when the device upgrading is successfully and automatically fused within 24 hours and less than 10%, the OTA upgrading task is automatically terminated.
During multi-batch task execution, the OTA does not meet the index requirement of meeting 30% of the device re-online rate for executing the next batch, and manual intervention or automatic program termination is performed after the fusing strategy. For normal equipment, after upgrading is successful, various data indexes can be quickly recovered, and fusing can be triggered only in an abnormal state. And this exception has covered the risk coverage of artifacts in the device OTA upgrade process. Certainly, whether the OTA upgrading process is normal or not needs to be reversely detected through part of equipment upgrading results, the first equipment still needs to be sacrificed under extreme conditions, and even though the first equipment is small-batch equipment, the risk of user loss still exists on a brand side, so that the OTA upgrading method aims to reduce the risk of occurrence of systematicness of OTA upgrading and improve the reliability of execution of OTA upgrading tasks.
The OTA upgrading strategy allows various strategies to exist, superposition operation can be carried out among the strategies, the superposed strategies can jointly act on the OTA upgrading task, and for example, the task execution strategy and the execution fusing strategy can jointly act on the OTA upgrading task in a superposed mode.
In each strategy, mutually exclusive strategy options are allowed to exist, generally, the same type of strategies has multiple implementation options, only one strategy is overlapped in actual use, and mutually exclusive states exist among different options of the strategies. For example: in the execution time strategy, a plurality of conditional choices are mutually exclusive, and the immediate execution and the delayed execution are necessarily either one of the two choices and cannot exist at the same time;
the strategy can be transversely expanded, is not one or more fixed strategy modes, and can be used for extending and expanding the service according to the customization of the actual service requirement; according to the scheme, the key strategy part is explained according to the protection key points and the upgrading risk is reduced, the practical function of the OTA upgrading strategy model is only to reduce the risk of the OTA upgrading task, and functional expanding space exists in other aspects such as observable upgrading process, sensible progress, inquireable recording, analyzable data and the like.
The OTA upgrade task time of a device should avoid the peak usage of the user device, e.g., choosing when the upgrade is conservative while the user is sleeping. However, the peak hours of equipment use may vary from country to country, from region to region, and the rest hours of users in the same region may also vary. Therefore, a basic data portrait of the device can be established to avoid, and the device is prevented from executing the OTA upgrading task in the using process, so that the initial sending time of the OTA upgrading task can be determined according to the basic data portrait.
Referring to fig. 3, fig. 3 is a flowchart illustrating another task execution method according to an embodiment of the present disclosure. As shown in fig. 3, the task execution method applied to the server includes:
301. determining a first device set, wherein devices in the first device set are part or all of devices in a device set to be upgraded;
302. sending an OTA upgrade task to devices in the first set of devices to instruct the devices in the first set of devices to perform the OTA upgrade task;
303. acquiring an execution result of an OTA (over the air) upgrading task of the equipment in the first equipment set;
304. determining a first number of successfully upgraded devices in the first device set according to an execution result of an OTA upgrade task sent by the devices in the first device set;
305. if the first quantity is higher than or equal to a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded;
306. if the first number is smaller than the preset number, acquiring execution progress information of OTA (over the air) upgrading tasks of equipment in a second equipment set, wherein the equipment in the second equipment set is equipment which has an execution result of unsuccessful upgrading in the first execution set;
307. determining a second number of successful OTA upgrading tasks of the equipment in the second equipment set after a preset time interval according to the execution progress information of the OTA upgrading tasks of the equipment in the second equipment set;
308. and if the sum of the second quantity and the first quantity is greater than a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
In this example, when the sum of the second number and the first number is greater than a preset number, the OTA upgrade task is sent to the devices in the device set to be upgraded, except for the devices in the first device set, so that verification processing can be performed when the task is sent, and the reliability of the OTA upgrade task during execution is further improved.
In accordance with the foregoing embodiments, please refer to fig. 4, fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application, and as shown in the drawing, the server includes a processor, an input device, an output device, and a memory, and the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, the computer program includes program instructions, the processor is configured to call the program instructions, and the program includes instructions for performing the following steps;
determining a first device set, wherein devices in the first device set are part or all of devices in a device set to be upgraded;
sending an OTA upgrade task to devices in the first set of devices to instruct the devices in the first set of devices to perform the OTA upgrade task;
acquiring an execution result of an OTA (over the air) upgrading task of the equipment in the first equipment set;
and according to the execution result of the OTA upgrading task sent by the equipment in the first equipment set, sending the OTA upgrading task to the equipment in the equipment set to be upgraded except the equipment in the first equipment set.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the terminal includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the above-described functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed in hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the terminal may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In accordance with the above, please refer to fig. 5, fig. 5 is a schematic structural diagram of a task performing device according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus includes:
a determining unit 501, configured to determine a first device set, where devices in the first device set are part or all of devices in a device set to be upgraded;
a first sending unit 502, configured to send an OTA upgrade task to devices in the first set of devices to instruct the devices in the first set of devices to perform the OTA upgrade task;
an obtaining unit 503, configured to obtain an execution result of an OTA upgrade task for a device in the first device set;
a second sending unit 504, configured to send the OTA upgrade task to a device in the device set to be upgraded, except for the first device set, according to an execution result of the OTA upgrade task sent by the device in the first device set.
In one possible implementation manner, the second sending unit 504 is configured to:
determining a first number of successfully upgraded devices in the first device set according to an execution result of an OTA upgrade task sent by the devices in the first device set;
and if the first quantity is higher than or equal to a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
In one possible implementation manner, the second sending unit 504 is configured to:
if the first number is smaller than the preset number, forbidding sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded, and determining alarm information;
and displaying the alarm information.
In one possible implementation manner, the second sending unit 504 is configured to:
if the first quantity is smaller than the preset quantity, acquiring the execution progress information of the OTA upgrade tasks of the equipment in a second equipment set, wherein the equipment in the second equipment set is the equipment which has an execution result of unsuccessful upgrade in the first execution set;
determining a second number of successful execution of the OTA upgrade tasks of the devices in the second device set after a preset time interval according to the execution progress information of the OTA upgrade tasks of the devices in the second device set;
and if the sum of the second quantity and the first quantity is greater than a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
In one possible implementation, the apparatus is further configured to:
acquiring state information of equipment in a second equipment set, wherein the equipment in the second equipment set is equipment with an execution result of unsuccessful upgrading in the first execution set;
determining abnormal information of the devices in the second device set according to the state information of the devices in the second device set;
and displaying the abnormal information of the devices in the second device set.
In one possible implementation manner, the obtaining unit 503 is configured to:
acquiring state information of the devices in the first device set;
and determining an execution result of the OTA upgrade task of the equipment in the first equipment set according to the state information of the equipment in the first equipment set.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the task execution methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program causes a computer to execute some or all of the steps of any one of the task execution methods as described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash memory disks, read-only memory, random access memory, magnetic or optical disks, and the like.
The foregoing embodiments have been described in detail, and specific examples are used herein to explain the principles and implementations of the present application, where the above description of the embodiments is only intended to help understand the method and its core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method of task execution, the method comprising:
determining a first device set, wherein devices in the first device set are part or all of devices in a device set to be upgraded;
sending an OTA upgrade task to devices in the first set of devices to instruct the devices in the first set of devices to perform the OTA upgrade task;
acquiring an execution result of an OTA (over the air) upgrading task of the equipment in the first equipment set;
and according to the execution result of the OTA upgrading task sent by the equipment in the first equipment set, sending the OTA upgrading task to the equipment in the equipment set to be upgraded except the equipment in the first equipment set.
2. The method of claim 1, wherein the sending the OTA upgrade tasks to the devices in the set of devices to be upgraded other than the first set of devices according to the execution result of the OTA upgrade tasks sent by the devices in the first set of devices comprises:
determining a first number of successfully upgraded devices in the first device set according to an execution result of an OTA upgrade task sent by the devices in the first device set;
and if the first quantity is higher than or equal to a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
3. The method according to claim 2, characterized in that if the first number is smaller than a preset number, the OTA upgrade tasks are prohibited from being sent to the devices in the device set to be upgraded except the first device set, and alarm information is determined;
and displaying the alarm information.
4. The method according to claim 2, characterized in that if the first number is smaller than a preset number, obtaining execution progress information of the OTA upgrade task of the devices in a second device set, where the devices in the second device set are devices whose execution results are not successfully upgraded in the first execution set;
determining a second number of successful OTA upgrading tasks of the equipment in the second equipment set after a preset time interval according to the execution progress information of the OTA upgrading tasks of the equipment in the second equipment set;
and if the sum of the second quantity and the first quantity is larger than a preset quantity, sending the OTA upgrading task to the equipment except the first equipment in the equipment set to be upgraded.
5. The method of claim 2, further comprising:
acquiring state information of equipment in a second equipment set, wherein the equipment in the second equipment set is equipment with an execution result of unsuccessful upgrading in the first execution set;
determining abnormal information of the devices in the second device set according to the state information of the devices in the second device set;
and displaying the abnormal information of the devices in the second device set.
6. The method of any of claims 1-5, wherein obtaining results of performing OTA upgrade tasks for devices in the first set of devices comprises:
acquiring state information of the devices in the first device set;
and determining an execution result of the OTA upgrade task of the equipment in the first equipment set according to the state information of the equipment in the first equipment set.
7. A task execution apparatus, characterized in that the apparatus comprises:
the device comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a first device set, and devices in the first device set are part or all of devices in a device set to be upgraded;
a first sending unit, configured to send an OTA upgrade task to devices in the first set of devices to instruct the devices in the first set of devices to perform the OTA upgrade task;
an obtaining unit, configured to obtain an execution result of an OTA upgrading task of a device in the first device set;
and the second sending unit is used for sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded according to the execution result of the OTA upgrading task sent by the equipment in the first equipment set.
8. The apparatus of claim 7, wherein the second sending unit is configured to:
determining a first number of successfully upgraded devices in the first device set according to an execution result of an OTA upgrade task sent by the devices in the first device set;
and if the first quantity is higher than or equal to a preset quantity, sending the OTA upgrading task to the equipment except the first equipment set in the equipment set to be upgraded.
9. A server, comprising a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-6.
CN202211027473.1A 2022-08-25 2022-08-25 Task execution method and related device Active CN115473808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211027473.1A CN115473808B (en) 2022-08-25 2022-08-25 Task execution method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211027473.1A CN115473808B (en) 2022-08-25 2022-08-25 Task execution method and related device

Publications (2)

Publication Number Publication Date
CN115473808A true CN115473808A (en) 2022-12-13
CN115473808B CN115473808B (en) 2024-08-09

Family

ID=84369525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211027473.1A Active CN115473808B (en) 2022-08-25 2022-08-25 Task execution method and related device

Country Status (1)

Country Link
CN (1) CN115473808B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145973A (en) * 2007-10-23 2008-03-19 华为技术有限公司 Software upgrade method and device
WO2015154385A1 (en) * 2014-08-06 2015-10-15 中兴通讯股份有限公司 Method and terminal for ota updating
CN108055209A (en) * 2017-12-26 2018-05-18 温岭卓致智能科技有限公司 A kind of router batch terminal upgrading method and system
CN109525410A (en) * 2017-09-20 2019-03-26 华为技术有限公司 The method, apparatus and distributed memory system of distributed memory system updating and management
CN111147314A (en) * 2019-12-30 2020-05-12 深圳市丰润达科技有限公司 Switch upgrading method, device and storage medium
CN112015098A (en) * 2020-08-14 2020-12-01 深圳市欧瑞博科技股份有限公司 System upgrading method and device for intelligent household equipment and electronic equipment
US20200379748A1 (en) * 2019-05-27 2020-12-03 Wangsu Science & Technology Co., Ltd. Upgrading method and apparatus
CN112822248A (en) * 2020-12-31 2021-05-18 新奥数能科技有限公司 OTA upgrading method, OTA upgrading device, readable medium and electronic equipment
CN113067734A (en) * 2021-03-29 2021-07-02 努比亚技术有限公司 Electronic price tag upgrading method, electronic price tag system, electronic terminal and storage medium
CN113873010A (en) * 2021-08-31 2021-12-31 青岛海尔科技有限公司 Equipment upgrading method and device, storage medium and electronic device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145973A (en) * 2007-10-23 2008-03-19 华为技术有限公司 Software upgrade method and device
WO2015154385A1 (en) * 2014-08-06 2015-10-15 中兴通讯股份有限公司 Method and terminal for ota updating
CN109525410A (en) * 2017-09-20 2019-03-26 华为技术有限公司 The method, apparatus and distributed memory system of distributed memory system updating and management
CN108055209A (en) * 2017-12-26 2018-05-18 温岭卓致智能科技有限公司 A kind of router batch terminal upgrading method and system
US20200379748A1 (en) * 2019-05-27 2020-12-03 Wangsu Science & Technology Co., Ltd. Upgrading method and apparatus
CN111147314A (en) * 2019-12-30 2020-05-12 深圳市丰润达科技有限公司 Switch upgrading method, device and storage medium
CN112015098A (en) * 2020-08-14 2020-12-01 深圳市欧瑞博科技股份有限公司 System upgrading method and device for intelligent household equipment and electronic equipment
CN112822248A (en) * 2020-12-31 2021-05-18 新奥数能科技有限公司 OTA upgrading method, OTA upgrading device, readable medium and electronic equipment
CN113067734A (en) * 2021-03-29 2021-07-02 努比亚技术有限公司 Electronic price tag upgrading method, electronic price tag system, electronic terminal and storage medium
CN113873010A (en) * 2021-08-31 2021-12-31 青岛海尔科技有限公司 Equipment upgrading method and device, storage medium and electronic device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
XINGCHEN WU ET AL.: "Method of differential-based remote upgrade for ECUs on vehicles", 2021 3RD INTERNATIONAL CONFERENCE ON ROBOTICS,INTELLIGENT CONTROL AND ARTIFICIAL INTELLIGENCE, 12 May 2021 (2021-05-12) *
施庆国 等: "智能网联汽车的OTA升级方案", 2018中国汽车工程学会年会, 1 November 2018 (2018-11-01) *
许驰: "大容量环境下设备升级模块设计与实现", 《中国优秀硕士学位论文全文数据库》, 15 October 2020 (2020-10-15) *

Also Published As

Publication number Publication date
CN115473808B (en) 2024-08-09

Similar Documents

Publication Publication Date Title
US11799786B2 (en) Device and method for disabling a WLAN hotspot based on data traffic value
CN108647118B (en) Storage cluster-based copy exception recovery method and device and computer equipment
WO2019140739A1 (en) Method for determining return visits to client, and electronic apparatus and computer-readable storage medium
CN108243031B (en) Method and device for realizing dual-computer hot standby
CN113590337A (en) Method and device for automatically adjusting cloud host configuration in cloud environment
CN112087771A (en) Communication control method and device, electronic equipment and computer readable storage medium
CN109495909A (en) The mobile network's control method and device of Android device
KR102705465B1 (en) Methods for handling abnormalities, terminal devices and storage media
CN111130856A (en) Server configuration method, system, equipment and computer readable storage medium
CN115473808A (en) Task execution method and related device
CN108471612A (en) SIM card falls card restoration methods, device and terminal
EP2940540A1 (en) Power system monitoring and control system
CN110913416B (en) Terminal, networking method thereof and computer-readable storage medium
CN109597728B (en) Control method and device of test equipment and computer readable storage medium
CN112667467A (en) Cluster self-adaptive current limiting method and device, computer equipment and storage medium
CN110837431A (en) Service control method, service control device, computer equipment and computer-readable storage medium
CN108846281A (en) root permission obtaining method and device, terminal equipment and storage medium
WO2018053916A1 (en) Application download method, device and terminal, and computer storage medium
CN113849207B (en) ARM server and reservation mode selection method for option configuration of ARM server
CN113704013A (en) Method, device, equipment and medium for PCIE error correction processing
CN111898117A (en) Mutually exclusive application processing method, device, terminal and storage medium
CN111131198A (en) Updating method and device for network security policy configuration
CN115242615B (en) Server operation management method and device, electronic equipment and storage medium
CN112134965B (en) Issuing method and device of Internet of things instruction and electronic equipment
CN103049344B (en) The method and apparatus of hardware plug fault-tolerant processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Country or region after: China

Address after: 518000 Office Building 02, 11th Floor, Building B2, Xiandong Road, Xiandong Community, Xili Street, Nanshan District, Shenzhen City, Guangdong Province, China

Applicant after: Shenzhen Kaidisi Intelligent Technology Co.,Ltd.

Address before: 9 / F, block B, Tsinghua information port, No.1, Xindong Road, songpingshan community, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN KAADAS INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant