CN113835732A - Version updating method and related equipment - Google Patents

Version updating method and related equipment Download PDF

Info

Publication number
CN113835732A
CN113835732A CN202111150415.3A CN202111150415A CN113835732A CN 113835732 A CN113835732 A CN 113835732A CN 202111150415 A CN202111150415 A CN 202111150415A CN 113835732 A CN113835732 A CN 113835732A
Authority
CN
China
Prior art keywords
version number
target application
update
file
version
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
CN202111150415.3A
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.)
Mashang Xiaofei Finance Co Ltd
Mashang Consumer Finance Co Ltd
Original Assignee
Mashang Xiaofei Finance 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 Mashang Xiaofei Finance Co Ltd filed Critical Mashang Xiaofei Finance Co Ltd
Priority to CN202111150415.3A priority Critical patent/CN113835732A/en
Publication of CN113835732A publication Critical patent/CN113835732A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The invention provides a version updating method and related equipment, wherein the method comprises the following steps: under the condition that an update file corresponding to a target application is received, packaging the update file and generating a first version number corresponding to the update file; combining the update file and the first version number into a script file; verifying the first version number under the condition that the target application generates routing update; and in the case that the verification is passed, updating the target application by using the script file. In the embodiment of the invention, under the condition that the target application generates the routing update, namely after all static resources are deployed by a client used by a user, the first version number in the script file is verified; and after the verification is passed, updating the target application by using the script file. Therefore, in the version updating process, after all static resources are ensured to be deployed, the target application is updated by using the script file, so that the error report of the browsing page is prevented, and the version updating efficiency is improved.

Description

