CN117667169A - Application program updating method and device, electronic equipment and storage medium - Google Patents

Application program updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117667169A
CN117667169A CN202211012064.4A CN202211012064A CN117667169A CN 117667169 A CN117667169 A CN 117667169A CN 202211012064 A CN202211012064 A CN 202211012064A CN 117667169 A CN117667169 A CN 117667169A
Authority
CN
China
Prior art keywords
application program
program
program file
file
hot update
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
CN202211012064.4A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211012064.4A priority Critical patent/CN117667169A/en
Publication of CN117667169A publication Critical patent/CN117667169A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The application program updating method, device, electronic equipment and storage medium are characterized in that a target storage space corresponding to an application program is set on terminal equipment for installing the application program, when the application program has a hot update requirement, a hot update program file can be sent to the terminal equipment through a background server, and the terminal equipment can store the hot update program file in the target storage space. When the application program is started, whether a hot update program file exists in the current target storage space is detected, if so, the application program is operated based on the hot update program file, and if not, the application program is operated based on the original program file in the software installation package. The method can meet the requirement of service logic hot update, reduce the occurrence of crash caused by compatibility in the process of program call, improve the running stability of the application program and be beneficial to improving the use experience of the application program. The method and the device can be widely applied to the technical field of software.

Description

Application program updating method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of software technologies, and in particular, to an application program updating method, an application program updating device, an electronic device, and a storage medium.
Background
Currently, with the development of information technology, a number of applications have been developed. Such as games, instant messaging, video, shopping, etc., brings a rich experience to people's work, life, and entertainment. After the application program is released, a developer may perform configuration update on the application program according to actual operation requirements, so as to solve the problem existing in the application program or provide new service functions.
In the related art, in order to meet urgent requirements such as bug repair and rapid iteration, an application program needs to have a capability of implementing hot update, that is, a function of implementing update of service logic on the premise of installing a software installation package. Currently, conventionally used hot update policies mostly require adjusting software installation packages of application programs, inserting a part of new program codes, and then implementing update of business logic based on replacement of the new and old program codes. In the implementation mode, compatibility problems often exist in the process of calling new program codes, program breakdown easily occurs, the running stability of an application program is poor, and the use experience is affected.
Disclosure of Invention
The embodiment of the application program updating method, device, electronic equipment and storage medium can improve the running stability of hot updating of the application program and are beneficial to improving the use experience of the application program.
In one aspect, an embodiment of the present application provides an update method of an application program, applied to a terminal device, where the method includes:
responding to a starting instruction for an application program, and determining a target storage space corresponding to the application program; the target storage space is used for storing a hot update program file of the application program;
detecting whether a hot update program file of the application program exists in the target storage space;
when the hot update program file exists in the target storage space, operating the application program based on the hot update program file; or when the hot update program file does not exist in the target storage space, determining an original program file from a software installation package of the application program, and running the application program based on the original program file.
On the other hand, the embodiment of the application also provides another updating method of the application program, which is applied to the background server, and comprises the following steps:
Receiving a hot update program file of an application program;
and sending the thermal update program file to a terminal device, so that the terminal device stores the thermal update program file into a target storage space corresponding to the application program, and running the application program based on the thermal update program file in response to a starting instruction for the application program.
On the other hand, the embodiment of the application also provides an updating device of the application program, which is applied to the terminal equipment, and the device comprises:
the response unit is used for responding to a starting instruction aiming at the application program and determining a target storage space corresponding to the application program; the target storage space is used for storing a hot update program file of the application program;
a detection unit, configured to detect whether a hot update program file of the application program exists in the target storage space;
the execution unit is used for running the application program based on the hot update program file when the hot update program file exists in the target storage space; or when the hot update program file does not exist in the target storage space, determining an original program file from a software installation package of the application program, and running the application program based on the original program file.
Further, the application updating device further includes a first acquiring unit, where the first acquiring unit is specifically configured to:
receiving a hot update program file sent by a background server of the application program;
and storing the hot update program file into a target storage space corresponding to the application program.
Further, the application updating device further includes a second acquiring unit, where the second acquiring unit is specifically configured to:
sending inquiry information to a background server of the application program; the inquiry information is used for inquiring whether a hot update program file of the application program exists in the background server;
receiving an inquiry result returned by a background server of the application program;
and when the query result represents that the hot update program file of the application program exists in the background server, downloading the hot update program file, and storing the hot update program file into a target storage space corresponding to the application program.
Further, the first acquiring unit or the second acquiring unit is specifically configured to:
acquiring version number information of the hot update program file;
and establishing a file catalog in the target storage space, and storing the hot update program file by taking the version number information as an index.
Further, the second acquiring unit is specifically configured to:
when the query result represents that the hot update program file of the application program exists in the background server, acquiring first version number information of the hot update program file in the background server;
inquiring second version number information of each hot update program file stored in the current target storage space;
comparing the first version number information with each second version number information;
and when the first version number information and any one of the second version number information are different, downloading the hot update program file in the background server, and storing the downloaded hot update program file in a target storage space corresponding to the application program.
Further, the application updating device further includes a first cleaning unit, where the first cleaning unit is specifically configured to:
detecting available storage capacity of the target storage space;
when the available storage capacity is smaller than a preset capacity threshold, determining a first target program file stored in the current target storage space according to the version number information; the first target program file is the latest hot update program file in the target storage space;
Deleting at least one second object program file from the object storage space; the second object program file is a hot update program file other than the first object program file.
Further, the execution unit is specifically configured to:
determining a first target program file stored in the current target storage space according to the version number information; the first target program file is the latest hot update program file in the target storage space;
and running the application program based on the first target program file.
Further, the updating device of the application program further includes a differential updating unit, where the differential updating unit is specifically configured to:
obtaining a difference program file and target version number information from a background server of the application program;
determining a first target program file stored in the target storage space currently; the first target program file is the latest hot update program file in the target storage space;
and merging the difference program file and the first target program file to obtain a new hot program update file, and determining the target version number information as the version number information of the new hot program update file.
Further, the application updating device further includes a second cleaning unit, where the second cleaning unit is specifically configured to:
acquiring an installation package to be updated of the application program from a background server of the application program;
deleting the current software installation package of the application program, and configuring the installation package to be updated to the terminal equipment as a new software installation package;
and when the configuration of the new software installation package is completed, all hot update program files in the target storage space are emptied.
Further, the execution unit is specifically configured to:
calling a program file reader to read the hot update program file to obtain a program code field;
and transmitting the program code field to a program executor to execute the business logic of the application program.
On the other hand, the embodiment of the application also provides another device for updating the application program, which is applied to the background server, and comprises the following steps:
a receiving unit for receiving a hot update program file of an application program;
and the sending unit is used for sending the thermal update program file to the terminal equipment so that the terminal equipment stores the thermal update program file into a target storage space corresponding to the application program, and running the application program based on the thermal update program file in response to a starting instruction for the application program.
On the other hand, the embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the updating method of the application program when executing the computer program.
On the other hand, the embodiment of the application also provides a computer readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to realize the updating method of the application program.
In another aspect, embodiments of the present application also provide a computer program product comprising a computer program stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program so that the computer device executes the update method for realizing the above-described application program.
The embodiment of the application at least comprises the following beneficial effects: the application provides a non-perceived application program hot update method, wherein a target storage space corresponding to an application program is arranged on terminal equipment for installing the application program, when the application program has a hot update requirement, a hot update program file can be sent to the terminal equipment through a background server, and the terminal equipment can store the hot update program file in the target storage space. When the application program is started, whether a hot update program file exists in the current target storage space is detected firstly based on a selected strategy, if so, the application program is operated based on the hot update program file, and if not, the application program is operated based on the original program file in the software installation package. In the method, the hot update program file can independently realize the running of the application program and can meet the requirement of service logic hot update; in addition, the method does not need to insert new program codes for replacement, can reduce the occurrence of crash caused by compatibility problems in the process of program call, can improve the running stability of the application program, and is beneficial to improving the use experience of the application program.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the technical aspects of the present application, and are incorporated in and constitute a part of this specification, illustrate the technical aspects of the present application and together with the examples of the present application, and not constitute a limitation of the technical aspects of the present application.
Fig. 1 is a schematic diagram of execution logic of an application program written in Java language according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an implementation environment of an application program update method according to an embodiment of the present application;
fig. 3 is a flowchart of an update method of an application program according to an embodiment of the present application;
fig. 4 is an interface schematic diagram of a terminal device with an application program installed according to an embodiment of the present application;
fig. 5 is a schematic flow chart of a terminal device acquiring a thermal update program file according to an embodiment of the present application;
fig. 6 is a schematic flow chart of another method for obtaining a thermal update program file by a terminal device according to an embodiment of the present application;
Fig. 7 is an interface schematic diagram of a target storage space of a terminal device according to an embodiment of the present application;
FIG. 8 is a finite state machine element diagram of a timer application according to an embodiment of the present application;
FIG. 9 is a schematic diagram of loading and executing an SCXML file according to an embodiment of the present application;
fig. 10 is a schematic diagram of an update flow of an SCXML file according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a dynamic loading flow of an SCXML file according to an embodiment of the present application;
FIG. 12 is a schematic diagram of another method for updating an application according to an embodiment of the present application;
fig. 13 is a block diagram of a device for updating an application according to an embodiment of the present application;
fig. 14 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application. The step numbers in the following embodiments are set for convenience of illustration only, and the order between the steps is not limited in any way, and the execution order of the steps in the embodiments may be adaptively adjusted according to the understanding of those skilled in the art.
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 herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application.
Before describing embodiments of the present application in detail, some of the terms and expressions that are referred to in the embodiments of the present application will be described first, and the terms and expressions that are referred to in the embodiments of the present application are applicable to the following explanations.
Finite state machine: a state machine for short is a mathematical computational model that represents a finite number of states and transitions and actions between these states. The finite state machine is a tool used to model the behavior of an object, and its role is mainly to describe the sequence of states an object experiences during its life cycle, and how to respond to various events from the outside world. In computer science, finite state machines are widely used for modeling application behavior, hardware circuitry design, software engineering, compilers, network protocols, and computing and language research.
And (5) hot updating: hot update is an update way of an application. In short, the instant updates encountered when an application is opened after the installed application is downloaded. The hot update can realize dynamic update, so that a developer can realize the requirement of repairing the loopholes of the application program or releasing the functions under the condition that the application program of a new version is not released.
Statecharts: statecharts is an extension of the finite state machine proposed in 1986 that complements the semantics of complex state, parallel state, and history state with traditional state machines.
W3C (World Wide Web Consortium, web consortium): the internet membership organization is working on implementing and developing Web specifications that describe Web communication protocols (such as HTML and XML) and other building blocks.
XML: refers to an extensible markup language (e X tensible M arkup L anguage) designed to transfer and store data.
SCXML: short for State Chart XML is a recommendation for W3C for complex finite State machines that supports complex elements such as composite State, parallel State, concurrency, synchronization, etc.
Apache Commons SCXML: an SCXML open source implementation is implemented using Java language.
Java: the object-oriented programming language has two characteristics of strong function, simplicity and easy use, and is used as a representative of static object-oriented programming language, thereby excellently realizing object-oriented theory and allowing complex programming. Java may be used as a business logic carrier for applications, and other programming languages commonly used include real Native, router, android App Bundle, and the like.
Java ClassLoader: in the Java language, the components responsible for converting code into Java classes in memory form.
Blockchain (Blockchain) is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain is essentially a decentralised database, which is a series of data blocks generated by cryptographic methods, each data block containing a batch of information of network transactions for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer. The blockchain can comprise a public chain, a alliance chain and a private chain, wherein the public chain refers to the blockchain that any person can enter the blockchain network at any time to read data, send data or contend accounting; the alliance chain refers to a blockchain which a plurality of organizations or organizations participate in management together; the private chain refers to a blockchain with a certain centralized control, the writing right of the account book of the private chain is controlled by a certain organization or organization, and the access and the use of data have strict authority management.
The application program updating method provided in the embodiment of the application program can be executed in the application program related to shopping, games, social contact and other fields: for example, in applications involving shopping, there may be a need to temporarily add promotional functionality. In this scenario, the update method provided in the embodiments of the present application may be used to perform a hot update on an application used by a consumer, adding new business functions. For another example, in applications involving social interactions, there may be a need to detect the running stability of an application after an update. Under the scene, the application program can be thermally updated on the test terminal equipment, the test can be rapidly operated, and the loopholes in the application program can be timely found, so that the efficient repair can be conveniently realized. For another example, in applications involving gaming, there may be temporarily discovered game vulnerabilities that affect the player's gaming experience. Under the scene, the vulnerability can be quickly repaired by issuing the hot update program file for repairing the vulnerability, which is beneficial to improving the game experience of players.
Of course, it should be noted that the above application scenario is only exemplary, and is not meant to limit the practical application of the method in the embodiment of the present application. Those skilled in the art will appreciate that the methods provided in the embodiments of the present application may be utilized to perform specified tasks in different application scenarios.
In addition, in each specific embodiment of the present application, when related processing is required according to data related to the identity or characteristics of the target object, such as information of the target object, behavior data of the target object, history data of the target object, and position information of the target object, permission or consent of the target object is obtained first, and the collection, use, processing, and the like of the data comply with related laws and regulations and standards of related countries and regions. In addition, when the embodiment of the application needs to acquire the sensitive information of the target object, the independent permission or independent consent of the target object is acquired through a popup window or a jump to a confirmation page or the like, and after the independent permission or independent consent of the target object is explicitly acquired, the necessary target object related data for enabling the embodiment of the application to normally operate is acquired.
Currently, with the development of information technology, a number of applications have been developed. Such as games, instant messaging, video, shopping, etc., brings a rich experience to people's work, life, and entertainment. After the application program is released, a developer may perform configuration update on the application program according to actual operation requirements, so as to solve the problem existing in the application program or provide new service functions.
In the related art, in order to meet urgent requirements such as bug repair and rapid iteration, an application program needs to have a capability of implementing hot update, that is, a function of implementing update of service logic on the premise of installing a software installation package. Currently, conventionally used hot update policies mostly require adjusting software installation packages of application programs, inserting a part of new program codes, and then implementing update of business logic based on replacement of the new and old program codes. For example, referring to fig. 1, taking an application program implemented in a Java type description language as an example, a related art hot update policy is generally implemented based on a Java Class loader for converting codes into executable Java Class files and storing the executable Java Class files in a designated directory. There may be a plurality of Java Class loaders, and the Java Class files obtained by converting the Java Class files are typically converted layer by layer in a hierarchical manner, such as AppClassLoader, extClassLoader in fig. 1, etc., and will be executed when the subsequent application program runs.
Specifically, the basic principle of implementing hot update in the application program is: the Java virtual machine may create a root ClassLoader and other classloaders associated with this ClassLoader and then insert the corresponding new code in the directory they need. When the ClassLoader is called, the inserted new codes are searched and converted into Java class, so that the self-defined path loading can be realized, and part of program codes in the original application program are replaced. Finally, the virtual machine can convert the virtual machine into machine code to be executed by an operating system, so that the service logic is updated.
However, the operating system of the terminal device does not provide an interface for setting the custom ClassLoader, in the related art, the custom ClassLoader is mostly set by calling the private interface of the operating system in a reflection manner, but the operating system has version differences, the reflection calling manner is likely to fail, compatibility problems exist, program breakdown easily occurs, running stability of an application program is poor, and use experience is affected.
Based on this, the embodiment of the application provides an update method, an apparatus, an electronic device and a storage medium of an application program, a target storage space corresponding to the application program is set on a terminal device for installing the application program, when a thermal update requirement exists for the application program, a thermal update program file can be sent to the terminal device through a background server, and the terminal device can store the thermal update program file in the target storage space. When the application program is started, whether a hot update program file exists in the current target storage space is detected firstly based on a selected strategy, if so, the application program is operated based on the hot update program file, and if not, the application program is operated based on the original program file in the software installation package. In the method, the hot update program file can independently realize the running of the application program and can meet the requirement of service logic hot update; in addition, the method does not need to insert new program codes for replacement, can reduce the occurrence of crash caused by compatibility problems in the process of program call, can improve the running stability of the application program, and is beneficial to improving the use experience of the application program.
The following describes in detail the implementation of the embodiments of the present application with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating an implementation environment of an application program updating method provided in an embodiment of the present application. In this implementation environment, the main hardware and software body includes a terminal device 210 and a background server 220.
Specifically, the terminal device 210 may have an associated application installed therein, and the background server 220 is a background server of the application. The terminal device 210 and the background server 220 are in communication connection. The application program updating method provided in the embodiment of the present application may be executed on the terminal device 210 or the background server 220 side. For example, the terminal device 210 side may acquire a hot update program file from the background server 220 and store it in the target storage space when the application program is not in the run phase. In the process of starting and running the application program, the application program can be run based on the hot update program file stored in the target storage space, so that hot update of the application program is realized.
The terminal device 210 of the above embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and a vehicle-mounted terminal.
The background server 220 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like.
In addition, the background server 220 may also be a node server in a blockchain network.
A communication connection may be established between the terminal device 210 and the backend server 220 through a wireless network or a wired network. The wireless network or wired network may be configured as the internet, using standard communication techniques and/or protocols, or any other network including, for example, but not limited to, a local area network (Local Area Network, LAN), metropolitan area network (Metropolitan Area Network, MAN), wide area network (Wide Area Network, WAN), mobile, wired or wireless network, a private network, or any combination of virtual private networks. The software and hardware main bodies may be connected by the same communication method or by different communication methods, which is not particularly limited in this application.
Of course, it can be understood that the implementation environment in fig. 2 is only some optional application scenarios of the application program updating method provided in the embodiment of the present application, and the actual application is not fixed to the software and hardware environment shown in fig. 2. The method provided by the embodiment of the application can be applied to various technical fields, such as shopping, games, social contact and the like, and is not particularly limited.
Referring to fig. 3, fig. 3 is a flowchart of an application program update method provided in the embodiment of the present application, where the application program update method may be executed by a terminal device, and specifically includes, but is not limited to, the following steps 310 to 330.
Step 310: responding to a starting instruction for an application program, and determining a target storage space corresponding to the application program; the target storage space is used for storing a hot update program file of the application program.
In this embodiment of the present application, for a thermal update requirement of an application, a storage space corresponding to the application may be set synchronously on a terminal device on which the application is installed, and the storage space is denoted as a target storage space, where the target storage space is used to store a thermal update program file of the corresponding application. In this embodiment of the present application, the hot update program file refers to a program file for implementing the hot update requirement of an application program, which may include a part of program files capable of executing new service logic of the application program alone, or may include a complete program file capable of executing all new and old service logic of the application program, which may be flexibly applied by a person skilled in the art as required.
It may be understood that in the embodiment of the present application, one or more applications may be installed in the same terminal device, and accordingly, for each application requiring thermal update, a target storage space corresponding to the application may be set. Of course, for an application program for which there is no need for hot update, it may not be necessary to configure a corresponding target storage space therefor, in other words, the number of target storage spaces may be less than or equal to the number of application programs installed in the terminal device.
In the embodiment of the present application, the storage capacity of each target storage space is not limited. In some embodiments, the storage capacity of each target storage space may be set to the same value, and its specific size may be flexibly determined according to the total available storage capacity of the terminal device. In other embodiments, the storage capacity of the target storage space may be determined according to the corresponding application program, for example, the storage capacity of the target storage space may be adaptively set according to the size of the software installation package of the latest version of the application program, and generally, the storage capacity of the target storage space may have a positive correlation with the size of the software installation package of the latest version of the application program, which is not limited in the specific functional relationship.
In addition, in the embodiment of the application, for the terminal device, the hot update of the application program is mainly embodied in the program file selected to be executed in the program starting stage. Thus, it will be appreciated by those skilled in the art that the above-described update method is embodied primarily based on the operating method performed during the program launch process, and thus, it is understood that the launch operation of the application may be considered as part of the update process.
For an application, after it is installed on a terminal device, there may generally be several different operating states: for example, foreground operating conditions, background operating conditions, and cache operating conditions may be included. The application program in the foreground running state is the running application program on the current interface of the terminal equipment; the application program in the background running state is the application program which is not running in the background of the terminal equipment and is in an unclosed state although not running in the current interface of the terminal equipment; the application program in the background buffer memory state is not operated on the current interface and is closed, but the application program for operating the needed data is also buffered in the memory of the terminal equipment. Of course, the application also includes an exit state that is completely closed, not running in the foreground, background, and cache of the terminal device.
In this step, when the application needs to be started, that is, the application needs to be converted from the exit state to the running state (generally, the foreground running state), the target object may interact with the terminal device, issue a start instruction for the application, and the terminal device may trigger to execute the service logic of running the application in response to the start instruction. Here, the target object may be a user of the application program, and the specific implementation form of issuing the start instruction for interaction between the target object and the terminal device is not limited in this application. Specifically, for example, the terminal device may receive an interaction instruction of the target object to the related component, and take the interaction instruction as a start instruction. Here, the related component may be a component configured by an underlying system of the terminal device or a component configured in an application program, and the implementation form may be flexibly set as required. For example, in some embodiments, the component may be a component in the terminal device having a voice interaction function, which may identify voice data of the target object through a voice recognition technology, where the target object may perform voice interaction with the terminal device, such as speaking "turn on map navigation function" to the terminal device, so as to issue a start instruction for a certain map application. In some embodiments, the component may also be a touch component, referring to fig. 4, a plurality of applications are installed on a certain terminal device, and icons corresponding to the plurality of applications are displayed on the screen 410 of the terminal device. At this time, the operation of clicking the icon 411 of the corresponding application program on the terminal device screen 410 by the target object may be regarded as initiating a start instruction for the application program. Of course, it may be understood that, in some embodiments, the received operations of touching, sliding, etc. of the target object in the specified screen area of the terminal device may also be used as a start instruction for the application, which is not specifically limited in this application.
In addition, it should be noted that, in the embodiment of the present application, the start instruction is not limited to triggering based on the real-time interaction of the target object. In some embodiments, the setting of the underlying system, the background server of the application program, or the target object may be automatically triggered when certain service logic is satisfied, for example, a target time node may be preset for a certain application program, then the underlying system may acquire time information in real time, and if the current time reaches the target time node, a start instruction for the application program may be automatically triggered. Of course, it should be understood that the foregoing embodiment of the automatic triggering start command based on time is only used for exemplary illustration, and those skilled in the art may flexibly set the service logic of the automatic triggering start command according to actual needs, which is not limited in this application.
In this step, after the terminal device receives the start instruction for the application program, the target storage space corresponding to the application program may be determined in response to the start instruction. As described above, in the embodiment of the present application, for each application program that has a thermal update requirement, a target storage space corresponding to the application program may be set. It will be appreciated that there is a correspondence between the application and the target storage space. Therefore, when the target storage space is set, the application program and the target storage space can be bound for facilitating the subsequent determination of the correspondence between the application program and the target storage space. Specifically, for example, in some embodiments, when a target storage space corresponding to a certain application program is set, a binding relationship between the target storage space and the application program may be stored; in some embodiments, the target storage space may also be configured with related identification information, where the identification information may be used to distinguish different application programs, for example, the identification information may include a name or a number of the application program, which is not limited in this application. Based on the binding relation between the target storage space and the application program, after the starting instruction for the application program is triggered, the target storage space corresponding to the application program can be determined.
It should be noted that, in the embodiment of the present application, if the application does not have a target storage space that is set correspondingly, it is indicated that the application does not have a thermal update requirement, or the update method proposed in the embodiment of the present application is not supported, so if the application for which the current start instruction is directed does not have a corresponding target storage space, the application may be started and run directly in a conventional manner.
Step 320: it is detected whether a hot update program file of the application program exists in the target storage space.
In this step, if the application program to be started and operated by the current start instruction has a corresponding target storage space, after determining that the target storage space corresponding to the application program exists, it may be detected whether a hot update program file of the application program exists in the target storage space. It may be understood that, in the embodiment of the present application, the target storage space is used to store a thermal update program file of a corresponding application program, if a thermal update requirement exists in a current application program, a developer of the application program may send the thermal update program file to a terminal device through a background server of the application program, and after the terminal device receives the thermal update program file, according to the application program corresponding to the thermal update program file, it may further determine which target storage space needs to be stored in the thermal update program file, so as to store the thermal update program file. Therefore, based on whether the thermal update program file of the application program exists in the target storage space, whether the current application program needs to be thermally updated or not can be determined, namely, when the thermal update program file of the application program exists in the target storage space, the application program needs to be thermally updated is described; otherwise, when the hot update program file of the application program does not exist in the target storage space, the application program is not required to be subjected to hot update.
Specifically, in this step, when detecting whether there is a hot update program file of an application program in the target storage space, there are various alternative embodiments, for example, in some embodiments, the target storage space may be directly searched for a file in the storage space, and specifically, whether there is a hot update program file of an application program may be determined by searching according to a file name, file attribute information, and so on. In other embodiments, it will be appreciated that, since the target storage space is used to store the hot update files of the application program, and no other file content is contained therein, it may be determined whether there are hot update files of the application program directly from the used storage capacity of the target storage space. For example, a storage capacity threshold may be set for comparison, and if the used storage capacity of the current target storage space is greater than the storage capacity threshold, it is indicated that there is likely to be a file in the current target storage space, which is a hot-update program file. Conversely, if the used storage capacity of the current target storage space is less than or equal to the storage capacity threshold, indicating that there is likely to be no file in the current target storage space, at this point, it may be determined that there is no hot-update program file in the target storage space. The size of the storage capacity threshold value here may be flexibly set according to practical experience, and is not limited in this application.
It can be understood that in the embodiment of the present application, the target storage space and the application program (with the thermal update requirement) are set in one-to-one correspondence, and the function of the target storage space is set to store the thermal update program file of the corresponding application program, so when determining whether the current application program has the thermal update requirement, the method can be directly implemented by detecting whether the thermal update program file of the application program exists in the target storage space, and thus, the application program can be more conveniently and rapidly thermally updated. Moreover, due to the one-to-one correspondence between the target storage space and the application program (with the requirement of hot update), the detection efficiency can be remarkably improved, and complex verification and search processes are not required to be executed.
Step 330: when a hot update program file exists in the target storage space, running an application program based on the hot update program file; alternatively, when the hot update program file does not exist in the target storage space, an original program file is determined from a software installation package of the application program, and the application program is run based on the original program file.
In this step, when the thermal update program file exists in the target storage space corresponding to the application program, it may be determined that the application program currently has a thermal update requirement, so that the application program may be run based on the thermal update program file in the target storage space. When the thermal update program file does not exist in the storage space corresponding to the application program, it can be determined that the application program does not currently exist in the thermal update requirement, and at this time, the application program can be started and run according to a conventional starting mode, namely, an installed original program file is determined from a software installation package of the application program, and then the application program is run based on the original program file.
It can be seen that, in the embodiment of the present application, when an application is started, whether a hot update program file exists in the current target storage space may be detected based on a selected policy, if so, the application is run based on the hot update program file, and if not, the application is run based on the original program file in the software installation package. Because the hot update program file can independently realize the running of the application program, the requirement of service logic hot update can be met. Moreover, for the user of the application program, each hot update is realized in the starting stage of the application program, the normal use of the application program is not influenced, and the hot update process is not perceived, so that the application program use experience of the user is less influenced.
Moreover, it can be understood that in the embodiment of the application, the provided updating method does not need to insert new program codes for replacement, so that the occurrence of crash caused by compatibility problems in the process of program calling can be reduced, the running stability of the application program can be improved, and the application program using experience can be improved.
Specifically, in one possible implementation manner, the hot update program file in the embodiment of the present application may be obtained through the following steps:
Receiving a hot update program file sent by a background server of an application program;
and storing the hot update program file into a target storage space corresponding to the application program.
Referring to fig. 5, in the embodiment of the present application, the hot update program file stored in the target storage space at the terminal device side may be directly issued to the terminal device by the background server. Specifically, when there is a need for a hot update for an application, a developer or other operator of the application may upload an update program file in a background server of the application, and the uploaded hot update program file may have a new update with respect to a last hot update task or business logic of the latest version of the application. When the background server receives the new hot update program file, it can directly send it to the terminal device installed with the application program. In this way, the terminal device may receive the hot update program file sent by the background server of the application program, and according to the related information of the background server, may determine the application program corresponding to the received hot update program file, and then may further determine, based on the application program, a target storage space for storing the hot update program file, so that the received hot update program file may be stored in the target storage space corresponding to the application program.
When the background server generates heat to the terminal device to update the program file, the running state of the application program in the terminal device is not limited. For example, when the terminal device receives the hot update program file, the application program may be in a state of running in the foreground, and at this time, the terminal device stores the hot update program file in the target storage space, and has no influence on the business logic of the application program running in the foreground currently. And after the application program is converted from the state of the previous operation to the exit state, the application program is automatically operated based on the hot update program file stored in the target storage space and acquired from the background server when the application program is restarted to operate next time, so that the business logic update of the application program is completed.
Specifically, in one possible implementation manner, the hot update program file in the embodiment of the present application may be obtained through the following steps:
sending inquiry information to a background server of the application program; the inquiry information is used for inquiring whether a hot update program file of the application program exists in the background server;
receiving an inquiry result returned by a background server of the application program;
and when the query result characterizes that the hot update program file of the application program exists in the background server, downloading the hot update program file, and storing the hot update program file into a target storage space corresponding to the application program.
Referring to fig. 6, in the embodiment of the present application, the hot update program file stored in the target storage space at the terminal device side may also be actively downloaded from the background server by the terminal device. Specifically, for the terminal device, it may send query information to the background server of the application program once every predetermined period of time has elapsed, the query information being used to query whether there is a hot update program file of the application program in the background server. Here, the length of the predetermined period of time may be flexibly set as required, and may be, for example, 15 minutes, 1 hour, or the like, which is not limited in this application. Assuming that a certain application has a need for hot update, similarly, a developer or other operator of the application may upload an update program file in a background server of the application, and the uploaded hot update program file may have a new update with respect to a last hot update task or business logic of the latest version of the application. After receiving the hot update program file, the background server receives the inquiry information sent by the terminal device after reaching the preset time period timed by the terminal device, and can send the inquiry result of the hot update program file with the application program to the terminal device. Of course, it will be appreciated that when there is no uploaded hot update program file in the background server, the query result of the hot update program file for which there is no application may be sent to the terminal device. After receiving the query result, if the query result characterizes that a hot update program file of the application program exists in the background server, the terminal device can download the hot update program file from the background server, and then store the downloaded hot update program file into a target storage space corresponding to the application program.
It can be appreciated that, when the terminal device runs the application program, that is, the application program is in a foreground running state, if the hot update program file of the application program is downloaded, a certain hardware resource and network resource of the terminal device may be occupied, and the normal running of the application program will be interfered, for example, a situation that some video playing types of application programs may be blocked may occur. Therefore, in order to reduce the influence of the downloading of the hot update program file on the normal running of the application program as much as possible, in the embodiment of the present application, when the application program is in a background running state or a background caching state, it may be set to periodically send query information to the background server and execute the downloading task of the hot update program file; when the application program is in the foreground running state, no inquiry information is sent to the background server, and the downloading task of the hot update program file is suspended.
It should be noted that, since there may be multiple hot update demands of the application program, there may be multiple hot update program files in the background server of the application program and the target storage space of the terminal device. Thus, in order to improve the accuracy of the terminal device sending the query information to the background server to download and obtain the hot update program file, in some embodiments, the query information sent by the terminal device may be used to query whether a new hot update program file of an application program exists in the background server. Here, the new hot-update program file refers to whether the hot-update program file currently latest (i.e., the latest uploaded by the developer) in the background server is different from the hot-update program file used by the terminal device side for the latest hot-update, if the hot-update program file currently latest in the background server is different from the hot-update program file used by the terminal device side for the latest hot-update, it is indicated that the new hot-update program file exists in the background server, and the terminal device can execute subsequent downloading and storing tasks. Otherwise, if the current latest thermal update program file in the background server is the same as the thermal update program file used by the terminal device side for the last thermal update, the thermal update program file in the background server is already downloaded, so that the terminal device does not need to repeatedly download and store.
In this embodiment of the present application, in order to conveniently compare whether different hot update program files are the same, version number information may be configured for each hot update program file. The version number information corresponds to the hot update program files one by one, each hot update program file has unique version number information, and the version numbers of the hot update program files are different. In particular, the version number information may be compiled using at least one element such as a number, letter, or character, which is not limited in this application. Taking purely digitally compiled version number information as an example, a number including a plurality of digits may be used as version number information, and for convenience of comparison, it may be set that a thermal update program file corresponding to version number information with a higher value is a relatively updated file, for example, a thermal update program file with a version number information of "2141002" is an updated thermal update program file relative to a thermal update program file with a version number information of "2141001".
In the embodiment of the present application, the version number information corresponding to the hot update program file may be automatically generated according to a predetermined rule or may be determined by a developer, which is not particularly limited in the present application.
For the terminal device side, the hot update program file can be stored according to the version number information, so that the hot update program file can be conveniently searched for in a subsequent process or compared and determined whether the hot update program file in the background server needs to be downloaded. Specifically, in one possible implementation manner, storing the hot update program file in a target storage space corresponding to the application program includes:
acquiring version number information of a hot update program file;
and establishing a file catalog in the target storage space, and storing the heat storage updating program file by taking the version number information as an index.
In this embodiment of the present application, for a terminal device, for a hot update program file that is received or downloaded from a background server of an application program, version number information corresponding to the hot update program file may be synchronously acquired from the background server. In some embodiments, the version number information of the hot program file may also be encapsulated into the hot program file, and after the terminal device obtains the hot program file, the terminal device may parse the hot program file to obtain the version number information. When the version number information corresponding to the hot update program file is obtained and then the hot update program file is stored, a file directory can be established in the target storage space, and then the hot update program file is stored by taking the version number information as an index. Specifically, referring to fig. 7, fig. 7 is an interface schematic diagram of a target storage space corresponding to an application program, where, for the application program a, a storage space included in the "hot update program file storage space" is the corresponding target storage space. The target storage space may include an established file directory 710, and the hot update program file of the application program a acquired by the terminal device may be stored in the file directory. Specifically, in the file directory, the respective hot-updater files may be arranged in the order of acquisition. Wherein the latest acquired, i.e. latest, hot-update program file may be arranged to the first location. The newer hot-updater files are arranged in the order of acquisition and the older hot-updater files are arranged in the order of acquisition. For example, in fig. 7, the version number information of the hot update program file of the application program includes a composition of letters, characters, and numbers, wherein for the last six digits, the larger the number is, the newer the version of the hot update program file is. Accordingly, it is possible to place the hot-update program file whose version number information is "CI2.1.0.181209" at the forefront, and display the stored individual hot-update program files with the version number information as an index. Therefore, when the application program is operated based on the hot update program files, the subsequent terminal equipment can quickly determine the latest text version, so that the data processing efficiency in the update or operation process of the application program can be improved.
In particular, based on the embodiment in which the terminal device stores the thermal update program file with the version number information as an index, in this case, when the version number information is set to a form capable of reflecting the actual version of the thermal update program file as new and old, the respective thermal update program files stored on the terminal device side can be distinguished based on the version number information. Therefore, different terminal devices can judge whether the currently stored thermal update program file is newer by comparing the version number information of the thermal update program file stored by the different terminal devices with the version number information of the thermal update program files stored by other terminal devices, and if not, the newer thermal update program file can be obtained from other terminal devices through the communication transmission relation among the terminal devices. In other words, in one possible implementation manner, the hot update program file in the embodiment of the present application may further be obtained by the following steps:
acquiring reference version number information of each hot update program file stored in the second equipment;
determining whether the currently stored hot update program file needs to be updated according to the reference version number information;
and if the currently stored hot update program file needs to be updated, acquiring a newer hot update program file from the second device.
In the embodiment of the present application, an embodiment in which a first device obtains a thermal update program file will be described by taking a terminal device with a certain application program as an example, and other terminal devices with the same application program may be described as second devices. The first device and the second device both perform hot update of the application program according to the manner provided in the embodiments of the present application. Therefore, when the hot update task is performed, the target storage space of the second device stores the hot update program file. In this embodiment of the present application, when the first device obtains the newer thermal update program file, the first device may obtain the thermal update program file from the second device, specifically, the first device may first establish a communication connection with the second device, and then obtain version number information of each thermal update program file stored in the second device, and record the version number information as reference version number information. Here, the present application is not limited as to the specific form of the communication connection relationship between the first device and the second device.
Based on the reference version number information, the first device may compare the version number information of the currently stored hot update program file with version number information of the hot update program file stored by the first device, so as to determine whether the currently stored hot update program file needs to be updated. It will be appreciated that if the program version of the hot update program file currently stored by the first device is newer than the program version corresponding to all the reference version number information, then this indicates that no new hot update program file exists at the second device, and the first device does not need to perform subsequent processing. If the program version of the hot update program file currently stored by the first device is later than the program version corresponding to a certain reference version number information, the fact that a newer hot update program file exists at the second device at the moment is indicated, and the first device has an unexecuted hot update task is indicated, so that the first device can acquire the newer hot update program file from the second device.
Of course, it will be understood that in some cases, for example, when the first device does not perform the thermal update task for a long time, there may exist a plurality of program versions corresponding to the reference version number information that are all newer than the program version of the thermal update program file currently stored by the first device, and at this time, the first device may obtain the latest thermal update program file from the second device, so as to quickly complete the latest thermal update task.
In the embodiment of the present application, the relationship between the first device and the second device is not limited, and the first device and the second device may be flexibly converted according to needs. For example, in some cases, the terminal device may obtain the hot update program file from another terminal device, where the terminal device is the first device; conversely, in some cases, other terminal devices may also obtain the hot update program file from the terminal device, where the terminal device is the second device. Also, the number of second devices may be one or more for the same first device, which is not limited in this application.
In addition, in the embodiment of the present application, as described above, there may be a plurality of hot update program files in the background server of the application, for the implementation type that the background server in fig. 5 directly issues the new hot update program file to the terminal device after receiving the new hot update program file, since the background server side has already determined that the hot update program file is a newly uploaded version, the problem that the terminal device repeatedly stores the same hot update program file will generally not occur when the uploading error is eliminated. For the implementation type in which the terminal device of fig. 6 actively downloads from the background server, the terminal device needs to distinguish which hot update program files are downloaded, so that the problem that the terminal device repeatedly stores the same hot update program files is reduced as much as possible.
Specifically, in one possible implementation manner, when the query result indicates that a hot update program file of an application program exists in the background server, downloading the hot update program file, and storing the hot update program file in a target storage space corresponding to the application program, where the method includes:
when the query result characterizes that a hot update program file of an application program exists in the background server, acquiring first version number information of the hot update program file in the background server;
inquiring second version number information of each hot update program file stored in the current target storage space;
comparing the first version number information with each second version number information;
and when the first version number information and any second version number information are different, downloading the hot update program file in the background server, and storing the downloaded hot update program file in a target storage space corresponding to the application program.
In this embodiment of the present application, for an implementation type that the terminal device actively downloads from the background server, if the query result characterizes that a hot update program file of the application program exists in the background server, version number information of the hot update program file in the background server may be obtained and recorded as first version number information. Here, since the hot-update program file has an iterative property, that is, the new hot-update program file is also an update to the old hot-update program file, only the first version number information of the latest hot-update program file in the background server may be generally acquired. Then, the version number information of each thermal update program file stored in the current target storage space can be queried and recorded as second version number information, then the first version number information and the second version number information are compared, and if the first version number information is consistent with a certain second version number information, the thermal update program file in the current background server is indicated to be stored by the terminal device, so that repeated downloading and storage are not needed at this time. Otherwise, if the first version number information and any second version number information are different, it is indicated that the latest thermal update program file in the background server is not included in the thermal update program files stored in the current terminal device, so that it can be determined that the application program has a new thermal update requirement at this time, and the terminal device can download the latest thermal update program file from the background server and store the downloaded thermal update program file in the target storage space corresponding to the application program.
It can be understood that, since the hot update program files acquired from the terminal device have new and old differences, the hot update process of the analysis application program can find: if the application program does not have new hot update requirements, the version number information of the latest hot update program file in the general terminal device and the latest hot update program file in the background server are consistent. When new thermal update demands exist on the application program, new thermal update program files are newly added in the background server, so that the first version number information of the latest thermal update program files in the background server is changed at the moment, and therefore inconsistent with the second version number information of the latest thermal update program files in the terminal equipment occurs. Therefore, in some embodiments, it may be directly compared whether the second version number information of the latest hot update program file at the terminal device side is consistent with the first version number information of the latest hot update program file in the background server, so as to determine whether the application program has a hot update requirement, and further determine whether the terminal device needs to download and store the hot update program file in the background server. Therefore, the task amount of comparing the first version number information with the second version number information can be reduced, the data processing pressure of updating the application program is reduced, and the acquisition efficiency of the hot updating program file is improved.
In the embodiment of the application, the version number information corresponding to the program file is updated thermally, so that the program file which needs to be executed in the running process of the application program can be conveniently confirmed. For example, in particular, in one possible implementation, when a hot update program file exists in the target storage space, running an application program based on the hot update program file includes:
determining a first target program file stored in a current target storage space according to the version number information; the first target program file is the latest hot update program file in the target storage space;
the application is run based on the first object file.
In this embodiment of the present invention, as described above, the version number information may be set to a form capable of reflecting the new and old situations of the actual version of the thermal update program file, so that the latest thermal update program file stored in the current target storage space may be determined directly according to the version number information at this time and recorded as the first target program file. Of course, even if the version number information does not actually reflect the actual version of the hot-update program file, the background server of the application program may query and determine which hot-update program file is uploaded later based on the version number information, thereby determining the first target program file. The first object file may then be executed to implement the running of the application, i.e. to complete the hot update of the application business logic.
It should be noted that, in the embodiment of the present application, the target storage space allocated for each application is generally limited due to the total available storage capacity of the terminal device. After the application program is installed, with the increase of the number of hot update times, more and more hot update program files are stored in the target storage space, and there may be a problem that the available storage capacity of the target storage space is excessively occupied, and new hot update program files cannot be stored again. Thus, in some embodiments, the target storage space may be cleaned up appropriately, deleting unnecessary hot update program files, thereby enabling the target storage space to continue to meet the hot update needs of the application.
Specifically, in one possible implementation manner, the method in the embodiment of the application further includes the following steps:
detecting available storage capacity of a target storage space;
when the available storage capacity is smaller than a preset capacity threshold, determining a first target program file stored in a current target storage space according to version number information; the first target program file is the latest hot update program file in the target storage space;
deleting at least one second object program file from the object storage space; the second object file is a hot update program file other than the first object file.
In the embodiment of the application, a preset capacity threshold value can be set in advance, then, the available storage capacity of the target storage space can be detected, and when the detected available storage capacity is greater than or equal to the preset capacity threshold value, it is indicated that more available storage capacity exists in the current target storage space, the temporary cleaning can be selected; otherwise, when the detected available storage capacity is smaller than the preset capacity threshold, the current available storage capacity of the target storage space is not much, and the target storage space needs to be cleaned to free enough available storage capacity, so that the possibility that the application program cannot perform the hot update normally due to the fact that the new hot update program file cannot be stored in the target storage space is reduced.
Specifically, in the embodiment of the present application, the cleaning of the target storage space may be deleting at least one old hot update program file therein. It will be appreciated that for an update of an application, when a new hot update program file exists, each hot update program file stored before the hot update program file belongs to old program files of updated business logic, which will not execute when the application is started, and may be deleted to make more available storage capacity. Therefore, in the embodiment of the present application, all the other hot update program files except the first target program file in the target storage space may be determined to be old program files and recorded as the second target program file. Then, at least one second object file may be selected for deletion to effect cleaning of the object storage space. Of course, in some embodiments, in order to increase the utilization of the target storage space as much as possible, it may be selected to delete all of the second target program files.
It should be noted that, in the embodiment of the present application, the user of the terminal device may also select to clean the target storage space of the application program according to the own use requirement, and delete part of the hot update program file. For example, referring to fig. 7, a clear button 720 may be provided on the interface of the target storage space displayed by the terminal device in fig. 7. When a user of the terminal device has a need to clean the memory space of the terminal device, the user may enter the interface of the target memory space of the application program and click the clean button 720. When the terminal device receives the click operation of the clean button 720, at least one second object program file may be deleted similarly to clean the object storage space. For the hot update program file in the file directory in fig. 7, the hot update program file with version number information of "CI2.1.0.181209" is the first target program file, and is reserved in the cleaning process; version number information is "CI2.1.0.181207", "CI2.1.0.181206", etc., that is, the hot update program files ordered as 2 to 6 in the file directory all belong to the second target program file. When deleting the second target program file, a reverse order deleting mode can be set, namely, deleting the second target program file in sequence with the sequence being later, and then deleting the second target program file in sequence with the sequence being earlier in the reverse order.
It may be understood that in the embodiment of the present application, the detection of the available storage capacity of the target storage space may be performed after the target storage space completes one time of storing the thermal update program file, or may be performed after a detection period is set, and the application is not limited to this.
It should be noted that, in order to enable the target storage space to normally store the latest hot update program file as much as possible, the preset capacity threshold needs to be as large as possible to be larger than the size of the conventional hot update program file, so as to reduce the influence on the hot update of the application program. As such, even if the current available storage capacity is less than the preset capacity threshold, it may still meet the need to store a new hot-update program file. Of course, in the embodiment of the present application, the actual size of the preset capacity threshold may be set according to different application programs and actual experiences, which is not specifically limited in the present application.
In addition to the foregoing embodiments, in some embodiments, the method may further include the following steps to implement a cleaning procedure for the target storage space:
acquiring an installation package to be updated of an application program from a background server of the application program;
Deleting the current software installation package of the application program, and configuring the installation package to be updated to the terminal equipment as a new software installation package;
when the configuration of the new software installation package is completed, all hot update program files in the target storage space are emptied.
In the embodiment of the application, besides the hot update of the application program, there is a normal service update requirement, that is, the terminal device needs to download the installation package for installing the application program again to realize the larger-scale service update. Specifically, in the embodiment of the present application, an installation package that needs to be reinstalled to implement updating is recorded as an installation package to be updated, and the terminal device may acquire the installation package to be updated from a background server of an application program, and then may delete a software installation package of the application program currently stored in the application program, and configure the installation package to be updated as a new software installation package in the terminal device, so as to implement normal service updating.
It can be understood that, after the terminal device downloads the installation package to be updated of the application program again, the current latest service logic is encapsulated in the installation package to be updated, and the version of the application program corresponding to the installation package to be updated belongs to the updated type with respect to the version of the application program corresponding to each hot update program file in the current target storage space. Therefore, in order to avoid that the application program runs based on the hot update program file when the application program is started, the target storage space needs to be cleared, that is, when the configuration of the new software installation package is completed, all the hot update program files in the target storage space are deleted.
For the hot update demands of different versions of the application program, most of the corresponding hot update program files are likely to be the same, and only new business functions are added on the original basis. For this type of hot update task, a considerable amount of network resources are wasted if the terminal device downloads the complete hot update program file each time. Thus, in some embodiments, the hot update program file stored in the target storage space at the terminal device side may also be processed by the terminal device based on an incremental update algorithm.
Specifically, in one possible implementation manner, the method in the embodiment of the application further includes the following steps:
obtaining a difference program file and target version number information from a background server of an application program;
determining a first target program file stored in a current target storage space; the first target program file is the latest hot update program file in the target storage space;
and merging the difference program file and the first target program file to obtain a new hot program update file, and determining the target version number information as the version number information of the new hot program update file.
In the embodiment of the application, in the process of two times of thermal updating, the change of the thermal updating program file is not very large, but only the situation that part of new file content is added, and the issuing and storage of the new thermal updating program file can be realized by adopting an incremental updating algorithm. Specifically, for the background server, after acquiring the uploaded new hot update program file, the background server can compare the new hot update program file with the hot update program file used in the last hot update, determine the newly added content therein, and extract the newly added content alone to form the differential program file. Then, the background server can generate the target version number information corresponding to the current thermal update, and then the background server can directly send the differential program file and the target version number information to the terminal equipment, or based on the mode of actively inquiring the terminal equipment, the terminal equipment can acquire the differential program file and the target version number information.
After the terminal device obtains the difference program file, the difference program file and the first target program file can be combined. It can be understood that the differential program file is the content of the hot update program file newly uploaded by the background server side, which is more than the hot update program file used by the previous hot update (i.e., the first target program file currently stored by the terminal device side). Therefore, the difference program file and the first target program file are combined, so that the hot update program file newly uploaded by the background server side can be restored and obtained, which is equivalent to the fact that the terminal equipment obtains the latest hot update program file from the background server side, and the target version number information can be determined as the version number information of the new hot update file after combination.
It can be understood that in the embodiment of the present application, the terminal device and the background server adopt an incremental update manner, so that the data processing pressure of the terminal device can be greatly reduced, and only the differential program file with smaller file data volume needs to be downloaded for merging processing to obtain the complete and latest hot update program file, so that the update efficiency can be significantly improved.
The method of updating the application provided in the present application will be described in detail below with reference to some more specific embodiments.
In the embodiment of the application, the service logic of the application program can be described by adopting a finite state machine, wherein the finite state machine is called a state machine for short, and is a mathematical calculation model for representing a finite number of states, transition, action and other behaviors between the states. The finite state machine is a tool used to model the behavior of an object, and its role is mainly to describe the sequence of states an object experiences during its life cycle, and how to respond to various events from the outside world.
Specifically, according to the business logic of the application program, the concepts of corresponding States (States), events (Events), transitions (Transitions) and Actions (Actions) in the finite state machine can be extracted. For example, referring to FIG. 8, a simple timer application is illustrated in which the displayed interfaces differ at various stages of the application's operation. Which may include a reset interface 801, a timing interface 802, and a pause interface 803. On these display interfaces, there are a START button 810 showing "START", a segment button 820 showing "SPLIT", a pause button 830 showing "STOP", and a RESET button 840 showing "RESET", and the application has the following business logic: 1. when the application program is started, entering a default state, displaying a reset interface 801, wherein the displayed timing result is '00:00:00.0', and the operation buttons displayed on the reset interface 801 are a start button 810 and a segment button 820, and waiting for operation; 2. if the start button 810 is clicked, starting timing, displaying a timing interface 802, wherein the operation buttons displayed by the timing interface 802 are a pause button 830 and a segment button 820; 3. if the segment button 820 is clicked, the current time is recorded and the timing is continued; 4. if the pause button 830 is clicked, the timing is paused, the pause interface 803 is displayed, and the operation buttons displayed by the pause interface 803 are a start button 810 and a reset button 840; 5. after the pause, if the reset button 840 is clicked, the default state is returned, the reset interface 801 is redisplayed, and the operation is waited for.
Based on the principle of the finite state machine, finite state machine elements corresponding to the application program can be extracted, and specifically include a state element, an event element, a transition element and an action element. Among the state elements, the application program includes three state types, which are reset (reset state, also referred to as default state), running (timing state), and used (pause state). In the event element, i.e. the service event that may occur in each state is combed, for the timer application in the embodiment of the present application, there are four service events, namely, watch. Start (start timer), watch. Stop (stop timer), watch. Split (segment timer), and watch. Reset (reset timer). The transition element refers to a state transition relationship of an application program when an event is triggered. In fig. 8, when the application is in running state, if the watch stop event triggers, the state is shifted to the running state. An action element refers to an action that may be performed when an application enters or exits certain states, and is specifically expressed by service logic, such as an action that starts timing when an application enters a running state. Here, it is necessary to distinguish between action elements and state elements, and the action itself is unstable, i.e., no condition is triggered, and the action ends once the execution is completed; while the state is relatively stable, a state persists if no external conditions trigger.
Also shown in fig. 8 is a graphical logical description of the finite state machine, which in actual terms can be expressed using the description language defined by the recommended standard SCXML given by W3C, as follows program code fields:
/>
in the embodiment of the application, after the code fields described based on the finite state machine principle are obtained, the code fields can be packaged to generate the program files of the corresponding application program. When executing the application program, the program file thereof needs to be loaded to realize the corresponding business logic. In particular, for a program file under the above-described SCXML standard definition, the program file may be executed based on Apache Commons SCXML. Apache Commons SCXML provides an implementation method for interpreting and executing program files in SCXML format, and the process of loading and executing program files under the definition of the SCXML standard is described in fig. 9 with reference to fig. 9. In particular, a program file reader 920 for reading code fields in a program file and a program executor 930 for executing business logic of an application program according to the code fields are provided with reference to fig. 9,Apache Commons SCXML. When the business logic of the application is implemented based on the obtained program file, the program file reader 920 may be called to read the program file 910, so as to obtain the program code field, and the program code field will be transmitted to the program executor 930. When the operator of the application triggers the corresponding business logic, for example, clicks on the start button 810 or the pause button 830 in fig. 8, the program executor 930 converts the state elements of the application based on the corresponding events, thereby updating the UI interface of the application, and performs the corresponding actions to complete the business logic of the application.
It can be appreciated that the hot update program file in the embodiment of the present application may be implemented based on the description language SCXML of the finite state machine in the foregoing embodiment. It should be understood, of course, that the above-described embodiments are merely exemplary of one alternative implementation of the present application, and are not intended to limit the programming language used in the actual implementation of the present application. For example, in other embodiments, the hot update program file in the embodiments of the present application may also be implemented based on the description languages of Java, real Native, flutter, android App Bundle, and the like, which is not limited in this application.
Specifically, taking an example of implementing the method for updating the application program provided in the embodiment of the present application based on the description language SCXML of the finite state machine, the SCXML file may be used as a hot update program file of the application program, for example, may be a program file of the timer application program obtained in the foregoing embodiment, which is denoted as stop. The updating method is mainly realized through two-stage processes, and specifically comprises an updating process and a dynamic loading process of the SCXML file at the terminal equipment side.
Referring to fig. 10, fig. 10 shows a schematic flow chart of updating an SCXML file provided in the embodiment of the present application, in this flow chart, when an application program is in a background running stage or a background caching stage, a background server of the application program may be queried for whether a new SCXML file exists, if the new SCXML file exists, the SCXML file is downloaded, and stored in a private directory of an SD card of the terminal device, where the private directory is a target storage space corresponding to the application program, and waits for a call in a subsequent dynamic loading process. If the background server does not have a new SCXML file, the background server can wait for 5 minutes and then inquire again, and the method is repeatedly executed.
Next, referring to fig. 11, fig. 11 shows a schematic diagram of a dynamic loading flow of an SCXML file provided in the embodiment of the present application, in this flow, when an application needs to be started, that is, a stop/SCXML needs to be loaded, it may be first queried from a target storage space corresponding to the application, that is, a private directory of an SD card, whether a file of stop/SCXML exists, and if so, it is indicated that a thermal update requirement exists in the current application, so that at this time, the stop/SCXML may be read from the private directory of the SD card, and a thermal update program file for executing service logic after thermal update may be obtained. Otherwise, if the private directory of the SD card is queried that the stop watch. Scxml does not exist, which indicates that the application program does not have the hot update requirement at the moment, the stop watch. Scxml is read from the software installation package of the application program, and for the terminal equipment of the Android system, the stop watch. Scxml is read from the Android assembly directory to run the application program.
Referring to fig. 12, fig. 12 is a flowchart of another method for updating an application provided in the embodiment of the present application, where the method for updating an application may be executed by a background server of the application, and specifically includes, but is not limited to, the following steps 1210 to 1220.
Step 1210, receiving a hot update program file of an application.
Step 1220, the hot update program file is sent to the terminal device, so that the terminal device stores the hot update program file in the target storage space corresponding to the application program, and runs the application program based on the hot update program file in response to the start instruction for the application program.
In the embodiment of the application, an application program updating method is also provided, and the application program updating method can be applied to a background server of an application program. When there is a need for hot updates of an application, the developer can transfer the updated program file to a background server. After receiving the hot update program file, the background server can send the hot update program file to the terminal device, so that the terminal device can store the hot update program file in a target storage space corresponding to the application program. Subsequently, when the terminal device starts to run the application program, the application program can be run based on the hot update program file in response to a starting instruction for the application program, so that hot update of the application program is realized.
It can be understood that, because the hot update program file provided by the background server in the embodiment of the application can independently implement the running of the application program, the requirement of service logic hot update can be met. Moreover, for the user of the application program, each hot update is realized in the starting stage of the application program, the normal use of the application program is not influenced, and the hot update process is not perceived, so that the application program use experience of the user is less influenced.
Moreover, it can be understood that the content in the embodiment of the method for updating an application program shown in fig. 3 is applicable to the embodiment of the electronic device, and the functions specifically implemented by the embodiment of the electronic device are the same as those in the embodiment of the method for updating an application program shown in fig. 3, and the beneficial effects achieved by the embodiment of the method for updating an application program shown in fig. 3 are the same as those achieved by the embodiment of the method for updating an application program shown in fig. 3.
On the other hand, the embodiment of the application also provides an updating device of an application program, which is applied to a terminal device, as shown in fig. 13, and the device comprises:
a response unit 1310, configured to determine, in response to a start instruction for an application, a target storage space corresponding to the application; the target storage space is used for storing a hot update program file of the application program;
a detecting unit 1320 for detecting whether a hot update program file of the application program exists in the target storage space;
an execution unit 1330 for running the application program based on the hot update program file when the hot update program file exists in the target storage space; alternatively, when the hot update program file does not exist in the target storage space, an original program file is determined from a software installation package of the application program, and the application program is run based on the original program file.
Further, the above-mentioned application updating device further includes a first obtaining unit, where the first obtaining unit is specifically configured to:
receiving a hot update program file sent by a background server of an application program;
and storing the hot update program file into a target storage space corresponding to the application program.
Further, the application updating device further includes a second acquiring unit, where the second acquiring unit is specifically configured to:
sending inquiry information to a background server of the application program; the inquiry information is used for inquiring whether a hot update program file of the application program exists in the background server;
receiving an inquiry result returned by a background server of the application program;
and when the query result characterizes that the hot update program file of the application program exists in the background server, downloading the hot update program file, and storing the hot update program file into a target storage space corresponding to the application program.
Further, the first acquiring unit or the second acquiring unit is specifically configured to:
acquiring version number information of a hot update program file;
and establishing a file catalog in the target storage space, and storing the heat storage updating program file by taking the version number information as an index.
Further, the second acquiring unit is specifically configured to:
When the query result characterizes that a hot update program file of an application program exists in the background server, acquiring first version number information of the hot update program file in the background server;
inquiring second version number information of each hot update program file stored in the current target storage space;
comparing the first version number information with each second version number information;
and when the first version number information and any second version number information are different, downloading the hot update program file in the background server, and storing the downloaded hot update program file in a target storage space corresponding to the application program.
Further, the application updating device further includes a first cleaning unit, where the first cleaning unit is specifically configured to:
detecting available storage capacity of a target storage space;
when the available storage capacity is smaller than a preset capacity threshold, determining a first target program file stored in a current target storage space according to version number information; the first target program file is the latest hot update program file in the target storage space;
deleting at least one second object program file from the object storage space; the second object file is a hot update program file other than the first object file.
Further, the execution unit is specifically configured to:
determining a first target program file stored in a current target storage space according to the version number information; the first target program file is the latest hot update program file in the target storage space;
the application is run based on the first object file.
Further, the application program updating device further includes a differential updating unit, where the differential updating unit is specifically configured to:
obtaining a difference program file and target version number information from a background server of an application program;
determining a first target program file stored in a current target storage space; the first target program file is the latest hot update program file in the target storage space;
and merging the difference program file and the first target program file to obtain a new hot program update file, and determining the target version number information as the version number information of the new hot program update file.
Further, the application updating device further includes a second cleaning unit, where the second cleaning unit is specifically configured to:
acquiring an installation package to be updated of an application program from a background server of the application program;
deleting the current software installation package of the application program, and configuring the installation package to be updated to the terminal equipment as a new software installation package;
When the configuration of the new software installation package is completed, all hot update program files in the target storage space are emptied.
Further, the execution unit is specifically configured to:
calling a program file reader to read a hot update program file to obtain a program code field;
the program code fields are transferred to the program executor for execution of the business logic of the application program.
It can be understood that the content in the embodiment of the method for updating an application program shown in fig. 3 is applicable to the embodiment of the present apparatus, and the functions specifically implemented by the embodiment of the present apparatus are the same as those in the embodiment of the method for updating an application program shown in fig. 3, and the advantages achieved are the same as those achieved in the embodiment of the method for updating an application program shown in fig. 3.
On the other hand, the embodiment of the application also provides another device for updating the application program, which is applied to the background server and comprises the following steps:
a receiving unit for receiving a hot update program file of an application program;
and the sending unit is used for sending the hot update program file to the terminal equipment so that the terminal equipment stores the hot update program file in a target storage space corresponding to the application program, and running the application program based on the hot update program file in response to a starting instruction for the application program.
It can be understood that the content of the embodiment of the method for updating an application program shown in fig. 12 is applicable to the embodiment of the present apparatus, and the functions specifically implemented by the embodiment of the present apparatus are the same as those of the embodiment of the method for updating an application program shown in fig. 12, and the advantages achieved are the same as those achieved by the embodiment of the method for updating an application program shown in fig. 12.
Referring to fig. 14, the embodiment of the application further discloses an electronic device, including:
at least one processor 1410;
at least one memory 1420 for storing at least one program;
the at least one program, when executed by the at least one processor 1410, causes the at least one processor 1410 to implement an embodiment of an update method for an application program as shown in fig. 3 or fig. 12.
It can be understood that the content of the embodiment of the method for updating an application program shown in fig. 3 or fig. 12 is applicable to the embodiment of the present electronic device, and the functions specifically implemented by the embodiment of the present electronic device are the same as those of the embodiment of the method for updating an application program shown in fig. 3 or fig. 12, and the advantages achieved are the same as those achieved by the embodiment of the method for updating an application program shown in fig. 3 or fig. 12.
The present application also discloses a computer-readable storage medium in which a processor-executable program is stored, which when executed by a processor is used to implement an embodiment of an update method for an application program as shown in fig. 3 or fig. 12.
It will be appreciated that the content of the embodiment of the method for updating an application program shown in fig. 3 or fig. 12 is applicable to the embodiment of the computer-readable storage medium, and the functions of the embodiment of the computer-readable storage medium are the same as those of the embodiment of the method for updating an application program shown in fig. 3 or fig. 12, and the advantages achieved are the same as those achieved by the embodiment of the method for updating an application program shown in fig. 3 or fig. 12.
The embodiments also disclose a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium as described above; the processor of the electronic device shown in fig. 14 may read the computer instructions from the computer-readable storage medium described above, and the processor executes the computer instructions to cause the electronic device to execute the embodiment of the update method of the application program shown in fig. 3 or fig. 12.
It will be appreciated that the content of the embodiment of the method for updating an application program shown in fig. 3 or fig. 12 is applicable to the present computer program product or the embodiment of the computer program, and the functions implemented by the present computer program product or the embodiment of the computer program are the same as those of the embodiment of the method for updating an application program shown in fig. 3 or fig. 12, and the advantages achieved are the same as those achieved by the embodiment of the method for updating an application program shown in fig. 3 or fig. 12.
In some alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may in fact be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed, and in which sub-operations described as part of a larger operation are performed independently.
Furthermore, while the present application is described in the context of functional modules, it should be appreciated that, unless otherwise indicated, one or more of the functions and/or features may be integrated in a single physical device and/or software module or one or more of the functions and/or features may be implemented in separate physical devices or software modules. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary to an understanding of the present application. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be apparent to those skilled in the art from consideration of their attributes, functions and internal relationships. Thus, those of ordinary skill in the art will be able to implement the present application as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative and are not intended to be limiting upon the scope of the application, which is to be defined by the appended claims and their full scope of equivalents.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the foregoing description of the present specification, descriptions of the terms "one embodiment/example", "another embodiment/example", "certain embodiments/examples", and the like, are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present application have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the application, the scope of which is defined by the claims and their equivalents.
While the preferred embodiments of the present application have been described in detail, the present application is not limited to the embodiments, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit of the present application, and these equivalent modifications and substitutions are intended to be included in the scope of the present application as defined in the appended claims.

