CN112825036A - Program updating method and device, electronic equipment and storage medium - Google Patents

Program updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112825036A
CN112825036A CN201911171851.1A CN201911171851A CN112825036A CN 112825036 A CN112825036 A CN 112825036A CN 201911171851 A CN201911171851 A CN 201911171851A CN 112825036 A CN112825036 A CN 112825036A
Authority
CN
China
Prior art keywords
program
information
version
stored
server
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.)
Pending
Application number
CN201911171851.1A
Other languages
Chinese (zh)
Inventor
楚毅
杨磊
谢海军
杨伟
史运光
魏爱国
李羲龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haier Smart Home Co Ltd
Qingdao Economic and Technological Development Zone Haier Water Heater Co Ltd
Qingdao Haier New Energy Electric Appliance Co Ltd
Original Assignee
Haier Smart Home Co Ltd
Qingdao Economic and Technological Development Zone Haier Water Heater Co Ltd
Qingdao Haier New Energy Electric Appliance Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haier Smart Home Co Ltd, Qingdao Economic and Technological Development Zone Haier Water Heater Co Ltd, Qingdao Haier New Energy Electric Appliance Co Ltd filed Critical Haier Smart Home Co Ltd
Priority to CN201911171851.1A priority Critical patent/CN112825036A/en
Publication of CN112825036A publication Critical patent/CN112825036A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The application provides a program updating method, a program updating device, an electronic device and a storage medium, wherein the method comprises the following steps: after the intelligent device is powered on, reading information of a first program stored in a server, wherein the first program is a program with a latest version, and the information of the first program is used for indicating the version of the first program; and if the information of the first program is different from the information of the second program stored in the intelligent equipment, downloading the first program stored in the server, wherein the first program and the second program are both programs for controlling the intelligent equipment to operate, and the information of the second program is used for indicating the version of the second program. The program updating method can achieve automatic updating of the program, and improves program updating efficiency.

Description

