CN112256301A - Application online upgrading method, device, equipment and computer readable storage medium - Google Patents

Application online upgrading method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112256301A
CN112256301A CN202011121431.5A CN202011121431A CN112256301A CN 112256301 A CN112256301 A CN 112256301A CN 202011121431 A CN202011121431 A CN 202011121431A CN 112256301 A CN112256301 A CN 112256301A
Authority
CN
China
Prior art keywords
upgrade
application
upgrading
online
file
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
CN202011121431.5A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011121431.5A priority Critical patent/CN112256301A/en
Publication of CN112256301A publication Critical patent/CN112256301A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to data updating and provides an application online upgrading method, device and equipment and a readable storage medium. According to the invention, the upgrade file of the target application is verified, and the subsequent upgrade process is started when the verification is passed, so that the safety and the correctness of the upgrade file are ensured; the target application is upgraded on line according to the installation configuration file in the XML format, so that a complicated process that a user develops an upgrading program according to an interface document is avoided; by performing stability test on the target application after upgrading and judging that online upgrading is completed only after the target application passes the stability test, the defect that an upgraded application is not tested on the spot in an internet of things online upgrading system in the current market is overcome, so that the usability of the upgraded target application is ensured, and the possibility of brick change of the upgraded equipment is reduced. In addition, the invention also relates to a block chain technology, and the XML installation configuration file can be stored in the block chain.

Description

