CN111813424A - Remote upgrading method and device, electronic equipment and storage medium - Google Patents
Remote upgrading method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111813424A CN111813424A CN201910286083.8A CN201910286083A CN111813424A CN 111813424 A CN111813424 A CN 111813424A CN 201910286083 A CN201910286083 A CN 201910286083A CN 111813424 A CN111813424 A CN 111813424A
- Authority
- CN
- China
- Prior art keywords
- parameter
- equipment
- upgraded
- upgrading
- data packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/606—Protecting data by securing the transmission between two devices or processes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the application discloses a remote upgrading method and device, electronic equipment and a storage medium. The method comprises the following steps: sending upgrading data packets to the equipment one by one, wherein the upgrading data packets comprise corresponding data packet page numbers; receiving a receiving state reply returned by the equipment to be upgraded corresponding to each upgrading data packet, and confirming to enter a breakpoint state when the reply is overtime; after the breakpoint state is confirmed to be finished or after a continuous transmission request of equipment to be upgraded is received, starting to send an upgrading data packet from a corresponding data packet page number when the breakpoint state is entered; and sending the parameter packet backed up in advance to the equipment. According to the technical scheme provided by the embodiment of the application, the problem that the user parameters are lost due to the fact that all contents are erased after a program is upgraded is solved, and further the actual use of a user is influenced.
Description
Technical Field
The embodiment of the application relates to the technical field of software upgrading, in particular to a remote upgrading method and device, electronic equipment and a storage medium.
Background
With the development of information technology, various remote devices are widely applied to various different occasions. Nowadays, the remote equipment has the shadow applied to remote control, outdoor monitoring and the like. In general, system software of a device needs to be updated regularly or irregularly, bugs of an operating system or a previous version of the software are perfected and repaired, or new application functions are added to the software for updating, so that the system software is more perfect and better used.
At present, when system software is upgraded, because actually used equipment has a lot of parameters set by a user, program upgrading can erase all contents and can not store the parameters, so that user parameters are lost, and the actual application of the user is seriously influenced.
Disclosure of Invention
The embodiment of the application provides a remote upgrading method and device, electronic equipment and a storage medium, which can be used for backing up parameters set by a user when the equipment is upgraded.
In a first aspect, an embodiment of the present application provides a remote upgrade method, which corresponds to an upper computer server, and includes:
sending upgrading data packets to equipment to be upgraded one by one, wherein the upgrading data packets comprise corresponding data packet page numbers;
receiving a receiving state reply returned by the equipment to be upgraded corresponding to each upgrading data packet, and confirming to enter a breakpoint state when the reply is overtime;
after the breakpoint state is confirmed to be finished or after a continuous transmission request of equipment to be upgraded is received, starting to send an upgrading data packet from a corresponding data packet page number when the breakpoint state is entered;
and sending the parameter packet which is backed up in advance to the equipment to be upgraded.
In a second aspect, an embodiment of the present application provides another remote upgrade method, corresponding to a device to be upgraded, including:
sending all current parameter packets to an upper computer;
receiving upgrading data packets sent by an upper computer one by one, wherein the upgrading data packets comprise corresponding data packet page numbers;
sending a receiving state reply corresponding to each upgrading data packet to an upper computer, confirming that a next upgrading data packet of the upgrading data packet is not received in a set time period, and entering a breakpoint state;
after entering a breakpoint state for a preset time, detecting an upgrade flag bit, and reporting information to an upper computer according to an incomplete upgrade record;
receiving an upgrade data packet sent by an upper computer from a corresponding data packet page number when the upper computer enters a breakpoint state;
and receiving a parameter packet backed up in advance.
In a third aspect, an embodiment of the present application provides a remote upgrade apparatus, including:
the upgrading module is used for sending upgrading data packets to the equipment one by one, and the upgrading data packets comprise corresponding data packet page numbers;
the breakpoint detection module is used for receiving a receiving state reply returned by the equipment to be upgraded corresponding to each upgrading data packet and confirming to enter a breakpoint state when the reply is overtime;
the breakpoint continuous transmission module is used for starting to send the upgrade data packet from the corresponding data packet page number when the breakpoint state is entered after the breakpoint state is confirmed to be finished or after a continuous transmission request of the equipment to be upgraded is received;
and the parameter backup module is used for sending the parameter packet which is backed up in advance to the equipment to be upgraded.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: a memory and one or more processors;
the memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, cause the one or more processors to implement the remote upgrade method as described in the first aspect.
In a fifth aspect, embodiments of the present application provide a storage medium containing computer-executable instructions for performing the remote upgrade method according to the first aspect when executed by a computer processor.
According to the method and the device, the user parameters sent by the device terminal are received in advance before the device system software is upgraded, the user setting parameters are pre-backed up, and after the upgrading is completed, the pre-backed-up parameter packet is sent to the device and used for setting the parameters after the device is upgraded. The method and the device avoid the loss of user parameters caused by erasing all contents after the program is upgraded, and further influence on the actual use of the user. Meanwhile, by detecting the upgrade record of the breakpoint of the equipment, after the breakpoint of the equipment is upgraded, the upgrade data packet is sent again according to the page code of the data packet of the previous breakpoint, so that the breakpoint continuous transmission of the equipment system software upgrade is realized, the upgrade process is prevented from being repeated, and the effect of saving flow is achieved.
Drawings
Fig. 1 is a flowchart of a remote upgrade method according to an embodiment of the present application;
FIG. 2 is a flowchart of breakpoint resuming in the device upgrading process according to an embodiment of the present application;
fig. 3 is a flowchart of a user parameter backup in a device upgrade process according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating new parameter insertion during device upgrade according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating dual link transmission of a parameter packet according to an embodiment of the present application;
fig. 6 is a flowchart of another remote upgrade method provided in the second embodiment of the present application;
fig. 7 is a schematic structural diagram of a remote upgrade apparatus according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The remote upgrading scheme is applied to equipment system software upgrading, and solutions such as breakpoint transmission continuation, parameter backup and new parameter setting are correspondingly provided aiming at the problems that upgrading data packet transmission is interrupted, user setting parameters can be completely erased after system upgrading, new parameter point location parameter values cannot be compatible and the like in the prior art, so that the equipment upgrading does not affect the use of users.
Implementing one step:
fig. 1 is a flowchart of a remote upgrade method provided in an embodiment of the present application, where the remote upgrade method provided in this embodiment may be executed by an upper computer server and implemented in a software program. The upper computer performs data interaction with one end of the equipment to be upgraded and sends an upgrading data packet to the equipment section, so that the upgrading of the system software of the equipment is realized. One end of the device to be upgraded can be a single device, or remote upgrading of a plurality of devices can be performed.
The following description will be given by taking the host computer as an example of a device for executing the remote upgrade method. Referring to fig. 1, the remote upgrade method specifically includes:
and S11, obtaining upgrade permission returned by the equipment, sending the MD5 check code of the upgrade data packet to the equipment, and starting sending the upgrade data packet to the equipment according to the equipment return.
For example, the upper computer server may be connected to a remote device to be upgraded through the communication module, and transmit the upgrade data packet through a remote data transmission link. Before equipment upgrading is started, software code software version numbers are sent to the equipment, and the software version numbers refer to a mode of setting version numbers for software. Generally, the version number is defined by a number, and the corresponding version sequence of the software is visually represented. Of course, the software version number may have different representation modes according to actual needs. And the upper computer sends the version number to one end of the equipment to be upgraded every other set time period. After receiving the new version number, the device compares the new version number with the version number of the current device system software, judges whether the received version number is higher than the current installed version of the device, if so, the device accords with the software upgrading condition, replies an upgrade permission instruction of an upper computer to start the device upgrading process. If the received version number is not higher than the current installed version of the equipment, the software upgrading condition is not met, and the equipment replies a command which does not allow upgrading to the upper computer end.
Optionally, in order to avoid that the device does not receive the version number information sent by the upper computer due to instability of the data transmission network, the upper computer adopts a time-sharing retransmission manner to avoid a situation that the device cannot receive the version number information due to instability of the data transmission network. And the upper computer starts timing after sending the version number, if the upper computer does not receive the equipment reply after timing for one minute, the upper computer retransmits the software version number information to the equipment, and the upper computer exits from upgrading until the upper computer retransmits three times and still does not receive the reply. Of course, if the upper computer receives a reply which does not allow upgrading, the upper computer directly exits the equipment upgrading process. It should be noted that the retransmission timing and the retransmission times are set according to the actual upgrade requirement, and the present application is not limited to this.
Specifically, if the upper computer receives an upgrade permission instruction returned by the equipment, the upper computer starts an equipment upgrade process. When the device receives the upgrade data packet to upgrade the system software, the upper computer sends an MD5 check code to the device end in advance, and the MD5 check code is used for performing MD5 check operation after the subsequent upgrade data packet is received. The MD5 check checks the correctness of the data by performing a hash operation on the received transmission data. The calculated hash value is compared with the hash value transmitted with the data, and if the two values are the same, the transmitted data is complete and is not falsified (if the hash value is not falsified), so that the use can be assured. The upper computer firstly sends the MD5 check code of the upgrade data packet to the equipment end, the equipment end receives the MD5 check code and replies the upgrade permission of the upper computer, the upper computer starts to send the upgrade data packet if receiving the reply, otherwise, the upper computer does not receive the reply of the equipment to the check code, and the MD5 check code of the upgrade data packet is retransmitted to the equipment end once a minute and a minute at a time until the upper limit is sent to quit the upgrade. The retransmission time interval and the upper limit of the retransmission times are set according to actual needs, and the application is not limited fixedly.
And S12, sending the upgrade data packets to the equipment one by one, wherein the upgrade data packets comprise corresponding data packet page numbers.
When the upper computer sends the upgrading data packet, each data packet sent is provided with a crc code, and after the device receives the data packet, crc (cyclic redundancy check) is carried out. The cyclic redundancy check is one of error checking checks most commonly used in the field of data communication, and the check code is that the lengths of the information field and the check field can be arbitrarily selected. Cyclic Redundancy Check (CRC) performs polynomial calculation on data through a data transmission error detection function, attaches the obtained result to the back of a frame, and a receiving device also performs a similar algorithm to ensure the correctness and integrity of data transmission. And if the CRC of the equipment passes, replying to receive correct information, simultaneously sending the page number information of the data packet to the upper computer, and after receiving the reply, carrying out page number check by the upper computer, and if the check passes, sending the next data packet. If the checking fails or the receiving correct information replied is not received overtime, the upper computer retransmits the current data packet until the retransmission times reach the upper limit and then the upgrade is carried out. And the upper computer repeats the upgrading data packet sending operation until all upgrading data packets are sent.
After upgrading is completed, the equipment to be upgraded calculates the MD5 check code of the received upgrading data packet, compares the MD5 check code with the MD5 check code of the received upgrading data packet before upgrading, and if the comparison result is correct, replies that upgrading is successful, and sends an upgrading end mark. At this point, the device completes the upgrade.
And S13, receiving a receiving state reply returned by the equipment to be upgraded corresponding to each upgrading data packet, and confirming to enter a breakpoint state when the reply is overtime.
For example, in the actual upgrade process, the data packet transmission is interrupted, and the situation that the device exits the upgrade sometimes occurs. If the equipment is unstable in network disconnection or power failure, the equipment cannot respond to the upgrading instruction of the upper computer, and if the equipment which enters the upgrading state does not respond to the upgrading instruction of the upper computer within a continuous period of time, the equipment is indicated to respond overtime, and the equipment can automatically exit the upgrading mode and record the current upgrading information. And as the upgrade record of the breakpoint of the equipment, after the communication link is restored, the equipment uploads the upgrade record of the breakpoint to the upper computer. And after the upper computer is upgraded and powered off, whether the equipment has the upgrade record of the breakpoint or not can be detected.
In addition, if the received data packet is checked to be a data error, the device returns data packet error information, the server retransmits the corresponding data packet, and the error information is returned when the retransmission times of the same data packet reach the upper limit, the upgrading fails, and the upgrading is exited. It should be noted that, unlike the case of replying overtime, after the device replies that the upper computer fails to receive, and quits upgrading, the upper computer needs to detect whether the upgrade data packet is correct, and the next upgrade needs to start sending from the first data packet.
And S14, after the breakpoint state is confirmed to be finished or after a continuous transmission request of the equipment to be upgraded is received, starting to send the upgrade data packet from the corresponding data packet page number when the breakpoint state is entered.
It should be noted that the initiation of the breakpoint resume action may be performed by the host computer activating and the device to be upgraded to interactively confirm the end of the breakpoint state, or may be performed by the device to be upgraded automatically sending a resume request to the host computer to start the resume action. The device to be upgraded judges that the breakpoint state is finished, and may detect the data transmission network state every set time period to be upgraded, and determine that the breakpoint state is finished after confirming that the communication link is restored to normal.
Specifically, the foregoing steps S13 to S14 describe breakpoint resuming of the upgrade data packet, and the breakpoint resuming method is specifically shown in fig. 2, where:
s131, detecting the upgrade record of the equipment breakpoints.
After the device is upgraded and disconnected, the device actively detects the upgrading zone bit after exiting upgrading and/or when rebooting. Because the received upgrade data packets are stored in the equipment, the upgrade data packets all contain data packet page numbers, the upgrade flag bits of the equipment can be determined according to the data packet page numbers, the upgrade flag bits mark the interrupt nodes of the upgrade records which are not finished, and the equipment receives the upgrade data packets from the upgrade flag bits again. When the equipment detects that the upgrading records are not completed, the information is reported, and the upper computer receives the information and detects whether the equipment has the overtime upgrading records, if so, the equipment starts to enter the breakpoint continuous transmission.
S141, according to the upgrading record of the equipment breakpoints, acquiring the data package page code information corresponding to the upgrading data package which sends the breakpoints in the upgrading record.
And after the upper computer and the equipment reestablish the communication link, the upper computer starts to detect the overtime upgrading record of the equipment, and acquires the data package page code information corresponding to the data package sent by the overtime upgrading breakpoint according to the overtime upgrading record.
And S142, starting to send the upgrading data packet from the page number of the data packet of the previous breakpoint.
When the upper computer restarts sending the data packet, the step S12 is repeated, except that when the update data packet starts to be sent, the upper computer starts sending from the page number of the data packet of the last breakpoint, so as to implement the breakpoint continuous transmission function. And the upper computer starts to send the upgrading data packet from the data packet corresponding to the data packet page code according to the data packet page code information corresponding to the data packet sent by the breakpoint until the equipment upgrading is completed. The breakpoint continuous transmission function can effectively solve unstable network factors caused by equipment environment, simultaneously solve the problem that the same data packet needs to be repeatedly sent when repeated upgrading fails, and achieve the effect of saving flow.
And S15, sending the pre-backup parameter package to the equipment to be upgraded.
For example, since the actually used device has many parameters set by the user, and the upgrading of the system software program may erase all the contents and may not store the parameters set by the user, the user parameters may be lost, which may seriously affect the actual application of the user. Therefore, in the upgrading process or after the equipment is upgraded, the upper computer sends the parameter packet set by the user, which is backed up in advance, to the equipment, and the equipment sets the user parameters after acquiring the parameter packet, so that the function of backing up the user parameters is realized. As shown in fig. 3, the parameter backup is specifically as follows:
and S150, before upgrading is started, receiving all current parameter packages sent by the equipment.
Before upgrading is started, the equipment sends all data packets set by the current parameters to the upper computer, and the upper computer stores the parameter packets set by the user and returns the parameter packets to the equipment end after the equipment upgrading is completed.
And S151, sending parameter packets to the equipment one by one, wherein the parameter packets comprise parameter packet page numbers.
And in the upgrading process or after the equipment is upgraded, sending an upgrading completion instruction to the upper computer end according to the equipment, or actively sending the upgrading completion instruction to the upper computer in the upgrading process. The upper computer starts to send the parameter packets which are backed up one by one. The parameter packet comprises a parameter packet page number, and the parameter packet page number is used for subsequent check of the equipment to ensure that the parameter packet is correctly sent.
Optionally, as shown in fig. 5, the upper computer end sends the pre-backup parameter packet through the dual data communication link. The same parameter packet is sent to the equipment end through different data communication links, and the equipment end receives the parameter packet from the two communication links. The parameter packet comprises a parameter packet page number, and after the equipment end receives the parameter packet, the equipment end firstly acquires the parameter packet page number information corresponding to the parameter packet. Since the device receives the parameter packets through the two communication links, if the two communication links can stably transmit, the device receives two identical parameter packets. Then, after acquiring the page number of the parameter packet, the device judges whether the parameter packet has been received according to the comparison with the previously received and stored page number of the parameter packet, if so, discards the parameter packet, and if not, stores the parameter packet and sets the parameter. The parameter packet is sent through the dual communication link, so that the condition that the parameter packet is failed to be sent under the condition that one path of communication network is unstable can be avoided, and the redundant sending of the parameter packet is further realized.
And S152, after receiving the page number check passing information of the previous parameter packet, sending the next parameter packet to the equipment.
And the correct sending of the parameter packet is ensured through checking the page code of the parameter packet. Meanwhile, according to the page code information of the parameter packet, the equipment can receive the parameter packet in sequence, and the conditions that the parameter packet is omitted from being sent and the parameter set by a user is not completely replied are avoided.
And S153, after all the parameter packets are sent, receiving all the parameter packet information uploaded by the equipment, and performing parameter checking.
And the upper computer compares the sent parameter packet information according to all the received parameter packet information, confirms that all the parameter packet equipment completes receiving, and completes the parameter packet sending process after the verification is passed.
Optionally, as shown in fig. 4, in the process of backing up the parameter package, the upper computer stores the parameter package, and after the device is upgraded, inserts the newly added parameter point into the parameter package and sends the parameter package to the device end.
Wherein:
s161, detecting whether a newly added parameter point location exists in the protocol of the upgrading program.
And the upper computer acquires default values of all parameter point locations of the version of the current upgraded program, compares the parameter point locations of the version before upgrading, and judges whether the upgraded version has newly added parameter point locations.
And S162, storing the parameter default value corresponding to the newly added parameter point location to the parameter packet, and then sending the parameter packet to the equipment.
The upper computer judges whether the updated version has a new parameter point location, and directly sends the parameter packet; if the newly added point location exists, the upper computer inserts the default value of the newly added point location into the stored parameter packet, and then sends the default value to the equipment end, and the equipment end changes the corresponding parameter value. Therefore, the compatibility function of the upgrade program parameters is realized, and the problem of incompatibility of newly added parameters is avoided.
The user parameters sent by the equipment terminal are received in advance before the equipment system software is upgraded, the user setting parameters are pre-backed up, and after the upgrading is completed, the pre-backed up parameter packet is sent to the equipment for the parameter setting after the equipment is upgraded. The method and the device avoid the loss of user parameters caused by erasing all contents after the program is upgraded, and further influence on the actual use of the user. Meanwhile, by detecting the upgrade record of the breakpoint of the equipment, after the breakpoint of the equipment is upgraded, the upgrade data packet is sent again according to the page code of the data packet of the previous breakpoint, so that the breakpoint continuous transmission of the equipment system software upgrade is realized, the upgrade process is prevented from being repeated, and the effect of saving flow is achieved.
Example two:
on the basis of the first embodiment, fig. 6 is a flowchart of another remote upgrade method provided in the second embodiment of the present application. The remote upgrading method is executed corresponding to a device end to be upgraded, and referring to fig. 6, the remote upgrading method includes:
and S21, replying upgrade permission, receiving the MD5 check code of the upgrade data packet, and restoring the upper computer according to the MD5 check code.
And S22, sending all current parameter packets to the upper computer.
And S23, receiving the upgrading data packets sent by the upper computer one by one, wherein the upgrading data packets comprise corresponding data packet page numbers.
And S24, sending a receiving state reply corresponding to each upgrading data packet to the upper computer, confirming that the next upgrading data packet of the upgrading data packet is not received in a set time period, and entering a breakpoint state.
And S25, detecting the upgrading flag bit after the breakpoint entering state reaches the preset time, and reporting information to the upper computer according to the uncompleted upgrading record.
And S26, receiving an upgrade data packet sent by the upper computer from the corresponding data packet page number when the upper computer enters the breakpoint state.
And S27, receiving all the data packets to be upgraded, performing MD5 checking, if the checking comparison result is correct, replying that the upgrade is successful, and sending an upgrade ending mark.
And S28, receiving the parameter package which is backed up in advance.
In the remote upgrade method corresponding to the device end to be upgraded according to this embodiment, in the remote upgrade method according to the first embodiment, the remote upgrade method executed by the device end to be upgraded has corresponding functions and beneficial effects, and a specific process thereof is referred to in the first embodiment, which is not described herein again.
Example three:
on the basis of the above embodiments, another remote upgrade method provided in the third embodiment of the present application corresponds to an interactive process between an upper computer and a device to be upgraded.
The upper computer firstly sends an upgrade request to the equipment end to be upgraded, the upgrade request comprises a software code software version number, if the upgrade request meets the conditions (after the equipment receives a new version number, the received current version is judged to be higher than the existing installed version of the equipment), the equipment replies permission for upgrading. And if the upper computer receives the reply permission of the equipment, the upper computer sends the MD5 check code of the upgrading data packet, the equipment receives the MD5 check code and replies to the upper computer, the upper computer starts to send the upgrading data packet if receiving the reply, otherwise, the upper computer does not receive the reply of the equipment to the check code, and the MD5 check code of the upgrading data packet is retransmitted once per minute and so on until the upper limit is sent to quit upgrading. The upper computer sends a data packet with a crc code, the device receives the data packet and then conducts crc check, if the check is passed, the upper computer replies to receive correct data and page numbers of the data packet to the upper computer, if the upper computer receives the reply, the upper computer conducts page number check, if the check is passed, the upper computer sends the next data packet, if the check is not passed, the upper computer will resend the current data packet, and the upgrade is quit until the upper limit of the number of times of resending. And repeating the steps until the data packet is sent out, performing MD5 verification after the equipment receives all the data packets, and replying to the upper computer after the data packet is received after the verification is passed so as to finish upgrading.
And if the upper computer does not receive the equipment reply and exits the upgrade after repeating for three times during the upgrade, entering an upgrade breakpoint transition state. The device will mark as a timeout state and record the page number of the currently transmitted data packet. If the equipment is in unstable network disconnection or power failure, the equipment does not respond to an upgrading instruction of the upper computer, if the equipment which enters the upgrading state does not receive the upgrading instruction of the upper computer in a continuous period of time, the equipment can automatically exit the upgrading mode and record the current upgrading information, the equipment actively detects an upgrading flag bit after exiting upgrading or when restarting, information is reported when incomplete upgrading records are detected, the upper computer receives the information and detects whether the equipment has overtime upgrading records, and if yes, the equipment starts entering a breakpoint for continuous transmission. It should be noted that the device actively sends a resume request or the upper computer actively inquires about the end of the breakpoint state to determine whether to start the breakpoint resume.
And then, the upper computer restarts to send the upgrade data packet to the equipment terminal. The difference is that when the upgrade data packet is sent, the upgrade data packet is sent from the page number of the data packet with the last breakpoint, so that the breakpoint continuous transmission function is realized. In addition, before the upgrading is started, the equipment sends all data packets set by the current parameters to the upper computer, the upper computer stores the parameter packets, in the equipment upgrading process or after the upgrading is completed, the default values of all parameter point locations of the version of the program to be upgraded are obtained from the server, the parameter point locations of the version before the upgrading are compared, if a newly added point location exists, the default value of the newly added point location is inserted into the stored parameter packet and then is issued to the equipment to change the corresponding parameter value, and the parameter cloud backup function is achieved.
The remote upgrade method corresponding to the device to be upgraded in this embodiment corresponds to the interaction method between the host computer and the device to be upgraded in the remote upgrade methods of the first and second embodiments, and has corresponding functions and beneficial effects, which are described in detail in the first and second embodiments, and are not described herein again.
Example four:
on the basis of the foregoing embodiment, fig. 7 is a schematic structural diagram of a remote upgrade apparatus provided in the fourth embodiment of the present application. Referring to fig. 7, the remote upgrade apparatus provided in this embodiment specifically includes: an upgrade module 31, a breakpoint detection module 32, a breakpoint resuming module 33, and a parameter backup module 34.
The upgrading module 31 is configured to send upgrading data packets to the device one by one, where the upgrading data packets include corresponding data packet page numbers; the breakpoint detection module 32 is configured to receive a receipt status reply returned by the device to be upgraded corresponding to each upgrade data packet, and confirm that the breakpoint status is entered when the reply is overtime; the breakpoint resuming module 33 is configured to, after the breakpoint state is determined to end or after a resume request of the device to be upgraded is received, start sending the upgrade data packet from the corresponding data packet page number when the breakpoint state is entered; and the parameter backup module 34 is used for sending the parameter packet backed up in advance to the device.
The user parameters sent by the equipment terminal are received in advance before the equipment system software is upgraded, the user setting parameters are pre-backed up, and the pre-backed up parameter packet is sent to the equipment in the upgrading process or after the upgrading is completed, so that the parameter setting after the equipment is upgraded is realized. The method and the device avoid the loss of user parameters caused by erasing all contents after the program is upgraded, and further influence on the actual use of the user. Meanwhile, by detecting the upgrade record of the breakpoint of the equipment, after the breakpoint of the equipment is upgraded, the upgrade data packet is sent again according to the page code of the data packet of the previous breakpoint, so that the breakpoint continuous transmission of the equipment system software upgrade is realized, the upgrade process is prevented from being repeated, and the effect of saving flow is achieved.
Specifically, the upgrade module 31 includes a crc check unit, configured to send upgrade data packets with crc check codes to the device one by one, and receive a device check result; the page number checking unit is used for checking the page number when receiving correct receiving information and the page number of the data packet replied by the equipment, and sending the next upgrading data packet after the checking is passed; and the updating data packet retransmitting unit is used for retransmitting the current updating data packet if the equipment reply is not received or the receiving error information replied by the equipment is received within the set time.
The breakpoint detection module 33 includes a breakpoint detection unit, configured to obtain, according to the upgrade record of the device breakpoint, data packet page code information corresponding to the upgrade data packet that sends the breakpoint in the upgrade record; and the continuous transmission unit is used for transmitting the upgrading data packet from the page number of the data packet of the previous breakpoint.
The parameter backup module 34 includes a parameter packet receiving unit, configured to receive all current parameter packets sent by the device before starting upgrading; the device comprises a parameter packet sending unit, a parameter packet sending unit and a parameter packet receiving unit, wherein the parameter packet sending unit is used for sending parameter packets to the device one by one, and the parameter packets comprise parameter packet page numbers; and the parameter page number checking unit is used for informing the parameter packet sending unit to send the next parameter packet to the equipment after receiving the page number checking passing information of the previous parameter packet, and receiving all the parameter packet information uploaded by the equipment after all the parameter packets are sent, and performing parameter checking.
Further, the parameter backup module further comprises a failure retransmission unit, which is used for retransmitting data when the parameter packet fails to be transmitted; and prompting that the equipment parameter fails to be downloaded after the data retransmission fails for a plurality of times.
Optionally, the parameter backup module further includes a newly added point location insertion unit, configured to detect whether a newly added parameter point location exists in a protocol of the upgrade program, store a parameter default value corresponding to the newly added parameter point location in the parameter packet, and issue the parameter default value to the device; and the double-link redundancy sending unit is used for sending the parameter packet backed up in advance through the double-data communication link.
Further, the remote upgrading device further comprises an upgrading inquiry module, which is used for acquiring upgrading permission replied by the equipment, sending the MD5 check code of the upgrading data packet to the equipment, and starting sending the upgrading data packet to the equipment according to the equipment reply.
The remote upgrading device provided by the fourth embodiment of the application can be used for executing the remote upgrading method provided by the first embodiment of the application, and has corresponding functions and beneficial effects.
Example five:
an embodiment of the present application provides an electronic device, which includes: processor, memory, communication module. The number of processors in the electronic device may be one or more, and the number of memories in the electronic device may be one or more. The processor, memory, and communication module of the electronic device may be connected by a bus or other means.
The memory is used as a computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the remote upgrade method described in any embodiment of the present application (for example, the upgrade module, the breakpoint detection module, the breakpoint resuming module, and the parameter backup module in the remote upgrade apparatus). The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system and an application program required by at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The communication module is used for establishing wireless connection with the equipment to be upgraded and transmitting data.
The processor executes various functional applications and data processing of the device by executing software programs, instructions and modules stored in the memory, that is, the above-described remote upgrade method is realized.
The electronic device provided by the above can be used to execute the remote upgrade method provided by the first embodiment, and has corresponding functions and beneficial effects.
Example six:
embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a remote upgrade method, the remote upgrade method comprising: sending upgrading data packets to equipment to be upgraded one by one, wherein the upgrading data packets comprise corresponding data packet page numbers; receiving a receiving state reply returned by the equipment to be upgraded corresponding to each upgrading data packet, and confirming to enter a breakpoint state when the receiving state reply fails to be received; after the breakpoint state is confirmed to be finished or after a continuous transmission request of equipment to be upgraded is received, starting to send an upgrading data packet from a corresponding data packet page number when the breakpoint state is entered; and sending the parameter packet which is backed up in advance to the equipment to be upgraded.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the remote upgrade method described above, and may also perform related operations in the remote upgrade method provided in any embodiment of the present application.
The remote upgrade apparatus, the storage medium, and the electronic device provided in the foregoing embodiments may execute the remote upgrade method provided in any embodiment of the present application, and reference may be made to the remote upgrade method provided in any embodiment of the present application without detailed technical details described in the foregoing embodiments.
The foregoing is considered as illustrative of the preferred embodiments of the invention and the technical principles employed. The present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.
Claims (14)
1. A remote upgrade method, comprising:
sending upgrading data packets to equipment to be upgraded one by one, wherein the upgrading data packets comprise corresponding data packet page numbers;
receiving a receiving state reply returned by the equipment to be upgraded corresponding to each upgrading data packet, and confirming to enter a breakpoint state when the reply is overtime;
after the breakpoint state is confirmed to be finished or after a continuous transmission request of equipment to be upgraded is received, starting to send an upgrading data packet from a corresponding data packet page number when the breakpoint state is entered;
and sending the parameter packet which is backed up in advance to the equipment to be upgraded.
2. The remote upgrade method according to claim 1, wherein the sending the pre-backed up parameter package to the device to be upgraded comprises:
sending parameter packets to equipment to be upgraded one by one, wherein the parameter packets comprise parameter packet page numbers;
after receiving the page number check passing information of the previous parameter packet, sending the next parameter packet to the equipment to be upgraded;
and after all the parameter packets are sent, receiving all the parameter packet information uploaded by the equipment, and performing parameter checking.
3. The remote upgrade method according to claim 2, wherein the sending the pre-backed up parameter package to the device to be upgraded further comprises:
if the parameter packet fails to be sent, carrying out data retransmission;
and prompting that the parameter of the equipment to be upgraded fails to be downloaded after the data retransmission fails for a plurality of times.
4. The remote upgrade method according to claim 1, wherein, in the sending the pre-backed up parameter package to the device to be upgraded, the method further comprises:
and detecting whether a newly added parameter point location exists in a protocol of the upgrading program, if so, storing a parameter default value corresponding to the newly added parameter point location to a parameter packet, and then issuing the parameter default value to the equipment to be upgraded.
5. The remote upgrade method according to claim 1, wherein, in the sending of the pre-backup parameter package to the device to be upgraded, the pre-backup parameter package is sent through a dual data communication link.
6. The remote upgrade method according to claim 1, wherein said sending upgrade data packets to the devices to be upgraded one by one comprises:
sending upgrade data packets with crc check codes to the equipment to be upgraded one by one, and receiving a check result of the equipment to be upgraded;
if receiving correct receiving information and data packet page numbers replied by the equipment, checking the page numbers, and sending a next upgrading data packet after the checking is passed;
and if the equipment to be upgraded does not receive the reply or receives the wrong receiving information replied by the equipment to be upgraded within the set time, retransmitting the current upgrading data packet.
7. The remote upgrade method according to claim 1, further comprising, before sending the upgrade data packets to the device to be upgraded one by one:
acquiring upgrade permission replied by the equipment to be upgraded, sending an MD5 check code of an upgrade data packet to the equipment to be upgraded, and starting to send the upgrade data packets to the equipment to be upgraded one by one according to the reply of the equipment to be upgraded;
after all the upgrading data packets are sent, the equipment to be upgraded calculates the MD5 check code of the received upgrading data packet, compares the MD5 check code with the MD5 check code of the received upgrading data packet before upgrading, and if the comparison result is correct, replies that the upgrading is successful, and sends an upgrading ending mark.
8. The remote upgrade method according to claim 1, wherein, in receiving a reply to the device to be upgraded corresponding to the reception status returned by each upgrade data packet, and confirming entry into the breakpoint status when the reply is timed out, the method further comprises:
when the reply receiving fails, the corresponding upgrading data packet is retransmitted;
and if the receiving fails to reach the preset times, the upgrading fails and the upgrading is quitted.
9. A remote upgrade method, comprising:
sending all current parameter packets to an upper computer;
receiving upgrading data packets sent by an upper computer one by one, wherein the upgrading data packets comprise corresponding data packet page numbers;
sending a receiving state reply corresponding to each upgrading data packet to an upper computer, confirming that a next upgrading data packet of the upgrading data packet is not received in a set time period, and entering a breakpoint state;
after entering a breakpoint state for a preset time, detecting an upgrade flag bit, and reporting information to an upper computer according to an incomplete upgrade record;
receiving an upgrade data packet sent by an upper computer from a corresponding data packet page number when the upper computer enters a breakpoint state;
and receiving a parameter packet backed up in advance.
10. The remote upgrade method according to claim 9, further comprising, in the receiving of the pre-backup parameter package:
and receiving a parameter packet containing the default values of the parameters corresponding to the newly added parameter point positions.
11. A remote upgrade apparatus, comprising:
the upgrading module is used for sending upgrading data packets to equipment to be upgraded one by one, and the upgrading data packets comprise corresponding data packet page numbers;
the breakpoint detection module is used for receiving a receiving state reply returned by the equipment to be upgraded corresponding to each upgrading data packet and confirming to enter a breakpoint state when the reply is overtime;
the breakpoint continuous transmission module is used for starting to send the upgrade data packet from the corresponding data packet page number when the breakpoint state is entered after the breakpoint state is confirmed to be finished or after a continuous transmission request of the equipment to be upgraded is received;
and the parameter backup module is used for sending the parameter packet which is backed up in advance to the equipment to be upgraded.
12. The remote upgrade apparatus according to claim 11, further comprising:
and the new parameter point location setting module is used for detecting whether a newly added parameter point location exists in the protocol of the upgrading program, if so, saving the parameter default value corresponding to the newly added parameter point location to the parameter packet, and then issuing the parameter packet to the equipment.
13. An electronic device, comprising: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a remote upgrade method as claimed in any one of claims 1 to 8.
14. A storage medium containing computer-executable instructions for performing the remote upgrade method of any one of claims 1-8 when executed by a computer processor.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910286083.8A CN111813424A (en) | 2019-04-10 | 2019-04-10 | Remote upgrading method and device, electronic equipment and storage medium |
PCT/CN2019/124784 WO2020207045A1 (en) | 2019-04-10 | 2019-12-12 | Remote upgrading method and apparatus, electronic device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910286083.8A CN111813424A (en) | 2019-04-10 | 2019-04-10 | Remote upgrading method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111813424A true CN111813424A (en) | 2020-10-23 |
Family
ID=72751847
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910286083.8A Withdrawn CN111813424A (en) | 2019-04-10 | 2019-04-10 | Remote upgrading method and device, electronic equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111813424A (en) |
WO (1) | WO2020207045A1 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5336965B2 (en) * | 2009-07-27 | 2013-11-06 | キヤノン株式会社 | Information processing apparatus, information processing apparatus control method, and program |
CN102364891B (en) * | 2011-09-13 | 2014-08-27 | 杭州华三通信技术有限公司 | Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment |
CN105183515B (en) * | 2015-09-02 | 2019-10-15 | 深圳一电航空技术有限公司 | The method and device of holder firmware upgrade |
CN107450945A (en) * | 2017-07-13 | 2017-12-08 | 北京小鸟看看科技有限公司 | A kind of firmware update of virtual reality device |
-
2019
- 2019-04-10 CN CN201910286083.8A patent/CN111813424A/en not_active Withdrawn
- 2019-12-12 WO PCT/CN2019/124784 patent/WO2020207045A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2020207045A1 (en) | 2020-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106569847B (en) | Method for vehicle-mounted system to realize IAP remote upgrade based on mobile network | |
EP1639468B1 (en) | Network equipment and a method for monitoring the start up of a such an equipment | |
CN104899065A (en) | Method and system for batch online recovery and software online upgrading | |
CN112130881A (en) | Firmware remote upgrading method and device | |
US9372682B2 (en) | Parallel programming and updating of lighting bus subscribers | |
CN102546784B (en) | Method for conducting batch upgrading for device firmware based on controller area network (CAN) bus | |
CN105224362A (en) | Host computer carries out the method and system of program upgrade to slave computer | |
CN106886438A (en) | System remote update method based on FPGA | |
CN110995724A (en) | Remote upgrading method for whole vehicle controller of new energy bus | |
CN109933354A (en) | Fingerprint head online upgrading method, system and the cloud lock of a kind of intelligent cloud lock | |
CN109992280A (en) | Method for upgrading embedded software, terminal device and storage device | |
CN112559059B (en) | BIOS (basic input output System) option configuration method and related device | |
CN116521201B (en) | Software upgrading method of battery pack and battery pack | |
CN111813424A (en) | Remote upgrading method and device, electronic equipment and storage medium | |
CN116450180A (en) | Remote upgrading method for terminal equipment | |
CN116483409A (en) | Remote firmware updating method, system, electronic equipment and storage medium | |
US20030154288A1 (en) | Server-client system and data transfer method used in the same system | |
CN111694516B (en) | Version online upgrading method and terminal of distributed block storage system | |
CN112099810A (en) | CAN network sub-node remote firmware upgrading method between motion control systems | |
CN111596642A (en) | Method, device and equipment for determining validity of electric control parameter and storage medium | |
CN114144759A (en) | Method and device for updating software of a vehicle computer comprising an execution memory, a backup memory and a check memory | |
CN111813597A (en) | Air conditioner | |
CN112527342A (en) | Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware | |
CN118245092B (en) | Multi-module online upgrading method for safety control platform | |
CN114443095B (en) | Air conditioner upgrading method and air conditioner |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20201023 |
|
WW01 | Invention patent application withdrawn after publication |