Version updating method and related equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a version update method and related devices.
Background
In a Model-View Model (MVVM) front-end architecture, a single-page Web application (SPA) provides a user with a browsing page. An SPA is an application that provides only one Web page, a Web application that dynamically updates the page by loading a single page and as the user interacts with the application.
Currently, the way to update the version of the SPA is generally: after the SPA new version is released, a loader is manually started, the SPA new version is loaded, and the original SPA is updated.
However, when the SPA is full update, if the SPA does not generate route update in the update process, the browser of the user client does not deploy static resources, so that if a user accesses a browsing page, the browsing page loads the static resources of the SPA in the previous version, and a page error is caused.
Disclosure of Invention
The embodiment of the invention provides a version updating method and related equipment, and aims to solve the technical problem that in the prior art, the SPA needs to be updated manually, and the error of the SPA page is easily caused.
In a first aspect, an embodiment of the present invention provides a version update method, including:
under the condition that an update file corresponding to a target application is received, packaging the update file and generating a first version number corresponding to the update file, wherein the target application is a single-page application;
combining the update file and the first version number into a script file;
verifying the first version number when the target application generates a routing update;
and in the case of passing the verification, updating the target application by using the script file.
In a second aspect, an embodiment of the present invention provides a version updating apparatus, including:
the system comprises a packaging module, a first edition number and a second edition number, wherein the packaging module is used for packaging an update file and generating a first edition number corresponding to the update file under the condition that the update file corresponding to a target application is received, and the target application is a single-page application;
the merging module is used for merging the update file and the first version number into a script file;
the verification module is used for verifying the first version number under the condition that the target application generates routing update;
and the updating module is used for updating the target application by using the script file under the condition of passing the verification.
In a third aspect, an embodiment of the present invention provides a communication device, including a processor, a memory, and a computer program stored on the memory and operable on the processor, where the computer program, when executed by the processor, implements the steps of the version updating method described above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the user behavior analysis method described above.
In the embodiment of the invention, under the condition of receiving the update file corresponding to the target application, the update file is packaged and a first version number corresponding to the update file is generated; combining the update file and the first version number into a script file; verifying the first version number under the condition that the target application generates routing update; and in the case that the verification is passed, updating the target application by using the script file. In the embodiment of the invention, under the condition that the target application generates the routing update, namely after all static resources are deployed by a client used by a user, the first version number in the script file is verified; and after the verification is passed, updating the target application by using the script file. Therefore, in the version updating process, after all static resources are ensured to be deployed, the target application is updated by using the script file, so that the error report of the browsing page is prevented, and the version updating efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of version update in the prior art;
FIG. 2 is a flowchart of a version update method provided by an embodiment of the present invention;
fig. 3 is a schematic application flow diagram of a version updating method according to an embodiment of the present invention;
FIG. 4 is a block diagram of a version update cutting apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of a communication device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating version updating in the prior art. As shown in fig. 1, the flow of the existing version update is generally as follows: research personnel release the new version application, and since the SPA can only communicate with the corresponding server, after the new version application is released, product service personnel need to be informed to manually refresh the old version application, verify the new version application, and then manually start a loading program to load the new version application, so that version updating is realized.
In the version updating process, the product service personnel are required to manually update the version, which reduces the efficiency of version updating. In addition, in the updating process, if the browser does not deploy complete static resources and receives a request of a user for accessing a browsing page, an error is reported on the browsing page.
The browsing page is a service provided by a browser, and the browsing page can be run in the browser, or the browser is built in a third-party application, so that the browsing page is run in the third-party application. The browser may be a browser plug-in, a browser applet, or the like.
In order to solve the above technical problem, an embodiment of the present invention provides a version updating method, which may be applied to a server side. Referring to fig. 2, fig. 2 is a flowchart of a version updating method according to an embodiment of the present invention, as shown in fig. 2, including the following steps:
101, when receiving an update file corresponding to a target application, packaging the update file and generating a first version number corresponding to the update file.
The target application is SPA application; the script file may be a file with a file type js, and the script file is also called as a js file.
In this step, in the case of receiving an update file corresponding to a target application, a jsonnp mode may be called, the update file may be packaged, and a first version number corresponding to the update file may be generated. Please refer to the following embodiments for a specific manner of how to generate the version number.
The update file can be understood as an installation package of a new version application released by research personnel; the Jsonp is a mode of calling elements of the browsing page, and the browsing page applying the mode can call the elements from other servers to realize cross-domain data access.
And 102, combining the update file and the first version number into a script file.
In this step, after the first version number is generated and the update file is packaged, the update file and the first version number are combined into a script file, and the script file may be expressed as version. In this embodiment, a file system object may be invoked to create a script file to the root directory of the target application.
In other embodiments, after the first version number corresponding to the update file is generated, the update file is packaged, and the script file is generated based on the update file, wherein the script file does not include the first version number. And storing the first version number into the server, and subsequently acquiring the first version number stored by the server by calling a related interface.
In the step, the update file and the first version number are combined into the js-form script file, so that cross-domain data access can be realized in the version update process of the target application, and special product service personnel are not required to manually update the target application.
103, in case the target application generates a routing update, the first version number is verified.
It should be understood that the target application generally has 2 ways to implement the route update, the first way is a hash mode, and the other way is a state mode, please refer to the following embodiments.
The first version number in the script file is validated in the event that the target application generates a routing update. The method for verifying the first version number can be expressed as window. Or after the first version number is generated, the first version number is stored in the server, and when the target application generates the route update, the relevant interface is called to inquire the first version number stored in the server. Please refer to the following examples for a specific way to verify the implementation of the first version number.
And 104, in the case of passing the verification, updating the target application by using the script file.
In this step, if the first version number is verified to be correct, the script file can be analyzed to obtain an updated file; and loading the update file to update the target application.
In the embodiment of the invention, under the condition of receiving the update file corresponding to the target application, the update file is packaged and a first version number corresponding to the update file is generated; combining the update file and the first version number into a script file; verifying the first version number under the condition that the target application generates routing update; and in the case that the verification is passed, updating the target application by using the script file. In the embodiment of the invention, under the condition that the target application generates the routing update, namely after all static resources are deployed by a client used by a user, the first version number in the script file is verified; and after the verification is passed, updating the target application by using the script file. Therefore, in the version updating process, after all static resources are ensured to be deployed, the target application is updated by using the script file, so that the error report of the browsing page is prevented, and the version updating efficiency is improved.
Optionally, before the verifying the first version number, the method includes:
determining that the target application generates a routing update in the event of listening for a first event.
In this embodiment, the first event may be represented as a window.
In this mode, a hash value is assigned to the target application, and if the target application generates a route update, the hash value corresponding to the target application will be changed. And under the condition of monitoring the first event, judging whether the target application generates routing update or not by reading the hash value corresponding to the target application. And if the hash value corresponding to the target application is not changed, judging that the target application does not generate the routing update.
In this embodiment, a first event is set, and whether a routing update occurs to a target application is determined by monitoring the first event, that is, whether a browser corresponding to the target application has loaded all static resources, so as to prevent a browsing page from reporting an error in a subsequent interaction process.
Optionally, before the verifying the first version number, the method includes:
determining that the target application generates a routing update in the event of listening for a second event.
In this embodiment, the second event may be represented as window.
In this mode, if the target application generates a route update, a history is generated, and whether the target application generates the route update is determined by reading the history generated by the target application. Under the condition of monitoring a second event, reading a history record corresponding to the target application, wherein the history record can be a routing record, and if a new routing history record is generated, determining that the target application generates routing update; and if the new route history record is not generated, determining that the generated route of the target application is not updated.
In this embodiment, a second event is set, and whether a routing update occurs to the target application is determined by monitoring the second event, that is, whether all static resources have been loaded by the browser corresponding to the target application, so as to prevent an error from being reported in a subsequent interaction process of the browsing page.
Optionally, the generating a first version number corresponding to the update file includes:
generating the first version number based on the packaging time corresponding to the update file; or
Generating the first version number based on the universal unique identification code corresponding to the updated file; or
And determining the acquired version number input by the user as the first version number.
In this embodiment, the first version number may be generated by the following method:
an optional implementation manner is to obtain a packing time corresponding to the update file, and dynamically generate the first version number based on the packing time. For example, a partial field in the first version number is used to characterize the packing time.
Another optional embodiment is to invoke a related tool, generate a Universal Unique Identifier (UUID) corresponding to the update file, and dynamically generate the first version number based on the universal Unique Identifier. For example, a partial field in the first version number is used to characterize the universally unique identification code.
Another optional embodiment is that the first version number is set by a user, that is, the version number input by the user is determined as the first version number.
Another optional implementation manner is to obtain the packing time corresponding to the update file, convert the packing time into a timestamp, and use the timestamp as the first version number.
Another alternative is to use a random number generation algorithm to generate a random number and use the random number as the first version number.
It should be understood that the first version number may also be generated in other manners, and the embodiment does not specifically limit the manner in which the first version number is generated here.
In this embodiment, the first version number may be determined based on the packaging time corresponding to the update file, or the universal unique identifier corresponding to the update file, or the version number input by the user, so as to verify the first version number in the subsequent version verification step.
Optionally, before the combining the update file and the first version number into the script file, the method includes:
acquiring the packaging time corresponding to the update file;
converting the packing time to a timestamp;
after the update file and the first version number are combined into the script file, the method includes:
adding the timestamp to the script file.
In this embodiment, after the update file is packaged, the packaging time is obtained, and the packaging time is converted into the timestamp.
In an alternative embodiment, where the timestamp format may be time-minute-second (yyyyyMMddHHmmssSSS) year, month, day, and year, such as 123 milliseconds at 21: 00/21/9/2021 year, the corresponding timestamp of the packing time may be set to 20210909210000123.
Further, after the script file is obtained and before the script file is loaded, a timestamp is added to the script file.
In this embodiment, a timestamp is added to the generated script file to prevent a duplicate version number from being generated. Therefore, in the subsequent version verification step of comparing the version number cached in the session storage object with the first version number, the situation that the version number cached in the session storage object and the first version number are the same version number and further the version verification result is influenced is avoided, and therefore the accuracy of the version verification result is ensured. The session storage object may be denoted as sessionStorage.
Optionally, after the update file and the first version number are merged into the script file, the method includes:
generating a random number by using a random number generation algorithm;
adding the random number to the script file.
In this embodiment, after the script file is obtained and before the script file is loaded, a preset random number generation algorithm may be used to generate a random number, and the random number is added to the script file. Preventing duplicate version numbers from being generated.
Therefore, in the subsequent version verification step of comparing the version number cached in the session storage object with the first version number, the situation that the version number cached in the session storage object and the first version number are the same version number can be avoided, and the accuracy of the version verification result is ensured.
Optionally, the verifying the first version number includes:
acquiring a second version number corresponding to the target application from a session storage object of the target application;
determining that the verification passes under the condition that the second version number is different from the first version number;
and updating the version number stored by the session storage object to the first version number when the verification is passed.
It should be understood that the session storage object of the target application stores a second version number corresponding to the target application in advance; the second version number is a current version number of the target application, and the second version number may be represented as currVersion, which is a version number before the target application is not updated. Part of the fields in the script file are associated with the session storage object so that, in the event that a routing update is generated by the target application, the first version number in the script file is used as a reference object to compare with the second version number stored by the session storage object.
In one possible case, the second version number is the same as the second version number, and in this case, when the target application is updated, it is determined that the authentication is not passed, and the target application is not updated using the script file.
Another possible case is that the second version number is different from the second version number, or the second version number does not exist in the session storage object, in which case, if the target application is not updated, it is determined that the verification is passed, and the target application is updated using the script file.
And under the condition that the verification is passed, updating the version number stored in the session storage object to the first version number, and verifying the script file in the next updating process of the target application.
In this embodiment, the update state of the target application is determined by comparing the first version number in the script file with the second version number stored in the session storage object, so as to determine whether the first version number is the latest version number.
In the embodiment of the present invention, there are 2 implementation manners for updating the target application using the script file, that is, the silent update and the query update, which are specifically described below:
the implementation mode of updating the target application by using the silent updating mode is as follows:
optionally, the updating the target application using the script file in the case that the verification passes includes:
if the verification is passed, performing routing update on the target application;
analyzing the script file to obtain an update file in the process of updating the route of the target application;
and loading the update file to obtain the updated application.
In this embodiment, when the verification passes, the routing update is performed on the target application, and the performing of the routing update on the target application may be understood as refreshing the browsing page corresponding to the target application. In the process of updating the route of the target application, the JavaScript interpreter can be used for analyzing the script file to obtain an updated file. Furthermore, the update file is loaded, and the target application is updated.
In this embodiment, when the verification passes, the related operation is automatically executed, and the silent update of the target application is realized.
The method for updating the target application by using the inquiry updating comprises the following steps:
optionally, the updating the target application using the script file in the case that the verification passes includes:
sending inquiry information under the condition that the verification is passed;
under the condition that a confirmation instruction for the inquiry information is received, analyzing the script file to obtain an update file;
and loading the update file to obtain the updated application.
In this embodiment, when the verification passes, query information is sent, where the query information may be a popup displayed by a browser corresponding to the target application. And if a confirmation instruction for the inquiry information is received, analyzing the script file by using a JavaScript interpreter to obtain an update file, wherein the confirmation instruction is used for representing the update target application. Furthermore, the update file is loaded, and the target application is updated.
If the confirmation instruction of the inquiry information is not received within the preset time or the negative instruction of the inquiry information is received, the script file is not analyzed, and the target application is not updated.
For example, in the case that the verification passes, the target application may apply a popup window displayed by the corresponding browser, where the content of the popup window may be "whether a new version update already exists and is updated immediately", and the popup window includes 2 controls, where a first control displays "yes" and a second control displays "no". If a touch instruction of a user to the first control is received, the touch instruction is regarded as a confirmation instruction, and the script file is analyzed so as to update the target application; and if a touch instruction of the user to the second control is received, the touch instruction is regarded as a negative instruction, and the target application is not updated.
In this embodiment, when the verification passes, the query information is sent out, and then whether the target application is updated is set in a user-defined manner according to the operation of the user, so that query updating of the target application is realized.
To facilitate the overall understanding of the overall scheme, please refer to fig. 3, and fig. 3 is a schematic application flow diagram of a version updating method according to an embodiment of the present invention. As shown in fig. 3, the server dynamically generates a first version number of the update file when receiving the update file; and then generating a script file containing the first version number, wherein the script file is a js file, and defines a verification method of the version number, and the contents are the compiling stage of the server. And the server monitors whether the route updating occurs to the browsing page corresponding to the target application in a global mode. Under the condition that the route is updated, the browser end loads a js file in the server by using a Jsonp technology to obtain a first version number; verifying the first version number by using the verification method of the defined version number; and when the first version number is the latest version number, the browser end updates the target application in a silent updating or inquiry updating mode.
Referring to fig. 4, fig. 4 is a structural diagram of a version updating apparatus according to an embodiment of the present invention, and as shown in fig. 4, the version updating apparatus 200 includes:
the packaging module 201 is configured to, in a case that an update file corresponding to a target application is received, package the update file and generate a first version number corresponding to the update file;
a merging module 202, configured to merge the update file and the first version number into a script file;
the verification module 203 is configured to verify the first version number when the target application generates a routing update;
and the updating module 204 is used for updating the target application by using the script file under the condition that the verification is passed. Optionally, the version updating apparatus 200 further includes:
the first monitoring module is used for determining that the target application generates the routing update under the condition of monitoring the first event.
Optionally, the version updating apparatus 200 further includes:
and the second monitoring module is used for determining that the target application generates the routing update under the condition of monitoring the second event.
Optionally, the packing module 201 is further specifically configured to:
generating the first version number based on the packaging time corresponding to the update file; or
Generating the first version number based on the universal unique identification code corresponding to the updated file; or
And determining the acquired version number input by the user as the first version number.
Optionally, the version updating apparatus 200 further includes:
the acquisition module is used for acquiring the packaging time corresponding to the update file;
the conversion module is used for converting the packing time into a timestamp;
and the first adding module is used for adding the time stamp to the script file.
Optionally, the version updating apparatus 200 further includes:
the generating module is used for generating a random number by using a random number generating algorithm;
and the second adding module is used for adding the random number to the script file.
Optionally, the verification module 203 is specifically configured to:
acquiring a second version number corresponding to the target application from a session storage object of the target application;
determining that the verification passes under the condition that the second version number is different from the first version number;
and updating the version number stored by the session storage object to the first version number when the verification is passed.
Optionally, the update module 204 is specifically configured to:
if the verification is passed, performing routing update on the target application;
analyzing the script file to obtain an update file in the process of updating the route of the target application;
and loading the update file to obtain the updated application.
Optionally, the updating module 204 is further specifically configured to:
sending inquiry information under the condition that the verification is passed;
under the condition that a confirmation instruction for the inquiry information is received, analyzing the script file to obtain an update file;
and loading the update file to obtain the updated application.
The version updating device provided by the embodiment of the invention can realize each process of the version updating method in the above method embodiment, and is not described again in order to avoid repetition.
Referring to fig. 5, fig. 5 is a structural diagram of a server according to an embodiment of the present invention, and as shown in fig. 5, the server 300 includes: a processor 301, a transceiver 302, a memory 303, and a bus interface, wherein:
a processor 301 for performing the following operations:
under the condition that an update file corresponding to a target application is received, packaging the update file and generating a first version number corresponding to the update file;
combining the update file and the first version number into a script file;
verifying the first version number when the target application generates a routing update;
and in the case of passing the verification, updating the target application by using the script file.
It should be understood that, in this embodiment, the processor 301 and the transceiver 302 can implement each process in the method embodiment of fig. 2, and are not described here again to avoid repetition.
In FIG. 5, the bus architecture may include any number of interconnected buses and bridges, with one or more processors, represented by processor 301, and various circuits, represented by memory 303, being linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface. The transceiver 302 may be a number of elements including a transmitter and a receiver that provide a means for communicating with various other apparatus over a transmission medium. The user interface 304 may also be an interface capable of interfacing with a desired device for different user devices, including but not limited to a keypad, display, speaker, microphone, joystick, etc.
The processor 301 is responsible for managing the bus architecture and general processing, and the memory 303 may store data used by the processor 301 in performing operations.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above version updating method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. 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 apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. A version update method, comprising:
under the condition that an update file corresponding to a target application is received, packaging the update file and generating a first version number corresponding to the update file, wherein the target application is a single-page application;
combining the update file and the first version number into a script file;
verifying the first version number when the target application generates a routing update;
and in the case of passing the verification, updating the target application by using the script file.
2. The method of claim 1, wherein prior to verifying the first version number, the method comprises:
and under the condition of monitoring a first event, determining that the target application generates a route update, wherein the first event represents that the hash value corresponding to the target application changes.
3. The method of claim 1, wherein prior to verifying the first version number, the method comprises:
and determining that the target application generates route updating under the condition of monitoring a second event, wherein the second event represents that the target application adds a route record.
4. The method of claim 1, wherein generating the first version number corresponding to the updated file comprises:
generating the first version number based on the packaging time corresponding to the update file; or
Generating the first version number based on the universal unique identification code corresponding to the updated file; or
Determining the version number of the acquired custom input as the first version number; or
And confirming the generated random number as the first version number.
5. The method of claim 1, wherein the generating the first version number is based on a packaging time corresponding to the update file, and wherein the method comprises:
acquiring the packaging time corresponding to the update file;
converting the packing time to a timestamp;
a first version number is generated based on the timestamp.
6. The method according to claim 1, wherein the confirming the generated random number as the first version number comprises:
generating a random number by using a random number generation algorithm;
and confirming the generated random number as the first version number.
7. The method of claim 1, wherein the validating the first version number comprises:
acquiring a second version number corresponding to the target application from a session storage object of the target application;
determining that the verification passes under the condition that the second version number is different from the first version number;
and updating the version number stored by the session storage object to the first version number when the verification is passed.
8. The method of claim 1, wherein updating the target application with the script file if the verification is passed comprises:
if the verification is passed, performing routing update on the target application;
analyzing the script file to obtain an update file in the process of updating the route of the target application;
and loading the update file to obtain the updated application.
9. The method of claim 1, wherein updating the target application with the script file if the verification is passed comprises:
sending inquiry information under the condition that the verification is passed;
under the condition that a confirmation instruction for the inquiry information is received, analyzing the script file to obtain an update file; the confirmation instruction is used for representing and updating the target application;
and loading the update file to obtain the updated application.
10. A version update apparatus, comprising:
the system comprises a packaging module, a first edition number and a second edition number, wherein the packaging module is used for packaging an update file and generating a first edition number corresponding to the update file under the condition that the update file corresponding to a target application is received, and the target application is a single-page application;
the merging module is used for merging the update file and the first version number into a script file;
the verification module is used for verifying the first version number under the condition that the target application generates routing update;
and the updating module is used for updating the target application by using the script file under the condition of passing the verification.
11. A communication device comprising 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 steps of the version updating method as claimed in any one of claims 1 to 9.
12. 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 version updating method of any one of claims 1 to 9.
CN202111150415.3A 2021-09-29 2021-09-29 Version updating method and related equipment Pending CN113835732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111150415.3A CN113835732A (en) 2021-09-29 2021-09-29 Version updating method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111150415.3A CN113835732A (en) 2021-09-29 2021-09-29 Version updating method and related equipment

