CN115357260A - Program upgrading method and device for terminal equipment, terminal equipment and storage medium - Google Patents

Program upgrading method and device for terminal equipment, terminal equipment and storage medium Download PDF

Info

Publication number
CN115357260A
CN115357260A CN202210864443.XA CN202210864443A CN115357260A CN 115357260 A CN115357260 A CN 115357260A CN 202210864443 A CN202210864443 A CN 202210864443A CN 115357260 A CN115357260 A CN 115357260A
Authority
CN
China
Prior art keywords
program
upgrading
upgraded
file
upgrade
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
CN202210864443.XA
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.)
Shenzhen Clou Electronics Co Ltd
Original Assignee
Shenzhen Clou Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Clou Electronics Co Ltd filed Critical Shenzhen Clou Electronics Co Ltd
Priority to CN202210864443.XA priority Critical patent/CN115357260A/en
Publication of CN115357260A publication Critical patent/CN115357260A/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
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a program upgrading method and device of terminal equipment, the terminal equipment and a storage medium, wherein the method is applied to the terminal and comprises the following steps: receiving an upgrade file of a program to be upgraded, wherein the upgrade file of the program to be upgraded comprises at least one upgrade program package of the program to be upgraded and an upgrade script file corresponding to the upgrade program package; decompressing an upgrade file of a program to be upgraded to obtain the upgrade file of the decompressed upgrade program, and recording decompressed information; finding the upgrading script file in the upgrading file of the decompressed upgrading program, executing the upgrading script file, sequentially calling the upgrading program package of the program to be upgraded corresponding to the upgrading script file, upgrading the program to be upgraded, and upgrading the program to be upgraded to the version in the program package to be upgraded. The method does not need to modify the main program of the equipment, can directly upgrade the program needing to be upgraded in the terminal, improves the upgrading efficiency of the terminal equipment, and reduces the upgrading workload.

Description

