CN114077458A - Method, device, equipment and storage medium for starting service module in application program - Google Patents

Method, device, equipment and storage medium for starting service module in application program Download PDF

Info

Publication number
CN114077458A
CN114077458A CN202111238225.7A CN202111238225A CN114077458A CN 114077458 A CN114077458 A CN 114077458A CN 202111238225 A CN202111238225 A CN 202111238225A CN 114077458 A CN114077458 A CN 114077458A
Authority
CN
China
Prior art keywords
version number
packet
latest
split
service module
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
CN202111238225.7A
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.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank 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 Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202111238225.7A priority Critical patent/CN114077458A/en
Publication of CN114077458A publication Critical patent/CN114077458A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The application relates to a method and a device for starting a service module in an application program, computer equipment and a storage medium. The method comprises the following steps: when an application program is started, response information is requested from a server; receiving response information issued by a server, wherein the response information is based on the version number of the unpacking packet in the response information and the latest version number of the base database data packet; updating the local basic library data packet corresponding to the application program to the latest version based on the latest version number, and loading the latest version to the memory; determining that the version of the local split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server; and determining that the version number of the latest split packet is matched with the latest version number of the base database data packet, completing the loading of the base database data packet, loading the latest split packet corresponding to the version number of the latest split packet to the memory, and starting the service module. By adopting the method, the opening speed of the business module page in the application program can be improved.

Description