Program updating method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of intelligent home appliance technologies, and in particular, to a method and an apparatus for updating a program, an electronic device, and a storage medium.
Background
Along with the improvement of the economic level of users, more and more intelligent devices, such as an intelligent air conditioner, an intelligent water heater and the like, appear in families. Generally, the smart device includes at least one machine set, and each machine set is generally provided with an operating program to control the operation of the smart device.
In the prior art, an operating program set in a unit is fixed and cannot be automatically updated or upgraded. When the running program needs to be upgraded, after-sales personnel are needed to be on-site. Generally, the running program is set in a computer board or a chip of the machine set, and after-sales personnel can replace the computer board originally installed in the machine set with the computer board having an updated sequence, or update the running program by physically connecting with the electronic device having the updated program through an update interface on the computer board.
The mode of the operation procedure renewal of unit among the prior art is inefficient, and need consume a large amount of manpower, material resources.
Disclosure of Invention
The application provides a program updating method, a program updating device, an electronic device and a storage medium, which can realize automatic updating of a program and improve the efficiency of program updating.
A first aspect of the present application provides a method for updating a program, including: after the intelligent device is powered on, reading information of a first program stored in a server, wherein the first program is a program with a latest version, and the information of the first program is used for indicating the version of the first program;
and if the information of the first program is different from the information of a second program stored in the intelligent equipment, downloading the first program stored in the server, wherein the first program and the second program are both programs for controlling the intelligent equipment to run, and the information of the second program is used for indicating the version of the second program.
Optionally, after the intelligent device is powered on and before the information of the first program stored in the server is read, the method further includes: sending a network connection request to the server, wherein the network connection request comprises a network connection secret key and identification information of the intelligent device, and the network connection request is used for requesting the server to perform network connection with the intelligent device by using the network connection secret key;
and receiving a network connection response sent by the server, wherein the network connection response is used for indicating that the network connection between the server and the intelligent equipment is successful.
Optionally, the method further includes: if the first program fails to be downloaded, or a network connection response sent by the server is not received, or the information of the first program is determined to be the same as the information of the second program stored in the intelligent equipment, checking the checksum of the second program;
and if the checksum of the second program is correct, operating the second program.
Optionally, if a non-initial version program is stored in the smart device, the second program is the non-initial version program, and if the non-initial version program is not stored in the smart device, the second program is the initial version program stored in the smart device.
Optionally, if the second program is a program of a non-initial version, the method further includes: if the checksum of the second program is incorrect, checking the checksum of the program of the initial version stored in the intelligent equipment;
if the checksum of the program of the initial version is correct, operating the program of the initial version;
and if the checksum of the program of the initial version is incorrect, pushing first reminding information, wherein the first reminding information is used for indicating that the program is wrong.
Optionally, if the second program is a program of an initial version, the method further includes: and if the checksum of the second program is incorrect, pushing first reminding information, wherein the first reminding information is used for indicating that the program is wrong.
Optionally, the information of the first program includes a version identifier and a checksum of the first program, and the information of the second program includes a version identifier and a checksum of the second program.
Optionally, after downloading the first program stored in the server, the method further includes: and running the first program.
Optionally, when downloading the first program stored in the server, the method further includes: and pushing second reminding information, wherein the second reminding information is used for indicating that the first program is being downloaded.
Optionally, the failure of downloading the first program includes: the downloading is interrupted, the downloading is not successful for the preset times or the downloading is not successful within the preset time.
A second aspect of the present application provides an apparatus for updating a program, including:
the intelligent device comprises a reading module, a judging module and a judging module, wherein the reading module is used for reading information of a first program stored in a server after the intelligent device is powered on, the first program is a program with a latest version, and the information of the first program is used for indicating the version of the first program;
and the processing module is used for downloading the first program stored in the server if the information of the first program is determined to be different from the information of a second program stored in the intelligent equipment, wherein the first program and the second program are both programs for controlling the intelligent equipment to run, and the information of the second program is used for indicating the version of the second program.
Optionally, after the smart device is powered on and before the reading module reads information of the first program stored in the server, the transceiver module is configured to send a network connection request to the server, where the network connection request includes a network connection key and identification information of the smart device, and the network connection request is used to request the server to perform network connection with the smart device using the network connection key;
correspondingly, the transceiver module is further configured to receive a network connection response sent by the server, where the network connection response is used to indicate that the network connection between the server and the intelligent device is successful.
Optionally, the processing module is further configured to check a checksum of the second program if the first program fails to be downloaded, or a network connection response sent by the server is not received, or it is determined that the information of the first program is the same as the information of the second program stored in the intelligent device;
the processing module is further configured to run the second program if the checksum of the second program is correct.
Optionally, if a non-initial version program is stored in the smart device, the second program is the non-initial version program, and if the non-initial version program is not stored in the smart device, the second program is the initial version program stored in the smart device.
Optionally, if the second program is a program of a non-initial version and the checksum of the second program is incorrect, the processing module is further configured to verify the checksum of the program of the initial version stored in the intelligent device;
if the checksum of the program of the initial version is correct, the processing module is further configured to run the program of the initial version;
if the checksum of the program of the initial version is incorrect, the processing module is further configured to push first reminding information, where the first reminding information is used to indicate that the program is incorrect.
Optionally, if the second program is a program of an initial version and the checksum of the second program is incorrect, the processing module is further configured to push first reminding information, where the first reminding information is used to indicate a program error.
Optionally, the information of the first program includes a version identifier and a checksum of the first program, and the information of the second program includes a version identifier and a checksum of the second program.
Optionally, the processing module is further configured to run the first program after downloading the first program stored in the server.
Optionally, the processing module is further configured to push second reminding information when the first program stored in the server is downloaded, where the second reminding information is used to indicate that the first program is being downloaded.
Optionally, the failure of downloading the first program includes: the downloading is interrupted, the downloading is not successful for the preset times or the downloading is not successful within the preset time.
A third aspect of the present application provides an electronic device comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory to cause the electronic device to perform the method of program updating of the first aspect described above.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement the method of program updating of the first aspect described above.
The application provides a program updating method, a program updating device, an electronic device and a storage medium, wherein the method comprises the following steps: after the intelligent device is powered on, reading information of a first program stored in a server, wherein the first program is a program with a latest version, and the information of the first program is used for indicating the version of the first program; and if the information of the first program is different from the information of the second program stored in the intelligent equipment, downloading the first program stored in the server, wherein the first program and the second program are both programs for controlling the intelligent equipment to operate, and the information of the second program is used for indicating the version of the second program. The program updating method can achieve automatic updating of the program, and improves program updating efficiency.
Drawings
Preferred embodiments of the method for program updating provided by the present application are described below with reference to the accompanying drawings in conjunction with specific embodiments. The attached drawings are as follows:
fig. 1 is a first schematic view of a scenario to which the program updating method provided in the present application is applied;
FIG. 2 is a first flowchart illustrating a method for updating a program provided by the present application;
FIG. 3 is a second flowchart illustrating a method for updating programs according to the present application;
FIG. 4 is a first schematic interface diagram of a smart device provided herein;
fig. 5 is a second schematic interface diagram of the smart device provided in the present application;
fig. 6 is a schematic view of a scenario to which the program updating method provided in the present application is applied;
FIG. 7 is a schematic diagram of an apparatus for program update provided in the present application;
fig. 8 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the embodiments of the present application, and it is obvious that the described embodiments are some but not all of the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to solve the problem that the running program of the unit in the intelligent device cannot be automatically updated in the prior art, the application provides a program updating method, which can realize the interaction between the unit and the server to automatically update the program so as to achieve the purpose of automatically updating the program and improve the efficiency of updating the program. It should be understood that the method for updating the program in the present application can be applied not only to the set of the smart device, but also to the electronic device, the computer board, or the chip that is not easy to detach and cannot automatically update the program. In the following embodiments, a method for updating a program will be described by taking an intelligent device as an example.
Fig. 1 is a first scene schematic diagram applicable to the program updating method provided by the present application. As shown in fig. 1, the applicable scenarios of the program updating method provided by the present application include: intelligent device and server. Wherein, the intelligent device can be an intelligent air conditioner, an intelligent refrigerator, an intelligent washing machine or an intelligent water heater and the like. It should be understood that fig. 1 illustrates an example in which the intelligent device is an intelligent air conditioner.
The following describes a method for updating a program provided by the present application with reference to specific embodiments. Fig. 2 is a first flowchart illustrating a method for updating a program according to the present application. The execution subject of the method flow shown in fig. 2 may be an intelligent device or a chip, a computer board, etc. in the intelligent device, and the intelligent device may be implemented by any software and/or hardware. As shown in fig. 2, the method for updating a program provided in this embodiment may include:
s201, after the intelligent device is powered on, reading information of a first program stored in a server, wherein the first program is a program with a latest version, and the information of the first program is used for indicating the version of the first program.
In this embodiment, the power-on of the smart device refers to the power-on of the smart device again after the power-off. The intelligent device can store the address of the server, and after the intelligent device is powered on, the intelligent device can be directly in network connection with the server according to the address of the server.
Optionally, an address used for storing the information of the first program in the server may also be stored in the intelligent device in this embodiment, so that the information of the first program stored in the server is read through the address of the information of the first program.
The server stores information of the first program and the first program, and the information of the first program and the first program may correspond to the same or different storage addresses. It should be understood that the first program in this embodiment is a program for controlling the operation of the smart device, that is, the operation of the first program may control the operation of the smart device. Wherein the first program stored in the server is the latest version of the program.
The information of the first program in this embodiment is used to indicate the version of the first program. Alternatively, the information of the first program may be information used for characterizing the version of the first program, such as release time, version number, or version image identifier of the first program.
In order to improve the security of the network connection between the smart device and the server, in this embodiment, one possible implementation manner that the smart device can perform the network connection with the server is as follows: the intelligent device sends a network connection request to the server. The network connection request comprises a network connection secret key and identification information of the intelligent device.
Optionally, the network connection key may be configured for the smart device by the server, and the network connection keys of all the smart devices may be the same, that is, the network connection key is fixed. Alternatively, the keys of the smart devices may be different, that is, may be configured by the server for each smart device according to the model of the smart device. In this embodiment, whichever of the above-described manners is adopted to configure the network connection key for the smart device, the correspondence between the identification information of the smart device and the network connection key is correspondingly stored in the server, and the identification of the smart device in this embodiment may be information that can uniquely identify the smart device as shown in the following table. Such as the production serial number of the smart device, the model number and the location of the smart device, etc.
Watch 1
Intelligent deviceIdentification information of Network connection key
A 123xxxxx
B 1Aaxxxxx
C Abxxxxxx
The network connection request is used for requesting the server to perform network connection with the intelligent device by using the network connection secret key. Correspondingly, after receiving the network connection request from the intelligent device, the server may perform network connection with the intelligent device according to the network connection key in the network connection request and the identifier of the intelligent device. After the server and the intelligent device are in network connection, a network connection response can be sent to the intelligent device, and the network connection response is used for indicating that the server and the intelligent device are in network connection successfully.
Correspondingly, the intelligent device may receive a network connection response sent by the server. It should be understood that, in this embodiment, after the smart device receives the network connection response from the server, the step of reading the information of the first program stored in the server may be performed.
And S202, if the information of the first program is different from the information of the second program stored in the intelligent equipment, downloading the first program stored in the server, wherein the first program and the second program are both programs for controlling the intelligent equipment to run, and the information of the second program is used for indicating the version of the second program.
In this embodiment, the intelligent device stores the second program and information of the second program. The second program is also a program for controlling the operation of the smart device, which is the same as the first program, that is, the operation of the smart device can be controlled by the second program. The information of the second program is used to indicate a version of the second program, where the information of the second program may be the same as the type of the information of the first program, and reference may be specifically made to the above description on the first program.
If the non-initial version program is stored in the intelligent device, the second program is the non-initial version program, and if the non-initial version program is not stored in the intelligent device, the second program is the initial version program stored in the intelligent device. The program of the non-initial version is a program which is updated on the basis of the program of the initial version.
It should be understood that if the non-initial version of the program is stored in the smart device, the initial version of the program may also be stored in the corresponding smart device. Accordingly, the second program is a program of a non-primary version having a higher version than the primary version. If the non-initial version program is not stored in the intelligent device, only the initial version program is stored in the intelligent device. Correspondingly, the second program is a non-primary version of the program.
Optionally, in this embodiment, if the non-initial version program is stored in the intelligent device, only the non-initial version program having the highest version compared to the initial version program is stored in the intelligent device. Illustratively, if the version number of the program of the initial version is 1.0, the intelligent device updates twice on the basis of the initial version, i.e., the programs with version numbers of 2.0 and 3.0, respectively, and correspondingly, the intelligent device stores the program of the initial version with version number of 1.0 and the program with version number of 3.0. If the intelligent device does not update the program of the initial version, only the program of the initial version with the version number of 1.0 is stored in the intelligent device.
Optionally, the location of the intelligent device for storing the non-initial version of the program and the initial version of the program is predetermined, and for example, the storage location of the program in the intelligent device is shown in the following table two:
watch two
Procedure Storage location in a smart device
Initial version Position 1
Non-primary version Position 2
In this embodiment, if the non-initial version of the program is stored in the smart device, the second program is the non-initial version of the program, and the smart device may compare information of the non-initial version of the program with information of the first program. And if the information of the program of the non-initial version is different from the information of the first program, determining that the program of the non-initial version in the intelligent equipment needs to be updated, and downloading the first program stored in the server.
After the intelligent device downloads the first program, the non-initial version of the program stored in the intelligent device may be deleted, and the downloaded first program may be used as the non-initial version of the program.
In this embodiment, if the non-initial version program is not stored in the smart device, the second program is the initial version program stored in the smart device. The smart device may compare the information of the initial version of the program with the information of the first program. And if the information of the initial version program is different from the information of the first program, determining that the initial version program in the intelligent equipment needs to be updated, and downloading the first program stored in the server. Correspondingly, after the intelligent device downloads the first program, the non-initial version program stored in the intelligent device may be deleted, and the downloaded first program may be used as the non-initial version program.
In a possible implementation manner, the information of the program in this embodiment may include: version identification of the program and a checksum. Correspondingly, the information of the first program includes a version identifier and a checksum of the first program, and the information of the second program includes a version identifier and a checksum of the first program.
The version identifier may be a version number used to indicate a version of the program, a release time of the version, or the like. The checksum (checksum) is a sum of a set of data items for a verification destination, and may be considered as a number or a string in the process of calculating a verification.
Correspondingly, in this embodiment, the information of the first program is the same as the information of the second program stored in the smart device, which means that the version identifier and the checksum of the first program are both the same as the version identifier and the checksum of the second program. As long as any one of the version identification and the checksum of the first program is different from that of the second program, it can be determined that the information of the first program is different from the information of the second program stored in the smart device.
The application provides a program updating method, which comprises the following steps: after the intelligent device is powered on, reading information of a first program stored in a server, wherein the first program is a program with a latest version, and the information of the first program is used for indicating the version of the first program; and if the information of the first program is different from the information of the second program stored in the intelligent equipment, downloading the first program stored in the server, wherein the first program and the second program are both programs for controlling the intelligent equipment to operate, and the information of the second program is used for indicating the version of the second program. The program updating method can achieve automatic updating of the program, and improves program updating efficiency.
On the basis of the above embodiments, the method for updating the program provided in the present application is further described below with reference to fig. 3. Fig. 3 is a flowchart illustrating a second method for updating a program according to the present application. As shown in fig. 3, the method for updating a program provided in this embodiment may include:
s301, after the intelligent device is powered on, a network connection request is sent to a server.
And S302, if the network connection response sent by the server is received, reading the information of the first program stored in the server.
And S303, if the information of the first program is different from the information of the second program stored in the intelligent equipment, downloading the first program stored in the server.
The implementation manners in S301 to S303 in this embodiment may specifically refer to the relevant descriptions in S201 to S202 in the above embodiments, and are not limited herein.
It should be understood that, in the process of downloading the first program, the smart device in this embodiment may push a second reminder message, where the second reminder message is used to indicate that the program of the smart device is being updated. Optionally, the mode of pushing the second reminding information by the intelligent device may be a mode of displaying on a display interface or playing audio and video.
For example, a reminding message may be displayed on the display interface of the smart device, such as a text of "program is updating, power off is not required" or the like. Fig. 4 is a first interface diagram of the smart device provided in the present application. As shown in fig. 4, characters such as "program is updating, no power off" and the like are displayed on the display interface of the intelligent air conditioner.
And S304, after the first program is downloaded, operating the first program.
In this embodiment, after the intelligent device is powered on, the intelligent device is to start the program to operate, but in this embodiment, the program may be automatically updated before the intelligent device operates. After the first program is downloaded, the first program may be executed to control the operation of the smart device.
S305, if the first program fails to be downloaded, or the network connection response sent by the server is not received, or the information of the first program is determined to be the same as the information of the second program stored in the intelligent equipment, checking the checksum of the second program.
It should be understood that S305, S302, S303, or S304 is an alternative step to be executed, and there is no precedence relationship.
When the intelligent device does not receive a network connection response sent by the server (namely, the network connection between the intelligent device and the server fails), or the downloading of the first program fails, or the intelligent device determines that the information of the first program is the same as the information of the second program stored in the intelligent device, the second program in the intelligent device is determined to be used for controlling the operation of the intelligent device. Correspondingly, in order to determine that the second program stored in the smart device is the correct program, the checksum of the second program needs to be checked.
Wherein, the failure of the first program download in this embodiment includes: the downloading is interrupted, the downloading is not successful for the preset times or the downloading is not successful within the preset time. The downloading interruption refers to interruption of downloading of the first program caused by power failure, disconnection of network connection and the like in the process of downloading the first program; the downloading of the preset times is unsuccessful, which means that the first program is still unsuccessfully downloaded when the times of trying to download the first program by the intelligent equipment reaches the preset times; the fact that the downloading is not successful within the preset time means that the first program is not downloaded successfully within the preset time when the downloading starting time is the starting time.
And S306, if the checksum of the second program is correct, operating the second program.
And when the checksum of the second program is correct, the second program is operated to control the intelligent device to operate according to the second program.
It should be understood that if the non-initial version of the program is stored in the smart device, the second program is the non-initial version of the program, and if the non-initial version of the program is not stored in the smart device, the second program is the initial version of the program stored in the smart device.
And S307, if the second program is a program of a non-initial version and the checksum of the second program is incorrect, checking the checksum of the program of the initial version stored in the intelligent device.
In one possible scenario of this embodiment: and when the second program is a program of a non-initial version and the checksum of the second program is incorrect, namely the program of the non-initial version is stored in the intelligent device, but the checksum of the program of the non-initial version is incorrect, namely the program of the non-initial version stored in the intelligent device is wrong and cannot run, checking the checksum of the program of the initial version stored in the intelligent device.
And S308, if the checksum of the program of the initial version is correct, running the program of the initial version.
If the checksum of the program of the initial version stored in the intelligent device is correct, it is determined that the program of the initial version can be run, and the intelligent device runs the program of the initial version.
S309, if the checksum of the program of the initial version is incorrect, pushing first reminding information, wherein the first reminding information is used for indicating that the program is wrong.
If the checksum of the program of the initial version stored in the intelligent device is correct, the program of the initial version is wrong and cannot run, and the intelligent device pushes the first reminding information. Wherein, the first reminding information is used for indicating program errors. It can be understood that, in the embodiment of this market, the manner of pushing the first reminder information by the smart device is the same as the manner of pushing the second reminder information, and reference may be specifically made to the above related description.
Fig. 5 is a schematic interface diagram ii of the smart device provided in the present application. As shown in fig. 5, when the checksum of the initial version of the program is incorrect, a text "program error please process" is displayed on the display interface of the smart device to remind the user of the program error of the initial version of the smart device.
S310, if the second program is the program of the initial version and the checksum of the second program is incorrect, pushing first reminding information, wherein the first reminding information is used for indicating program errors.
In one possible scenario of this embodiment: when the second program is the program of the initial version and the checksum of the second program is incorrect, that is, the program of the non-initial version is not stored in the intelligent device and the checksum of the stored program of the initial version is incorrect, pushing first reminding information, wherein the first reminding information is used for indicating a program error.
It should be understood that S306, S307, and S310 are steps that are executed alternatively, and the three steps are in order.
Fig. 6 is a schematic view of a second scenario in which the program updating method provided by the present application is applicable. As shown in fig. 6, the scene may further include a terminal device bound to the smart device, and a user may control operation of the smart device by operating on the terminal device. If the intelligent device is an intelligent washing machine, the terminal device controls the washing device to wash clothes for the user, for example, the user can start or stop the washing device through the terminal device, and can select a washing program, washing time and the like through the terminal device.
The terminal device may include, but is not limited to, a mobile terminal device or a fixed terminal device. The mobile terminal devices include, but are not limited to, a mobile phone, a Personal Digital Assistant (PDA), a tablet computer, a portable device (e.g., a portable computer, a pocket computer, or a handheld computer), and the like. Fixed terminal devices include, but are not limited to, desktop computers, washing machine controllers (similar to television remote controls), and the like.
In a possible implementation manner, the above-mentioned implementation manner in S201 may also be performed due to a terminal bound by the smart device. Correspondingly, after the network connection is established between the terminal and the server, the steps in S201 and S202 are executed, and after the terminal downloads the first program, the first program may be sent to the intelligent device, so that the program in the intelligent device is updated. The manner in which the terminal interacts with the server and the manner in which the first program is determined to be downloaded may specifically refer to the above related description.
Correspondingly, the implementation in S301 to S303, S305, S307, and S309 in the above embodiment may also be performed by the terminal bound to the intelligent device, and when the checksum verification is successful, the verification result of the checksum may be sent to the intelligent device, so that the intelligent device runs the corresponding program, and the purpose of automatically updating the program may also be achieved.
Fig. 7 is a schematic structural diagram of a device for updating a program provided in the present application. As shown in fig. 7, the program updating apparatus 700 includes: a reading module 701, a processing module 702 and a transceiver module 703.
The reading module 701 is configured to read information of a first program stored in the server after the smart device is powered on, where the first program is a program of a latest version, and the information of the first program is used to indicate a version of the first program.
The processing module 702 is configured to download the first program stored in the server if it is determined that the information of the first program is different from the information of the second program stored in the intelligent device, where the first program and the second program are both programs that control the operation of the intelligent device, and the information of the second program is used to indicate a version of the second program.
Optionally, after the smart device is powered on, before the reading module 701 reads information of the first program stored in the server, the transceiver module 703 is configured to send a network connection request to the server, where the network connection request includes a network connection key and identification information of the smart device, and the network connection request is used to request the server to perform network connection with the smart device using the network connection key.
Correspondingly, the transceiver module 703 is further configured to receive a network connection response sent by the server, where the network connection response is used to indicate that the network connection between the server and the intelligent device is successful.
Optionally, the processing module 702 is further configured to check the checksum of the second program if the first program fails to be downloaded, or a network connection response sent by the server is not received, or it is determined that the information of the first program is the same as the information of the second program stored in the intelligent device.
The processing module 702 is further configured to run the second program if the checksum of the second program is correct.
Optionally, if the non-initial version program is stored in the intelligent device, the second program is the non-initial version program, and if the non-initial version program is not stored in the intelligent device, the second program is the initial version program stored in the intelligent device.
Optionally, if the second program is a program of a non-initial version and the checksum of the second program is incorrect, the processing module 702 is further configured to check the checksum of the program of the initial version stored in the intelligent device.
The processing module 702 is further configured to run the program of the initial version if the checksum of the program of the initial version is correct.
If the checksum of the program of the initial version is incorrect, the processing module 702 is further configured to push a first warning message, where the first warning message is used to indicate that the program is incorrect.
Optionally, if the second program is a program of the initial version and the checksum of the second program is incorrect, the processing module 702 is further configured to push first reminding information, where the first reminding information is used to indicate that the program is incorrect.
Optionally, the information of the first program includes a version identifier and a checksum of the first program, and the information of the second program includes a version identifier and a checksum of the second program.
Optionally, the processing module 702 is further configured to run the first program after downloading the first program stored in the server.
Optionally, the processing module 702 is further configured to push second reminding information when the first program stored in the server is downloaded, where the second reminding information is used to indicate that the first program is being downloaded.
Optionally, the failure of the first program download includes: the downloading is interrupted, the downloading is not successful for the preset times or the downloading is not successful within the preset time.
The principle and technical effect of the program updating apparatus provided in this embodiment are similar to those of the program updating method, and are not described herein again.
Fig. 8 is a schematic structural diagram of an electronic device provided in the present application. As shown in fig. 8, the electronic device 800 includes: a memory 801 and at least one processor 802.
A memory 801 for storing program instructions.
The processor 802 is configured to implement the method for updating a program in this embodiment when the program instruction is executed, and specific implementation principles may be referred to in the foregoing embodiments, which are not described herein again.
The electronic device 800 may also include an input/output interface 803.
The input/output interface 803 may include a separate output interface and input interface, or may be an integrated interface that integrates input and output. The output interface is used for outputting data, and the input interface is used for acquiring input data.
The present application further provides a readable storage medium, in which an execution instruction is stored, and when the execution instruction is executed by at least one processor of the electronic device, the computer execution instruction, when executed by the processor, implements the method for updating the program in the foregoing embodiments.
The present application also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the electronic device may read the execution instructions from the readable storage medium, and the execution of the execution instructions by the at least one processor causes the electronic device to implement the method for program updating provided by the various embodiments described above.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the above embodiments of the program updating apparatus, it should be understood that the Processing module may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor, or in a combination of the hardware and software modules in the processor.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (13)