Application online upgrading method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for online upgrade of an application.
Background
In recent years, human life has become more and more closely related to the internet of things. From the development situation of the current market, many application programs in the internet of things, such as Arm Linux, are difficult or impossible for users to operate and access. The fast life cycle of modern software requires a set of perfect online upgrading system for the internet of things software.
At present, part of internet of things online upgrading products appear in the market, generally provide services for customers in an interface mode, support various downloading and installing strategies, have strong data encryption capacity, provide abnormal processing mechanisms such as breakpoint continuous transmission and power-off protection, and have defects. On one hand, the products provide services in the form of interfaces, so that after a client takes the products, the client needs to understand the interface documents first and then develop upgrading programs according to the application requirements and the server requirements, and thus, a great deal of time and energy are wasted; on the other hand, the products pay more attention to exception handling in the upgrading process, the stability test after application upgrading is less supported, and the possibility of equipment brick changing after upgrading is increased. Therefore, the above situations all reflect the problem that the existing online upgrading method for the application of the internet of things is poor in reliability.
Disclosure of Invention
The invention mainly aims to provide an application online upgrading method, device, equipment and computer readable storage medium, and aims to solve the technical problem that the existing online upgrading method for the application of the Internet of things is poor in reliability.
In order to achieve the above object, the present invention provides an application online upgrade method, which is applied to a client, and comprises the following steps:
receiving an upgrade file of a target application on the client and an installation configuration file in an extensible markup language format, and verifying the upgrade file;
when the upgrade file passes the verification, locally installing the upgrade file on the client according to the installation configuration file so as to upgrade the target application on line and upgrade the target application on line;
and carrying out stability test on the target application after online upgrading.
Optionally, before receiving the upgrade file of the target application on the client and the installation configuration file in the extensible markup language format, the method further includes:
acquiring equipment application information of the target application, and sending an upgrade requirement checking request containing the equipment application information to an upgrade server, so that the upgrade server determines the upgrade requirement of the target application according to the upgrade requirement request and changes an original configuration file in a preset extensible markup language format according to the upgrade requirement to serve as the installation configuration file;
the receiving the upgrade file of the target application on the client and the installation configuration file in the extensible markup language format comprises:
receiving the installation configuration file sent by the upgrade server, and requesting the upgrade file from the upgrade server based on the installation configuration file to receive the upgrade file when the upgrade server sends the upgrade file, wherein the installation configuration file comprises a download policy, an installation policy, a download address and/or an upgrade package check code.
Optionally, before the obtaining the device application information of the target application, the method further includes:
when an online upgrading instruction is received, determining the target application based on the online upgrading instruction, and sending a request information inquiry instruction related to the target application to the upgrading server;
and acquiring response information of the upgrade server to the request information inquiry instruction to create the upgrade requirement check request based on the response information, wherein the response information comprises a request access address, a request access port number and/or a request access parameter.
Optionally, the verifying the upgrade file includes:
generating a local check code according to the target application, and acquiring an upgrade package check code in the installation configuration file, wherein the local check code is stored in a block chain;
judging whether the upgrade package check code is matched with the local check code;
if the upgrade package check code is matched with the local check code, judging that the upgrade file passes the check;
and if the upgrade package check code is not matched with the local check code, judging that the upgrade file does not pass the check.
Optionally, if the upgrade package check code does not match the local check code, after determining that the upgrade file fails to be checked, the method further includes:
recording the event that the upgrade package check code is not matched with the local check code as a loss;
and when the accumulated loss times exceed the preset time threshold value, exiting the current online upgrading process, and generating and displaying a verification failure message.
Optionally, the performing the stability test on the target application after the online upgrade includes:
circularly executing the application function of the target application after the online upgrade within a preset time length, and recording the execution state of the application function;
judging whether the execution state of the application function is abnormal or not;
if the execution state of the application function is abnormal, judging that the target application after the online upgrade does not pass the stability test;
and if the execution state of the application function is not abnormal, judging that the target application after the online upgrade passes the stability test.
Optionally, if the execution state of the application function is abnormal, after determining that the target application after the online upgrade fails the stability test, the method further includes:
generating and displaying application test failure information;
and determining a downloading strategy of the upgrading file so as to delete the upgrading package of the target application or return to the target application of the old version according to the downloading strategy.
In addition, to achieve the above object, the present invention further provides an application online upgrade apparatus, including:
the file checking module is used for receiving an upgrade file of a target application on the client and an installation configuration file in an extensible markup language format and checking the upgrade file;
the online upgrading module is used for locally installing the upgrading file on the client according to the installation configuration file when the upgrading file passes the verification so as to upgrade the target application online and upgrade the target application online;
and the application testing module is used for testing the stability of the target application after online upgrading.
Optionally, before receiving the upgrade file of the target application on the client and the installation configuration file in the extensible markup language format, the method further includes:
acquiring equipment application information of the target application, and sending an upgrade requirement checking request containing the equipment application information to an upgrade server, so that the upgrade server determines the upgrade requirement of the target application according to the upgrade requirement request and changes an original configuration file in a preset extensible markup language format according to the upgrade requirement to serve as the installation configuration file;
the step of receiving the upgrade file of the target application on the client and the installation configuration file in the extensible markup language format comprises the following steps:
receiving the installation configuration file sent by the upgrade server, and requesting the upgrade file from the upgrade server based on the installation configuration file to receive the upgrade file when the upgrade server sends the upgrade file, wherein the installation configuration file comprises a download policy, an installation policy, a download address and/or an upgrade package check code.
Optionally, before the obtaining the device application information of the target application, the method further includes:
when an online upgrading instruction is received, determining the target application based on the online upgrading instruction, and sending a request information inquiry instruction related to the target application to the upgrading server;
and acquiring response information of the upgrade server to the request information inquiry instruction to create the upgrade requirement check request based on the response information, wherein the response information comprises a request access address, a request access port number and/or a request access parameter.
Optionally, the verifying the upgrade file includes:
generating a local check code according to the target application, and acquiring an upgrade package check code in the installation configuration file, wherein the local check code is stored in a block chain;
judging whether the upgrade package check code is matched with the local check code;
if the upgrade package check code is matched with the local check code, judging that the upgrade file passes the check;
and if the upgrade package check code is not matched with the local check code, judging that the upgrade file does not pass the check.
Optionally, if the upgrade package check code does not match the local check code, after determining that the upgrade file fails to be checked, the method further includes:
recording the event that the upgrade package check code is not matched with the local check code as a loss;
and when the accumulated loss times exceed the preset time threshold value, exiting the current online upgrading process, and generating and displaying a verification failure message.
Optionally, the performing the stability test on the target application after the online upgrade includes:
circularly executing the application function of the target application after the online upgrade within a preset time length, and recording the execution state of the application function;
judging whether the execution state of the application function is abnormal or not;
if the execution state of the application function is abnormal, judging that the target application after the online upgrade does not pass the stability test;
and if the execution state of the application function is not abnormal, judging that the target application after the online upgrade passes the stability test.
Optionally, if the execution state of the application function is abnormal, after determining that the target application after the online upgrade fails the stability test, the method further includes:
generating and displaying application test failure information;
and determining a downloading strategy of the upgrading file so as to delete the upgrading package of the target application or return to the target application of the old version according to the downloading strategy.
In addition, to achieve the above object, the present invention further provides an online application upgrade apparatus, which includes a processor, a memory, and an online application upgrade program stored on the memory and executable by the processor, wherein when the online application upgrade program is executed by the processor, the steps of the online application upgrade method as described above are implemented.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium having an application online upgrade program stored thereon, wherein the application online upgrade program, when executed by a processor, implements the steps of the application online upgrade method as described above.
The invention provides an application online upgrading method, device, equipment and computer readable storage medium, wherein the application online upgrading method verifies an upgrading file of a target application, and enters a subsequent upgrading process when the verification is passed, so that the safety and the correctness of the upgrading file are ensured; the target application is upgraded on line according to the installation configuration file in the XML format, so that the complicated process of developing an upgrading program by a user according to an interface document is avoided; by performing stability test on the target application after upgrading and judging that online upgrading is completed only after the target application passes the stability test, the defects that whether the definition of the online upgrading system of the internet of things on the current market on upgrading success is only smooth in the upgrading process and the upgraded application is not tested on the spot are overcome, the usability of the upgraded target application is ensured, the possibility of equipment brick change after upgrading is reduced, and the technical problem that the reliability of the existing online upgrading method of the application of the internet of things is poor is solved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an application online upgrade device according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of the online upgrade method according to the present invention;
FIG. 3 is a schematic diagram of functional modules of the online upgrade apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The application online upgrading method related by the embodiment of the invention is mainly applied to application online upgrading equipment, and the application online upgrading equipment can be equipment with display and processing functions, such as a PC (personal computer), a portable computer, a mobile terminal and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of an application online upgrade device according to an embodiment of the present invention. In this embodiment of the present invention, the application online upgrade apparatus may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a magnetic disk memory), and optionally, the memory 1005 may be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 does not constitute a limitation of the application of the online upgrade apparatus, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
With continued reference to FIG. 1, memory 1005 of FIG. 1, which is one type of computer-readable storage medium, may include an operating system, a network communication module, and an application online upgrade program.
In fig. 1, the network communication module is mainly used for connecting to a server and performing data communication with the server; and the processor 1001 may call the application online upgrade program stored in the memory 1005 and execute the application online upgrade method provided by the embodiment of the present invention.
Based on the hardware structure, the invention provides various embodiments of the application online upgrading method.
In recent years, human life has become more and more closely related to the internet of things. From the development situation of the current market, many application programs in the internet of things, such as Arm Linux, are difficult or impossible for users to operate and access. The fast life cycle of modern software requires a set of perfect online upgrading system for the internet of things software.
At present, part of internet of things online upgrading products appear in the market, generally provide services for customers in an interface mode, support various downloading and installing strategies, have strong data encryption capacity, provide abnormal processing mechanisms such as breakpoint continuous transmission and power-off protection, and have defects. On one hand, the products provide services in the form of interfaces, so that after a client takes the products, the client needs to understand the interface documents first and then develop upgrading programs according to the application requirements and the server requirements, and thus, a great deal of time and energy are wasted; on the other hand, the products pay more attention to exception handling in the upgrading process, the stability test after application upgrading is less supported, and the possibility of equipment brick changing after upgrading is increased. Therefore, the above situations all reflect the problem that the existing online upgrading method for the application of the internet of things is poor in reliability.
In order to solve the problems, the invention provides an application online upgrading method, namely, an upgrading file of a target application is verified, and a subsequent upgrading process is started only when the verification is passed, so that the safety and the correctness of the upgrading file are ensured; the target application is upgraded on line according to the installation configuration file in the XML format, so that a complicated process that a user develops an upgrading program according to an interface document is avoided; by performing stability test on the target application after upgrading and judging that online upgrading is completed only after the target application passes the stability test, the defects that whether the definition of the online upgrading system of the internet of things in the current market on upgrading success is only smooth in the upgrading process and the upgraded application is not tested on the spot are overcome, the usability of the upgraded target application is ensured, the possibility of equipment changing into bricks after application upgrading is reduced, and the technical problem that the reliability of the existing online upgrading method of the application of the internet of things is poor is solved.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the online upgrade method of the present invention.
A first embodiment of the present invention provides an application online upgrade method, including the following steps:
step S10, receiving the upgrade file of the target application on the client and the installation configuration file in the format of the extensible markup language, and checking the upgrade file;
in this embodiment, the method is applied to a client, and the client is provided with application software which needs to be updated online. The upgrade server is used for upgrading the application software on the client on line. The upgrade file is typically a file that contains the installation package as well as other download installation related information. The XML installation configuration file is a configuration file in an Extensible Markup Language (XML) file format. It should be noted that, most of the online upgrading systems for internet of things software in the current market are provided for users in an interface form, and users need to develop upgrading programs according to interface documents, which is very tedious in process. The method is provided for an upgrading server and a client which are finished by a user, the user only needs to modify the XML configuration file when upgrading program deployment and deployment aiming at a specific upgrading, and compared with an Application Programming Interface (API), the method is much more convenient to understand and use. The following steps are required for deployment of the upgrade program: the client needs to deploy an access address, a port number, an access parameter of the upgrade requirement check request, a path for storing the temporary file, and the like. And the server side needs to configure the upgrading requirement to check whether the responded data items are required to be upgraded or not, and download and install strategies, download addresses and the like. The following steps are required for a specific upgrade: the server only needs to deploy the application path of the latest version and the optional upgrading equipment group.
Specifically, if a user needs to perform online upgrade on a certain internet of things application program on a client at the moment and sends an instruction for online upgrade of the application program to the client, the client needs to first obtain an upgrade file of the application program and an installation configuration file in an XML file format from an upgrade server, and then check the upgrade file to verify the correctness and availability of the upgrade file.
Step S20, when the upgrade file passes the verification, locally installing the upgrade file on the client according to the installation configuration file to upgrade the target application online and upgrade the target application online;
and step S30, performing stability test on the target application after online upgrade.
In this embodiment, the XML installation configuration file generally includes information such as a download policy, an installation policy, and a download address, and when the client performs online application upgrade, the client needs to install the information to install the upgrade file. After the client installs the upgrade file of the target application, the stability test of the upgraded target application is required, the target application is really operated and the operation state of the target application is recorded, so that the upgraded application is ensured to be usable to the maximum extent. And only when the upgraded target application passes the stability test, the online upgrade of the target application can be judged to be successfully completed.
As a specific embodiment, the online upgrade of the application program of the internet of things is performed according to the following steps.
First, the upgrade server issues the latest version of the application. This step requires deployment of the application latest version path and optional upgrade device population.
And secondly, the client sends an upgrade requirement checking request. The client collects current application information and other related information according to the local configuration file and sends the current application information and other related information to the server.
And thirdly, calculating the upgrading requirement by the upgrading server. After receiving the request of checking the upgrading requirement of the client, the upgrading server compares the device application information with the latest version application information, checks the upgrading requirement by combining the client group information, and judges whether the current client is in the optional upgrading device group and whether the version of the target application is required to be updated. After the target application on the client needs to be upgraded online, the upgrade server also needs to calculate information such as a downloading and installing strategy, a downloading address, an upgrade package check code and the like.
And fourthly, the upgrading server responds to the upgrading requirement of the client. And the upgrading server returns the upgrading requirement check result to the client, and if the upgrading is required, the downloading server issues the information such as the downloading and installing strategy, the downloading address, the upgrading packet check code and the like.
And fifthly, the client judges whether the target application needs to be upgraded. If the client judges that the target application needs to be upgraded, a downloading process is carried out; if not, exiting the upgrading program.
And sixthly, the client requests for upgrading the file. And the client updates the file to the server hydrogen according to a downloading strategy, wherein the downloading strategy can be whole package downloading or differential downloading.
And seventhly, the upgrading server issues the upgrading file. And the upgrading server provides the upgrading file to the client according to the request of the last step.
And eighthly, the client checks the upgrade file. After the client finishes downloading the upgrade file, the client locally calculates the check code and compares the check code with the check code calculated by the upgrade server, and the download is carried out again if the verification fails.
And ninthly, installing the upgrade file. And the client side installs the upgrade file according to the installation strategy. The installation strategy can be selected from immediate installation, timed installation, restart installation, leisure installation and the like. When installing, firstly decompressing the downloaded upgrade file, and then installing the upgrade file according to the XML installation configuration file. The XML installation configuration file is automatically calculated and generated by the upgrade server before sending the upgrade file.
And step ten, applying the test. Testing whether the upgraded application can normally run is an important method for preventing the equipment of the Internet of things from changing bricks. When the application test is carried out, if no abnormity is found after a period of time, recording the abnormity in the upgrade configuration; if the application crashes when not running normally for the specified time, no recording will occur.
And step eleven, sending an upgrading result to an upgrading server. The upgrading server can obtain a test result after accessing the application test configuration item, and if the application normally runs, the client replies that the upgrading of the upgrading server is finished; and if the application runs abnormally, the client replies that the upgrading of the upgrading server fails.
And step ten, the upgrading server receives the upgrading result. And the upgrading server receives an upgrading result sent by the client, and if the upgrading is successful, the target application information of the client is updated.
In this embodiment, the present invention receives an upgrade file of a target application on the client and an installation configuration file in an extensible markup language format, and verifies the upgrade file; when the upgrade file passes the verification, locally installing the upgrade file on the client according to the installation configuration file so as to upgrade the target application on line and upgrade the target application on line; and carrying out stability test on the target application after online upgrading. By the mode, the upgrade file of the target application is verified, and the subsequent upgrade process is started when the verification is passed, so that the safety and the correctness of the upgrade file are ensured; the target application is upgraded on line according to the installation configuration file in the XML format, so that a complicated process that a user develops an upgrading program according to an interface document is avoided; by performing stability test on the target application after upgrading and judging that online upgrading is completed only after the target application passes the stability test, the defects that whether the definition of the online upgrading system of the internet of things in the current market on upgrading success is only smooth in the upgrading process and the upgraded application is not tested on the spot are overcome, the usability of the upgraded target application is ensured, the possibility of equipment changing into bricks after application upgrading is reduced, and the technical problem that the reliability of the existing online upgrading method of the application of the internet of things is poor is solved.
Further, based on the first embodiment shown in fig. 2, a second embodiment of the present invention is provided for applying an online upgrade method. In this embodiment, before receiving the upgrade file of the target application on the client and the installation configuration file in the xml format, the method further includes:
acquiring equipment application information of the target application, and sending an upgrade requirement checking request containing the equipment application information to an upgrade server, so that the upgrade server determines the upgrade requirement of the target application according to the upgrade requirement request and changes an original configuration file in a preset extensible markup language format according to the upgrade requirement to serve as the installation configuration file;
the step of receiving the upgrade file of the target application on the client and the installation configuration file in the extensible markup language format comprises the following steps:
receiving the installation configuration file sent by the upgrade server, and requesting the upgrade file from the upgrade server based on the installation configuration file to receive the upgrade file when the upgrade server sends the upgrade file, wherein the installation configuration file comprises a download policy, an installation policy, a download address and/or an upgrade package check code.
In this embodiment, it should be noted that, when the client deploys the upgrade program, it needs to deploy information such as an access address, a port number, an access parameter, a path for storing the temporary file, and the like of the upgrade requirement check request; the upgrade server needs to configure upgrade requirements to check whether the responded data items need to be upgraded, download and install strategies, download addresses and the like. The original XML configuration file is a configuration file containing installation configuration information such as a default downloading strategy and an installation strategy.
The client needs to acquire device application information such as an application name, a current version and the like according to the local configuration file, and send the device application information to the upgrade client as main information of the upgrade requirement check request. After receiving the request, the upgrade client may further determine whether the version of the target application currently installed on the client is an old version compared to a latest version if the target application is in the current optional upgrade device group, and if the upgrade server determines that the version of the target application currently installed on the client is an old version, the upgrade client determines that the client needs to upgrade the target application online, and determines a download policy, an installation policy, a download address, an upgrade package check code, etc. in the upgrade task, and modifies the preset XML installation configuration file using the update client to obtain a target XML installation configuration file, wherein the download policy may include whole package download and differential download, the installation policy may include immediate installation, timed installation, re-installation and installation in time, and the upgrade server obtains the latest target XML installation configuration file, it may be sent to the client; and if the upgrade server judges that the target application is not in the current optional upgrade equipment group or the target application is in the current optional upgrade equipment group but the currently installed version of the client is the latest version, exiting the current upgrade process, and generating and outputting the information without upgrading.
Further, before the obtaining the device application information of the target application, the method further includes:
when an online upgrading instruction is received, determining the target application based on the online upgrading instruction, and sending a request information inquiry instruction related to the target application to the upgrading server;
and acquiring response information of the upgrade server to the request information inquiry instruction to create the upgrade requirement check request based on the response information, wherein the response information comprises a request access address, a request access port number and/or a request access parameter.
In this embodiment, the online upgrade instruction may be initiated manually, or may be initiated by the client according to a preset program, which is not limited in this embodiment. Specifically, a user initiates an online upgrade instruction for a certain internet of things application program on a client, and the client receives the instruction to determine a target application which needs to be upgraded currently. When the client determines that the target application needs to be upgraded online currently, a request information inquiry instruction for inquiring the relevant information of the upgrade requirement check request is sent to the upgrade client. After receiving the query instruction, the upgrade server determines information such as a default access address, a port number, an access parameter, a temporary file path and the like of an upgrade requirement check request to be deployed by the client according to the current target application, and replies the information to the client according to the information.
In addition, the user can also change the information such as the access address, the port number, the access parameter, the path for storing the temporary file and the like in the XML file according to the actual requirement so as to complete the configuration of the client upgrading program without adopting the default information sent by the upgrading client.
Further, the verifying the upgrade file includes:
generating a local check code according to the target application, and acquiring an upgrade package check code in the installation configuration file, wherein the local check code is stored in a block chain;
judging whether the upgrade package check code is matched with the local check code;
if the upgrade package check code is matched with the local check code, judging that the upgrade file passes the check;
and if the upgrade package check code is not matched with the local check code, judging that the upgrade file does not pass the check.
In this embodiment, the local check code is automatically generated by the client according to the target application, and the upgrade package check code is automatically generated by the upgrade client according to the target application. After the client automatically calculates and generates the local check code, the client matches the local check code with the upgrade package check code sent by the upgrade client. If the client determines that the upgrade package check code is matched with the local check code, determining that the current upgrade file passes the check; if the client determines that the upgrade package check code is not matched with the local check code, the client determines that the current upgrade file does not pass the check, the upgrade file cannot be used for upgrading the target application, and single matching or multiple matching can be performed in practical application.
It is emphasized that, to further ensure the privacy and security of the local check code, the local check code may also be stored in a node of a block chain.
Further, if the upgrade package check code does not match the local check code, determining that the upgrade file fails to be checked, further comprising:
recording the event that the upgrade package check code is not matched with the local check code as a loss;
and when the accumulated loss times exceed the preset time threshold value, exiting the current online upgrading process, and generating and displaying a verification failure message.
In this embodiment, the upgrade package check code and the local check code are matched for multiple times, the local check code may be regenerated by the client when one matching is unsuccessful, and the same local check code may be used for multiple matching. And the client records the event that the upgrade package check code is not matched with the local check code every time as loss once, and performs the next matching once the upgrade package check code is not matched with the local check code. And directly exiting the current upgrading process until the accumulated loss times exceed a preset time threshold, and generating and displaying verification failure information to prompt a user. The preset time threshold may be flexibly set according to actual requirements, which is not specifically limited in this embodiment.
Furthermore, because the internet of things software online upgrading system on the current market is mostly provided for clients in an interface form, users need to develop upgrading programs according to interface documents, and the process is complicated. In addition, the file in the XML format is low in understanding difficulty, and a user can change the XML file according to actual requirements, so that the method is simple and easy to use; by matching the check codes respectively generated by the client and the upgrade server, the upgrade file can be quickly and conveniently checked; by accumulating the number of mismatches, the current upgrade process is exited until it meets the corresponding criteria, so that time does not need to be spent in the failed upgrade process.
Further, based on the first embodiment shown in fig. 2, a third embodiment of the present invention is provided for applying an online upgrade method. In this embodiment, the performing the stability test on the target application after the online upgrade includes:
circularly executing the application function of the target application after the online upgrade within a preset time length, and recording the execution state of the application function;
judging whether the execution state of the application function is abnormal or not;
if the execution state of the application function is abnormal, judging that the target application after the online upgrade does not pass the stability test;
and if the execution state of the application function is not abnormal, judging that the target application after the online upgrade passes the stability test.
In this embodiment, the preset duration may be flexibly set according to actual requirements, which is not specifically limited in this embodiment. Testing whether the upgraded application can normally run is an important method for preventing the equipment of the Internet of things from changing bricks. Programs in internet of things devices generally perform certain functions by cycling through the programs. And the client circularly executes the application function of the target application after the online upgrade within a preset time length, records the execution state every time, and judges whether the recorded execution state information within the preset time length is abnormal. If the client detects that the execution state is abnormal, the target application after online upgrading is judged not to pass the stability test; and if the client detects that the execution state is not abnormal, judging that the target application after the online upgrading passes the stability test, and smoothly finishing the current online upgrading of the target application.
Further, if the execution state of the application function is abnormal, after determining that the target application after the online upgrade fails the stability test, the method further includes:
generating and displaying application test failure information;
and determining a downloading strategy of the upgrading file so as to delete the upgrading package of the target application or return to the target application of the old version according to the downloading strategy.
In this embodiment, after determining that the target application after the online upgrade fails the stability test, the client generates and displays a prompt message indicating that the application test fails, so as to prompt the user that the upgraded target application fails the stability test, and selects a corresponding restore operation according to a previous download policy. Specifically, if the upgrade file is downloaded in a whole package manner, the newly installed application is deleted; if the upgrade file is downloaded in a differential downloading mode, the target application of the old version should be rolled back.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, the definition of successful upgrade through the internet of things online upgrade system in the current market is only whether the upgrade process is smooth, and the on-site test of the upgraded application is not performed. The invention increases the procedure of testing application on the basis of ensuring the integrity of the upgrading process, can more truly explain the usability of the upgraded application, and reduces the possibility of equipment changing into bricks.
In addition, as shown in fig. 3, to achieve the above object, the present invention further provides an online application upgrade apparatus, including:
the file checking module 10 is configured to receive an upgrade file of a target application on the client and an installation configuration file in an extensible markup language format, and check the upgrade file;
the online upgrading module 20 is configured to, when the upgrade file passes the verification, locally install the upgrade file on the client according to the installation configuration file, so as to upgrade the target application online;
and the application testing module 30 is used for performing stability testing on the target application after online upgrading.
Optionally, the application online upgrade apparatus further includes:
the request sending module is used for acquiring the equipment application information of the target application and sending an upgrading requirement checking request containing the equipment application information to an upgrading server so that the upgrading server can determine the upgrading requirement of the target application according to the upgrading requirement request and change an original configuration file in a preset extensible markup language format according to the upgrading requirement to be used as the installation configuration file;
the file verification module 10 includes:
and the configuration file receiving unit is used for receiving the installation configuration file sent by the upgrade server, requesting the upgrade file from the upgrade server based on the installation configuration file, and receiving the upgrade file when the upgrade server sends the upgrade file, wherein the installation configuration file comprises a download strategy, an installation strategy, a download address and/or an upgrade package check code.
Optionally, the application online upgrade apparatus further includes:
the query sending module is used for determining the target application based on the online upgrading instruction and sending a request information query instruction related to the target application to the upgrading server when the online upgrading instruction is received;
and the response information acquisition module is used for acquiring response information of the upgrade server to the request information inquiry instruction so as to create the upgrade requirement check request based on the response information, wherein the response information comprises a request access address, a request access port number and/or a request access parameter.
Optionally, the file verification module 10 further includes:
the verification code acquisition unit is used for generating a local verification code according to the target application and acquiring an upgrade package verification code in the installation configuration file, wherein the local verification code is stored in a block chain;
the matching judgment unit is used for judging whether the upgrade package check code is matched with the local check code;
the first matching unit is used for judging that the upgrade file passes the verification if the upgrade package verification code is matched with the local verification code;
and the second matching unit is used for judging that the upgrade file does not pass the inspection if the upgrade package check code is not matched with the local check code.
Optionally, the second matching unit is further configured to:
recording the event that the upgrade package check code is not matched with the local check code as a loss;
and when the accumulated loss times exceed the preset time threshold value, exiting the current online upgrading process, and generating and displaying a verification failure message.
Optionally, the application testing module 30 includes:
the state recording unit is used for circularly executing the application function of the target application after the online upgrade within a preset time length and recording the execution state of the application function;
an abnormality judgment unit configured to judge whether an execution state of the application function is abnormal;
the first exception unit is used for judging that the target application after the online upgrade does not pass the stability test if the execution state of the application function is abnormal;
and the second exception unit is used for judging that the target application after the online upgrade passes the stability test if the execution state of the application function is not abnormal.
Optionally, the application testing module 30 further includes:
the test information display unit is used for generating and displaying application test failure information;
and the download restoration unit is used for determining the download strategy of the upgrade file so as to delete the upgrade package of the target application or return to the old version of the target application according to the download strategy.
The invention also provides application online upgrading equipment.
The application online upgrading device comprises a processor, a memory and an application online upgrading program which is stored on the memory and can run on the processor, wherein when the application online upgrading program is executed by the processor, the steps of the application online upgrading method are realized.
The method for implementing the online upgrade application program when executed may refer to various embodiments of the online upgrade application method of the present invention, and will not be described herein again.
In addition, the embodiment of the invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores an application online upgrade program, wherein the application online upgrade program, when executed by a processor, implements the steps of the application online upgrade method as described above.
The method for implementing the online upgrade application program when executed may refer to various embodiments of the online upgrade application method of the present invention, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An application online upgrading method is applied to a client side and comprises the following steps:
receiving an upgrade file of a target application on the client and an installation configuration file in an extensible markup language format, and verifying the upgrade file;
when the upgrade file passes the verification, locally installing the upgrade file on the client according to the installation configuration file so as to upgrade the target application on line;
and carrying out stability test on the target application after online upgrading.
2. The method of claim 1, wherein prior to receiving the upgrade file and the installation configuration file in extensible markup language format for the target application on the client, further comprising:
acquiring equipment application information of the target application, sending an upgrading requirement checking request containing the equipment application information to an upgrading server, so that the upgrading server determines the upgrading requirement of the target application according to the upgrading requirement request, and changing an original configuration file in a preset extensible markup language format according to the upgrading requirement to serve as the installation configuration file;
the receiving the upgrade file of the target application on the client and the installation configuration file in the extensible markup language format comprises:
receiving the installation configuration file sent by the upgrade server, and requesting the upgrade file from the upgrade server based on the installation configuration file to receive the upgrade file when the upgrade server sends the upgrade file, wherein the installation configuration file comprises a download policy, an installation policy, a download address and/or an upgrade package check code.
3. The method of claim 2, wherein prior to obtaining the device application information for the target application, further comprising:
when an online upgrading instruction is received, determining the target application based on the online upgrading instruction, and sending a request information inquiry instruction related to the target application to the upgrading server;
and acquiring response information of the upgrade server to the request information inquiry instruction to create the upgrade requirement check request based on the response information, wherein the response information comprises a request access address, a request access port number and/or a request access parameter.
4. The method of claim 2, wherein the verifying the upgrade file comprises:
generating a local check code according to the target application, and acquiring an upgrade package check code in the installation configuration file, wherein the local check code is stored in a block chain;
judging whether the upgrade package check code is matched with the local check code;
if the upgrade package check code is matched with the local check code, judging that the upgrade file passes the check;
and if the upgrade package check code is not matched with the local check code, judging that the upgrade file does not pass the check.
5. The method of claim 4, wherein if the upgrade package check code does not match the local check code, determining that the upgrade file has not passed the verification, further comprising:
recording the event that the upgrade package check code is not matched with the local check code as a loss;
and when the accumulated loss times exceed the preset time threshold value, exiting the current online upgrading process, and generating and displaying a verification failure message.
6. The method of claim 1, wherein the performing the stability test on the target application after the online upgrade comprises:
circularly executing the application function of the target application after the online upgrade within a preset time length, and recording the execution state of the application function;
judging whether the execution state of the application function is abnormal or not;
if the execution state of the application function is abnormal, judging that the target application after the online upgrade does not pass the stability test;
and if the execution state of the application function is not abnormal, judging that the target application after the online upgrade passes the stability test.
7. The method of claim 6, wherein after determining that the target application after the online upgrade fails the stability test if the execution state of the application function is abnormal, the method further comprises:
generating and displaying application test failure information;
and determining a downloading strategy of the upgrading file so as to delete the upgrading package of the target application or return to the target application of the old version according to the downloading strategy.
8. An online application upgrade apparatus, comprising:
the file checking module is used for receiving an upgrade file of a target application on the client and an installation configuration file in an extensible markup language format and checking the upgrade file;
the online upgrading module is used for locally installing the upgrading file on the client according to the installation configuration file when the upgrading file passes the verification so as to upgrade the target application online;
and the application testing module is used for testing the stability of the target application after online upgrading.
9. An online application upgrade device, characterized in that the online application upgrade device comprises a processor, a memory, and an online application upgrade program stored on the memory and executable by the processor, wherein the online application upgrade program, when executed by the processor, implements the steps of the online application upgrade method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which an application online upgrade program is stored, wherein the application online upgrade program, when executed by a processor, implements the steps of the application online upgrade method according to any one of claims 1 to 7.
CN202011121431.5A 2020-10-19 2020-10-19 Application online upgrading method, device, equipment and computer readable storage medium Pending CN112256301A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011121431.5A CN112256301A (en) 2020-10-19 2020-10-19 Application online upgrading method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011121431.5A CN112256301A (en) 2020-10-19 2020-10-19 Application online upgrading method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112256301A true CN112256301A (en) 2021-01-22