Publications (1)

Publication Number Publication Date
CN113835732A true CN113835732A (en) 2021-12-24

Family

ID=78967587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111150415.3A Pending CN113835732A (en) 2021-09-29 2021-09-29 Version updating method and related equipment

Country Status (1)

Country Link
CN (1) CN113835732A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984686A (en) * 2013-02-07 2014-08-13 阿里巴巴集团控股有限公司 Page-switching method and device
CN106933614A (en) * 2015-12-30 2017-07-07 广州爱九游信息技术有限公司 A kind of single-page application upgrade method and device
CN107273528A (en) * 2017-06-28 2017-10-20 努比亚技术有限公司 A kind of front and back end separation method, mobile terminal and computer-readable recording medium
CN109471988A (en) * 2018-10-12 2019-03-15 平安科技(深圳)有限公司 Page info update method, device, computer equipment and storage medium
CN109933349A (en) * 2019-01-28 2019-06-25 优信拍(北京)信息科技有限公司 A kind of method to be timely updated based on vue spa, system and equipment
CN110569463A (en) * 2019-08-02 2019-12-13 视联动力信息技术股份有限公司 Page refreshing method and device and storage medium
CN111191167A (en) * 2019-12-23 2020-05-22 京信通信***(中国)有限公司 Page resource updating method and device, computer equipment and storage medium
CN111399966A (en) * 2020-06-03 2020-07-10 广东睿江云计算股份有限公司 Method and system for hiding webpage
WO2021120913A1 (en) * 2019-12-20 2021-06-24 北京金山云网络技术有限公司 Application loading method, device, user terminal and server
CN113296856A (en) * 2020-07-13 2021-08-24 阿里巴巴集团控股有限公司 Page jump and route configuration method, equipment, system and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984686A (en) * 2013-02-07 2014-08-13 阿里巴巴集团控股有限公司 Page-switching method and device
CN106933614A (en) * 2015-12-30 2017-07-07 广州爱九游信息技术有限公司 A kind of single-page application upgrade method and device
CN107273528A (en) * 2017-06-28 2017-10-20 努比亚技术有限公司 A kind of front and back end separation method, mobile terminal and computer-readable recording medium
CN109471988A (en) * 2018-10-12 2019-03-15 平安科技(深圳)有限公司 Page info update method, device, computer equipment and storage medium
CN109933349A (en) * 2019-01-28 2019-06-25 优信拍(北京)信息科技有限公司 A kind of method to be timely updated based on vue spa, system and equipment
CN110569463A (en) * 2019-08-02 2019-12-13 视联动力信息技术股份有限公司 Page refreshing method and device and storage medium
WO2021120913A1 (en) * 2019-12-20 2021-06-24 北京金山云网络技术有限公司 Application loading method, device, user terminal and server
CN111191167A (en) * 2019-12-23 2020-05-22 京信通信***(中国)有限公司 Page resource updating method and device, computer equipment and storage medium
CN111399966A (en) * 2020-06-03 2020-07-10 广东睿江云计算股份有限公司 Method and system for hiding webpage
CN113296856A (en) * 2020-07-13 2021-08-24 阿里巴巴集团控股有限公司 Page jump and route configuration method, equipment, system and storage medium