Method, device, equipment and storage medium for starting service module in application program
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for starting a service module in an application.
Background
With the wide Application of hot update of Application programs (APP), the Application programs get rid of the limitation of release, and developers can repair BUG and release functions without releasing a new version.
In the prior art, in the hot update process, a server issues a base database data packet and a split packet as two independent files to a client side separately to perform hot update of a service module.
However, in practical applications, any modification of the base class library requires re-integration of the base library data packets into the native APP, and all corresponding split packets need synchronous update and change, and since the server cannot guarantee that the base library data packets and the split packets are issued to the client at the same time, the versions of the base library data packets and the split packets received by the client may be inconsistent, which may result in failure of hot update, so that the client needs to re-acquire new base library data packets and split packets, resulting in slow APP page opening speed. Therefore, how to update the service module, support the unpacking packet and the base database packet, and increase the opening speed of the service module page in the application program is a problem to be solved urgently at the present stage.
Disclosure of Invention
Therefore, it is necessary to provide a method, an apparatus, a device, and a storage medium for starting a service module in an application program, which can realize that a service module updates, supports a split packet and a base database data packet, and improves the page opening speed of the service module in the application program.
A method for starting a service module in an application program comprises the following steps:
when an application program is started, response information related to the split packet version is requested from a server;
receiving response information issued by the server, and acquiring the version number of the split packet corresponding to the server and the application program and the latest version number of the basic library data packet corresponding to the server and the application program based on the response information;
updating the local basic library data packet corresponding to the application program to the latest version based on the latest version number, and loading the latest version to the memory;
determining that the version of the local split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server;
determining that the version number of the latest split packet is matched with the latest version number of the base database data packet, and the latest split packet corresponding to the version number of the latest split packet is loaded to the memory after the base database data packet is loaded;
and starting the service module based on the loaded latest disassembled packet and the base database data packet.
In one embodiment, requesting response information related to the split packet version from the server includes:
acquiring the version number of a local unpacking packet corresponding to an application program, and generating a corresponding request by taking the version number as a parameter;
and sending a request to the server to request response information related to the split packet version.
In one embodiment, determining that the version of the local split package corresponding to the service module is updated to the latest split package version number based on the version number of the split package of the server includes:
acquiring the version number of a split packet corresponding to the service end and the service module based on the response information;
and when the version number of the split packet corresponding to the service module and the service module is consistent with the version number of the split packet corresponding to the local service module, acquiring the version of the split packet corresponding to the local service module, which is updated to the latest split packet version number.
In one embodiment, determining that the version of the local split package corresponding to the service module is updated to the latest split package version number based on the version number of the split package of the server, further includes:
when the version numbers of the split packets corresponding to the service modules and the plurality of service terminals are inconsistent with the version number of the split packet corresponding to the service module locally, acquiring a split packet compressed file download address in response information;
and downloading and decompressing the split packet corresponding to the service module to the local based on the split packet compression file downloading address, so that the version of the split packet corresponding to the service module in the local is updated to the latest split packet version number.
In one embodiment, after obtaining the latest split packet version number of the split packet corresponding to the service module, the method further includes:
and when the version number of the latest split packet is not matched with the latest version number of the server-side basic database data packet, acquiring a service packet corresponding to the version number of the latest split packet, and starting a service module by the service packet.
In one embodiment, acquiring a service packet corresponding to the version number of the latest split packet, and starting a service module by the service packet includes:
when a service packet exists locally, loading the service packet to a memory, and starting a service module;
and when the service package does not exist locally, requesting the server to download the service package to the local, then loading the service package to the memory, and starting the service module.
In one embodiment, after determining that the latest split packet version number matches the latest version number of the base database packet, the method further includes:
and if the basic library data packet corresponding to the latest version number is not loaded, stopping loading the basic library data packet corresponding to the latest version number, combining and loading the basic library data packet corresponding to the latest version number, and correspondingly disassembling the local and business modules to the memory.
An in-application service module starting apparatus, comprising:
the response information request module is used for requesting response information related to the split package version to the server side when the application program is started;
the response information receiving module is used for receiving response information issued by the server, and acquiring the version number of the split packet corresponding to the server and the application program and the latest version number of the basic library data packet corresponding to the server and the application program based on the response information;
the preloading module is used for updating the local basic library data packet corresponding to the application program to the latest version based on the latest version number and loading the basic library data packet to the memory;
the split packet updating module is used for determining that the version of the split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server;
the unpacking and loading module is used for determining that the latest unpacking packet version number is matched with the latest version number of the basic library data packet, and the latest unpacking packet corresponding to the latest unpacking packet version number is loaded to the memory after the basic library data packet is loaded;
and the service module starting module is used for starting the service module based on the loaded latest disassembled packet and the basic database data packet.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method according to any of the embodiments described above when the computer program is executed by the processor.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
According to the method, the device, the equipment and the storage medium for updating the service module in the application program, firstly, when the application program is started, the response information related to the split packet version is requested from the server, so that the version number of the split packet corresponding to the server and the application program and the latest version number of the basic library data packet corresponding to the server and the application program are obtained and are used for subsequent version matching. And further, updating the local base database data packet corresponding to the application program to the latest version based on the latest version number, so as to update the local base database data packet to the latest version, and loading the base database data packet corresponding to the latest version number into the memory. And further, updating the split package version corresponding to the local business module to the latest split package version number based on the split package version number of the server. Further, it is determined that the latest split packet version number matches the latest version number of the base database data packet, and the base database data packet is completely loaded, the latest split packet is loaded into the memory separately, the service module is started based on the loaded latest split packet and the base database data packet, and the speed of opening the application program service module can be increased under the condition that the split packet corresponding to the service module and the base database data packet version corresponding to the service module are consistent.
Drawings
FIG. 1 is a diagram illustrating an exemplary implementation of a method for initiating a service module within an application;
FIG. 2 is a flowchart illustrating a method for initiating a service module in an application according to an embodiment;
FIG. 3 is a flowchart illustrating the steps of preloading for updates to base library packages, according to one embodiment;
FIG. 4 is a flowchart illustrating the steps of a unpack update load in another embodiment;
FIG. 5 is a block diagram of an embodiment of an apparatus for initiating a service module in an application;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method for starting the service module in the application program can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. When the application program is started, the terminal 102 requests the server 104 for response information related to the split packet version, and the server 104 issues corresponding response information after receiving the request. Further, the terminal 102 receives the response information sent by the server 104, and obtains the version number of the split packet corresponding to the server and the application program and the latest version number of the basic library data packet (Common packet) corresponding to the server and the application program based on the response information, so as to be used for subsequent version matching. Further, when the version number of the local base database packet corresponding to the application program and the latest version number of the base database packet corresponding to the application program are not matched, the terminal 102 downloads the base database packet corresponding to the latest version number, updates the local base database packet corresponding to the application program to the latest version, and loads the base database packet corresponding to the latest version number to the memory. Further, based on the version number of the split package of the server in the response message, the terminal 102 determines that the version of the split package corresponding to the local service module has been updated to the latest version number of the split package. Further, when the version number of the latest disassembled packet matches the latest version number of the base database packet and the base database packet is loaded, the terminal 102 loads the latest disassembled packet into the memory, and starts the service module based on the loaded latest disassembled packet and the base database packet.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, there is provided an in-application service module starting method, which is described by taking the method as an example applied to the terminal 102 in fig. 1, and includes the following steps:
step 202, when the application program is started, response information related to the split package version is requested from the server.
In this embodiment, the JavaScript-based open source framework read Native (hereinafter abbreviated as RN) is widely applied, so that an Application (APP) gets rid of the limitation of version issue, a server issues an RN code, and a terminal updates a service module according to the RN code without closing the Application. Since the terminal cannot directly know the update condition of the service module in the application program, when the user starts the application program, the terminal needs to request response information from the server.
In this embodiment, the terminal obtains the version number of the local breakout package corresponding to the application program, and takes the version number as a parameter to be carried when requesting response information from the server.
The response information may include, but is not limited to: the method comprises the steps of updating the latest version number of a basic library data packet corresponding to a server and an application program, the version number of a split packet corresponding to the server and the application program, the version numbers of split packets corresponding to a plurality of servers and a service module, and the download addresses of split packet compressed files of the split packets corresponding to the plurality of servers and the service module.
The basic library data packet (Common packet) refers to a product of a JavaScript basic library set in the same application program, and generally includes an RN and an App basic library.
And 204, receiving response information issued by the server, and acquiring the version number of the split packet corresponding to the server and the application program and the latest version number of the basic library data packet corresponding to the server and the application program based on the response information.
In this embodiment, based on the response information, the terminal obtains the version number of the split packet corresponding to the server and the application program and the latest version number of the base library data packet corresponding to the server and the application program, and may be used to determine whether the split packet corresponding to the local application program and the base library data packet corresponding to the local application program are the latest version by matching.
And step 206, updating the local basic library data packet corresponding to the application program to the latest version based on the latest version number, and loading the latest version to the memory.
In this embodiment, when the version number of the base library packet corresponding to the local application program is not consistent with the latest version number of the base library packet at the server, the version number of the base library packet corresponding to the local application program is not matched with the latest version number of the base library packet at the server, that is, the base library packet is updated. When the basic library data packet is updated, the terminal downloads the basic library data packet corresponding to the latest version number to the local based on the response information, namely, the local basic library data packet is updated to the latest version, and then the basic library data packet corresponding to the latest version number is preloaded to the internal memory.
Further, in this embodiment, when the version number of the local base database packet corresponding to the application program is consistent with the latest version number of the base database packet at the server, the version number of the local base database packet corresponding to the application program is matched with the latest version number of the base database packet at the server, that is, the version number of the local base database packet corresponding to the application program is the latest version, and at this time, the terminal does not need to download a new base database packet, as long as the local base database packet is preloaded to the memory. When the local base database data packets change, due to the preloading of the local base database data packets, all split packets corresponding to the local base database data packets do not need to be updated and changed at the same time, and time is reserved for updating the split packets corresponding to the local base database data packets.
And step 208, determining that the version of the local split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server.
In this embodiment, the terminal matches the version number of the local service module-corresponding disassembled packet with the latest version number of the service module-corresponding disassembled packet, and determines whether the disassembled packet is updated.
In this embodiment, when the split package is updated, the split package version corresponding to the service module and the service module is the latest split package version, and the terminal downloads the split package version to the local and obtains the version number of the split package version. When the split packet is not updated, the version number of the split packet corresponding to the service module is the latest split packet version, and at the moment, the terminal only needs to acquire the version number of the local split packet as the latest split packet version number without downloading the new split packet, so that repeated downloading is avoided.
Step 210, determining that the latest split packet version number matches the latest version number of the base database data packet, and after the base database data packet is completely loaded, loading the latest split packet corresponding to the latest split packet version number to the memory.
In this embodiment, the terminal loads the latest split packet to the memory after confirming that the latest split packet version matches the latest version of the base database packet, so that failure in updating caused by mismatch between the split packet and the base database packet version can be avoided.
Step 212, based on the loaded latest disassembled packet and the base database data packet, the service module is started.
In this implementation, the latest split package version matches the latest version of the base library data package, so that the split package can call the base library data package, start the service module, and complete the update of the service module in the application program.
In the method for starting the service module in the application program, firstly, when the application program is started, the server is requested for response information related to the split packet version, so that the version number of the split packet corresponding to the server and the application program and the latest version number of the basic library data packet corresponding to the server and the application program are obtained and are used for subsequent version matching. And further, updating the local base database data packet corresponding to the application program to the latest version based on the latest version number, so as to update the local base database data packet to the latest version, and loading the base database data packet corresponding to the latest version number into the memory. And further, updating the split package version corresponding to the local business module to the latest split package version number based on the split package version number of the server. Further, it is determined that the latest split packet version number matches the latest version number of the base database data packet, and the base database data packet is completely loaded, the latest split packet is loaded into the memory separately, the service module is started based on the loaded latest split packet and the base database data packet, and the speed of opening the application program service module can be increased under the condition that the split packet corresponding to the service module and the base database data packet version corresponding to the service module are consistent.
In one embodiment, referring to fig. 3, requesting response information related to the split packet version from the server may include: acquiring the version number of a local unpacking packet corresponding to an application program, and generating a corresponding request by taking the version number as a parameter; and sending a request to the server to request response information related to the split packet version.
In this embodiment, the local breakout package corresponding to the application program may include a plurality of local breakout packages corresponding to the service modules. Wherein, each service module has at least one corresponding split packet.
In this embodiment, when the service module a exists in the application program, the terminal may first obtain at least one local split packet version number corresponding to the service module a, and use the split packet version number as a parameter to be carried when requesting corresponding information from the server, so as to request to obtain response information related to the split packet version corresponding to the service module a.
In this embodiment, the terminal acquires at least one split packet version number corresponding to each service module locally, and takes each version number as a parameter, and carries the version number when requesting corresponding information from the server, so as to request to acquire response information related to the split packet version corresponding to each service module in the application program.
In one embodiment, referring to fig. 4, determining that the version of the local split package corresponding to the service module is updated to the latest split package version number based on the version number of the split package of the server may include: acquiring the version number of a split packet corresponding to the service end and the service module based on the response information; and when the version number of the split packet corresponding to the service module and the service module is consistent with the version number of the split packet corresponding to the local service module, acquiring the version of the split packet corresponding to the local service module, which is updated to the latest split packet version number.
In this embodiment, the terminal obtains the split packet version number corresponding to the service module and the service module in the response information, that is, the latest version number of the split packet of the service module, and performs split packet version matching between the latest version number of the split packet of the service module and the version number of the split packet corresponding to the local service module.
Further, in this embodiment, when the version number of the local breakout package corresponding to the service module is consistent with the latest version number of the breakout package of the service terminal, the version number of the local breakout package corresponding to the service module is already the latest breakout package version, and at this time, the terminal does not need to download the new breakout package, and only needs to acquire the version number of the local breakout package and use the version number as the latest breakout package version number, so that repeated downloading is avoided, and the volume of the file to be downloaded during updating is reduced.
In one embodiment, determining that the version of the local split package corresponding to the service module is updated to the latest split package version number based on the version number of the split package of the server may further include: when the version numbers of the split packets corresponding to the service modules and the plurality of service terminals are inconsistent with the version number of the split packet corresponding to the service module locally, acquiring a split packet compressed file download address in response information; and downloading and decompressing the split packet corresponding to the service module to the local based on the split packet compression file downloading address, so that the version of the split packet corresponding to the service module in the local is updated to the latest split packet version number.
In this embodiment, the locally splitting the packet may include: a local and application corresponding split packet, a plurality of local and business module corresponding split packets, and the like.
When the version number of the local disassembled packet corresponding to the business module is inconsistent with the latest version number of the disassembled packet of the server, the disassembled packet is updated. And when the split package is updated, the terminal downloads the split package corresponding to the latest version number to the local based on the download address of the split package compressed file in the response information, namely, the local split package is updated to the latest version, and the version number of the latest split package is obtained.
In this embodiment, the response information may further include an update instruction, and the downloading, by the terminal, the split packet corresponding to the latest version number to the local device based on the download address of the split packet compressed file in the response information may include: and acquiring a download address and an update instruction of the split packet compressed file in the response information.
Further, in this embodiment, when the update instruction is not to be forcibly updated, based on the download address of the split packet compressed file in the response information, the split packet compressed file corresponding to the service module will perform background silent download to the local; and when the updating instruction is forced updating, the terminal downloads and decompresses the split packet compressed file corresponding to the service module to the local part based on the split packet compressed file downloading address in the response information.
In one embodiment, referring to fig. 4, after obtaining the latest split packet version number of the split packet corresponding to the service module, the method may further include: and when the version number of the latest split packet is not matched with the latest version number of the server-side basic database data packet, acquiring a service packet corresponding to the version number of the latest split packet, and starting a service module by the service packet.
The service packet refers to a complete RN product that implements a certain service function, and may be used alone, which is also referred to as a full packet.
In this embodiment, after the latest split packet version number is obtained, the terminal matches the latest split packet version number with the latest version number of the server-side base data packet, and when the latest split packet version number does not match the latest version number of the server-side base data packet, the split packet cannot call the base data packet to start the service module. At this time, the terminal acquires the service packet corresponding to the latest split packet version number, loads the service packet into the memory, and starts the service module by the service packet.
In one embodiment, with continued reference to fig. 4, acquiring a service packet corresponding to the latest split packet version number, and starting a service module by the service packet may include: when a service packet exists locally, loading the service packet to a memory, and starting a service module; and when the service package does not exist locally, requesting the server to download the service package to the local, then loading the service package to the memory, and starting the service module.
In this embodiment, referring to fig. 4, before the terminal acquires the service package corresponding to the latest split package version number, it is required to identify whether the service package corresponding to the latest split package version number exists locally, so as to avoid repeated downloading and improve the starting speed of the service module.
In this embodiment, the terminal first obtains the version number of the service packet corresponding to the local service module and the version number of the service packet corresponding to the version number of the latest split packet, and compares the two versions. Further, when the version number of the service packet corresponding to the service module locally is consistent with the version number of the service packet corresponding to the version number of the latest split packet, that is, the service packet corresponding to the latest split packet locally exists, the terminal loads the service packet to the memory, and the service module is started by the service packet. When the version number of the local service package corresponding to the service module is not consistent with the version number of the service package corresponding to the version number of the latest split package, namely the service package corresponding to the latest split package does not exist locally, the terminal requests the server to download the service package corresponding to the version number of the latest split package, then loads the service package to the memory, and starts the service module by the service package.
In one embodiment, with continued reference to fig. 4, after determining that the latest split packet version number matches the latest version number of the base database packet, the method may further include: and if the basic library data packet corresponding to the latest version number is not loaded, stopping loading the basic library data packet corresponding to the latest version number, combining and loading the basic library data packet corresponding to the latest version number, and correspondingly disassembling the local and business modules to the memory.
In this embodiment, after the terminal determines that the version number of the latest split packet matches the latest version number of the base database packet, the preloading condition of the latest version of the base database packet may also be determined.
The preloading condition of the latest version of the base database data package may include: loaded completed, unloaded completed, load failed, etc.
In this embodiment, when the latest version of the base library data packet is completely loaded, the split packet may directly call the base library data packet, and start the service module. When the latest version of the basic library data packet is not loaded completely or fails to be loaded, the terminal can stop the preloading of the basic library data packet corresponding to the latest version number, merge and load the basic library data packet corresponding to the latest version number and the disassembled packet to the memory, and then start the service module.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided an in-application service module starting apparatus, including: a response information request module 100, a response information receiving module 200, a preloading module 300, a latest split package version number obtaining module 400, a split package loading module 500 and a service module starting module 600, wherein:
the response information requesting module 100 is configured to request, from the server, response information related to the split packet version when the application program is started.
The response information receiving module 200 is configured to receive response information issued by the server, and obtain, based on the response information, a version number of the split packet corresponding to the server and the application program, and a latest version number of the base database packet corresponding to the server and the application program.
The preloading module 300 is configured to update the local base database packet corresponding to the application program to the latest version based on the latest version number, and load the updated base database packet into the memory.
The split package updating module 400 is configured to determine, based on the version number of the split package of the server, that the version of the split package corresponding to the local service module has been updated to the latest split package version number.
The split packet loading module 500 is configured to determine that the latest split packet version number matches the latest version number of the base database data packet, and the latest split packet corresponding to the latest split packet version number is loaded to the memory after the base database data packet is loaded.
And a service module starting module 600, configured to start a service module based on the loaded latest disassembled packet and the base database data packet.
In one embodiment, the response information requesting module 100 may include:
and the corresponding information request generation submodule is used for acquiring the version number of the local unpacking packet corresponding to the application program and generating a corresponding request by taking the version number as a parameter.
And the response information request sending submodule is used for sending a request to the server so as to request the response information related to the split packet version.
In one embodiment, the split package update module 400 may include:
and the unpacking version number obtaining submodule is used for obtaining the version number of the unpacking corresponding to the service end and the service module based on the response information.
And the split packet version number acquisition submodule is used for acquiring the version number of the split packet corresponding to the local business module updated to the latest split packet version number when the version number of the split packet corresponding to the local business module and the server side is consistent with the version number of the split packet corresponding to the local business module.
In one embodiment, the split package updating module 400 may further include:
and the compressed file download address acquisition submodule is used for acquiring the download address of the split packet compressed file in the response information when the version numbers of the split packets corresponding to the plurality of service terminals and the service module are inconsistent with the version number of the split packet corresponding to the local service module and the service module.
And the compressed file downloading and decompressing submodule is used for downloading and decompressing the split packet corresponding to the service module to the local based on the split packet compressed file downloading address, so that the version of the split packet corresponding to the service module in the local is updated to the latest split packet version number.
In one embodiment, the apparatus may further include:
and the service packet acquisition module is used for acquiring the service packet corresponding to the version number of the latest split packet when the version number of the latest split packet is not matched with the latest version number of the server-side base data packet, and starting the service module by the service packet.
In one embodiment, the service package obtaining module may include:
and the local service package loading submodule is used for loading the service package to the memory and starting the service module when the service package exists locally.
And the server side service package downloading and loading submodule is used for requesting the server side to download the service package to the local side when the service package does not exist in the local side, then loading the service package to the memory, and starting the service module.
In one embodiment, the apparatus may further include:
and the merging and loading module is used for stopping the loading of the base library data packet corresponding to the latest version number if the base library data packet corresponding to the latest version number is not completely loaded, merging and loading the base library data packet corresponding to the latest version number, and correspondingly unpacking the local and business module to the memory.
For specific limitations of the service module starting apparatus in the application program, reference may be made to the above limitations on the service module starting method in the application program, and details are not described herein again. All or part of each module in the service module starting device in the application program can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing the version number data of the basic database data packet, the split packet and the service packet. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an in-application service module initiation method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: when an application program is started, response information related to the split packet version is requested from a server; receiving response information issued by the server, and acquiring the version number of the split packet corresponding to the server and the application program and the latest version number of the basic library data packet corresponding to the server and the application program based on the response information; updating the local basic library data packet corresponding to the application program to the latest version based on the latest version number, and loading the latest version to the memory; determining that the version of the local split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server; determining that the version number of the latest split packet is matched with the latest version number of the base database data packet, and the latest split packet corresponding to the version number of the latest split packet is loaded to the memory after the base database data packet is loaded; and starting the service module based on the loaded latest disassembled packet and the base database data packet.
In one embodiment, the processor, when executing the computer program, may implement: requesting response information related to the split packet version from a server, including: acquiring the version number of a local unpacking packet corresponding to an application program, and generating a corresponding request by taking the version number as a parameter; and sending a request to the server to request response information related to the split packet version.
In one embodiment, the processor, when executing the computer program, may implement: determining that the version of the local split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server, wherein the method comprises the following steps: acquiring the version number of a split packet corresponding to the service end and the service module based on the response information; and when the version number of the split packet corresponding to the service module and the service module is consistent with the version number of the split packet corresponding to the local service module, acquiring the version of the split packet corresponding to the local service module, which is updated to the latest split packet version number.
In one embodiment, the processor, when executing the computer program, may implement: determining that the version of the local split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server, and further comprising: when the version numbers of the split packets corresponding to the service modules and the plurality of service terminals are inconsistent with the version number of the split packet corresponding to the service module locally, acquiring a split packet compressed file download address in response information; and downloading and decompressing the split packet corresponding to the service module to the local based on the split packet compression file downloading address, so that the version of the split packet corresponding to the service module in the local is updated to the latest split packet version number.
In one embodiment, the processor, when executing the computer program, may implement: after obtaining the latest split packet version number of the split packet corresponding to the service module, the method further comprises the following steps: and when the version number of the latest split packet is not matched with the latest version number of the server-side basic database data packet, acquiring a service packet corresponding to the version number of the latest split packet, and starting a service module by the service packet.
In one embodiment, the processor, when executing the computer program, may implement: obtaining a service packet corresponding to the version number of the latest split packet, and starting a service module by the service packet, wherein the method comprises the following steps: when a service packet exists locally, loading the service packet to a memory, and starting a service module; and when the service package does not exist locally, requesting the server to download the service package to the local, then loading the service package to the memory, and starting the service module.
In one embodiment, the processor, when executing the computer program, may implement: after determining that the latest split packet version number is matched with the latest version number of the base database data packet, the method further comprises the following steps: and if the basic library data packet corresponding to the latest version number is not loaded, stopping loading the basic library data packet corresponding to the latest version number, combining and loading the basic library data packet corresponding to the latest version number, and correspondingly disassembling the local and business modules to the memory.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: when an application program is started, response information related to the split packet version is requested from a server; receiving response information issued by the server, and acquiring the version number of the split packet corresponding to the server and the application program and the latest version number of the basic library data packet corresponding to the server and the application program based on the response information; updating the local basic library data packet corresponding to the application program to the latest version based on the latest version number, and loading the latest version to the memory; determining that the version of the local split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server; determining that the version number of the latest split packet is matched with the latest version number of the base database data packet, and the latest split packet corresponding to the version number of the latest split packet is loaded to the memory after the base database data packet is loaded; and starting the service module based on the loaded latest disassembled packet and the base database data packet.
In one embodiment, the computer program when executed by the processor may implement: requesting response information related to the split packet version from a server, including: acquiring the version number of a local unpacking packet corresponding to an application program, and generating a corresponding request by taking the version number as a parameter; and sending a request to the server to request response information related to the split packet version.
In one embodiment, the computer program when executed by the processor may implement: determining that the version of the local split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server, wherein the method comprises the following steps: acquiring the version number of a split packet corresponding to the service end and the service module based on the response information; and when the version number of the split packet corresponding to the service module and the service module is consistent with the version number of the split packet corresponding to the local service module, acquiring the version of the split packet corresponding to the local service module, which is updated to the latest split packet version number.
In one embodiment, the computer program when executed by the processor may implement: determining that the version of the local split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server, and further comprising: when the version numbers of the split packets corresponding to the service modules and the plurality of service terminals are inconsistent with the version number of the split packet corresponding to the service module locally, acquiring a split packet compressed file download address in response information; and downloading and decompressing the split packet corresponding to the service module to the local based on the split packet compression file downloading address, so that the version of the split packet corresponding to the service module in the local is updated to the latest split packet version number.
In one embodiment, the computer program when executed by the processor may implement: after obtaining the latest split packet version number of the split packet corresponding to the service module, the method further comprises the following steps: and when the version number of the latest split packet is not matched with the latest version number of the server-side basic database data packet, acquiring a service packet corresponding to the version number of the latest split packet, and starting a service module by the service packet.
In one embodiment, the computer program when executed by the processor may implement: obtaining a service packet corresponding to the version number of the latest split packet, and starting a service module by the service packet, wherein the method comprises the following steps: when a service packet exists locally, loading the service packet to a memory, and starting a service module; and when the service package does not exist locally, requesting the server to download the service package to the local, then loading the service package to the memory, and starting the service module.
In one embodiment, the computer program when executed by the processor may implement: after determining that the latest split packet version number is matched with the latest version number of the base database data packet, the method further comprises the following steps: and if the basic library data packet corresponding to the latest version number is not loaded, stopping loading the basic library data packet corresponding to the latest version number, combining and loading the basic library data packet corresponding to the latest version number, and correspondingly disassembling the local and business modules to the memory.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for starting a service module in an application program is characterized by comprising the following steps:
when an application program is started, response information related to the split packet version is requested from a server;
receiving response information issued by a server, and acquiring the version number of a split packet corresponding to the server and the application program and the latest version number of a basic library data packet corresponding to the server and the application program based on the response information;
updating a local basic library data packet corresponding to the application program to the latest version based on the latest version number, and loading the latest version to a memory;
determining that the version of the split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server;
determining that the version number of the latest split packet is matched with the latest version number of the base database data packet, and the latest split packet corresponding to the version number of the latest split packet is loaded to a memory after the base database data packet is loaded;
and starting the service module based on the loaded latest disassembled packet and the basic database data packet.
2. The method of claim 1, wherein the requesting response information related to the split packet version from the server comprises:
acquiring the version number of a local unpacking packet corresponding to an application program, and generating a corresponding request by taking the version number as a parameter;
and sending the request to a server to request response information related to the split packet version.
3. The method of claim 1, wherein the determining that the version of the split packet locally corresponding to the service module has been updated to the latest split packet version number based on the version number of the split packet at the server comprises:
acquiring the version number of a split packet corresponding to the service end and the service module based on the response information;
and when the version number of the split packet corresponding to the service module and the service module is consistent with the version number of the split packet corresponding to the local service module and the service module, determining that the version of the split packet corresponding to the local service module is updated to the latest split packet version number.
4. The method of claim 3, wherein the determining that the version of the split packet locally corresponding to the service module has been updated to the latest split packet version number based on the version number of the split packet at the server side further comprises:
when the version numbers of the split packets corresponding to the service modules and the service modules of the plurality of service terminals are not consistent with the version number of the split packet corresponding to the service module, acquiring a download address of the split packet compressed file in the response information;
and downloading and decompressing the split packet corresponding to the service module to the local based on the split packet compressed file downloading address, so that the version of the split packet corresponding to the service module in the local is updated to the latest split packet version number.
5. The method of claim 1, wherein after obtaining the latest split packet version number of the split packet corresponding to the service module, the method further comprises:
and when the version number of the latest split packet is not matched with the latest version number of the server-side base data packet, acquiring a service packet corresponding to the version number of the latest split packet, and starting the service module by the service packet.
6. The method of claim 5, wherein the obtaining the service packet corresponding to the latest split packet version number, and starting the service module by the service packet comprises:
when the service package exists locally, loading the service package to a memory, and starting the service module;
and when the service package does not exist locally, requesting a server to download the service package to the local, then loading the service package to a memory, and starting the service module.
7. The method of claim 1, wherein determining that the latest subpacket version number matches the latest version number of the base library packet further comprises:
and if the basic library data packet corresponding to the latest version number is not completely loaded, stopping the loading of the basic library data packet corresponding to the latest version number, combining and loading the basic library data packet corresponding to the latest version number, and locally and correspondingly subpackaging the business module to a memory.
8. An in-application service module initiation apparatus, the apparatus comprising:
the response information request module is used for requesting response information related to the split package version to the server side when the application program is started;
the response information receiving module is used for receiving response information issued by the server, and acquiring the version number of the split packet corresponding to the server and the application program and the latest version number of the basic library data packet corresponding to the server and the application program based on the response information;
the preloading module is used for updating a local basic library data packet corresponding to the application program to the latest version based on the latest version number and loading the local basic library data packet to the memory;
the split packet updating module is used for determining that the version of the split packet corresponding to the service module is updated to the latest split packet version number based on the version number of the split packet of the server;
the unpacking and loading module is used for determining that the version number of the latest unpacking packet is matched with the latest version number of the basic library data packet, the basic library data packet is completely loaded, and the latest unpacking packet corresponding to the version number of the latest unpacking packet is loaded to the memory;
and the service module starting module is used for starting the service module based on the latest loaded disassembled packet and the basic database data packet.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111238225.7A 2021-10-25 2021-10-25 Method, device, equipment and storage medium for starting service module in application program Pending CN114077458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111238225.7A CN114077458A (en) 2021-10-25 2021-10-25 Method, device, equipment and storage medium for starting service module in application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111238225.7A CN114077458A (en) 2021-10-25 2021-10-25 Method, device, equipment and storage medium for starting service module in application program

