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

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

Info

Publication number
CN109634641B
CN109634641B CN201811629355.1A CN201811629355A CN109634641B CN 109634641 B CN109634641 B CN 109634641B CN 201811629355 A CN201811629355 A CN 201811629355A CN 109634641 B CN109634641 B CN 109634641B
Authority
CN
China
Prior art keywords
application
application data
updated
component
data
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.)
Active
Application number
CN201811629355.1A
Other languages
Chinese (zh)
Other versions
CN109634641A (en
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.)
Beijing Urban Network Neighbor Information Technology Co Ltd
Original Assignee
Beijing Urban Network Neighbor Information Technology 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 Beijing Urban Network Neighbor Information Technology Co Ltd filed Critical Beijing Urban Network Neighbor Information Technology Co Ltd
Priority to CN201811629355.1A priority Critical patent/CN109634641B/en
Publication of CN109634641A publication Critical patent/CN109634641A/en
Application granted granted Critical
Publication of CN109634641B publication Critical patent/CN109634641B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

The invention discloses an application program updating method, an application program updating device, electronic equipment and a medium. The method comprises the following steps: loading web application data with a web component, loading a native application component for an update application for the web application data, calling the native application component for the update application, detecting whether updated application data exists on a server, the application data comprising the web application data and/or the native application data, when updated application data exist, the updated application data are extracted from the server, and the updated webpage application data and/or the updated native application data are adopted to update the application program, so that the limitation that a new application program needs to be installed to realize updating is overcome, the function of partially updating the webpage application or the native application in the mixed application program is realized, the problem that the waiting time for releasing a new version of the application program is too long is avoided, and the problems that the problem of repairing the application program is not timely, and the interface style and the new function cannot be adjusted at any time are solved.

Description