Family

ID=74245606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011121431.5A Pending CN112256301A (en) 2020-10-19 2020-10-19 Application online upgrading method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112256301A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461873A (en) * 2014-11-19 2015-03-25 青岛海信电器股份有限公司 Testing method and device of application programs
CN109358883A (en) * 2018-11-05 2019-02-19 珠海格力电器股份有限公司 Programme upgrade method, system and application system, storage medium
CN110377321A (en) * 2019-07-22 2019-10-25 平安科技(深圳)有限公司 Method, apparatus, terminal and the storage medium of application program updating
CN110471689A (en) * 2019-08-22 2019-11-19 北京元安物联技术有限公司 A kind of application program updating method and device
CN111427609A (en) * 2020-04-01 2020-07-17 山东汇贸电子口岸有限公司 Automatic application upgrading method based on multi-node server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461873A (en) * 2014-11-19 2015-03-25 青岛海信电器股份有限公司 Testing method and device of application programs
CN109358883A (en) * 2018-11-05 2019-02-19 珠海格力电器股份有限公司 Programme upgrade method, system and application system, storage medium
CN110377321A (en) * 2019-07-22 2019-10-25 平安科技(深圳)有限公司 Method, apparatus, terminal and the storage medium of application program updating
CN110471689A (en) * 2019-08-22 2019-11-19 北京元安物联技术有限公司 A kind of application program updating method and device
CN111427609A (en) * 2020-04-01 2020-07-17 山东汇贸电子口岸有限公司 Automatic application upgrading method based on multi-node server