Program upgrading method and device for terminal equipment, terminal equipment and storage medium
Technical Field
The invention belongs to the technical field of computers, and relates to a program upgrading method and device of terminal equipment, the terminal equipment and a storage medium.
Background
Along with the increasing of the holding capacity of the automatic terminal equipment, more frequent function change, more frequent product APP and the like, the upgrading work of various APP program function modules and local communication modules in the terminal equipment and related products such as an electric energy meter connected to the terminal equipment is more frequent, the upgrading work of the existing automatic terminal equipment is also frequent, firstly, the upgrading program package is transmitted to the terminal equipment by the master station platform, the terminal equipment identifies according to the file name of the received upgrading program package, and whether the upgrading program package is an effective upgrading program package or not and a program which needs to be upgraded and corresponds to the upgrading program package are judged. If terminal equipment increases new function module or APP procedure, or current function module, APP program interface has taken place the change, then can make main website platform to terminal equipment among the terminal equipment main program, terminal equipment to function module and APP's the corresponding modification of upgrade interface, just can satisfy its upgrading demand, and then lead to terminal equipment main program frequent modification, and must be with the on-the-spot main program upgrading back of fortune equipment earlier, just can support relevant changeable function module to upgrade the action, a large amount of work has been increased.
Meanwhile, in some provincial main station platforms, after the upgrading program package is transmitted into the main station platform, the name of the program package can be randomly modified, the modified name is different and irregular, so that the terminal equipment cannot effectively identify the upgrading program package, and the design and upgrading work of the terminal program is very difficult.
Disclosure of Invention
Based on the method and the device, the terminal equipment and the storage medium for upgrading the program of the terminal equipment, the problem that the upgrading interface is not uniform in the upgrading process, the main program of the terminal and the field stock terminal equipment need to be modified, and the name of the upgrading program package is randomly modified by the main station platform is solved.
The invention provides a program upgrading method of terminal equipment, which is applied to a terminal and comprises the following steps:
s1, receiving an upgrading file of a program to be upgraded, wherein the upgrading file of the program to be upgraded comprises at least one upgrading program package of the program to be upgraded and an upgrading script file corresponding to the upgrading program package;
s2, decompressing the upgrade file of the program to be upgraded to obtain the upgrade file of the decompressed upgrade program, and recording decompressed information;
and S3, finding the upgrading script file in the upgrading file of the decompressed upgrading program, executing the upgrading script file, sequentially calling the upgrading program package of the program to be upgraded corresponding to the upgrading script file, upgrading the program to be upgraded, and upgrading the program to be upgraded to the version in the program package to be upgraded.
Further, after step S2 and before step S3, the method further includes:
detecting whether the upgrade file of the decompressed upgrade program meets the upgrade regulation;
if the upgrade file of the decompressed upgrade program conforms to the upgrade specification, executing step S3;
if the upgrade file of the decompressed upgrade program does not accord with the upgrade regulation, discarding the upgrade file of the decompressed upgrade program, and generating the feedback message of the upgrade failure of the program to be upgraded.
Further, after step S3, the method further includes:
and deleting the upgrading file of the program to be upgraded and the upgrading file of the decompressed upgrading program according to the decompression information.
Further, the upgrade file of the program to be upgraded further includes: upgrading the required configuration file;
and the upgrading file of the program to be upgraded is obtained by putting the upgrading program package of the program to be upgraded, the upgrading script file corresponding to the upgrading program package and the configuration file required by upgrading into a new folder and packaging the new folder.
Furthermore, the name of the upgrading file of the program to be upgraded can be modified at will;
and when the name of the upgrading program package of the program to be upgraded is modified, the content of the upgrading script file corresponding to the upgrading program package of the program to be upgraded is also modified adaptively.
Further, the program to be upgraded is at least one of an application program, a functional module and an application tool corresponding to the functional module.
The invention provides a program upgrading method of terminal equipment, which is applied to a server side and comprises the following steps:
acquiring an upgrading file of a program to be upgraded;
adaptively modifying the name of the upgrading file of the program to be upgraded according to the management requirement;
when the issuing triggering of the upgrading file of the program to be upgraded is met, sending the upgrading file of the program to be upgraded to the terminal equipment; the upgrading file of the program to be upgraded comprises at least one upgrading program package of the program to be upgraded and an upgrading script file corresponding to the upgrading program package;
and the upgrading script file is executed on the terminal equipment, the upgrading file of the program to be upgraded corresponding to the upgrading script file is called, and the program to be upgraded in the terminal equipment is upgraded to the version in the program package to be upgraded.
Further, before the obtaining of the upgrade file of the program to be upgraded, the method further includes:
generating a program upgrading package of the program to be upgraded based on the upgrading version installation package of the program to be upgraded;
generating an upgrading script file according to the program upgrading package of the program to be upgraded;
and packaging the program upgrading package of the program to be upgraded, the upgrading script file and the configuration file required by upgrading in a new file, and compressing the packaged file to obtain the upgrading file of the program to be upgraded.
The invention provides a program upgrading device of terminal equipment, which is applied to a terminal and comprises the following components:
the device comprises a receiving device and a processing device, wherein the receiving device is used for receiving an upgrading file of a program to be upgraded, and the upgrading file of the program to be upgraded comprises at least one upgrading program package of the program to be upgraded and an upgrading script file corresponding to the upgrading program package;
the decompression device is used for decompressing the upgrade file of the program to be upgraded to obtain the upgrade file of the decompressed upgrade program and recording decompression information;
and the upgrading device is used for finding the upgrading script file in the upgrading file of the decompressed upgrading program, executing the upgrading script file, sequentially calling the upgrading file of the program to be upgraded corresponding to the upgrading script file, upgrading the program to be upgraded and upgrading the program to be upgraded to the version in the program package to be upgraded.
The invention provides a program upgrading device of terminal equipment, which is applied to a server side and comprises the following components:
the acquisition device is used for acquiring an upgrading file of the program to be upgraded;
the modifying module is used for adaptively modifying the name of the upgrading file of the program to be upgraded according to the management requirement;
the sending module is used for sending the upgrading file of the program to be upgraded to the terminal equipment when the upgrading file of the program to be upgraded is issued and triggered; the upgrading file of the program to be upgraded comprises at least one upgrading program package of the program to be upgraded and an upgrading script file corresponding to the upgrading program package;
and the upgrading script file is executed on the terminal equipment, the upgrading file of the program to be upgraded corresponding to the upgrading script file is called, and the program to be upgraded in the terminal equipment is upgraded to the version in the program package to be upgraded.
The invention provides a terminal device, which comprises:
a memory: for storing a computer program;
a processor: for executing the computer program to implement the steps of a program upgrading method of a terminal device as described in any one of the above.
The invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the above.
The invention provides a program upgrading method of terminal equipment, which comprises the steps of generating an upgrading script file corresponding to an upgrading program package through the upgrading program package of a program to be upgraded, putting the upgrading program package and the upgrading script file into a new folder, compressing the upgrading program package and the upgrading script file to obtain the upgrading file of the program to be upgraded, finding the upgrading script file and executing the upgrading script file after the upgrading program package is decompressed in the terminal equipment, calling the upgrading program package of the program to be upgraded corresponding to the upgrading script file, and upgrading the program to be upgraded to a version in the upgrading program package. When upgrading, interface differences among different upgrading programs are avoided, the main program of the equipment is not required to be modified, the program which needs to be upgraded in the terminal can be directly upgraded, the problem that the name of an upgrading program package is randomly modified by a main station platform is also avoided, the upgrading efficiency of the terminal equipment is improved, and the upgrading workload is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is an application environment diagram of a program upgrading method of a terminal device in an embodiment;
fig. 2 is a schematic flowchart of a program upgrading method of a terminal device in an embodiment;
FIG. 3 is a schematic diagram of a terminal device in one embodiment;
fig. 4 is a flowchart illustrating a program upgrading method of a terminal device according to another embodiment;
fig. 5 is a block diagram showing a configuration of a program upgrading apparatus of a terminal device in one embodiment;
fig. 6 is a block diagram showing a program upgrading apparatus of a terminal device in another embodiment;
fig. 7 is a schematic structural diagram of a terminal device disclosed in the embodiment of the present invention;
FIG. 8 is a schematic diagram of a computer storage medium according to an embodiment of the present invention.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof in the description and claims of this application and the description of the figures above, are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning in themselves.
The program upgrading method for the terminal device provided by the embodiment of the application can be applied to the application environment shown in fig. 1. The terminal device 101 communicates with the master station platform 102 by wireless communication. The terminal device 101 includes various functional modules, a local communication module, and related products connected to the terminal device 101. The method comprises the steps that various functional modules, local communication modules and related products connected to the terminal device 101 in the terminal device 101 are updated or added based on various needs such as development or function updating, the master station platform 102 obtains an upgrading program package of a program to be upgraded and sends the upgrading program package of the program to be upgraded to the terminal device 101, the terminal device 101 updates the program to be upgraded based on the upgrading program package of the program to be upgraded, and the upgrading program package of the program to be upgraded can simultaneously contain the functional modules, the local communication modules and the upgrading packages of the related products connected to the terminal device. After receiving the upgrade package of the program to be upgraded, the terminal device 101 upgrades the corresponding program to be upgraded without affecting the operation of the terminal device 101. The terminal device 101 may be any possible terminal device, and the master platform 102 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, a program upgrading method for a terminal device is provided, which is described by taking the application of the method to the terminal device 101 in fig. 1 as an example, and includes step S1 and step S3.
The method comprises the following steps that S1, an upgrading file of a program to be upgraded is received, wherein the upgrading file of the program to be upgraded comprises at least one upgrading program package of the program to be upgraded and an upgrading script file corresponding to the upgrading program package;
in some embodiments, the upgrade file of the program to be upgraded further includes: upgrading the required configuration file;
and the upgrading file of the program to be upgraded is obtained by putting the upgrading program package of the program to be upgraded, the upgrading script file corresponding to the upgrading program package and the configuration file required by upgrading into a new folder and packaging the new folder.
Specifically, as shown in fig. 3, a plurality of APP service programs are simultaneously run in the terminal device 101, and a plurality of types of function modules are configured. In practical application, there is an upgrade requirement for the function module, the APP program, and the relevant APP and module program of the electric energy meter and other products in the terminal device 101. When the program in the terminal device 101 has an upgrade requirement, an upgrade program package of the program to be upgraded is prepared, an upgrade script file corresponding to the upgrade program is generated according to the upgrade program package, an upgrade configuration file is prepared, then the upgrade program package, the upgrade script file and the configuration file are placed into a new folder for packaging, and the upgrade file of the program to be upgraded is obtained through compression. The upgrade file of the program to be upgraded received by the terminal device 101 may be obtained by directly communicating with the master station platform, or the upgrade file of the program to be upgraded is stored in a mobile storage device, such as a usb disk or a mobile hard disk, and then when the terminal device detects that the upgrade file of the program to be upgraded exists in the mobile storage device, the upgrade file of the program to be upgraded is obtained from the mobile storage device. The method and the device for obtaining the upgrade file of the program to be upgraded are not specifically limited. In the following related embodiments, an example in which an upgrade file of a program to be upgraded is obtained from a master platform is described.
In some embodiments, the name of the upgrade file of the program to be upgraded can be modified at will;
and when the name of the upgrading program package of the program to be upgraded is modified, the content of the upgrading script file corresponding to the upgrading program package of the program to be upgraded is also modified adaptively.
The upgrading file of the program to be upgraded comprises an upgrading program package and an upgrading script file corresponding to the upgrading program package, and when the program to be upgraded is upgraded, the program package is called by executing the script file to realize the upgrading of the program to be upgraded. Meanwhile, when the upgrade script file corresponding to the upgrade package is generated, the name of the upgrade package and the difference of the upgrade process are taken into account, and when the name of the upgrade package, the upgrade interface or the upgrade rule changes, the content and the execution flow of the upgrade script file also need to be modified adaptively. But the name of the main upgrading script cannot be randomly modified, so that the name cannot be found in the terminal equipment.
In some embodiments, the program to be upgraded is at least one of an application program, a functional module and an application tool corresponding to the functional module.
During upgrading, the upgrade file of the program to be upgraded may include a plurality of upgrade program packages, a plurality of upgrade script files corresponding to the upgrade program packages, and zero or more configuration files required for the upgrading, for example, the upgrade file may be an upgrade file of an application program, a function module, and a plurality of programs in each type of upgrade program in an application tool corresponding to the function module, or a free combination of these types of upgrade programs.
S2, decompressing the upgrade file of the program to be upgraded to obtain the upgrade file of the decompressed upgrade program, and recording decompressed information;
wherein, in some embodiments, after step S2, further comprising:
detecting whether the upgrade file of the decompressed upgrade program meets the upgrade regulation;
if the upgrade file of the decompressed upgrade program conforms to the upgrade specification, executing step S3;
and if the upgrade file of the decompressed upgrade program does not accord with the upgrade regulation, discarding the upgrade file of the decompressed upgrade program and generating a feedback message of the upgrade failure of the program to be upgraded.
Specifically, after the upgrade file of the to-be-upgraded program is decompressed, checking whether the decompressed upgrade file of the upgrade program meets upgrade regulations or not, wherein the upgrade regulations are integrity and legality of the upgrade file, so as to ensure that the upgrade file of the decompressed upgrade program is complete and legal, and the legality and integrity checking may specifically include various possible checking manners, such as checking the integrity of the upgrade file of the decompressed upgrade program, checking whether the upgrade file of the decompressed upgrade program is sent by a legal master station platform, and the like. The specific verification method may adopt any possible verification method, for example, when verifying the integrity of the upgrade file of the decompressed upgrade program, the generated upgrade file of the program to be upgraded is operated in advance to obtain a verification file, and the verification file is carried in the upgrade file of the program to be upgraded. When receiving the upgrading file of the program to be upgraded, the terminal equipment decompresses the upgrading file, then verifies the integrity of the decompressed upgrading file of the program to be upgraded through the verification file. The calculation and verification are not calculated by the main station platform, the calculation and verification are carried out in advance and then are put into the upgrade file for packaging, the terminal decompresses after receiving the upgrade packet to obtain the relevant upgrade packet, verification file and the like,
and for example, when the legality of the master station is checked, a certificate can be issued for the master station platform by a third party, and the legality is verified by the certificate carried in the upgrading file of the program to be upgraded, which is sent by the master station platform. It is understood that in other embodiments, other verification methods may be used, and other content to be verified may be verified.
When the integrity and the legality check are not passed, discarding the upgrade file of the decompressed upgrade program, generating a feedback message of the upgrade failure of the program to be upgraded, sending the feedback message to the master station platform, resending the upgrade file of the program to be upgraded according to the feedback message by the master station platform, and executing the step S2, and when the integrity and the legality check are passed, directly executing the step S3.
And S3, finding the upgrading script file in the upgrading file of the decompressed upgrading program, executing the upgrading script file, sequentially calling the upgrading program package of the program to be upgraded corresponding to the upgrading script file, upgrading the program to be upgraded, and upgrading the program to be upgraded to the version in the program package to be upgraded.
In some embodiments, after step S3, further comprising:
and step S4: and deleting the upgrading file of the program to be upgraded and the upgrading file of the decompressed upgrading program according to the decompression information.
Specifically, the program upgrading method for the terminal device provided in this embodiment may be implemented by the following programs:
-decompression commands
tar-xvf/mnt/data/Upgrade.tar.tgz-C/mnt/data/>/mnt/data/Upgrade.tmp
-executing the Main Shell script
/mnt/data/Upgrade/upgrade.sh
-delete command
head-1/mnt/data/Upgrade.tmp|xargs-I{}rm-rf/mnt/data/{}
rm-rf/mnt/data/Upgrade.tmp
Sh script content is as follows:
#!/bin/bash
cp/mnt/data/data/Upgrade/update.bin/mnt/data/data/
cp/mnt/data/data/Upgrade/10-14.dft/mnt/data/cfg/
rm-rf/mnt/data/app/clou.tgzrm-rf/mnt/data/app/clou
cp/mnt/data/data/Upgrade/clou.tgz/mnt/data/app/
the contents in the upgrade.sh script file can be modified according to actual needs to adapt to the upgrading differences of different functional modules and APP programs;
bin upgrading the alternate mining bottom plate;
upgrading the terminal body by clou.tgz;
10-14.dft upgrade configuration files;
other upgrade requirements;
and the upgrade.sh of the main shell script cannot be randomly modified, so that the main shell script cannot be found in the terminal equipment.
The program upgrading method of the terminal equipment provided by the embodiment of the invention is characterized in that an upgrading program package of a program to be upgraded and an upgrading script file corresponding to the upgrading program package are placed in an upgrading file of the program to be upgraded, the upgrading script file is found and executed after the terminal equipment is decompressed, the upgrading program package of the program to be upgraded corresponding to the upgrading script file is called, and the program to be upgraded is upgraded to the version in the upgrading program package. When upgrading, interface differences among different upgrading programs are avoided, the main program of the equipment does not need to be modified, the program which needs to be upgraded in the terminal can be directly upgraded, the problem that the name of an upgrading program package is randomly modified by a main station platform is also avoided, the upgrading efficiency of the terminal equipment is improved, and the upgrading workload is reduced.
In one embodiment, as shown in fig. 4, a program upgrading method for a terminal device is provided, which is described by taking the method as an example for being applied to the master station platform 102 in fig. 1, and includes steps S401 and S403.
Step 401: acquiring an upgrading file of a program to be upgraded;
before step 401, further comprising:
step 4001: generating a program upgrading package of the program to be upgraded based on the upgrading version installation package of the program to be upgraded;
specifically, for example, when an application program, a function module and an application tool corresponding to the function module in the terminal device are in a new version, and the corresponding program in the terminal device is upgraded, firstly, an upgrade version installation package is generated into a program upgrade package of the program to be upgraded;
step 4002: generating an upgrading script file according to the program upgrading package of the program to be upgraded;
specifically, the upgrade script file may be generated according to a name path of a program upgrade package of the program to be upgraded, and in this embodiment, a shell script is generated as an example.
Step 4003: and packaging the program upgrading package of the program to be upgraded, the upgrading script file and the configuration file required by upgrading in a new file, and compressing the packaged file to obtain the upgrading file of the program to be upgraded.
Specifically, the above steps 4001 to 4003 may be implemented as follows:
secondary packaging program file format:
Figure BDA0003757952760000111
Figure BDA0003757952760000121
the Upgrade is a file folder, the name of which needs to be fixed and can not be changed randomly, and is used for storing various functional modules, upgrading program packages of various APPs, corresponding shell upgrading scripts and the like;
the program package to be upgraded of the clue.tgz can be an upgrading program package of one or more functional modules and APP, the file name of the upgrading program package is not limited and can be modified at will, but the name used by the corresponding shell script is also used for synchronous modification;
sh shell upgrading main script, the name needs to be fixed and can not be changed randomly; the content in the script needs to be correspondingly changed according to the difference characteristics of the corresponding functional module and the program upgrade package of the APP;
packaging procedure of packaging program:
ubuntu@ubuntu$tar-zcvf Upgrade.tar.tgz./Upgrade
ubuntu@ubuntu$ls
Upgrade Upgrade.tar.tgz
after executing the tar-zcvf Upgrade. The upgrading package is an upgrading program package transmitted into the main station platform, and the file name of the upgrading program package can be modified at will so as to adapt to the problem that the main station platform randomly changes the file name of the upgrading program package. But does not
Step 402: adaptively modifying the name of the upgrading file of the program to be upgraded according to the management requirement;
different master station platforms have different management strategies, so after the upgrading file of the upgrading program is obtained, the name of the upgrading file of the upgrading program can be modified according to the management strategy of the master station platform.
Step 403: when the issuing triggering of the upgrading file of the program to be upgraded is met, sending the upgrading file of the program to be upgraded to the terminal equipment; the upgrading file of the program to be upgraded comprises at least one upgrading program package of the program to be upgraded and an upgrading script file corresponding to the upgrading program package;
and the upgrading script file is executed on the terminal equipment, the upgrading file of the program to be upgraded corresponding to the upgrading script file is called, and the program to be upgraded in the terminal equipment is upgraded to the version in the program package to be upgraded.
After the master station platform acquires the upgrade file of the program to be upgraded, the name of the upgrade file is modified according to the management strategy, the upgrade file of the program to be upgraded is directly clicked and issued on the master station platform, the upgrade file of the program to be upgraded is sent to the terminal equipment, the terminal equipment decompresses the upgrade file of the program to be upgraded after receiving the upgrade file of the program to be upgraded, and the program to be upgraded is upgraded into the version in the program package to be upgraded according to the information of the program to be upgraded in the file after decompression.
According to the program upgrading method of the terminal equipment, the upgrading script file corresponding to the upgrading program package is generated through the upgrading program package of the program to be upgraded, the upgrading program package and the upgrading script file are placed into the new folder and compressed to obtain the upgrading file of the program to be upgraded, the name of the upgrading script file can be adaptively modified according to the management strategy of the master station platform, and the problem that the program upgrading in the terminal equipment fails due to the fact that the name of the program package of the master station platform is randomly modified is avoided.
In one embodiment, as shown in fig. 5, there is provided a program upgrading apparatus of a terminal device, applied to a terminal, the apparatus including:
a receiving module 501, configured to receive an upgrade file of a program to be upgraded, where the upgrade file of the program to be upgraded includes at least one upgrade program package of the program to be upgraded and an upgrade script file corresponding to the upgrade program package;
the decompression module 502 is configured to decompress the upgrade file of the program to be upgraded, obtain the upgrade file of the decompressed upgrade program, and record decompression information;
the upgrading module 503 is configured to find the upgrade script file in the upgrade files of the decompressed upgrade programs, execute the upgrade script file, sequentially call the upgrade files of the programs to be upgraded corresponding to the upgrade script file, upgrade the programs to be upgraded, and upgrade the programs to be upgraded to the versions in the program packages to be upgraded.
In some embodiments, the apparatus further comprises:
the detection module is used for detecting whether the upgrade file of the decompressed upgrade program conforms to the upgrade regulation;
if the upgrade file of the decompressed upgrade program conforms to the upgrade specification, executing the step S3;
and if the upgrade file of the decompressed upgrade program does not accord with the upgrade regulation, discarding the upgrade file of the decompressed upgrade program and generating a feedback message of the upgrade failure of the program to be upgraded.
In some embodiments, the apparatus further comprises:
and the deleting module is used for deleting the upgrading file of the program to be upgraded and the upgrading file of the decompressed upgrading program according to the decompression information.
In some embodiments, the apparatus further comprises:
wherein, still include in the upgrading file of the procedure of waiting to upgrade: upgrading the required configuration file;
and the packaging module is used for placing the upgrading program package of the program to be upgraded, the upgrading script file corresponding to the upgrading program package and the configuration file required by upgrading into a new folder and packaging the new folder.
Further, the packaging module 506 is also used for optionally modifying the name of the upgrade file of the program to be upgraded;
and when the name of the upgrading program package of the program to be upgraded is modified, the content of the upgrading script file corresponding to the upgrading program package of the program to be upgraded is also modified adaptively.
Further, the program to be upgraded is at least one of an application program, a functional module and an application tool corresponding to the functional module.
In one embodiment, as shown in fig. 6, there is provided a program upgrading apparatus for a terminal device, which is applied to a server, the apparatus including:
an obtaining module 601, configured to obtain an upgrade file of a program to be upgraded;
a modifying module 602, configured to adaptively modify a name of an upgrade file of the program to be upgraded according to a management requirement;
a sending module 603, configured to send the upgrade file of the program to be upgraded to the terminal device when the upgrade file of the program to be upgraded is triggered to be issued; the upgrading file of the program to be upgraded comprises at least one upgrading program package of the program to be upgraded and an upgrading script file corresponding to the upgrading program package;
and the upgrading script file is executed on the terminal equipment, the upgrading file of the program to be upgraded corresponding to the upgrading script file is called, and the program to be upgraded in the terminal equipment is upgraded to the version in the program package to be upgraded.
In some embodiments, the apparatus further comprises:
the first generation module is used for generating a program upgrading package of the program to be upgraded based on the upgrading version installation package of the program to be upgraded;
the second generation module is used for generating an upgrading script file according to the program upgrading package of the program to be upgraded;
and the packaging module is used for packaging the program upgrading package of the program to be upgraded, the upgrading script file and the configuration file required by upgrading in a new file, and compressing the packaged file to obtain the upgrading file of the program to be upgraded.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 7, the computer apparatus may include:
a memory 701 in which executable program code is stored;
a processor 702 coupled to the memory 701;
the processor 702 calls the executable program code stored in the memory 701 to execute the steps in the program upgrading method of the terminal device of the present invention.
Referring to fig. 8, an embodiment of the present invention discloses a computer storage medium 801, where the computer storage medium 801 stores computer instructions, and the computer instructions are used to execute the steps in the method for upgrading a program of a terminal device according to the present invention when the computer instructions are called.
The above-described embodiments of the apparatus are only illustrative, and the modules described as separate parts may or may not be physically separate, and the 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. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, wherein the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM) or other Memory capable of storing data, a magnetic tape, or any other computer-readable medium capable of storing data.
Finally, it should be noted that: the program upgrading method, apparatus, terminal device and storage medium for a terminal device disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, and are only used for illustrating the technical solutions of the present invention, not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some 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 spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A program upgrading method of terminal equipment is applied to a terminal, and is characterized in that the method comprises the following steps:
the method comprises the following steps that S1, an upgrading file of a program to be upgraded is received, wherein the upgrading file of the program to be upgraded comprises at least one upgrading program package of the program to be upgraded and an upgrading script file corresponding to the upgrading program package;
s2, decompressing the upgrade file of the program to be upgraded to obtain the upgrade file of the decompressed upgrade program, and recording decompressed information;
and S3, finding the upgrading script file in the upgrading file of the decompressed upgrading program, executing the upgrading script file, sequentially calling upgrading program packages of the program to be upgraded corresponding to the upgrading script file, upgrading the program to be upgraded, and upgrading the program to be upgraded to the version in the program package to be upgraded.
2. The program upgrading method for a terminal device according to claim 1, further comprising, after step S2 and before step S3:
detecting whether the upgrade file of the decompressed upgrade program conforms to upgrade regulations;
if the upgrade file of the decompressed upgrade program conforms to the upgrade specification, executing step S3;
and if the upgrade file of the decompressed upgrade program does not accord with the upgrade regulation, discarding the upgrade file of the decompressed upgrade program and generating a feedback message of the upgrade failure of the program to be upgraded.
3. The program upgrading method for a terminal device according to claim 1, further comprising, after step S3:
and deleting the upgrading file of the program to be upgraded and the upgrading file of the decompressed upgrading program according to the decompression information.
4. The program upgrading method for terminal equipment according to claim 3, wherein the upgrade file of the program to be upgraded further comprises: upgrading the required configuration file;
and the upgrading file of the program to be upgraded is obtained by putting the upgrading program package of the program to be upgraded, the upgrading script file corresponding to the upgrading program package and the configuration file required by upgrading into a new folder and packaging the new folder.
5. The program upgrading method of a terminal device according to claim 4, wherein a name of an upgrade file of the program to be upgraded is optionally modifiable;
and when the name of the upgrading program package of the program to be upgraded is modified, the content of the upgrading script file corresponding to the upgrading program package of the program to be upgraded is also modified adaptively.
6. The program upgrading method for terminal equipment according to any one of claims 1 to 5, wherein the program to be upgraded is at least one of an application program, a functional module and an application tool corresponding to the functional module.
7. A program upgrading method of terminal equipment is applied to a server side, and is characterized in that the method comprises the following steps:
acquiring an upgrading file of a program to be upgraded;
adaptively modifying the name of the upgrading file of the program to be upgraded according to the management requirement;
when the issuing triggering of the upgrading file of the program to be upgraded is met, sending the upgrading file of the program to be upgraded to the terminal equipment; the upgrading file of the program to be upgraded comprises at least one upgrading program package of the program to be upgraded and an upgrading script file corresponding to the upgrading program package;
and the upgrading script file is executed on the terminal equipment, the upgrading file of the program to be upgraded corresponding to the upgrading script file is called, and the program to be upgraded in the terminal equipment is upgraded to the version in the program package to be upgraded.
8. The program upgrading method of a terminal device according to claim 7, wherein before obtaining the upgrade file of the program to be upgraded, the method further comprises:
generating a program upgrading package of the program to be upgraded based on the upgrading version installation package of the program to be upgraded;
generating an upgrading script file according to the program upgrading packet of the program to be upgraded;
and packaging the program upgrading package of the program to be upgraded, the upgrading script file and the configuration file required by upgrading in a new file, and compressing the packaged file to obtain the upgrading file of the program to be upgraded.
9. A terminal device, the terminal device comprising:
a memory: for storing a computer program;
a processor: steps for executing the computer program to implement a method of program upgrade of a terminal device according to any of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of a program upgrading method for a terminal device according to any one of claims 1-6.
CN202210864443.XA 2022-07-21 2022-07-21 Program upgrading method and device for terminal equipment, terminal equipment and storage medium Pending CN115357260A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210864443.XA CN115357260A (en) 2022-07-21 2022-07-21 Program upgrading method and device for terminal equipment, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210864443.XA CN115357260A (en) 2022-07-21 2022-07-21 Program upgrading method and device for terminal equipment, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115357260A true CN115357260A (en) 2022-11-18