Application program updating method and device, electronic equipment and medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an application updating method, an application updating apparatus, an electronic device, and a computer-readable storage medium.
Background
With the increasing development of mobile internet, the requirements of users on client application programs on mobile terminal devices such as mobile phones and tablets are more and more complex and diversified. To enhance the user experience, client application providers are continually developing new client applications or continually adding new functionality to client applications.
In the fast iterative development of the client application program, the client application program is inevitably updated when the problem that the client application program is exposed after being issued, or a new function needs to be added, or an interface needs to be adjusted, and the like are often encountered.
However, the new version of the client application program is released again, and the user installs the new client application program to update, so that the process of the method is complicated, the time for waiting for the online is long, the problems of the application program cannot be repaired in time, and the interface style and the new functions cannot be adjusted at any time.
Disclosure of Invention
In view of the above problems, an application updating method, an application updating apparatus, an electronic device, and a computer-readable storage medium are provided to solve the problems that the problem of repairing an application is not timely, and the interface style and the added function cannot be adjusted at any time.
According to an aspect of the present invention, there is provided an application program update method, in which an application program includes a web page component and a native application component for updating an application, the method including:
loading webpage application data by adopting the webpage component;
loading the native application component for the updated application against the web application data;
calling the native application component for updating the application, and detecting whether updated application data exist in the server or not, wherein the application data comprise webpage application data and/or native application data;
calling the native application component for the updated application, and extracting updated application data from the server when the updated application data exists;
and updating the application program by adopting the updated webpage application data and/or the original application data.
Optionally, a first application data file list is saved in the application program, and the detecting whether updated application data exists on the server includes:
acquiring a second application data file list of the server side;
and comparing the first application data file list with the second application data file list to determine the updated application data existing on the server.
Optionally, before the updating the application program with the updated web application data and/or native application data, the method further includes:
calculating a unique characteristic value of the obtained application data;
comparing the calculated unique characteristic value with the unique characteristic value recorded in the second application data file list;
and deleting the application data with inconsistent comparison results.
Optionally, when the updated application data includes updated web application data, the updating the application program with the updated web application data includes:
and loading the updated webpage application data by adopting the webpage component.
Optionally, when the updated application data includes updated native application data, the updating the application program with the updated native application data includes:
determining updated native application data called by the webpage component according to the webpage application data;
loading the updated native application component within the application program according to the invoked updated native application data.
Optionally, the determining, according to the web page application data, updated native application data called by the web page component includes:
determining a called class name, a called method name and called parameters according to the webpage application data;
transmitting the class name, method name and parameters from the web page component to a native application of the application using an intermediate component;
and determining the called updated native application data according to the class name, the method name and the parameters.
According to another aspect of the present invention, there is provided an application program updating apparatus, in which a web page component and a native application component for updating an application are included in an application program, the apparatus including:
the data loading module is used for loading webpage application data by adopting the webpage component;
the component loading module is used for loading the native application components for updating the application aiming at the webpage application data;
the data detection module is used for calling the native application component for updating the application and detecting whether updated application data exist in the server or not, wherein the application data comprise webpage application data and/or native application data;
the data extraction module is used for calling the native application component for updating the application and extracting updated application data from the server when the updated application data exists;
and the updating module is used for updating the application program by adopting the updated webpage application data and/or the original application data.
Optionally, a first application data file list is saved in the application program, and the data detection module includes:
the list acquisition submodule is used for acquiring a second application data file list of the server side;
and the comparison submodule is used for comparing the first application data file list with the second application data file list and determining updated application data existing on the server.
Optionally, the apparatus further comprises:
the characteristic value calculation module is used for calculating a unique characteristic value of the obtained application data before the application program is updated by adopting the updated webpage application data and/or the original application data;
the characteristic value comparison module is used for comparing the calculated unique characteristic value with the unique characteristic value recorded in the second application data file list;
and the deleting module is used for deleting the application data with inconsistent comparison results.
Optionally, when the updated application data includes updated web application data, the updating module includes:
and the data loading submodule is used for loading updated webpage application data by adopting the webpage component.
Optionally, when the updated application data comprises updated native application data, the update module comprises:
the data determination submodule is used for determining updated native application data called by the webpage component according to the webpage application data;
and the component loading submodule is used for loading the updated native application component in the application program according to the called updated native application data.
Optionally, the data determination sub-module includes:
the determining unit is used for determining the called class name, method name and parameter according to the webpage application data;
a transmission unit, configured to transmit the class name, the method name, and the parameter from the web page component to a native application of the application using an intermediate component;
and the data determining unit is used for determining the called updated native application data according to the class name, the method name and the parameters.
In accordance with another aspect of the present invention, there is provided an electronic apparatus including: a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the application update method described above.
According to another aspect of the present invention, there is provided a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the above-mentioned application program updating method.
In summary, according to the embodiments of the present invention, the web application data is loaded by using the web component. The method comprises the steps of loading a native application component for updating application aiming at webpage application data, calling the native application component for updating application, detecting whether updated application data exist in a server or not, wherein the application data comprise the webpage application data and/or the native application data, calling the native application component for updating application, extracting the updated application data from the server when the updated application data exist, updating the application program by adopting the updated webpage application data and/or the native application data, overcoming the limitation that a new application program needs to be installed to realize updating, realizing the function of partially updating the webpage application or the native application in a hybrid application program, avoiding the problem of overlong waiting time for releasing a new version of the application program, solving the problem of untimely occurrence of repairing the application program, and the problem that the interface style and the added function can not be adjusted at any time.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flowchart illustrating an application update method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating an application update method according to a second embodiment of the present invention;
fig. 3 is a block diagram illustrating an application updating apparatus according to a third embodiment of the present invention;
fig. 4 shows a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example one
Referring to fig. 1, a flowchart illustrating an application updating method in a first embodiment of the present invention is shown, which may specifically include:
and step 101, loading webpage application data by using the webpage component.
In the embodiment of the invention, the application program comprises a webpage component and a native application component for updating the application. The application program can be composed of a webpage application part and a native application part, for the webpage application part, webpage application data acquired in advance can be loaded by utilizing a webpage component, and the webpage application data can be generally used for displaying a UI (user interface) of the application program and can also interact with the native application part to call some native application components of the native application part to realize functions.
For example, a web page component and a native application component are included in a hybrid application program, and the hybrid application program refers to an application program between a web-app (web application) and a native-app (native application), and has the advantages of good user interaction experience of the native-app and cross-platform development of the web-app.
The application data comprises webpage application data, native application data and the like, the webpage application data refers to data written by a web development language, and the native application data refers to data written by a native development language. The web application data needs to rely on webview (i.e., web page components) within the hybrid application to enable presentation on the client. The web page component may load web page application data, render and display.
The hybrid application program usually employs url (Uniform Resource Locator) loading of web application data, which has the disadvantage of being limited to network environment, and once the network speed is slow, loading of the page is very slow and even fails.
In the embodiment of the invention, the webpage application data can be embedded into the application program in advance and is shelved together with the application program, namely, is released to an application market. When the user downloads the application program, the web application data is acquired, and therefore, the web application data is called as the pre-acquired web application data. The method can avoid the process that the conventional webpage loading method needs to pull the webpage from the server when the application program is opened, and avoids the problem of long loading time.
For example, the webpage application data based on the fact frame is placed in the assets folder of the application program, the webpage application data is obtained when the hybrid application program is downloaded, and then the webpage application data is copied to the local directory of the hybrid application program for subsequent use when the hybrid application program is locally loaded for the first time.
And 102, loading the native application component for updating the application aiming at the webpage application data.
In the embodiment of the present invention, the native application component may implement a function of an update application, the function of the update application may be integrated into an existing native application component, or a native application component dedicated for the update application may be separately added, which is not limited in this embodiment of the present invention.
In the embodiment of the present invention, the native application component for updating the application may be loaded according to the web application data, that is, the web application data calls the native application component for updating the application by interacting with the native application part.
Step 103, calling the native application component for updating the application, and detecting whether updated application data exists in the server, where the application data includes web page application data and/or native application data.
In the embodiment of the present invention, a native application component for updating an application is called, and whether updated application data exists in a server may be detected, and a specific implementation manner may include multiple manners, for example, obtaining a first application data file list on the server side, comparing the first application data file list on the server side with a second application data file list stored locally, and determining updated application data on the server.
And 104, calling the native application component for updating the application, and extracting the updated application data from the server when the updated application data exists.
In the embodiment of the invention, a native application component for updating the application is called, and if the server is detected to have updated application data, the updated application data is extracted from the server. In some cases, the updated application data only includes the web page application data, in other cases, the updated application data only includes the native application data, in other cases, the updated application data includes the web page application data and the native application data, and the updated data may be specifically extracted according to an actual situation, which is not limited in this embodiment of the present invention.
And 105, updating the application program by using the updated webpage application data and/or the updated native application data.
In the embodiment of the present invention, after the updated application data is extracted, the implementation manner of the update needs to be determined in three cases:
first, if only the updated web application data exists, an implementation manner of updating the application program by using the updated web application data may include: and loading the updated webpage application data by adopting the webpage component, so that the application program can be updated.
Second, if there is only an updated native application, an implementation manner of updating the application with the updated native application data may include: and according to the updated native application data, loading the updated native application component in the application program, and thus completing the updating of the application program.
Thirdly, if the webpage application data and the native application data are updated, the webpage component is required to be called to load the updated webpage application data, the updated native application data called by the webpage component is determined according to the part which is not updated or the updated part in the webpage application data, and the updated native application component in the application program is loaded according to the called updated native application data, so that the application program can be updated.
In summary, according to the embodiments of the present invention, the web application data is loaded by using the web component. The method comprises the steps of loading a native application component for updating application aiming at webpage application data, calling the native application component for updating application, detecting whether updated application data exist in a server or not, wherein the application data comprise the webpage application data and/or the native application data, calling the native application component for updating application, extracting the updated application data from the server when the updated application data exist, updating the application program by adopting the updated webpage application data and/or the native application data, overcoming the limitation that a new application program needs to be installed to realize updating, realizing the function of partially updating the webpage application or the native application in a hybrid application program, avoiding the problem of overlong waiting time for releasing a new version of the application program, solving the problem of untimely occurrence of repairing the application program, and the problem that the interface style and the added function can not be adjusted at any time.
Example two
Referring to fig. 2, a flowchart illustrating an application updating method in the second embodiment of the present invention is shown, which may specifically include:
step 201, loading webpage application data by using the webpage component.
In the embodiment of the present invention, the specific implementation manner of this step may refer to the description in the foregoing embodiment, and details are not described herein.
Step 202, loading the native application component for updating the application according to the webpage application data.
In the embodiment of the present invention, the specific implementation manner of this step may refer to the description in the foregoing embodiment, and details are not described herein.
Step 203, acquiring a second application data file list of the server side.
In the embodiment of the present invention, the application data may be divided into a plurality of files, each time the update occurs, only one or a few files may be generated, and if the update is performed by compressing all the files of the application data into one compressed packet, the network traffic and the download time are greatly wasted.
For this purpose, in the native application component for updating the application, a second application data file list on the server side may be obtained first, and the path, size, unique characteristic value (e.g., md5 value), and version number of the application program of all the files of the application data are listed in detail in the application data file list.
Step 204, comparing the first application data file list and the second application data file list, and determining updated application data existing on the server.
In the embodiment of the invention, the application program locally stores an application data file list which is recorded as the first application data file list, and updated application data existing on the server can be determined by comparing the second application data file list of the server with the locally stored first application data file list, so that partial files of the application data are updated, and the effect of improving the updating speed is achieved.
For example, comparing the second application data file list on the server with the first application data file list stored locally, if the version numbers are not consistent, it indicates that there is an update, otherwise, no update is needed, and then determining the file of the application data to be updated according to the path or md5 value where there is an inconsistency.
In this embodiment of the present invention, optionally, the second application data file list on the server is a list encrypted by a private key stored by the server, and before comparing the second application data file list with the first application data file list and determining updated application data existing on the server, the method may further include: and decrypting the second application data file list on the server by using the locally stored public key.
In consideration of safety, the application data file list can be protected in an asymmetric encryption mode, a local application program stores a public key, the server stores a corresponding private key, the server encrypts the application data file list by using the private key, and after the application data file list on the server is obtained, the application data file list needs to be decrypted locally by using the stored public key, so that the authenticity of the application data file list is ensured.
In the embodiment of the present invention, optionally, after the native application component for updating the application detects that there is updated application data, the web page component may be notified that there is updated application data. After receiving the update notification, the web page component acquires the current network status, and determines whether the network status meets a preset network requirement, for example, tests the network speed, and determines whether the network speed reaches a network speed threshold set by the preset update requirement, and if the network speed meets the preset network requirement, calls a native application component for updating the application to extract updated application data from the server.
Step 205, calling the native application component for updating the application, and extracting the updated application data from the server when the updated application data exists.
In the embodiment of the present invention, the specific implementation manner of this step may refer to the description in the foregoing embodiment, and details are not described herein.
In this embodiment of the present invention, before the updating the application program with the updated web application data and/or native application data, it may further include: calculating a unique characteristic value of the obtained application data; comparing the calculated unique characteristic value with the unique characteristic value recorded in the second application data file list; and deleting the application data with inconsistent comparison results.
The unique characteristic values (for example, md5 values) of all files are recorded in the second application data file list, after updated application data are acquired, the unique characteristic values of each acquired file are calculated, then the unique characteristic values are compared with the unique characteristic values recorded in the second application data file list, if the unique characteristic values of the updated application data are found to be inconsistent with those in the list, the application data with inconsistent comparison results are deleted, and then the application data can be pulled from the server again, so that the security of the local application data of the application program is ensured, and the risk caused by tampering is avoided.
Step 206, the updated web page application data is loaded using the web page component.
In the embodiment of the present invention, when the updated application data includes the updated web application data, the updated web application data is loaded by using the web component, that is, the update of the web application part of the application program can be realized, and the method and the device can be used for realizing the adjustment of the interface style of the application program at any time.
Step 207, determining updated native application data called by the web page component according to the web page application data.
In the embodiment of the present invention, the native application part of the application program may be loaded according to the web application data, and when the updated application data includes the updated native application data, the native application data called by the web component is determined according to the web application data.
In the embodiment of the present invention, preferably, one implementation manner of determining updated native application data called by the web page component according to the web page application data may include: determining a called class name, method name and parameters according to webpage application data, transmitting the class name, method name and parameters from the webpage component to a native application program of the application program by using an intermediate component, and determining updated native application data of the call according to the class name, method name and parameters.
After entering the application program, a webpage component is opened, updated webpage application data are loaded, if the webpage application data are not updated, the webpage application data which are not updated are loaded, and if the webpage application data are updated, the updated webpage application data are loaded. The method comprises the steps that according to the part, not updated, or the part, updated, of the webpage application data, the name of a called class, the name of a method and parameters of the called class can be determined, interaction between the webpage component and the native application component is achieved through a defined middle component (such as Jsbridge), the name of the class, the name of the method and the parameters of the method are transmitted to a native application program of the application program through the middle component, after the native application program receives the name of the native application data, the class of the native application data is loaded through the name of the class, and the corresponding method in the class is called through the name of the method and the parameters of the method, so that the called native application data are obtained, wherein the called native.
Step 208, loading the updated native application components in the application program according to the invoked updated native application data.
In the embodiment of the present invention, according to the called updated native application data, the native application component in the application program is loaded, for example, the updated native application data (native code) is loaded through a classloader (class loader), and the component manager is used for loading, so as to implement the update of the native application part of the application program.
In summary, according to the embodiments of the present invention, the web application data is loaded by using the web component. Aiming at webpage application data, loading a native application component for updating application, acquiring a second application data file list at the server side, comparing the first application data file list with the second application data file list, determining updated application data existing on the server, extracting the updated application data from the server when the updated application data exists, loading the updated webpage application data by adopting the webpage component, determining updated native application data called by the webpage component according to the webpage application data, and loading the updated native application component in the application program according to the called updated native application data, thereby overcoming the limitation that a new application program needs to be installed to realize updating, realizing the function of partially updating the webpage application or the native application in the hybrid application program, and avoiding the problem of overlong waiting time for releasing a new version of the application program, the problems that the problems of repairing the application program are not timely, and the interface style and the newly added function cannot be adjusted at any time are solved.
Furthermore, by acquiring the second application data file list on the server, comparing the first application data file list with the second application data file list, and determining the updated application data on the server, partial files of the application data are updated, and the effect of improving the updating speed is achieved.
Further, the unique characteristic value of the obtained application data is calculated, the calculated unique characteristic value is compared with the unique characteristic value recorded in the second application data file list, and the application data with inconsistent comparison results are deleted, so that the safety of the local application data of the application program is ensured, and the risk caused by tampering is avoided.
EXAMPLE III
Referring to fig. 3, a block diagram of an application updating apparatus in a third embodiment of the present invention is shown, which may specifically include:
a data loading module 301, configured to load web application data using the web component;
a component loading module 302, configured to load the native application component for the updated application for the web application data;
a data detection module 303, configured to invoke the native application component for updating the application, and detect whether updated application data exists in the server, where the application data includes web page application data and/or native application data;
a data extraction module 304, configured to invoke the native application component for the updated application, and when updated application data exists, extract the updated application data from the server;
an update module 305 for updating the application program with the updated web application data and/or native application data.
In this embodiment of the present invention, optionally, a first application data file list is stored in the application program, and the data detection module includes:
the list acquisition submodule is used for acquiring a second application data file list of the server side;
and the comparison submodule is used for comparing the first application data file list with the second application data file list and determining updated application data existing on the server.
In this embodiment of the present invention, optionally, the apparatus further includes:
the characteristic value calculation module is used for calculating a unique characteristic value of the obtained application data before the application program is updated by adopting the updated webpage application data and/or the original application data;
the characteristic value comparison module is used for comparing the calculated unique characteristic value with the unique characteristic value recorded in the second application data file list;
and the deleting module is used for deleting the application data with inconsistent comparison results.
In this embodiment of the present invention, optionally, when the updated application data includes updated web application data, the updating module includes:
and the data loading submodule is used for loading updated webpage application data by adopting the webpage component.
In this embodiment of the present invention, optionally, when the updated application data includes updated native application data, the updating module includes:
the data determination submodule is used for determining updated native application data called by the webpage component according to the webpage application data;
and the component loading submodule is used for loading the updated native application component in the application program according to the called updated native application data.
In this embodiment of the present invention, optionally, the data determining sub-module includes:
the determining unit is used for determining the called class name, method name and parameter according to the webpage application data;
a transmission unit, configured to transmit the class name, the method name, and the parameter from the web page component to a native application of the application using an intermediate component;
and the data determining unit is used for determining the called updated native application data according to the class name, the method name and the parameters.
In summary, according to the embodiments of the present invention, the web application data is loaded by using the web component. The method comprises the steps of loading a native application component for updating application aiming at webpage application data, calling the native application component for updating application, detecting whether updated application data exist in a server or not, wherein the application data comprise the webpage application data and/or the native application data, calling the native application component for updating application, extracting the updated application data from the server when the updated application data exist, updating the application program by adopting the updated webpage application data and/or the native application data, overcoming the limitation that a new application program needs to be installed to realize updating, realizing the function of partially updating the webpage application or the native application in a hybrid application program, avoiding the problem of overlong waiting time for releasing a new version of the application program, solving the problem of untimely occurrence of repairing the application program, and the problem that the interface style and the added function can not be adjusted at any time.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 4, the electronic device 800 may include one or more processors 801 and one or more memories 802 coupled to the processors 801. The electronic device 800 may also include an input interface 803 and an output interface 804 for communicating with another apparatus or system. Program code executed by the CPU of the processor 801 may be stored in the memory 802.
The processor 801 in the electronic device 800 calls the program code stored in the memory 802 to execute the application program update method in the above-described embodiment.
The processor is the control center of the server and provides a processing device for executing instructions, performing interrupt operations, providing timing functions and various other functions. The processor may be a single core (single CPU) processor or a multi-core (multi-CPU) processor. Unless otherwise stated, a component such as a processor or a memory described as performing a task may be implemented as a general component, which is temporarily used to perform the task at a given time, or as a specific component specially manufactured to perform the task. The term "processor" as used herein refers to one or more devices, circuits and/or processing cores that process data, such as computer program instructions.
The above elements in the above server may be connected to each other by a bus, such as one of a data bus, an address bus, a control bus, an expansion bus, and a local bus, or any combination thereof.
There is also provided, in accordance with an embodiment of the present invention, a computer-readable storage medium having a computer program stored thereon, where the storage medium may be a Read-Only Memory (ROM) or a Read-write medium, such as a hard disk or a flash Memory. The computer program, when executed by a processor, implements the application update method of the foregoing embodiments.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The application updating method, the application updating device, the electronic device and the medium provided by the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (14)