1. A method of program update, comprising:
after the intelligent device is powered on, reading information of a first program stored in a server, wherein the first program is a program with a latest version, and the information of the first program is used for indicating the version of the first program;
and if the information of the first program is different from the information of a second program stored in the intelligent equipment, downloading the first program stored in the server, wherein the first program and the second program are both programs for controlling the intelligent equipment to run, and the information of the second program is used for indicating the version of the second program.
2. The method according to claim 1, after the smart device is powered on and before the information of the first program stored in the server is read, further comprising:
sending a network connection request to the server, wherein the network connection request comprises a network connection secret key and identification information of the intelligent device, and the network connection request is used for requesting the server to perform network connection with the intelligent device by using the network connection secret key;
and receiving a network connection response sent by the server, wherein the network connection response is used for indicating that the network connection between the server and the intelligent equipment is successful.
3. The method of claim 2, further comprising:
if the first program fails to be downloaded, or a network connection response sent by the server is not received, or the information of the first program is determined to be the same as the information of the second program stored in the intelligent equipment, checking the checksum of the second program;
and if the checksum of the second program is correct, operating the second program.
4. The method according to claim 3, wherein the second program is a non-initial version of the program if the non-initial version of the program is stored in the smart device, and wherein the second program is an initial version of the program stored in the smart device if the non-initial version of the program is not stored in the smart device.
5. The method of claim 4, wherein if the second program is a non-original version of a program, the method further comprises:
if the checksum of the second program is incorrect, checking the checksum of the program of the initial version stored in the intelligent equipment;
if the checksum of the program of the initial version is correct, operating the program of the initial version;
and if the checksum of the program of the initial version is incorrect, pushing first reminding information, wherein the first reminding information is used for indicating that the program is wrong.
6. The method of claim 4, wherein if the second program is an original version of the program, the method further comprises:
and if the checksum of the second program is incorrect, pushing first reminding information, wherein the first reminding information is used for indicating that the program is wrong.
7. The method according to any one of claims 1 to 6, wherein the information of the first program includes a version identification and a checksum of the first program, and the information of the second program includes a version identification and a checksum of the second program.
8. The method according to any one of claims 1 to 6, further comprising, after said downloading said first program stored in said server:
and running the first program.
9. The method according to any one of claims 1 to 6, wherein the downloading the first program stored in the server further comprises:
and pushing second reminding information, wherein the second reminding information is used for indicating that the first program is being downloaded.
10. The method of claim 3, wherein the first program download failure comprises: the downloading is interrupted, the downloading is not successful for the preset times or the downloading is not successful within the preset time.
11. An apparatus for program update, comprising:
the intelligent device comprises a reading module, a judging module and a judging module, wherein the reading module is used for reading information of a first program stored in a server after the intelligent device is powered on, the first program is a program with a latest version, and the information of the first program is used for indicating the version of the first program;
and the processing module is used for downloading the first program stored in the server if the information of the first program is determined to be different from the information of a second program stored in the intelligent equipment, wherein the first program and the second program are both programs for controlling the intelligent equipment to run, and the information of the second program is used for indicating the version of the second program.
12. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the electronic device to perform the method of any of claims 1-10.
13. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1-10.
CN201911171851.1A 2019-11-21 2019-11-21 Program updating method and device, electronic equipment and storage medium Pending CN112825036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911171851.1A CN112825036A (en) 2019-11-21 2019-11-21 Program updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911171851.1A CN112825036A (en) 2019-11-21 2019-11-21 Program updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112825036A true CN112825036A (en) 2021-05-21