Family

ID=84031150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210864443.XA Pending CN115357260A (en) 2022-07-21 2022-07-21 Program upgrading method and device for terminal equipment, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115357260A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115809096A (en) * 2023-02-02 2023-03-17 麒麟软件有限公司 Batch self-adaptive upgrading method for operating systems

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115809096A (en) * 2023-02-02 2023-03-17 麒麟软件有限公司 Batch self-adaptive upgrading method for operating systems
CN115809096B (en) * 2023-02-02 2023-04-25 麒麟软件有限公司 Batch self-adaptive upgrading method for operating system

Similar Documents

Publication Publication Date Title
CN107346252B (en) Application updating method and device
EP2608585B1 (en) Method, device and system for triggering terminal operation
CN108540509B (en) Processing method and device of terminal browser, server and intelligent terminal
CN112650520A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN103036706A (en) Local processing method of application upgrading abnormity
CN109753301A (en) Application system dispositions method, device, storage medium and electronic equipment
CN108845824A (en) Using update method and device and computer readable storage medium
CN112783542A (en) Software upgrading method and device and readable storage medium
CN105786636B (en) A kind of system repair and device
CN115357260A (en) Program upgrading method and device for terminal equipment, terminal equipment and storage medium
CN110045969B (en) Application program installation method, server, system, device and storage medium
CN113094064A (en) Gateway software module upgrading method, device, equipment and storage medium
CN112882743A (en) Software upgrading method
CN112286565A (en) Embedded system differential upgrading method based on storage container
CN108989428B (en) Bluetooth terminal upgrading method, server, computer readable storage medium and system
CN116243949A (en) Software upgrading method and device, embedded equipment and storage medium
CN115883359A (en) Upgrade installation method and device, system, electronic equipment and storage medium thereof
CN113867756A (en) Software upgrading method, terminal equipment and readable storage medium
CN111176693B (en) Upgrading method of digital television system
CN112732349A (en) Method and device for loading SO library, electronic equipment and computer readable storage medium
CN114253441A (en) Target function starting method and device, storage medium and electronic device
CN106713453B (en) Application information monitoring method and device
CN110825406A (en) Software upgrading method and related equipment
CN113127054B (en) File processing method and related device
CN113312073B (en) Installation package file processing method and related 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