Publications (1)

Publication Number Publication Date
CN114077458A true CN114077458A (en) 2022-02-22

Family

ID=80283824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111238225.7A Pending CN114077458A (en) 2021-10-25 2021-10-25 Method, device, equipment and storage medium for starting service module in application program

Country Status (1)

Country Link
CN (1) CN114077458A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061750A (en) * 2022-06-27 2022-09-16 浪潮卓数大数据产业发展有限公司 Componentized data interaction method, device, equipment and medium for application program
CN115576624A (en) * 2022-09-22 2023-01-06 上海申雪供应链管理有限公司 Programming framework optimization method, system, terminal equipment and storage medium
CN116069365A (en) * 2023-02-13 2023-05-05 重庆长安汽车股份有限公司 A device application update method, system, device, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006091960A (en) * 2004-09-21 2006-04-06 Hitachi Information Systems Ltd Program update system and program update method
CN105897461A (en) * 2016-03-23 2016-08-24 广州视睿电子科技有限公司 Multi-system OTA upgrading method and multi-system equipment
CN111367558A (en) * 2020-02-25 2020-07-03 网易(杭州)网络有限公司 Data updating method and device for application program
CN111857781A (en) * 2020-07-23 2020-10-30 平安普惠企业管理有限公司 Resource updating method and related equipment
CN113448611A (en) * 2021-08-31 2021-09-28 中邮消费金融有限公司 Method and system for quickly and thermally updating application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006091960A (en) * 2004-09-21 2006-04-06 Hitachi Information Systems Ltd Program update system and program update method
CN105897461A (en) * 2016-03-23 2016-08-24 广州视睿电子科技有限公司 Multi-system OTA upgrading method and multi-system equipment
CN111367558A (en) * 2020-02-25 2020-07-03 网易(杭州)网络有限公司 Data updating method and device for application program
CN111857781A (en) * 2020-07-23 2020-10-30 平安普惠企业管理有限公司 Resource updating method and related equipment
CN113448611A (en) * 2021-08-31 2021-09-28 中邮消费金融有限公司 Method and system for quickly and thermally updating application program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061750A (en) * 2022-06-27 2022-09-16 浪潮卓数大数据产业发展有限公司 Componentized data interaction method, device, equipment and medium for application program
CN115061750B (en) * 2022-06-27 2024-05-31 浪潮卓数大数据产业发展有限公司 Method, device, equipment and medium for componentized data interaction of application program
CN115576624A (en) * 2022-09-22 2023-01-06 上海申雪供应链管理有限公司 Programming framework optimization method, system, terminal equipment and storage medium
CN116069365A (en) * 2023-02-13 2023-05-05 重庆长安汽车股份有限公司 A device application update method, system, device, device and storage medium