Family

ID=75906498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911171851.1A Pending CN112825036A (en) 2019-11-21 2019-11-21 Program updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112825036A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360175A (en) * 2021-08-11 2021-09-07 新石器慧通(北京)科技有限公司 Application updating method of vehicle controller and vehicle controller

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850422A (en) * 2014-05-21 2015-08-19 北汽福田汽车股份有限公司 Method and system for remotely updating terminal equipment program
CN105827413A (en) * 2016-03-15 2016-08-03 乐视移动智能信息技术(北京)有限公司 Electronic terminal, and system safety verification device and method thereof
CN107608689A (en) * 2017-08-07 2018-01-19 阿里巴巴集团控股有限公司 The update method of application program, device and electronic equipment in client
CN108089943A (en) * 2016-11-21 2018-05-29 比亚迪股份有限公司 Program excutive method, device and terminal based on MCU system
CN109495532A (en) * 2017-09-13 2019-03-19 北京京东尚科信息技术有限公司 Client update method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850422A (en) * 2014-05-21 2015-08-19 北汽福田汽车股份有限公司 Method and system for remotely updating terminal equipment program
CN105827413A (en) * 2016-03-15 2016-08-03 乐视移动智能信息技术(北京)有限公司 Electronic terminal, and system safety verification device and method thereof
CN108089943A (en) * 2016-11-21 2018-05-29 比亚迪股份有限公司 Program excutive method, device and terminal based on MCU system
CN107608689A (en) * 2017-08-07 2018-01-19 阿里巴巴集团控股有限公司 The update method of application program, device and electronic equipment in client
CN109495532A (en) * 2017-09-13 2019-03-19 北京京东尚科信息技术有限公司 Client update method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360175A (en) * 2021-08-11 2021-09-07 新石器慧通(北京)科技有限公司 Application updating method of vehicle controller and vehicle controller