Similar Documents

Publication Publication Date Title
WO2019242166A1 (en) Application update method and system, and computer device and storage medium
WO2020233081A1 (en) Client plugin-ization implementation method, apparatus, computer device and storage medium
CN112650520A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN111694620B (en) Interaction method, device and equipment of third party service and computer storage medium
CN113050984A (en) Resource calling method and device, electronic equipment and storage medium
CN113434254B (en) Client deployment method, client deployment apparatus, computer device, and storage medium
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN113835732A (en) Version updating method and related equipment
CN111338717A (en) Interface calling method, application program upgrading method, server and client
US20130332568A1 (en) Method of data processing by a navigation module
CN115454878A (en) Interface calling test method applied to micro service and related device
CN114648012A (en) Bill processing method and device, electronic equipment and computer readable medium
CN114489603A (en) Code generation method, apparatus, electronic device, medium, and product
CN113791795A (en) Plug-in installation method, device, system, equipment and storage medium
CN112000313A (en) Request response method, device, equipment and storage medium
CN113326506A (en) Applet monitoring method and device
CN106775900B (en) Calling method and system of application browser
CN113779445A (en) Page rendering method, device, system, equipment and storage medium
CN111857736A (en) Cloud computing product generation method, device, equipment and storage medium
CN112860398A (en) Data processing method, device, equipment and medium based on rule engine
CN118276972A (en) Three-party package loading method, device, equipment and storage medium
CN113821737B (en) Map rendering method, device, equipment and storage medium for single page application
CN111131471B (en) Operation method and device of service system and electronic equipment
CN113805968B (en) Function execution method and device of application program, computer equipment and storage medium
CN115022168B (en) Unified monitoring method based on zabbix and related equipment

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