1. An application program updating method, wherein the application program includes a web page component and a native application component for updating an application, the method comprising:
loading webpage application data by adopting the webpage component;
loading the native application component for the update application aiming at the webpage application data, wherein the native application component is integrated with a component for updating the function of the application or is a component special for updating the application;
calling the native application component for updating the application, and detecting whether updated application data exist in the server or not, wherein the application data comprise webpage application data and/or native application data;
calling the native application component for the updated application, and extracting updated application data from the server when the updated application data exists;
updating the application program by using the updated webpage application data and/or native application data;
wherein invoking the native application component for updating the application, extracting updated application data from the server when the updated application data exists, comprises:
after detecting that the updated application data exists, a native application component for updating the application notifies the webpage component of the existence of the updated application data;
the web page component, upon receiving the update notification, invokes a native application component for updating the application to retrieve the updated application data from the server.
2. The method of claim 1, wherein the application program stores a first list of application data files, and wherein detecting whether updated application data exists on the server comprises:
acquiring a second application data file list of the server side;
and comparing the first application data file list with the second application data file list to determine the updated application data existing on the server.
3. The method of claim 2, wherein prior to said updating the application with the updated web application data and/or native application data, the method further comprises:
calculating a unique characteristic value of the obtained application data;
comparing the calculated unique characteristic value with the unique characteristic value recorded in the second application data file list;
and deleting the application data with inconsistent comparison results.
4. The method of claim 1, wherein when the updated application data comprises updated web application data, the updating the application with the updated web application data comprises:
and loading the updated webpage application data by adopting the webpage component.
5. The method of claim 1, wherein when the updated application data comprises updated native application data, the updating the application with the updated native application data comprises:
determining updated native application data called by the webpage component according to the webpage application data;
loading the updated native application component within the application program according to the invoked updated native application data.
6. The method of claim 5, wherein determining updated native application data for the web page component invocation from the web page application data comprises:
determining a called class name, a called method name and called parameters according to the webpage application data;
transmitting the class name, method name and parameters from the web page component to a native application of the application using an intermediate component;
and determining the called updated native application data according to the class name, the method name and the parameters.
7. An apparatus for updating an application program, wherein the application program includes a web page component and a native application component for updating the application program, the apparatus comprising:
the data loading module is used for loading webpage application data by adopting the webpage component;
the component loading module is used for loading the native application component for updating the application aiming at the webpage application data, wherein the native application component is integrated with a component for updating the function of the application, or the native application component is a component special for updating the application;
the data detection module is used for calling the native application component for updating the application and detecting whether updated application data exist in the server or not, wherein the application data comprise webpage application data and/or native application data;
the data extraction module is used for calling the native application component for updating the application and extracting updated application data from the server when the updated application data exists;
the updating module is used for updating the application program by adopting the updated webpage application data and/or the updated native application data;
wherein invoking the native application component for updating the application, extracting updated application data from the server when the updated application data exists, comprises:
after detecting that the updated application data exists, a native application component for updating the application notifies the webpage component of the existence of the updated application data;
the web page component, upon receiving the update notification, invokes a native application component for updating the application to retrieve the updated application data from the server.
8. The apparatus of claim 7, wherein a first list of application data files is stored in the application program, and wherein the data detection module comprises:
the list acquisition submodule is used for acquiring a second application data file list of the server side;
and the comparison submodule is used for comparing the first application data file list with the second application data file list and determining updated application data existing on the server.
9. The apparatus of claim 8, further comprising:
the characteristic value calculation module is used for calculating a unique characteristic value of the obtained application data before the application program is updated by adopting the updated webpage application data and/or the original application data;
the characteristic value comparison module is used for comparing the calculated unique characteristic value with the unique characteristic value recorded in the second application data file list;
and the deleting module is used for deleting the application data with inconsistent comparison results.
10. The apparatus of claim 7, wherein when the updated application data comprises updated web application data, the update module comprises:
and the data loading submodule is used for loading updated webpage application data by adopting the webpage component.
11. The apparatus of claim 7, wherein when the updated application data comprises updated native application data, the update module comprises:
the data determination submodule is used for determining updated native application data called by the webpage component according to the webpage application data;
and the component loading submodule is used for loading the updated native application component in the application program according to the called updated native application data.
12. The apparatus of claim 11, wherein the data determination submodule comprises:
the determining unit is used for determining the called class name, method name and parameter according to the webpage application data;
a transmission unit, configured to transmit the class name, the method name, and the parameter from the web page component to a native application of the application using an intermediate component;
and the data determining unit is used for determining the called updated native application data according to the class name, the method name and the parameters.
13. An electronic device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the application update method of any of claims 1-6.
14. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the application program update method according to any one of claims 1-6.
CN201811629355.1A 2018-12-28 2018-12-28 Application program updating method and device, electronic equipment and medium Active CN109634641B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811629355.1A CN109634641B (en) 2018-12-28 2018-12-28 Application program updating method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811629355.1A CN109634641B (en) 2018-12-28 2018-12-28 Application program updating method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN109634641A CN109634641A (en) 2019-04-16
CN109634641B true CN109634641B (en) 2021-02-09