Similar Documents

Publication Publication Date Title
CN110633160A (en) Interface calling method and device, computer equipment and storage medium
CN114077458A (en) Method, device, equipment and storage medium for starting service module in application program
CN111651178A (en) Container configuration update method, apparatus, computer equipment and storage medium
CN110134457A (en) Plug-in loading method and device
CN110489421A (en) Date storage method, device, computer readable storage medium and computer equipment
CN110866198A (en) Static resource caching method, system, device, computer equipment and storage medium
CN113094076A (en) Version iteration method, device, equipment and medium based on version control
CN112783866A (en) Data reading method and device, computer equipment and storage medium
CN113268224A (en) Jar package caching method and device for Maven warehouse and computer equipment
CN111026988A (en) Page loading method, device and system and computer equipment
CN111078256A (en) Upgrade method, terminal and readable storage medium of automated test environment
CN109766084B (en) Custom development method, apparatus, computer equipment and storage medium for payment application
CN114117273A (en) Page loading method and device, computer equipment and storage medium
CN111177624B (en) Website front-end and back-end communication method, device, computer equipment and storage medium
CN110727477B (en) Component loading method and device, computer equipment and storage medium
CN113010199A (en) Application updating method and device, computer equipment and storage medium
WO2021248310A1 (en) Method and apparatus for acquiring service calling information, and vulnerability test method for service
CN112052028B (en) Android application program package generation method, terminal and storage medium
CN110196724B (en) File loading method, terminal, server, computer equipment and storage medium
CN110673869B (en) Library file loading method, device and system
CN116070048A (en) A H5 page display method, device and equipment
CN113867756A (en) Software upgrade method, terminal device and readable storage medium
CN114003486A (en) A plug-in debugging method, client, server and storage medium
CN112559248A (en) Preprocessing service recovery method, device, equipment and storage medium
CN113568633A (en) Server power supply online updating method and device, computer equipment and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220222

RJ01 Rejection of invention patent application after publication