Similar Documents

Publication Publication Date Title
US10075536B2 (en) Transferring a pairing from one pair of devices to another
CN106648669B (en) Product equipment remote firmware upgrading method and system
CN105162841A (en) Domestic appliance control method and system
CN1960434B (en) Method, devices for implementing upgrading TV system
CN101958799B (en) Method, device and system for updating terminal
CN107273160A (en) A kind of method and device of edition upgrading
CN104866333A (en) Upgrading system and upgrading method for software in household appliances
CN109753297A (en) Method for upgrading software, device and readable storage medium storing program for executing when terminal standby
CN103970553A (en) Control method for function upgrading of household appliance product
CN106850241A (en) A kind of vehicle-mounted OBD terminals and its remote upgrade method
CN103200022B (en) A kind of data download abnormality eliminating method, equipment and system
JP5895385B2 (en) Image output apparatus and program thereof
CN109002305B (en) Method and system for updating equipment program
CN111026408A (en) Method and device for managing application and computer storage medium
CN112104477A (en) Online updating method and system for firmware of electric control end and WiFi module
CN105045671A (en) Method and device for upgrading systems of intelligent terminals
CN112825036A (en) Program updating method and device, electronic equipment and storage medium
CN112486733B (en) System restoration method, device, terminal and storage medium
US20170168796A1 (en) Method and electronic apparatus for transferring application program from pc to mobile apparatus
CN107396185B (en) Upgrading method and system
CN108920338A (en) A kind of method and terminal indicating file system state
CN104836820A (en) Method and system for client interaction, and client terminals
US9027158B2 (en) Download method of media contents
KR101206639B1 (en) Server and Method for updating firmware in Mobile communication terminal
CN110851161B (en) Firmware updating method for intelligent household equipment

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