Claims (15)

1. An update method of an application program, applied to a terminal device, the method comprising:
responding to a starting instruction for an application program, and determining a target storage space corresponding to the application program; the target storage space is used for storing a hot update program file of the application program;
detecting whether a hot update program file of the application program exists in the target storage space;
when the hot update program file exists in the target storage space, operating the application program based on the hot update program file; or when the hot update program file does not exist in the target storage space, determining an original program file from a software installation package of the application program, and running the application program based on the original program file.
2. The method for updating an application program according to claim 1, wherein the hot update program file is acquired by:
receiving a hot update program file sent by a background server of the application program;
and storing the hot update program file into a target storage space corresponding to the application program.
3. The method for updating an application program according to claim 1, wherein the hot update program file is acquired by:
Sending inquiry information to a background server of the application program; the inquiry information is used for inquiring whether a hot update program file of the application program exists in the background server;
receiving an inquiry result returned by a background server of the application program;
and when the query result represents that the hot update program file of the application program exists in the background server, downloading the hot update program file, and storing the hot update program file into a target storage space corresponding to the application program.
4. A method for updating an application program according to claim 2 or 3, wherein storing the hot update program file in a target storage space corresponding to the application program comprises:
acquiring version number information of the hot update program file;
and establishing a file catalog in the target storage space, and storing the hot update program file by taking the version number information as an index.
5. The method for updating an application program according to claim 3, wherein when the query result indicates that a hot update program file of the application program exists in the background server, downloading the hot update program file, and storing the hot update program file in a target storage space corresponding to the application program, includes:
When the query result represents that the hot update program file of the application program exists in the background server, acquiring first version number information of the hot update program file in the background server;
inquiring second version number information of each hot update program file stored in the current target storage space;
comparing the first version number information with each second version number information;
and when the first version number information and any one of the second version number information are different, downloading the hot update program file in the background server, and storing the downloaded hot update program file in a target storage space corresponding to the application program.
6. The method for updating an application program according to claim 4, characterized in that the method further comprises the steps of:
detecting available storage capacity of the target storage space;
when the available storage capacity is smaller than a preset capacity threshold, determining a first target program file stored in the current target storage space according to the version number information; the first target program file is the latest hot update program file in the target storage space;
Deleting at least one second object program file from the object storage space; the second object program file is a hot update program file other than the first object program file.
7. The method according to claim 4, wherein when the hot update program file exists in the target storage space, running the application program based on the hot update program file includes:
determining a first target program file stored in the current target storage space according to the version number information; the first target program file is the latest hot update program file in the target storage space;
and running the application program based on the first target program file.
8. The method for updating an application program according to claim 1, characterized in that the method further comprises the steps of:
obtaining a difference program file and target version number information from a background server of the application program;
determining a first target program file stored in the target storage space currently; the first target program file is the latest hot update program file in the target storage space;
And merging the difference program file and the first target program file to obtain a new hot program update file, and determining the target version number information as the version number information of the new hot program update file.
9. The method for updating an application program according to claim 1, characterized in that the method further comprises the steps of:
acquiring an installation package to be updated of the application program from a background server of the application program;
deleting the current software installation package of the application program, and configuring the installation package to be updated to the terminal equipment as a new software installation package;
and when the configuration of the new software installation package is completed, all hot update program files in the target storage space are emptied.
10. The method for updating an application program according to claim 1, wherein the running the application program based on the hot update program file includes:
calling a program file reader to read the hot update program file to obtain a program code field;
and transmitting the program code field to a program executor to execute the business logic of the application program.
11. A method for updating an application program, applied to a background server, the method comprising:
Receiving a hot update program file of an application program;
and sending the thermal update program file to a terminal device, so that the terminal device stores the thermal update program file into a target storage space corresponding to the application program, and running the application program based on the thermal update program file in response to a starting instruction for the application program.
12. An apparatus for updating an application program, applied to a terminal device, comprising:
the response unit is used for responding to a starting instruction aiming at the application program and determining a target storage space corresponding to the application program; the target storage space is used for storing a hot update program file of the application program;
a detection unit, configured to detect whether a hot update program file of the application program exists in the target storage space;
the execution unit is used for running the application program based on the hot update program file when the hot update program file exists in the target storage space; or when the hot update program file does not exist in the target storage space, determining an original program file from a software installation package of the application program, and running the application program based on the original program file.
13. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method of updating an application program according to any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium storing a program, characterized in that the program, when executed by a processor, implements the method of updating an application program according to any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of updating an application program according to any of claims 1 to 11.
CN202211012064.4A 2022-08-23 2022-08-23 Application program updating method and device, electronic equipment and storage medium Pending CN117667169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211012064.4A CN117667169A (en) 2022-08-23 2022-08-23 Application program updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211012064.4A CN117667169A (en) 2022-08-23 2022-08-23 Application program updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117667169A true CN117667169A (en) 2024-03-08