Similar Documents

Publication Publication Date Title
CN108595221B (en) Plug-in loading method, device, server and storage medium of PaaS platform
US7480907B1 (en) Mobile services network for update of firmware/software in mobile handsets
CN107547239B (en) Configuration object updating method and device
CN105138347A (en) Difference upgrade patch generating method, software upgrading method and corresponding apparatus
US20060156129A1 (en) System for maintaining data
EP1327191A1 (en) Non-invasive automatic offsite patch fingerprinting and updating system and method
EP1803313A1 (en) Method and system for controlling software version updates
CN112650520A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN109308184B (en) Middleware installation and update method, device and computer readable storage medium
CN113642004A (en) Container mirror image security scanning and repairing method, device and equipment
CN112615747A (en) Method and device for automatically deploying and configuring network equipment
CN111698558A (en) Television software upgrading method, television terminal and computer readable storage medium
CN114780019A (en) Electronic device management method and device, electronic device and storage medium
CN110597662A (en) Backup data automatic verification method and device, user equipment and storage medium
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN112256283A (en) Application version control method and device for Android equipment
CN112256301A (en) Application online upgrading method, device, equipment and computer readable storage medium
CN114003264B (en) Linux operating system upgrading method
CN114237722A (en) System starting method, device, equipment and engineering vehicle
CN114443065A (en) Platform deployment method, platform deployment device, electronic equipment and storage medium
CN112711430A (en) ADB-based non-network equipment upgrading method and system and readable storage medium
CN112947951A (en) Software installation method and related equipment
CN107179917A (en) System architecture and dispositions method for the operating system of installing multiple test systems
CN112486509A (en) Jar package assembly heat deployment method and system
CN111782222A (en) Object deployment method and device

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