Disclosure of Invention
In order to solve the technical problems, the application provides a method, a device, equipment and a storage medium for upgrading terminal firmware.
The technical scheme of the application is realized as follows:
in a first aspect, a method for upgrading terminal firmware is provided, which is applied to a device management server side, and the method includes:
when the terminal firmware upgrade is determined to fail, a first request is sent to the terminal;
receiving the current upgrading state and the upgrading failure reason of the terminal returned when the terminal responds to the first request;
determining an interruption position when breakpoint continuous transmission is selected according to the current upgrading state of the terminal and the upgrading failure reason;
and continuously sending upgrading information to the terminal based on the interrupt position, so that the terminal continuously executes firmware upgrading from the interrupt position.
In the above solution, the current upgrade status of the terminal is a firmware download status, and when the upgrade failure cause indicates that the firmware download is not started or the firmware download fails, the determining the interrupt position includes: sending a second request to the terminal; receiving the number of bytes of the downloaded firmware returned by the terminal when responding to the second request; and taking the last byte position of the downloaded firmware byte as the interrupt position.
In the above scheme, the continuing to send upgrade information to the terminal based on the interrupt position includes: and when the terminal meets the data receiving condition, continuously transmitting the residual byte number to the terminal according to the downloaded firmware byte number, so that the terminal continuously downloads the residual byte number from the byte position of the last byte in the downloaded firmware bytes.
In the above solution, the determining that the terminal meets the data receiving condition includes: sending a third request to the terminal; terminal attribute information returned by the terminal when the terminal responds to the third request is received; the terminal attribute information at least comprises available space, residual electric quantity, signal strength and the number of terminals which are executing firmware upgrading tasks in a cell to which the terminal belongs; the available space is larger than the size of a firmware package to be transmitted, the residual electric quantity is larger than a preset electric quantity threshold, the signal strength is larger than a preset strength threshold, and when the number of terminals of a cell to which the terminal belongs, which are executing firmware upgrading tasks, is smaller than the number of preset terminals, the terminal is determined to meet the data receiving condition.
In the above scheme, the current upgrade status of the terminal is a firmware download complete status, and when the upgrade failure cause indicates that the firmware upgrade is not started or the firmware download fails or the firmware upgrade fails, the interrupt position is the initial position where the terminal firmware is being upgraded; and continuing to send upgrade information to the terminal based on the interrupt position, including: when the terminal meets the firmware upgrading condition, a first state switching instruction and a firmware upgrading instruction are sent to the terminal, so that the terminal responds to the first state switching instruction, and after the terminal is switched from a firmware downloading completion state to a firmware upgrading state, firmware upgrading is executed in response to the firmware upgrading instruction.
In the above scheme, the current upgrade status of the terminal is a firmware upgrade status, and when the upgrade failure cause indicates that firmware upgrade is not started or the download of the firmware package fails or the firmware upgrade fails, the interrupt position is an initial position where the terminal firmware is being upgraded; and continuing to send upgrade information to the terminal based on the interrupt position, including: and when the terminal is determined to meet the firmware upgrading condition, sending a firmware upgrading instruction to the terminal, so that the terminal responds to the firmware upgrading instruction to execute firmware upgrading.
In the above solution, the determining that the terminal meets the firmware upgrade condition includes: sending a fourth request to the terminal; receiving the residual electric quantity of the terminal returned when the terminal responds to the fourth request; and when the residual electric quantity of the terminal is larger than a preset electric quantity threshold value, determining that the terminal meets the firmware upgrading condition.
In the above scheme, the method further comprises: and when the terminal is selected to reset according to the current upgrading state of the terminal and the reason of the upgrading failure, sending a reset instruction to the terminal, so that the terminal is reset to an initial state.
In the above scheme, selecting the terminal for resetting according to the current upgrade status of the terminal and the upgrade failure cause includes: the current upgrading state of the terminal is a firmware downloading state, the reason of the upgrading failure indicates that the firmware is successfully upgraded, or the memory space of the terminal is insufficient, or the integrity check of a firmware packet fails, or when the firmware upgrading fails, the terminal is selected to reset; or the current upgrade state of the terminal is a firmware download completion state, the upgrade failure reason indicates that the firmware upgrade is successful, or the memory space of the terminal is insufficient, or the integrity check of the firmware package fails, the terminal is selected to reset; or the current upgrade state of the terminal is a firmware upgrade state, and when the upgrade failure reason indicates that the firmware upgrade is successful or the integrity check of the firmware package fails, the terminal is selected to be reset.
In the above scheme, the method further comprises: and when the terminal is selected to be identified as failed in upgrading according to the current upgrading state of the terminal and the reason for failed upgrading, identifying the failed upgrading of the terminal firmware, and displaying the reason for failed upgrading of the firmware through a display unit.
In the above scheme, the selecting the identification terminal upgrade failure according to the current upgrade status of the terminal and the upgrade failure reason includes: the current upgrade state of the terminal is a firmware download state, and the upgrade failure reason indicates that the type of the firmware package is not supported, or the network address is invalid, or an upgrade protocol is not supported, and the upgrade failure of the terminal is selected and identified; or the current upgrade state of the terminal is a firmware download completion state, and the upgrade failure reason indicates that the type of the firmware package is not supported, or the network address is invalid, or the upgrade protocol is not supported, and the terminal upgrade failure is selected and identified; or the current upgrade state of the terminal is a firmware upgrade state, and the upgrade failure reason indicates that the type of the firmware package is not supported, or the network address is invalid, or the upgrade protocol is not supported, and the terminal upgrade failure is selected and identified.
In the above solution, when the current upgrade status of the terminal is an idle status and the upgrade failure cause indicates that the upgrade process is not entered, the method further includes: and determining that the terminal meets the data receiving condition, and transmitting the firmware package to the terminal in blocks according to a preset block transmission strategy when the acquired number of bytes of the downloaded firmware of the terminal is zero, so that the terminal downloads the complete firmware package to execute firmware upgrading.
In the above solution, the transmitting the firmware packet to the terminal in blocks according to a preset block transmission policy includes: sending a second state switching instruction to the terminal; the first state switching instruction is used for indicating to switch from an idle state to a firmware downloading state; and receiving state switching success information returned by the terminal when responding to the second state switching instruction, and transmitting the firmware packet to the terminal in blocks according to the preset block transmission strategy.
In the above solution, the determining that the terminal firmware upgrade fails includes: receiving uplink data sent by the terminal; wherein, the uplink data comprises a terminal identifier; when the terminal is determined to have a firmware upgrading task based on the terminal identification, a fifth request is sent to the terminal; receiving a first firmware version number of the terminal returned by the terminal when the terminal responds to the fifth request; when the firmware upgrading type of the terminal is determined to be complete package upgrading, comparing a second firmware version number of the complete package with the first firmware version number; and when the terminal firmware upgrading and the terminal firmware upgrading are inconsistent, determining that the terminal firmware upgrading fails.
In the above scheme, the method further comprises: when the firmware upgrading type of the terminal is determined to be differential packet upgrading, judging whether the first firmware version number is consistent with the initial version number of the differential packet; when the two are consistent, comparing the target version number of the differential packet with the first firmware version number; and when the terminal firmware upgrading and the terminal firmware upgrading are inconsistent, determining that the terminal firmware upgrading fails.
In the above scheme, the uplink data further includes a cell identifier to which the terminal belongs; before the fifth request is sent to the terminal, the method further includes: acquiring the number of terminals of the cell downloading the firmware package according to the cell identifier of the terminal; and when the number is smaller than the preset number, sending the fifth request to the terminal.
In the above solution, before the sending the first request to the terminal, the method further includes: acquiring the number of retries of the terminal firmware upgrade failure; when the terminal firmware upgrade failure retry times are smaller than preset retry times, sending the first request to the terminal; or acquiring a failure time point of the terminal firmware; and sending the first request to the terminal within a preset time period after the time point.
In a second aspect, a method for upgrading terminal firmware is provided, applied to a terminal side, and the method includes:
receiving a first request sent by a device management server;
responding to the first request, and sending the current upgrading state and the upgrading failure reason of the terminal to the equipment management server, so that the equipment management server determines the interrupt position when selecting breakpoint continuous transmission according to the current upgrading state and the upgrading failure reason of the terminal;
Receiving upgrade information which is continuously sent by the equipment management server based on the interrupt position;
and continuing to execute firmware upgrade from the interrupt position based on the upgrade information.
In the above solution, the current upgrade status of the terminal is a firmware download status, and when the upgrade failure cause indicates that the firmware download is not started or fails, the method further includes: receiving a second request sent by the equipment management server; and responding to the second request, and sending the number of the downloaded firmware bytes to the device management server, so that the device management server takes the last byte position of the downloaded firmware bytes as the interrupt position.
In the above solution, the receiving the upgrade information sent by the device management server based on the interrupt position includes: receiving a third request sent by the equipment management server; transmitting the terminal attribute information to the equipment management server in response to the third request, so that the equipment management server judges whether the terminal meets a data receiving condition based on the terminal attribute information; the terminal attribute information at least comprises available space, residual electric quantity, signal strength and the number of terminals which are executing firmware upgrading tasks in a cell to which the terminal belongs; receiving the residual byte number continuously transmitted by the equipment management server according to the downloaded firmware byte number; and the remaining byte number is the byte number which is continuously transmitted when the equipment management server determines that the terminal meets the data receiving condition.
In the above scheme, the current upgrade status of the terminal is a firmware download complete status, and when the upgrade failure cause indicates that the firmware upgrade is not started or the firmware download fails or the firmware upgrade fails, the interrupt position is the initial position where the terminal firmware is being upgraded; the receiving the upgrade information continuously sent by the equipment management server based on the interrupt position comprises the following steps: receiving a fourth request sent by the equipment management server; transmitting the residual electric quantity of the terminal to the equipment management server in response to the fourth request, so that the equipment management server determines that the terminal meets a firmware upgrading condition based on the residual electric quantity; receiving a first state switching instruction and a firmware upgrading instruction sent by the equipment management server; the first state switching instruction and the firmware upgrading instruction are instructions sent when the equipment management server determines that the terminal meets the firmware upgrading condition; and responding to the first state switching instruction, and executing firmware upgrading in response to the firmware upgrading instruction after switching from the firmware downloading completion state to the firmware upgrading state.
In the above scheme, the current upgrade status of the terminal is a firmware upgrade status, and when the upgrade failure cause indicates that firmware upgrade is not started or the download of the firmware package fails or the firmware upgrade fails, the interrupt position is an initial position where the terminal firmware is being upgraded; the receiving the upgrade information continuously sent by the equipment management server based on the interrupt position comprises the following steps: receiving a fourth request sent by the equipment management server; transmitting the residual electric quantity of the terminal to the equipment management server in response to the fourth request, so that the equipment management server determines that the terminal meets a firmware upgrading condition based on the residual electric quantity; receiving a firmware upgrading instruction sent by the equipment management server; the firmware upgrading instruction is an instruction sent when the equipment management server determines that the terminal meets the firmware upgrading condition; and executing firmware upgrade in response to the firmware upgrade instruction.
In the above scheme, the method further comprises: receiving a reset instruction sent by the equipment management server; the reset instruction is an instruction sent by the equipment management server when the terminal is reset according to the current upgrading state of the terminal and the upgrading failure reason; and responding to the reset instruction, and resetting the terminal to an initial state.
In the above scheme, the current upgrade status of the terminal is a firmware download status, and the reason for the upgrade failure indicates that the firmware upgrade is successful, or the memory space of the terminal is insufficient, or the integrity check of the firmware package fails, or the firmware upgrade fails; or the current upgrade state of the terminal is a firmware download completion state, and the upgrade failure reason indicates that the firmware upgrade is successful, or the memory space of the terminal is insufficient, or the integrity check of the firmware package fails; or the current upgrade state of the terminal is a firmware upgrade state, and the upgrade failure reason indicates that the firmware upgrade is successful or the integrity check of the firmware package fails.
In the above solution, when the current upgrade status of the terminal is an idle status and the upgrade failure cause indicates that the upgrade process is not entered, the method further includes: receiving a firmware packet transmitted by the equipment management server in a blocking mode according to a preset blocking transmission strategy; downloading the complete firmware package performs the firmware upgrade.
In the above solution, the receiving the firmware packet that is transmitted by the device management server according to the preset block transmission policy includes: receiving a second state switching instruction sent by the equipment management server; responding to the second state switching instruction, switching the idle state to a firmware downloading state, and sending successful state switching information to the equipment management server; and receiving the firmware packet transmitted by the equipment management server in a blocking mode according to a preset blocking transmission strategy.
In a third aspect, a terminal firmware upgrade apparatus is provided, which is applied to a device management server side, and the apparatus includes:
the first sending unit is used for sending a first request to the terminal when determining that the terminal firmware upgrade fails;
the first receiving unit is used for receiving the current upgrading state and the upgrading failure reason of the terminal returned when the terminal responds to the first request;
the determining unit is used for determining an interruption position when a user selects breakpoint transmission according to the current upgrading state of the terminal and the upgrading failure reason;
and the first sending unit is further used for continuously sending upgrade information to the terminal based on the interrupt position, so that the terminal continuously executes firmware upgrade from the interrupt position.
In a fourth aspect, a terminal firmware upgrade apparatus is provided, applied to a terminal side, the apparatus includes:
a second receiving unit, configured to receive a first request sent by the device management server;
the second sending unit is used for responding to the first request and sending the current upgrading state and the upgrading failure reason of the terminal to the equipment management server so that the equipment management server determines the interrupt position when selecting the breakpoint continuous transmission according to the current upgrading state and the upgrading failure reason of the terminal;
the second receiving unit is further configured to receive upgrade information that is continuously sent by the device management server based on the interrupt position;
and the execution unit is used for continuing to execute firmware upgrade from the interrupt position based on the upgrade information.
In a fifth aspect, there is provided a device management server comprising: a processor and a memory configured to store a computer program capable of running on the processor, wherein the processor is configured to perform the steps of the aforementioned method when the computer program is run.
In a sixth aspect, there is provided a terminal comprising: a processor and a memory configured to store a computer program capable of running on the processor, wherein the processor is configured to perform the steps of the aforementioned method when the computer program is run.
In a seventh aspect, a computer readable storage medium is provided, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the aforementioned method.
By adopting the technical scheme, after the equipment management server determines that the terminal firmware fails to upgrade, when the breakpoint is selected for continuous transmission according to the current upgrade state and upgrade failure reason of the terminal acquired from the terminal side, namely, the equipment management server continues to retry the upgrade task from the upgrade interrupt position, thereby avoiding repeated new upgrade tasks and saving network resources. For example, the current upgrade status of the terminal is a firmware download status, the reason for the upgrade failure is that the firmware download fails, and the device management server will continue to transmit the remaining firmware package to the terminal immediately after the last firmware download failure node, without newly creating an upgrade task.
Detailed Description
For a more complete understanding of the nature and the technical content of the embodiments of the present application, reference should be made to the following detailed description of embodiments of the application, taken in conjunction with the accompanying drawings, which are meant to be illustrative only and not limiting of the embodiments of the application.
An embodiment of the application provides a terminal firmware upgrading method, and fig. 1 is a first flow diagram of the terminal firmware upgrading method in the embodiment of the application, where the terminal firmware upgrading method is applied to a device management server side.
As shown in fig. 1, the method for upgrading terminal firmware specifically includes:
step 101: and when the terminal firmware upgrade is determined to fail, a first request is sent to the terminal.
Step 102: and receiving the current upgrading state and the upgrading failure reason of the terminal returned by the terminal when the terminal responds to the first request.
Step 103: and determining an interruption position when the breakpoint continuous transmission is selected according to the current upgrading state of the terminal and the upgrading failure reason.
Step 104: and continuously sending upgrading information to the terminal based on the interrupt position, so that the terminal continuously executes firmware upgrading from the interrupt position.
Here, the execution subject of steps 101 to 104 may be a processor of the device management server.
In the embodiment of the application, after the equipment management server determines that the terminal firmware upgrade fails, the current upgrade state and upgrade failure reason of the terminal are obtained from the terminal side, and when the equipment management server selects breakpoint continuous transmission according to the current upgrade state and upgrade failure reason of the terminal, namely, the equipment management server can retry the firmware upgrade task from the upgrade interrupt position, thereby avoiding repeated new upgrade tasks and saving network resources.
Before the firmware upgrade method is performed, a communication connection between the terminal and the device management server is established through a lightweight M2M (Light weight M2M, lwm 2M) protocol.
The steps in the firmware upgrading method are specifically described below.
In some embodiments, the determining that the terminal firmware upgrade failed includes: receiving uplink data sent by the terminal; wherein, the uplink data comprises a terminal identifier; when the terminal is determined to have a firmware upgrading task based on the terminal identification, a fifth request is sent to the terminal; receiving a first firmware version number of the terminal returned by the terminal when the terminal responds to the fifth request; when the firmware upgrading type of the terminal is determined to be complete package upgrading, comparing a second firmware version number of the complete package with the first firmware version number; and when the terminal firmware upgrading and the terminal firmware upgrading are inconsistent, determining that the terminal firmware upgrading fails.
In some embodiments, the method further comprises: when the firmware upgrading type of the terminal is determined to be differential packet upgrading, judging whether the first firmware version number is consistent with the initial version number of the differential packet; when the two are consistent, comparing the target version number of the differential packet with the first firmware version number; and when the terminal firmware upgrading and the terminal firmware upgrading are inconsistent, determining that the terminal firmware upgrading fails.
In the embodiment of the application, a firmware upgrading task is created for the terminal in advance at the equipment management server side, namely, the equipment management server side stores the terminal identification with the firmware upgrading task in advance. When the terminal is switched from the sleep state to the wake state, the terminal sends uplink data (such as register, update, and business data (notify)) to the device management server, and the device management server determines whether the stored terminal identifier with firmware upgrade includes the terminal identifier in the uplink data, and indicates that the current terminal has firmware upgrade task when the terminal identifier is included, and indicates that the current terminal does not have firmware upgrade task when the terminal identifier is not included.
The device management server side also stores a firmware packet corresponding to the terminal with the firmware upgrading task in advance, and the type of the firmware packet generally comprises a differential packet and a complete packet. When the type of the firmware package corresponding to the current terminal is determined to be a complete package, whether the first firmware version number of the current terminal is consistent with the second firmware version number of the complete package or not is determined, if the first firmware version number of the current terminal is inconsistent with the second firmware version number of the complete package, the terminal firmware upgrading failure is indicated, and if the first firmware version number of the current terminal is inconsistent with the second firmware version number of the complete package, the terminal firmware upgrading success is indicated. When the type of the firmware packet corresponding to the current terminal is determined to be the differential packet, firstly judging whether the first firmware version number of the current terminal is consistent with the initial version number of the differential packet, if so, indicating that the current terminal can execute firmware upgrading, and if not, indicating that the current terminal cannot execute firmware upgrading; and judging whether the first firmware version number of the current terminal is consistent with the target firmware version number of the differential packet, if not, indicating that the terminal firmware upgrade fails, and if so, indicating that the terminal firmware upgrade is successful. For example, when the first firmware version number of the terminal is 1 and the start version number of the differential packet is 1, it is indicated that the current terminal can perform firmware upgrade, and as to which level the current terminal is raised, the target version number of the differential packet, for example, the target version number of the differential packet is 2, can be seen.
In some embodiments, the uplink data further includes a cell identifier to which the terminal belongs; before the fifth request is sent to the terminal, the method further includes: acquiring the number of terminals of the cell downloading the firmware package according to the cell identifier of the terminal; and when the number is smaller than the preset number, sending the fifth request to the terminal.
According to the embodiment of the application, the equipment management server acquires the number of terminals downloading the firmware package in the cell according to the cell identifier of the terminal in the uplink data, compares the number with the preset number, and indicates that the current terminal can immediately execute the firmware upgrade when the number of the terminals downloading the firmware package in the cell is smaller than the preset number, and indicates that the current terminal should delay executing the firmware upgrade when the number of the terminals downloading the firmware package in the cell is larger than or equal to the preset number. In other words, the embodiment of the application allows a plurality of terminals to execute firmware upgrade under the same cell at the same time, and improves the utilization ratio of bandwidth resources compared with the prior art that only one terminal is allowed to execute firmware upgrade under the same cell at the same time. In addition, the success rate of downloading the firmware package can be improved by limiting the number of terminals downloading the firmware package under the cell.
In some embodiments, before the sending the first request to the terminal, the method further includes: acquiring the number of retries of the terminal firmware upgrade failure; when the terminal firmware upgrade failure retry times are smaller than preset retry times, sending the first request to the terminal; or acquiring a failure time point of the terminal firmware; and sending the first request to the terminal within a preset time period after the time point.
When the equipment management server side detects that the terminal firmware fails to upgrade, the number of retries of the current terminal firmware upgrade failure is increased by 1, and a first request can be sent to the terminal as long as the number of retries of the current terminal firmware upgrade failure is smaller than the preset number of retries, so that whether to select breakpoint continuous transmission or other (such as terminal reset) is determined according to the current upgrade state and upgrade failure reason of the requested terminal.
Or when the equipment management server side detects that the terminal firmware upgrade fails, recording the current terminal firmware upgrade failure time point, and sending a first request to the terminal within the preset time of the time point, wherein the first request is used for judging whether to select breakpoint continuous transmission or other reasons according to the current upgrade state and upgrade failure reason of the requested terminal.
According to the embodiment of the application, when the equipment management server selects breakpoint continuous transmission according to the current upgrading state of the terminal and the reason of upgrading failure, the equipment management server can continuously send upgrading information to the terminal immediately after the last failed task node, so that the terminal can continuously execute firmware upgrading immediately after the last failed task node. In practical application, the device management server determines the interrupt position, and then continuously sends the upgrade information to the terminal based on the interrupt position, so that the terminal continuously executes firmware upgrade from the interrupt position. Here, the current upgrade state of the terminal includes four kinds, i.e., an Idle state (Idle), a firmware download state (download), a firmware download completion state (download), and a firmware upgrade state (update). The reasons for upgrade failure include nine types, namely, 0 initial state, 1 upgrade success, 2 space shortage, memory overflow during 3 download, link disconnection during 4 download, 5 firmware package integrity check failure, 6 firmware package type unsupported, 7 invalid network address (URL), 8 upgrade failure, and 9 upgrade protocol unsupported.
Here, when the current upgrade status of the terminal is Downloading, the reason of the upgrade failure indicates that the firmware download is not started (i.e. corresponding to upgrade failure reason 0) or the firmware download fails (including two cases, i.e. memory overflow during 3 downloads and link disconnection during 4 downloads), the device management server will select breakpoint resume immediately after the last firmware download failure node (i.e. interrupt position). In some embodiments, the determining the interrupt location includes: sending a second request to the terminal; receiving the number of bytes of the downloaded firmware returned by the terminal when responding to the second request; and taking the last byte position of the downloaded firmware byte as the interrupt position. In some embodiments, the continuing to send upgrade information to the terminal based on the interrupt location includes: and when the terminal meets the data receiving condition, continuously transmitting the residual byte number to the terminal according to the downloaded firmware byte number, so that the terminal continuously downloads the residual byte number from the byte position of the last byte in the downloaded firmware bytes.
That is, the device management server sends a second request to the terminal to obtain the number of bytes of the firmware downloaded by the terminal, and the device management server continuously transmits the remaining number of bytes to the terminal according to the number of bytes of the firmware downloaded by the terminal, so that the terminal downloads the complete firmware package to execute firmware upgrade.
Before the device management server transmits the remaining bytes of the firmware packet to the terminal, whether the terminal meets the data receiving condition is judged, and only when the terminal is determined to meet the data receiving condition, the remaining bytes of the firmware packet are transmitted to the terminal. In some embodiments, the determining that the terminal satisfies a data reception condition includes: sending a third request to the terminal; receiving available space, residual electric quantity, signal strength and the number of terminals which are executing firmware upgrading tasks of a cell to which the terminal belongs, wherein the available space, the residual electric quantity and the signal strength of the terminal are returned when the terminal responds to the third request; the available space is larger than the size of a firmware package to be transmitted, the residual electric quantity is larger than a preset electric quantity threshold, the signal strength is larger than a preset strength threshold, and when the number of terminals of a cell to which the terminal belongs, which are executing firmware upgrading tasks, is smaller than the number of preset terminals, the terminal is determined to meet the data receiving condition.
That is, the device management server requests the available space, the residual power, the signal strength of the terminal and the number of terminals executing the firmware upgrading task of the cell to which the terminal belongs to the terminal, determines that the available space of the terminal is larger than the size of the firmware package to be transmitted, the residual power of the terminal is larger than a preset power threshold, the signal strength of the terminal is larger than the preset strength threshold, and when the number of terminals executing the firmware upgrading task of the cell to which the terminal belongs is smaller than the preset number of terminals, the terminal is indicated to meet the data receiving condition, namely, the number of the residual bytes of the firmware package transmitted by the device management server can be received. The preset electric quantity threshold value is the maximum electric quantity required by the terminal to receive the remaining bytes of the firmware package and execute the subsequent firmware upgrading task. The preset intensity threshold is the maximum signal intensity required by the terminal to receive the remaining bytes of the firmware package and execute the subsequent firmware upgrading task. The preset terminal number is the total terminal number of the cell to which the terminal belongs, wherein the total terminal number can execute firmware upgrading tasks.
Here, when the current upgrade status of the terminal is Downloaded, the upgrade failure cause indicates that the firmware upgrade is not started (i.e. corresponding to upgrade failure cause 0), or the firmware download fails (including two cases, i.e. memory overflow during 3 download and link disconnection during 4 download), or the firmware upgrade fails (i.e. corresponding to upgrade failure cause 8), at this time, the interrupt position is the initial position where the terminal firmware is being upgraded, and the device management server selects the interrupt point to resume transmitting the firmware upgrade instruction to the terminal, so that the terminal responds to the firmware upgrade instruction to execute the firmware upgrade. In some embodiments, the continuing to send upgrade information to the terminal based on the interrupt location includes: when the terminal meets the firmware upgrading condition, a first state switching instruction and a firmware upgrading instruction are sent to the terminal, so that the terminal responds to the first state switching instruction, and after the terminal is switched from a firmware downloading completion state to a firmware upgrading state, firmware upgrading is executed in response to the firmware upgrading instruction.
Because the firmware upgrade instruction can be executed only when the current upgrade state of the terminal is upgrade, and the current upgrade state of the terminal is Downloaded at this time, the device management server needs to send a first state switching instruction and a firmware upgrade instruction to the terminal, so that the terminal responds to the first state switching instruction, switches from Downloaded to upgrade, and then responds to the firmware upgrade instruction to execute firmware upgrade.
Here, when the current upgrade status of the terminal is update, the reason of the upgrade failure indicates that the firmware upgrade is not started (i.e. corresponding to the reason 0 of upgrade failure), or the firmware download fails (including two cases, i.e. memory overflow in the 3 download process and link disconnection in the 4 download process), or the firmware upgrade fails (i.e. corresponding to the reason 8 of upgrade failure), at this time, the interrupt position is the initial position where the terminal firmware is being upgraded, and the device management server selects the breakpoint continuous transmission to continue sending the firmware upgrade instruction to the terminal, so that the terminal responds to the firmware upgrade instruction to execute the firmware upgrade. In some embodiments, the continuing to send upgrade information to the terminal based on the interrupt location includes: and when the terminal is determined to meet the firmware upgrading condition, sending a firmware upgrading instruction to the terminal, so that the terminal responds to the firmware upgrading instruction to execute firmware upgrading.
Because the current upgrade state of the terminal is update, the device management server directly sends a firmware upgrade instruction to the terminal, so that the terminal responds to the firmware upgrade instruction to execute firmware upgrade.
In some embodiments, the determining that the terminal satisfies the firmware upgrade condition includes: sending a fourth request to the terminal; receiving the residual electric quantity of the terminal returned when the terminal responds to the fourth request; and when the residual electric quantity of the terminal is larger than a preset electric quantity threshold value, determining that the terminal meets the firmware upgrading condition.
The preset electric quantity threshold value is the maximum electric quantity required by the terminal to execute the first switching instruction and the firmware upgrading instruction or the firmware upgrading instruction.
In the embodiment of the application, when the equipment management server selects to select the terminal to reset according to the current upgrading state of the terminal and the reason of upgrading failure, the reason of upgrading failure may be that the firmware upgrading is successful, and the terminal is reset to the initial state (i.e. Idle state Idle) at this time, or that the terminal memory is insufficient, and the terminal cannot execute the firmware upgrading at the current moment, so that the terminal is reset to the initial state (i.e. Idle state Idle) and other reasons may be possible. In practical application, the device management server sends a reset instruction to the terminal, so that the terminal is reset to an initial state.
In some embodiments, when the current upgrade status of the terminal is Downloading, the upgrade failure cause indicates that the firmware upgrade is successful (i.e. corresponding to upgrade failure cause 1), or the memory space of the terminal is insufficient (i.e. corresponding to upgrade failure cause 2), or the integrity check of the firmware package fails (i.e. corresponding to upgrade failure cause 5), or the firmware upgrade fails (i.e. corresponding to upgrade failure cause 8), a reset instruction is sent to the terminal, so that the current upgrade status of the terminal is switched from Downloading to Idle, the upgrade failure cause is reset to the initial status 0, and the number of bytes of the downloaded firmware package is erased.
In some embodiments, when the current upgrade status of the terminal is Downloaded, the upgrade failure cause indicates that the firmware upgrade is successful (i.e. corresponding to upgrade failure cause 1), or the memory space of the terminal is insufficient (i.e. corresponding to upgrade failure cause 2), or the integrity check of the firmware package fails (i.e. corresponding to upgrade failure cause 5), a reset instruction is sent to the terminal, so that the current upgrade status of the terminal is switched from Downloaded to Idle, the upgrade failure cause is reset to the initial status 0, and the number of bytes of the Downloaded firmware package is erased.
In some embodiments, when the current upgrade status of the terminal is update, the reason for the upgrade failure indicates that the firmware upgrade was successful (i.e. corresponding to upgrade failure reason 1), or the integrity check of the firmware package fails (i.e. corresponding to upgrade failure reason 5), a reset instruction is sent to the terminal, so that the current upgrade status of the terminal is switched from update to Idle, the reason for the upgrade failure is reset to initial status 0, and the number of bytes of the downloaded firmware package is erased.
When the equipment management server selects and selects the identification terminal to fail to upgrade according to the current upgrade state and upgrade failure reason of the terminal, the equipment management server indicates that the upgrade failure reason is the problem that the equipment management server cannot solve, at the moment, the equipment management server identifies the terminal to fail to upgrade, retries is not needed, and the firmware upgrade failure reason can be displayed through the display unit.
In some embodiments, when the current upgrade status of the terminal is Downloading, the upgrade failure cause indicates that the firmware package type is not supported (i.e., corresponding to upgrade failure cause 6), or the network address is invalid (i.e., corresponding to upgrade failure cause 7), or the upgrade protocol is not supported (i.e., corresponding to upgrade failure cause 9), the device management server chooses to identify that the terminal upgrade failed.
In some embodiments, when the current upgrade status of the terminal is Downloaded, the upgrade failure cause indicates that the firmware package type is not supported (i.e., corresponding to upgrade failure cause 6), or the network address is invalid (i.e., corresponding to upgrade failure cause 7), or the upgrade protocol is not supported (i.e., corresponding to upgrade failure cause 9), the device management server chooses to identify that the terminal upgrade failed.
In some embodiments, when the current upgrade status of the terminal is update, the upgrade failure cause indicates that the firmware package type is not supported (i.e., corresponding to upgrade failure cause 6), or the network address is invalid (i.e., corresponding to upgrade failure cause 7), or the upgrade protocol is not supported (i.e., corresponding to upgrade failure cause 9), the device management server selects to identify that the terminal upgrade failed.
In the embodiment of the application, when the current upgrade state of the terminal is Idle, and the upgrade failure reason indicates that the upgrade process is not entered, the terminal is indicated to execute the firmware upgrade for the first time, and a new upgrade process is started at the moment. In some embodiments, the method further comprises: and determining that the terminal meets the data receiving condition, and transmitting the firmware package to the terminal in blocks according to a preset block transmission strategy when the acquired number of bytes of the downloaded firmware of the terminal is zero, so that the terminal downloads the complete firmware package to execute firmware upgrading.
Specifically, the device management server requests available space, residual electric quantity, signal intensity of the terminal and the number of terminals executing firmware upgrading tasks of a cell to which the terminal belongs to the terminal, determines that the available space of the terminal is larger than the size of a firmware package to be transmitted, the residual electric quantity of the terminal is larger than a preset electric quantity threshold, the signal intensity of the terminal is larger than the preset intensity threshold, and the number of terminals executing firmware upgrading tasks of the cell to which the terminal belongs is smaller than the preset number of terminals, and indicates that the terminal meets the data receiving condition. On the basis, if the acquired number of bytes of the downloaded firmware of the terminal is zero, the equipment management server transmits the firmware package to the terminal in blocks according to a preset block transmission strategy, so that the terminal downloads the complete firmware package to execute firmware upgrading. The firmware package block transmission mode can more flexibly push data of the firmware package and improve the firmware upgrading efficiency.
In some embodiments, before the firmware packet is transmitted to the terminal in blocks according to a preset block transmission policy, the method further includes: sending a second state switching instruction to the terminal; the first state switching instruction is used for indicating to switch from an idle state to a firmware downloading state; and receiving state switching success information returned by the terminal when responding to the second state switching instruction, and transmitting the firmware packet to the terminal in blocks according to the preset block transmission strategy.
The device management server needs to send a second state switching instruction to the terminal, so that the terminal responds to the second state switching instruction, generates a state switching success instruction after switching from Idle to Downloading, and transmits the firmware package to the terminal according to a preset block transmission strategy after receiving the state switching success information sent by the terminal, so that the terminal downloads the complete firmware package to execute firmware upgrading.
By adopting the technical scheme, after the equipment management server determines that the terminal firmware fails to upgrade, when the breakpoint is selected for continuous transmission according to the current upgrade state and upgrade failure reason of the terminal acquired from the terminal side, namely, the equipment management server continues to retry the upgrade task from the upgrade interrupt position, thereby avoiding repeated new upgrade tasks and saving network resources. For example, the current upgrade status of the terminal is a firmware download status, the reason for the upgrade failure is that the firmware download fails, and the device management server will continue to transmit the remaining firmware package to the terminal immediately after the last firmware download failure node, without newly creating an upgrade task.
Based on the foregoing embodiments, an example of a terminal firmware upgrading method is provided in the embodiments of the present application, and fig. 2 is a schematic diagram of a second flow of the terminal firmware upgrading method in the embodiments of the present application, where the terminal firmware upgrading method is applied to a device management server side. Here, the firmware upgrade method is exemplified by a case where the device management server continues to select the breakpoint resume after the terminal firmware upgrade fails, and a case where the terminal performs the firmware upgrade for the first time, and thus, the reason for the firmware upgrade failure is not shown in the following flowchart.
As shown in fig. 2, the method for upgrading terminal firmware specifically includes:
step 201: receiving uplink data sent by a terminal; the uplink data comprises a terminal identifier and a cell identifier to which the terminal belongs.
Step 202: determining whether the terminal has a firmware upgrading task according to the terminal identification; if yes, go to step 203; if not, go to step 215.
Step 203: determining whether the number of terminals of a cell downloading a firmware package is larger than the preset number of terminals according to the cell identifier of the terminal; if not, go to step 204; if yes, go to step 215.
Step 204: and reading the terminal resource attribute value.
Step 205: determining whether the terminal firmware upgrade type is differential packet upgrade; if yes, go to step 206; if not, go to step 207.
Step 206: whether the first firmware version number of the terminal is consistent with the initial version number of the differential packet; if not, go to step 207; if yes, go to step 215.
Step 207: whether the first firmware version number of the terminal is consistent with the target version number of the firmware package; if yes, go to step 208; if not, go to step 209.
The firmware packet target version number is the differential packet target version number or the second firmware version number of the complete packet.
Step 208: the firmware upgrade was successful.
Step 209: whether the retry number of the terminal firmware upgrade failure is larger than the preset retry number or within the preset duration of the terminal firmware upgrade failure time point; if not, go to step 210; if yes, go to step 215.
Step 210: and reading the current upgrading state of the terminal.
Step 211: when the current upgrading state of the terminal is Idle, determining that the terminal meets the data receiving condition according to the terminal resource attribute values (the available space of the terminal, the residual electric quantity, the signal strength and the number of terminals executing firmware upgrading tasks in a cell to which the terminal belongs) obtained in the step 204, and sending a second state switching instruction to the terminal; and when receiving state switching success information generated after Idle switching to Downloading returned by the terminal, transmitting the firmware packet to the terminal in blocks according to a preset block transmission strategy.
Step 212: when the current upgrading state of the terminal is Downloading, reading the byte number of the downloaded firmware package of the terminal; and when the terminal meets the data receiving condition according to the terminal resource attribute values (the available space of the terminal, the residual electric quantity, the signal intensity and the number of terminals which are executing firmware upgrading tasks of the cell to which the terminal belongs) obtained in the step 204, continuously transmitting the residual byte number to the terminal according to the downloaded firmware package byte number.
Step 213: when the current upgrade state of the terminal is Downloaded, and the terminal meets the firmware upgrade condition according to the terminal resource attribute value (the residual electric quantity of the terminal) acquired in the step 204, a first state switching instruction and a firmware upgrade instruction are sent to the terminal, so that the terminal responds to the first state switching instruction, switches from Downloaded to upgrade, and then responds to the firmware upgrade instruction to execute firmware upgrade.
Step 214: when the current upgrade state of the terminal is update, and the terminal meets the firmware upgrade condition according to the terminal resource attribute value (the terminal residual electric quantity) acquired in the step 204, a firmware upgrade instruction is sent to the terminal, so that the terminal responds to the firmware upgrade instruction to execute firmware upgrade.
Step 215: and (5) terminating.
The embodiment of the application also provides a terminal firmware upgrading method, and fig. 3 is a third flow diagram of the terminal firmware upgrading method in the embodiment of the application, wherein the terminal firmware upgrading method is applied to a terminal side.
As shown in fig. 3, the method for upgrading terminal firmware specifically includes:
step 301: receiving a first request sent by a device management server;
step 302: responding to the first request, and sending the current upgrading state and the upgrading failure reason of the terminal to the equipment management server, so that the equipment management server determines the interrupt position when selecting breakpoint continuous transmission according to the current upgrading state and the upgrading failure reason of the terminal;
step 303: receiving upgrade information which is continuously sent by the equipment management server based on the interrupt position;
step 304: and continuing to execute firmware upgrade from the interrupt position based on the upgrade information.
When the current upgrade status of the terminal is Downloading, the reason of the upgrade failure indicates that the firmware download is not started (i.e. corresponding to upgrade failure reason 0) or the firmware download fails (including two cases, namely, memory overflow in the 3 download process and link disconnection in the 4 download process), the device management server needs to select a breakpoint to resume transmission immediately after the last firmware download failure node, and correspondingly, the terminal needs to continue the firmware package download immediately after the last firmware download failure node, and in some embodiments, the method further includes: receiving a second request sent by the equipment management server; and responding to the second request, and sending the number of bytes of the downloaded firmware to the device management server.
That is, the terminal receives the second request sent by the device management server, and responds to the second request to obtain the number of bytes of the downloaded firmware and inform the device management server, so that the device management server continuously transmits the remaining number of bytes according to the number of bytes of the downloaded firmware, and the terminal downloads the complete firmware package to execute firmware upgrading.
Before the device management server transmits the remaining bytes of the firmware packet to the terminal, it will first determine whether the terminal satisfies the data receiving condition, and only when the terminal is determined to satisfy the data receiving condition, it will transmit the remaining bytes of the firmware packet to the terminal, so that terminal attribute information for determining whether the terminal satisfies the data receiving condition needs to be requested to the terminal before. In some embodiments, a third request sent by the device management server is received; transmitting the terminal attribute information to the equipment management server in response to the third request, so that the equipment management server judges whether the terminal meets a data receiving condition based on the terminal attribute information; the terminal attribute information at least comprises available space, residual electric quantity, signal strength and the number of terminals which are executing firmware upgrading tasks in a cell to which the terminal belongs; receiving the residual byte number continuously transmitted by the equipment management server according to the downloaded firmware byte number; and the remaining byte number is the byte number which is continuously transmitted when the equipment management server determines that the terminal meets the data receiving condition.
When the current upgrade state of the terminal is Downloaded, the upgrade failure cause indicates that the firmware upgrade is not started (corresponding to upgrade failure cause 0) or the firmware download fails (including two cases, namely, memory overflow in the 3 download process and link disconnection in the 4 download process) or the firmware upgrade fails (corresponding to upgrade failure cause 8), the interrupt position is the initial position of the terminal firmware being upgraded, at this time, the terminal will again receive the firmware upgrade instruction sent by the device management server, and the terminal responds to the firmware upgrade instruction to execute the firmware upgrade. In some embodiments, the receiving upgrade information that the device management server continues to send based on the interrupt location includes: receiving a fourth request sent by the equipment management server; transmitting the residual electric quantity of the terminal to the equipment management server in response to the fourth request, so that the equipment management server determines that the terminal meets a firmware upgrading condition based on the residual electric quantity; receiving a first state switching instruction and a firmware upgrading instruction sent by the equipment management server; the first state switching instruction and the firmware upgrading instruction are instructions sent when the equipment management server determines that the terminal meets the firmware upgrading condition; and responding to the first state switching instruction, and executing firmware upgrading in response to the firmware upgrading instruction after switching from the firmware downloading completion state to the firmware upgrading state.
The terminal can execute the firmware upgrading instruction when the current upgrading state of the terminal is upgrading, and the current upgrading state of the terminal is Downloaded at the moment, so the terminal needs to receive a first state switching instruction and a firmware upgrading instruction sent by the equipment management server, responds to the first state switching instruction, switches from the Downloaded state to the upgrading state, and then responds to the firmware upgrading instruction to execute the firmware upgrading. Here, in order to avoid failure of the terminal in response to the first state switching instruction and the firmware upgrading instruction due to insufficient electric quantity, before the device management server sends the first state switching instruction and the firmware upgrading instruction to the terminal, it needs to check whether the residual electric quantity of the terminal meets a preset electric quantity threshold value, and if so, the terminal only receives the first state switching instruction and the firmware upgrading instruction sent by the device management server.
When the current upgrade state of the terminal is upgrade, the upgrade failure cause indicates that the firmware upgrade is not started (corresponding to upgrade failure cause 0) or the firmware download fails (including two cases, namely, memory overflow in the 3 download process and link disconnection in the 4 download process) or the firmware upgrade fails (corresponding to upgrade failure cause 8), the interrupt position is the initial position of the terminal firmware being upgraded, at this time, the terminal will receive the firmware upgrade instruction sent by the device management server again, and the terminal responds to the firmware upgrade instruction to execute the firmware upgrade. In some embodiments, the receiving upgrade information that the device management server continues to send based on the interrupt location includes: receiving a fourth request sent by the equipment management server; transmitting the residual electric quantity of the terminal to the equipment management server in response to the fourth request, so that the equipment management server determines that the terminal meets a firmware upgrading condition based on the residual electric quantity; receiving a firmware upgrading instruction sent by the equipment management server; the firmware upgrading instruction is an instruction sent when the equipment management server determines that the terminal meets the firmware upgrading condition; and executing firmware upgrade in response to the firmware upgrade instruction.
Because the current upgrade state of the terminal is update, the terminal does not need to adjust the state, directly receives the firmware upgrade instruction sent by the equipment management server, and responds to the firmware upgrade instruction to execute firmware upgrade. Here, in order to avoid failure of the terminal in response to the firmware upgrade instruction due to insufficient power, before the device management server sends the firmware upgrade instruction to the terminal, it needs to check whether the remaining power of the terminal meets a preset power threshold, and if so, the terminal receives the firmware upgrade instruction sent by the device management server.
In the embodiment of the application, when the equipment management server selects to select the terminal to reset according to the current upgrading state of the terminal and the reason of upgrading failure, the reason of upgrading failure may be that the terminal is reset to the initial state (i.e. Idle state Idle) at the moment because the firmware upgrading is successful, or that the terminal cannot execute the firmware upgrading at the current moment because the memory of the terminal is insufficient, so that the terminal is reset to the initial state (i.e. Idle state Idle), or other reasons are possible. In practical application, the terminal receives a reset instruction sent by the equipment management server, responds to the reset instruction, and resets to an initial state.
In some embodiments, when the current upgrade status of the terminal is Downloading, the upgrade failure cause indicates that the firmware upgrade is successful (i.e. corresponding to upgrade failure cause 1), or the memory space of the terminal is insufficient (i.e. corresponding to upgrade failure cause 2), or the integrity check of the firmware package fails (i.e. corresponding to upgrade failure cause 5), or the firmware upgrade fails (i.e. corresponding to upgrade failure cause 8), the terminal receives a reset instruction sent by the device manager, responds to the reset instruction, the current upgrade status of the terminal is switched from Downloading to Idle, the upgrade failure cause is reset to the initial status 0, and the number of bytes of the downloaded firmware package is erased.
In some embodiments, when the current upgrade status of the terminal is Downloaded, the upgrade failure cause indicates that the firmware upgrade is successful (i.e. corresponding to upgrade failure cause 1), or the memory space of the terminal is insufficient (i.e. corresponding to upgrade failure cause 2), or the integrity check of the firmware package fails (i.e. corresponding to upgrade failure cause 5), the terminal receives a reset instruction sent by the device manager, responds to the reset instruction, the current upgrade status of the terminal is switched from Downloaded to Idle, the upgrade failure cause is reset to initial state 0, and the number of bytes of the Downloaded firmware package is erased.
In some embodiments, when the current upgrade status of the terminal is update, the reason for the upgrade failure indicates that the firmware upgrade was successful (i.e. corresponding to upgrade failure reason 1), or the integrity check of the firmware package fails (i.e. corresponding to upgrade failure reason 5), the terminal receives a reset instruction sent by the device manager, responds to the reset instruction, switches the current upgrade status of the terminal from update to Idle, resets the upgrade failure reason to initial status 0, and erases the number of bytes of the downloaded firmware package.
In the embodiment of the application, when the current upgrade state of the terminal is Idle, and the upgrade failure reason indicates that the upgrade process is not entered, the terminal is indicated to execute the firmware upgrade for the first time, and a new upgrade process is started at the moment. In some embodiments, the method further comprises: receiving a firmware packet transmitted by the equipment management server in a blocking mode according to a preset blocking transmission strategy; downloading the complete firmware package performs the firmware upgrade.
The firmware package block transmission mode can more flexibly push data of the firmware package and improve the firmware upgrading efficiency.
In some embodiments, the receiving the firmware packet transmitted by the device management server according to the preset block transmission policy includes: receiving a second state switching instruction sent by the equipment management server; responding to the second state switching instruction, switching the idle state to a firmware downloading state, and sending successful state switching information to the equipment management server; and receiving the firmware packet transmitted by the equipment management server in a blocking mode according to a preset blocking transmission strategy.
The terminal can download the firmware package when the current upgrade state of the terminal is Downloading, and the current upgrade state of the terminal is Idle at the moment, so the terminal needs to receive a second state switching instruction sent by the equipment management server, the terminal responds to the second state switching instruction, generates a state switching success instruction after switching from Idle to Downloading, and after receiving the state switching success information sent by the terminal, the equipment management server transmits the firmware package to the terminal in blocks according to a preset block transmission strategy, and the terminal downloads the complete firmware package to execute firmware upgrade.
By adopting the technical scheme, the terminal sends the current upgrade state and upgrade failure reason of the terminal to the equipment management server, when the equipment management server selects the breakpoint continuous transmission according to the current upgrade state and upgrade failure reason of the terminal, the terminal continues to retry the upgrade task, receives the upgrade information which is continuously sent by the equipment management server according to the interrupt position, and the terminal continues to execute firmware upgrade from the interrupt position based on the upgrade information, so that the firmware upgrade efficiency is improved, and meanwhile, the network resources are saved.
Based on the above embodiments, the embodiments of the present application provide an interaction timing diagram between a terminal and an equipment management server, when the current upgrade status of the terminal is Idle, and when the upgrade failure cause indicates that the upgrade process is not entered, a new upgrade process (corresponding to claim 12) is started, fig. 4 is a first interaction timing diagram between the terminal and the equipment management server in the embodiments of the present application, as shown in fig. 4, specifically,
step 1: the device management server reads the attribute values of the resources of the terminal/3/0 and/4/0, and the data format of the read data is TLV format.
Step 2: the terminal sends the available space, the residual electric quantity, the signal intensity, the byte number of the downloaded firmware package and the terminal number of the firmware package being downloaded by the cell to which the terminal belongs to the equipment management server.
The terminal/3/0 resources include/3/0/10 of the terminal available space,/3/0/26230 of the terminal remaining power, and/3/0/26500 of the number of bytes of the downloaded firmware package. The terminal/4/0 resource includes/4/0/2 terminal signal strength,/4/0/8 terminal number of terminals in downloading the firmware package in the cell to which the terminal belongs.
Step 3: and (4) the equipment management server determines whether the terminal meets the data receiving condition according to the available space of the terminal, the residual electric quantity, the signal strength and the number of terminals of the firmware package being downloaded by the cell to which the terminal belongs, and when the number of bytes of the downloaded firmware package is zero, the step (4) is executed.
Step 4: the device management server sends/5/0/26501 to the terminal and sets the timeout period of the terminal task occupied cell to 30s.
By setting the timeout time, the problem that the cell resources are occupied for a long time due to abnormality in the upgrading process of the terminal is avoided.
Step 5: the terminal response/5/0/26501 is used for switching the current upgrade state of the terminal from Idle to Downloading.
Step 6: and the terminal sends the successful state switching information to the equipment management server.
Step 7: the device management server writes the firmware package into/5/0/0 resource, transmits the firmware package to the terminal in blocks, the data format is AQUE format, and sets the timeout time 600s of the terminal task occupying the cell.
Step 8: the terminal receives the/5/0/26501 sent by the device management server again, and is used for switching the current upgrade state of the terminal from Downloading to Downloading.
Step 9: and the terminal sends the firmware package downloading completion information to the equipment management server.
Step 10: the device management server reads the residual power of the terminal/3/0/26230, and the data format is TLV format.
Step 11: the terminal obtains the residual electric quantity and sends the residual electric quantity to the equipment management server.
Step 12: the device management server determines whether the remaining power of the terminal is less than a preset power threshold, and if so, step 13 is executed.
Step 13: the device management server sends/5/0/2 and/5/0/26501 to the terminal and sets the timeout period of the terminal task occupied cell to 60s.
And/5/0/2 is firmware upgrade instruction, and/5/0/26501 is used for indicating that the current upgrade state of the terminal is switched from Downloaded to upgrade.
Step 14: the terminal responds/5/0/26501 to switch the current upgrade state of the terminal from Downloaded to update.
Step 15: the terminal sends the received/5/0/2 firmware upgrade instruction information to the device management server.
Step 16: the terminal responds to/5/0/2 firmware upgrade instructions to perform firmware upgrade.
Step 17: the device management server waits until the terminal next sends uplink data to continue the terminal firmware upgrading flow.
When the current upgrade status of the terminal is Downloading, fig. 5 is a second interaction timing diagram between the terminal and the device management server in the embodiment of the present application, as shown in fig. 5, specifically,
when the upgrade failure cause result= 0||result= 3|result= 4, the device management server selects the breakpoint resume. (corresponding claims 2 to 4) the following steps 1 to 17 are specifically performed.
Step 1: the device management server reads the attribute values of the resources of the terminal/3/0 and/4/0, and the data format of the read data is TLV format.
Step 2: and the terminal sends the available space, the residual electric quantity, the signal intensity and the terminal quantity of the firmware package being downloaded by the cell to which the terminal belongs to the equipment management server.
The terminal/3/0 resource includes/3/0/10 terminal available space,/3/0/26160 terminal remaining power. The terminal/4/0 resource includes/4/0/2 terminal signal strength,/4/0/8 terminal number of terminals in downloading the firmware package in the cell to which the terminal belongs.
Step 3: and the equipment management server determines whether the terminal meets the data receiving condition according to the available space of the terminal, the residual electric quantity, the signal strength and the number of terminals of the firmware package being downloaded by the cell to which the terminal belongs, and executes the step 4.
Step 4: the device management server sends/5/0/26501 to the terminal and sets the timeout period of the terminal task occupied cell to 30s.
By setting the timeout time, the problem that the cell resources are occupied for a long time due to abnormality in the upgrading process of the terminal is avoided.
Step 5: the terminal response/5/0/26501 is used for switching the current upgrade state of the terminal from Idle to Downloading.
Step 6: and the terminal sends the successful state switching information to the equipment management server.
Step 7: the device management server writes the firmware package into/5/0/0 resource, transmits the firmware package to the terminal in blocks, the data format is AQUE format, and sets the timeout time 600s of the terminal task occupying the cell.
Step 8: the terminal receives the/5/0/26501 sent by the device management server again, and is used for switching the current upgrade state of the terminal from Downloading to Downloading.
Step 9: and the terminal sends the firmware package downloading completion information to the equipment management server.
Step 10: the device management server reads the residual power of the terminal/3/0/26230, and the data format is TLV format.
Step 11: the terminal obtains the residual electric quantity and sends the residual electric quantity to the equipment management server.
Step 12: the device management server determines whether the remaining power of the terminal is less than a preset power threshold, and if so, step 13 is executed.
Step 13: the device management server sends/5/0/2 and/5/0/26501 to the terminal and sets the timeout period of the terminal task occupied cell to 60s.
And/5/0/2 is firmware upgrade instruction, and/5/0/26501 is used for indicating that the current upgrade state of the terminal is switched from Downloaded to upgrade.
Step 14: the terminal response/5/0/26501 is used for switching the current upgrade state of the terminal from Downloaded to update.
Step 15: the terminal sends the received/5/0/2 firmware upgrade instruction information to the device management server.
Step 16: the terminal responds to/5/0/2 firmware upgrade instructions to perform firmware upgrade.
Step 17: the device management server waits until the terminal next sends uplink data to continue the terminal firmware upgrading flow.
When the upgrade failure cause result= 1||result= 2|result= 5|result= 8, the device management server selects the terminal reset. Specifically, the following steps 1 to 4 are performed.
Step 1: the device management server assigns a value of/5/0/0 to null and sends the null to the terminal.
Step 2: the terminal responds to/5/0/0, resets the current upgrade state of the terminal to Idle, resets the reason of upgrade failure to an initial state, and erases the byte number of the downloaded firmware package.
Step 3: and the terminal sends the terminal reset success information to the equipment management server.
Step 4: the device management server waits until the terminal next sends uplink data to continue the terminal firmware upgrading flow.
When the upgrade failure cause result= 6||result= 7|result= 9, the device management server selects to identify that the terminal firmware upgrade fails. Specifically, the following step 1 is performed.
Step 1: the device management server identifies that the terminal firmware upgrade failed and does not retry.
When the current upgrade status of the terminal is Downloaded, fig. 6 is a third interaction timing diagram between the terminal and the device management server according to an embodiment of the present application, as shown in fig. 6, specifically,
when the upgrade failure cause result= 0||result= 3|result= 4|result= 8, the device management server selects breakpoint continuous transmission, i.e. continues the upgrade flow. (corresponding to claim 5) the following steps 1 to 6 are specifically performed.
Step 1: and (2) the equipment management server reads the residual electric quantity of the terminal, and executes the step (2) when the residual electric quantity is determined to be larger than a preset electric quantity threshold value.
Step 2: the device management server sends/5/0/2 and/5/0/26501 to the terminal and sets the timeout period of the terminal task occupied cell to 60s.
And/5/0/2 is firmware upgrade instruction, and/5/0/26501 is used for indicating that the current upgrade state of the terminal is switched from Downloaded to upgrade.
Step 3: the terminal response/5/0/26501 is used for switching the current upgrade state of the terminal from Downloaded to update.
Step 4: the terminal sends the received/5/0/2 firmware upgrade instruction information to the device management server.
Step 5: the terminal responds to/5/0/2 firmware upgrade instructions to perform firmware upgrade.
Step 6: the device management server waits until the terminal next sends uplink data to continue the terminal firmware upgrading flow.
When the upgrade failure cause result= 1||result= 2|result= 5, the device management server selects the terminal reset. Specifically, the following steps 1 to 4 are performed.
Step 1: the device management server assigns a value of/5/0/0 to null and sends the null to the terminal.
Step 2: the terminal responds to/5/0/0, resets the current upgrade state of the terminal to Idle, resets the reason of upgrade failure to Initial state, and erases the byte number of the downloaded firmware package.
Step 3: and the terminal sends the terminal reset success information to the equipment management server.
Step 4: the device management server waits until the terminal next sends uplink data to continue the terminal firmware upgrading flow.
When the upgrade failure cause result= 6||result= 7|result= 9, the device management server selects to identify that the terminal firmware upgrade fails. Specifically, the following step 1 is performed.
Step 1: the device management server identifies that the terminal firmware upgrade failed and does not retry.
Fig. 7 is a fourth interaction timing diagram between the terminal and the device management server in the embodiment of the present application when the current upgrade status of the terminal is update, as shown in fig. 7, specifically,
when the upgrade failure cause result= 0||result= 2|result= 3||result= 4|result= 8, the device management server selects breakpoint continuous transmission, i.e. continues the upgrade flow. (corresponding to claim 6) the following steps 1 to 8 are specifically performed.
Step 1: the device management server reads the residual power of the terminal/3/0/26230, and the data format is TLV format.
Step 2: the terminal obtains the residual electric quantity and sends the residual electric quantity to the equipment management server.
Step 3: and (4) the equipment management server determines whether the residual electric quantity of the terminal is smaller than a preset electric quantity threshold value, and if so, the step (4) is executed.
Step 4: the device management server sends/5/0/2 and/5/0/26501 to the terminal and sets the timeout period of the terminal task occupied cell to 60s.
And/5/0/2 is firmware upgrade instruction, and/5/0/26501 is used for indicating that the current upgrade state of the terminal is switched from Downloaded to upgrade.
Step 5: the terminal response/5/0/26501 is used for switching the current upgrade state of the terminal from Downloaded to update.
Step 6: the terminal sends the received/5/0/2 firmware upgrade instruction information to the device management server.
Step 7: the terminal responds to/5/0/2 firmware upgrade instructions to perform firmware upgrade.
Step 8: the device management server waits until the terminal next sends uplink data to continue the terminal firmware upgrading flow.
When the upgrade failure cause result= 1||result= 5, the device management server selects terminal reset. Specifically, the following steps 1 to 4 are performed.
Step 1: the device management server assigns a value of/5/0/0 to null and sends the null to the terminal.
Step 2: the terminal responds to/5/0/0, resets the current upgrade state of the terminal to Idle, resets the reason of upgrade failure to Initial state, and erases the byte number of the downloaded firmware package.
Step 3: and the terminal sends the terminal reset success information to the equipment management server.
Step 4: the device management server waits until the terminal next sends uplink data to continue the terminal firmware upgrading flow.
When the upgrade failure cause result= 6||result= 7|result= 9, the device management server selects to identify that the terminal firmware upgrade fails. Specifically, the following step 1 is performed.
Step 1: the device management server identifies that the terminal firmware upgrade failed and does not retry.
In order to implement the method of the embodiment of the present application, based on the same inventive concept, the embodiment of the present application further provides a terminal firmware upgrading device, fig. 8 is a schematic diagram of a first composition structure of the terminal firmware upgrading device in the embodiment of the present application, as shown in fig. 8, the terminal firmware upgrading device 80 is applied to a device management server, where the terminal firmware upgrading device 80 may specifically include:
A first sending unit 801, configured to send a first request to the terminal when determining that the firmware upgrade of the terminal fails;
a first receiving unit 802, configured to receive a current upgrade status and an upgrade failure reason of the terminal returned when the terminal responds to the first request;
a determining unit 803, configured to determine an interruption position when selecting breakpoint transmission according to a current upgrade status of the terminal and the upgrade failure reason;
the first sending unit 801 is further configured to continue sending upgrade information to the terminal based on the interrupt location, so that the terminal continues to perform firmware upgrade from the interrupt location.
By adopting the technical scheme, after the equipment management server determines that the terminal firmware fails to upgrade, when the breakpoint is selected for continuous transmission according to the current upgrade state and upgrade failure reason of the terminal acquired from the terminal side, namely, the equipment management server continues to retry the upgrade task from the upgrade interrupt position, thereby avoiding repeated new upgrade tasks and saving network resources. For example, the current upgrade status of the terminal is a firmware download status, the reason for the upgrade failure is that the firmware download fails, and the device management server will continue to transmit the remaining firmware package to the terminal immediately after the last firmware download failure node, without newly creating an upgrade task.
In some embodiments, the current upgrade status of the terminal is a firmware download status, and when the reason for the upgrade failure indicates that the firmware download is not started or the firmware download fails, the determining unit 803 is specifically configured to send a second request to the terminal; receiving the number of bytes of the downloaded firmware returned by the terminal when responding to the second request; and taking the last byte position of the downloaded firmware byte as the interrupt position.
In some embodiments, the first sending unit 801 is specifically configured to continuously transfer the remaining number of bytes to the terminal according to the downloaded firmware number of bytes when the terminal meets the data receiving condition, so that the terminal continues to download the remaining number of bytes from the byte position of the last byte in the downloaded firmware bytes.
In some embodiments, the first sending unit 801 is specifically further configured to send a third request to the terminal; returning terminal attribute information when the terminal responds to the third request; the terminal attribute information at least comprises available space, residual electric quantity, signal strength and the number of terminals which are executing firmware upgrading tasks in a cell to which the terminal belongs; the available space is larger than the size of a firmware package to be transmitted, the residual electric quantity is larger than a preset electric quantity threshold, the signal strength is larger than a preset strength threshold, and when the number of terminals of a cell to which the terminal belongs, which are executing firmware upgrading tasks, is smaller than the number of preset terminals, the terminal is determined to meet the data receiving condition.
In some embodiments, the current upgrade status of the terminal is a firmware download complete status, and when the upgrade failure cause indicates that the firmware upgrade is not started or the firmware download fails or the firmware upgrade fails, the interrupt position is an initial position where the terminal firmware is being upgraded; the first sending unit 801 is specifically further configured to send a first state switching instruction and a firmware upgrading instruction to the terminal when it is determined that the terminal meets a firmware upgrading condition, so that the terminal responds to the first state switching instruction, switches from a firmware downloading completion state to a firmware upgrading state, and then responds to the firmware upgrading instruction to execute firmware upgrading.
In some embodiments, the current upgrade status of the terminal is a firmware upgrade status, and when the upgrade failure cause indicates that the firmware upgrade is not started or the firmware package download fails or the firmware upgrade fails, the interrupt position is an initial position where the terminal firmware is being upgraded; the first sending unit 801 is specifically further configured to send a firmware upgrade instruction to the terminal when determining that the terminal meets a firmware upgrade condition, so that the terminal executes firmware upgrade in response to the firmware upgrade instruction.
In some embodiments, the first sending unit 801 is specifically further configured to send a fourth request to the terminal; receiving the residual electric quantity of the terminal returned when the terminal responds to the fourth request; and when the residual electric quantity of the terminal is larger than a preset electric quantity threshold value, determining that the terminal meets the firmware upgrading condition.
In some embodiments, the first sending unit 801 is specifically further configured to send a reset instruction to the terminal when the terminal is selected to be reset according to the current upgrade status of the terminal and the reason for failure in upgrade, so that the terminal is reset to the initial status.
In some embodiments, the current upgrade status of the terminal is a firmware download status, and the reason for the upgrade failure indicates that the firmware upgrade is successful, or the memory space of the terminal is insufficient, or the integrity check of the firmware package fails, or when the firmware upgrade fails, the terminal is selected to be reset; or the current upgrade state of the terminal is a firmware download completion state, the upgrade failure reason indicates that the firmware upgrade is successful, or the memory space of the terminal is insufficient, or the integrity check of the firmware package fails, the terminal is selected to reset; or the current upgrade state of the terminal is a firmware upgrade state, and when the upgrade failure reason indicates that the firmware upgrade is successful or the integrity check of the firmware package fails, the terminal is selected to be reset.
In some embodiments, the first sending unit 801 is specifically further configured to identify that the firmware upgrade of the terminal fails when the terminal fails to upgrade according to the current upgrade status of the terminal and the upgrade failure reason, and display the firmware upgrade failure reason through the display unit.
In some embodiments, the current upgrade status of the terminal is a firmware download status, and the reason for the upgrade failure indicates that the type of the firmware package is not supported, or the network address is invalid, or the upgrade protocol is not supported, and the terminal upgrade failure is selected and identified; or the current upgrade state of the terminal is a firmware download completion state, and the upgrade failure reason indicates that the type of the firmware package is not supported, or the network address is invalid, or the upgrade protocol is not supported, and the terminal upgrade failure is selected and identified; or the current upgrade state of the terminal is a firmware upgrade state, and the upgrade failure reason indicates that the type of the firmware package is not supported, or the network address is invalid, or the upgrade protocol is not supported, and the terminal upgrade failure is selected and identified.
In some embodiments, when the current upgrade status of the terminal is in an idle status and the upgrade failure cause indicates that the upgrade process is not entered, the first sending unit 801 is specifically further configured to determine that the terminal meets a data receiving condition, and transmit the firmware package to the terminal in blocks according to a preset block transmission policy when the number of bytes of the downloaded firmware of the terminal is zero, so that the terminal downloads the complete firmware package to execute firmware upgrade.
In some embodiments, the first sending unit 801 is specifically further configured to send a second state switching instruction to the terminal; the first state switching instruction is used for indicating to switch from an idle state to a firmware downloading state; and receiving state switching success information returned by the terminal when responding to the second state switching instruction, and transmitting the firmware packet to the terminal in blocks according to the preset block transmission strategy.
In some embodiments, the first receiving unit 802 is specifically further configured to receive uplink data sent by the terminal; wherein, the uplink data comprises a terminal identifier; when the terminal is determined to have a firmware upgrading task based on the terminal identification, a fifth request is sent to the terminal; receiving a first firmware version number of the terminal returned by the terminal when the terminal responds to the fifth request; when the firmware upgrading type of the terminal is determined to be complete package upgrading, comparing a second firmware version number of the complete package with the first firmware version number; and when the terminal firmware upgrading and the terminal firmware upgrading are inconsistent, determining that the terminal firmware upgrading fails.
In some embodiments, the first receiving unit 802 is specifically further configured to determine, when the firmware upgrade type of the terminal is a differential packet upgrade, whether the first firmware version number is consistent with the start version number of the differential packet; when the two are consistent, comparing the target version number of the differential packet with the first firmware version number; and when the terminal firmware upgrading and the terminal firmware upgrading are inconsistent, determining that the terminal firmware upgrading fails.
In some embodiments, the uplink data further includes a cell identifier to which the terminal belongs; the first sending unit 801 is specifically further configured to obtain, according to a cell identifier to which the terminal belongs, a number of terminals that the cell is downloading a firmware package; and when the number is smaller than the preset number, sending the fifth request to the terminal.
In some embodiments, the first sending unit 801 is specifically further configured to obtain the number of retries of the terminal firmware upgrade failure; when the terminal firmware upgrade failure retry times are smaller than preset retry times, sending the first request to the terminal; or acquiring a failure time point of the terminal firmware; and sending the first request to the terminal within a preset time period after the time point.
In order to implement the method of the embodiment of the present application, based on the same inventive concept, the embodiment of the present application further provides a terminal firmware upgrading device, fig. 9 is a schematic diagram of a second component structure of the terminal firmware upgrading device in the embodiment of the present application, as shown in fig. 9, a terminal firmware upgrading device 90 is applied to a terminal, where the terminal firmware upgrading device 90 specifically may include:
a second receiving unit 901, configured to receive a first request sent by a device management server;
A second sending unit 902, configured to send, in response to the first request, a current upgrade status and an upgrade failure cause of the terminal to the device management server, so that the device management server determines an interrupt position when selecting a breakpoint for continuous transmission according to the current upgrade status and the upgrade failure cause of the terminal;
the second receiving unit 901 is further configured to receive upgrade information that is continuously sent by the device management server based on the interrupt location;
an execution unit 903, configured to continue to execute firmware upgrade from the interrupt location based on the upgrade information.
By adopting the technical scheme, the terminal sends the current upgrade state and upgrade failure reason of the terminal to the equipment management server, when the equipment management server selects breakpoint continuous transmission according to the current upgrade state and upgrade failure reason of the terminal, the terminal continues to retry the upgrade task, receives upgrade information which is continuously sent by the equipment management server according to the interrupt position, and the terminal continues to execute firmware upgrade from the interrupt position based on the upgrade information, so that network resources are saved.
In some embodiments, the current upgrade status of the terminal is a firmware download status, and when the upgrade failure cause indicates that the firmware download is not started or the firmware download fails, the second receiving unit 901 is specifically configured to receive a second request sent by the device management server; and responding to the second request, and sending the number of the downloaded firmware bytes to the device management server, so that the device management server takes the last byte position of the downloaded firmware bytes as the interrupt position.
In some embodiments, the second receiving unit 901 is specifically further configured to receive a third request sent by the device management server; transmitting the terminal attribute information to the equipment management server in response to the third request, so that the equipment management server judges whether the terminal meets a data receiving condition based on the terminal attribute information; the terminal attribute information at least comprises available space, residual electric quantity, signal strength and the number of terminals which are executing firmware upgrading tasks in a cell to which the terminal belongs; receiving the residual byte number continuously transmitted by the equipment management server according to the downloaded firmware byte number; and the remaining byte number is the byte number which is continuously transmitted when the equipment management server determines that the terminal meets the data receiving condition.
In some embodiments, the current upgrade status of the terminal is a firmware download complete status, and when the upgrade failure cause indicates that the firmware upgrade is not started or the firmware download fails or the firmware upgrade fails, the interrupt position is an initial position where the terminal firmware is being upgraded; the second receiving unit 901 is specifically further configured to receive a fourth request sent by the device management server; transmitting the residual electric quantity of the terminal to the equipment management server in response to the fourth request, so that the equipment management server determines that the terminal meets a firmware upgrading condition based on the residual electric quantity; receiving a first state switching instruction and a firmware upgrading instruction sent by the equipment management server; the first state switching instruction and the firmware upgrading instruction are instructions sent when the equipment management server determines that the terminal meets the firmware upgrading condition; and responding to the first state switching instruction, and executing firmware upgrading in response to the firmware upgrading instruction after switching from the firmware downloading completion state to the firmware upgrading state.
In some embodiments, the current upgrade status of the terminal is a firmware upgrade status, and when the upgrade failure cause indicates that the firmware upgrade is not started or the firmware package download fails or the firmware upgrade fails, the interrupt position is an initial position where the terminal firmware is being upgraded; the second receiving unit 901 is specifically further configured to receive a fourth request sent by the device management server; transmitting the residual electric quantity of the terminal to the equipment management server in response to the fourth request, so that the equipment management server determines that the terminal meets a firmware upgrading condition based on the residual electric quantity; receiving a firmware upgrading instruction sent by the equipment management server; the firmware upgrading instruction is an instruction sent when the equipment management server determines that the terminal meets the firmware upgrading condition; and executing firmware upgrade in response to the firmware upgrade instruction.
In some embodiments, the second receiving unit 901 is specifically further configured to receive a reset instruction sent by the device management server; the reset instruction is an instruction sent by the equipment management server when the terminal is reset according to the current upgrading state of the terminal and the upgrading failure reason; and responding to the reset instruction, and resetting the terminal to an initial state.
In some embodiments, the current upgrade status of the terminal is a firmware download status, and the reason for the upgrade failure indicates that the firmware upgrade is successful, or that the memory space of the terminal is insufficient, or that the integrity check of the firmware package fails, or that the firmware upgrade fails; or the current upgrade state of the terminal is a firmware download completion state, and the upgrade failure reason indicates that the firmware upgrade is successful, or the memory space of the terminal is insufficient, or the integrity check of the firmware package fails; or the current upgrade state of the terminal is a firmware upgrade state, and the upgrade failure reason indicates that the firmware upgrade is successful or the integrity check of the firmware package fails.
In some embodiments, the current upgrade status of the terminal is an idle status, and when the upgrade failure cause indicates that the upgrade process is not entered, the second receiving unit 901 is specifically further configured to receive a firmware packet transmitted by the device management server in a blocking manner according to a preset blocking transmission policy; downloading the complete firmware package performs the firmware upgrade.
In some embodiments, the second receiving unit 901 is specifically further configured to receive a second state switching instruction sent by the device management server; responding to the second state switching instruction, switching the idle state to a firmware downloading state, and sending successful state switching information to the equipment management server; and receiving the firmware packet transmitted by the equipment management server in a blocking mode according to a preset blocking transmission strategy.
The embodiment of the present application further provides another device management server, fig. 10 is a schematic diagram of a composition structure of the device management server according to the embodiment of the present application, and as shown in fig. 10, the device management server 100 includes: a processor 1001 and a memory 1002 configured to store a computer program capable of running on the processor;
wherein the processor 1001 is configured to execute the method steps in the aforementioned embodiments when running a computer program.
Of course, in actual practice, the components of the device management server would be coupled together by a bus system 1003, as shown in FIG. 10. It is appreciated that the bus system 1003 is used to implement connective communication between these components. The bus system 1003 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration, the various buses are labeled as bus system 1003 in fig. 10.
The embodiment of the present application further provides another terminal, fig. 11 is a schematic structural diagram of a terminal according to the embodiment of the present application, and as shown in fig. 11, the terminal 110 includes: a processor 1101 and a memory 1102 configured to store a computer program capable of running on the processor;
wherein the processor 1101 is configured to execute the method steps of the previous embodiments when running a computer program.
Of course, in actual practice, the various components in the terminal are coupled together by a bus system 1103, as shown in FIG. 11. It is appreciated that the bus system 1103 serves to facilitate connected communications between these components. The bus system 1103 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration, the various buses are labeled as bus system 1103 in fig. 11.
In practical applications, the processor may be at least one of an application specific integrated circuit (ASIC, application Specific Integrated Circuit), a digital signal processing device (DSPD, digital Signal Processing Device), a programmable logic device (PLD, programmable Logic Device), a Field-programmable gate array (Field-Programmable Gate Array, FPGA), a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronics for implementing the above-described processor functions may be other for different devices, and embodiments of the present application are not particularly limited.
The Memory may be a volatile Memory (RAM) such as Random-Access Memory; or a nonvolatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD) or a Solid State Drive (SSD); or a combination of the above types of memories and provide instructions and data to the processor.
In an exemplary embodiment, the present application also provides a computer-readable storage medium storing a computer program.
Optionally, the computer readable storage medium may be applied to any one of the methods in the embodiments of the present application, and the computer program causes a computer to execute a corresponding flow implemented by a processor in each method in the embodiments of the present application, which is not described herein for brevity.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate units may or may not be physically separate, and units 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present invention may be integrated in one processing module, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units. Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, or the like, which can store program codes.
The methods disclosed in the method embodiments provided by the application can be arbitrarily combined under the condition of no conflict to obtain a new method embodiment.
The features disclosed in the several product embodiments provided by the application can be combined arbitrarily under the condition of no conflict to obtain new product embodiments.
The features disclosed in the embodiments of the method or the apparatus provided by the application can be arbitrarily combined without conflict to obtain new embodiments of the method or the apparatus.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.