Family

ID=90079254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211012064.4A Pending CN117667169A (en) 2022-08-23 2022-08-23 Application program updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117667169A (en)

Similar Documents

Publication Publication Date Title
CN108027722B (en) Dynamically updating applications in compilation and deployment
CN106164866B (en) Efficient migration of client-side WEB state
US20230247090A1 (en) Dynamic execution resource selection for customized workflow tasks
US8983935B2 (en) Methods for utilizing a javascript emulator in a web content proxy server and devices thereof
US20170322934A1 (en) Software version control without affecting a deployed container
CN109983434A (en) For eliminating the system and method restarted during the configuration of the initial machine of operating system
CN102087615A (en) Automated merger of logically associated messages in a message queue
CN109359092B (en) File management method, desktop display method, device, terminal and medium
CN109684573B (en) Target picture display method and device, storage medium and electronic equipment
CN113986257A (en) Cloud platform front-end management interface deployment method and device and storage medium
JP2018510428A (en) Code caching system
US11256603B2 (en) Generating and attributing unique identifiers representing performance issues within a call stack
CN109558187A (en) A kind of user interface rendering method and device
CN115659340B (en) Counterfeit applet identification method and device, storage medium and electronic equipment
US20130346908A1 (en) Late instantiation of dependent objects
CN108228266A (en) Start the method and apparatus of Fragment components under a kind of Android card cages between different plug-in units
CN117667169A (en) Application program updating method and device, electronic equipment and storage medium
CN109426546B (en) Application starting method and device, computer storage medium and equipment
CN114860202A (en) Project operation method, device, server and storage medium
CN114756362A (en) Resource quota management method and system, intelligent terminal and storage medium
CN113282363A (en) Method and device for optimizing hybrid APP
CN113110849A (en) Loading resources on demand
CN105610908B (en) A kind of samba service implementing method and system based on Android device
US11017032B1 (en) Document recovery utilizing serialized data
CN106598687A (en) Script preheating 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