Family

ID=66079090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811629355.1A Active CN109634641B (en) 2018-12-28 2018-12-28 Application program updating method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN109634641B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032385A (en) * 2019-04-23 2019-07-19 成都四方伟业软件股份有限公司 Component update method, device and electronic equipment
CN110874236B (en) * 2019-11-13 2023-04-07 中国建设银行股份有限公司 Cross-platform application device, terminal and storage medium
CN112328283A (en) * 2020-11-12 2021-02-05 北京字节跳动网络技术有限公司 Application program updating method, device, equipment and medium
CN113656810A (en) * 2021-07-16 2021-11-16 五八同城信息技术有限公司 Application program encryption method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574049B (en) * 2014-10-30 2020-07-03 阿里巴巴集团控股有限公司 Page processing method, device and system for mobile application
CN105487905A (en) * 2015-11-27 2016-04-13 东软集团股份有限公司 Updating method and device of hybrid application
CN108304207A (en) * 2018-03-01 2018-07-20 上海找钢网信息科技股份有限公司 Mix the resource regeneration method and system of APP application programs

Also Published As

Publication number Publication date
CN109634641A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN109634641B (en) Application program updating method and device, electronic equipment and medium
US20170185431A1 (en) Method and apparatus for dynamically implementing application function
US8887152B1 (en) Android application virtual environment
US10320940B1 (en) Managing generic data
CN111143869B (en) Application package processing method and device, electronic equipment and storage medium
US9235586B2 (en) Reputation checking obtained files
US8667487B1 (en) Web browser extensions
US20200278853A1 (en) Processing, modification, distribution of custom software installation packages
US9317681B2 (en) Information processing apparatus, information processing method, and computer program product
CN105786538B (en) software upgrading method and device based on android system
JP6306265B2 (en) Malware detection method and malware detection device
CN103064738B (en) The method and system of local application forms embedding browser under Linux
CN106843978B (en) SDK access method and system
CN105335184B (en) Application installation method and device
US20150220245A1 (en) Branded computer devices and apparatus to connect user and enterprise
CN107528718B (en) Method, device and system for acquiring resources
US10761825B2 (en) System and method for application plug-in distribution
CN112559928B (en) Page processing method and device based on hybrid development, electronic equipment and storage medium
CN103793248A (en) Method and device for upgrading application program
CN111078637A (en) Script file online method and device, computer equipment and storage medium
CN110928571A (en) Business program development method and device
CN105808630B (en) Android application auditing method and device
CN110574006B (en) System and method for automatically synchronizing responses and conditions on a device
WO2020006911A1 (en) Hybrid app interface calling method and device, and computer-readable storage medium
CN108509228B (en) Page loading method, terminal equipment and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant