CN112764792B - Method and device for upgrading associated server version application and electronic equipment - Google Patents

Method and device for upgrading associated server version application and electronic equipment Download PDF

Info

Publication number
CN112764792B
CN112764792B CN202110109017.0A CN202110109017A CN112764792B CN 112764792 B CN112764792 B CN 112764792B CN 202110109017 A CN202110109017 A CN 202110109017A CN 112764792 B CN112764792 B CN 112764792B
Authority
CN
China
Prior art keywords
version
server
client
application
version information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110109017.0A
Other languages
Chinese (zh)
Other versions
CN112764792A (en
Inventor
欧阳志刚
丘晓强
刘丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qiyue Information Technology Co Ltd
Original Assignee
Shanghai Qiyue Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Qiyue Information Technology Co Ltd filed Critical Shanghai Qiyue Information Technology Co Ltd
Priority to CN202110109017.0A priority Critical patent/CN112764792B/en
Publication of CN112764792A publication Critical patent/CN112764792A/en
Application granted granted Critical
Publication of CN112764792B publication Critical patent/CN112764792B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Abstract

The invention relates to the technical field of computers, in particular to a method, a device and electronic equipment for upgrading associated server version applications, which comprise the following steps: the client reads the cache version information; the client initiates an upgrade request parameter to a server upgrade interface based on the cache version information, and acquires resource data returned by a server based on interaction with the server upgrade interface; comparing the client application version information with the server application version information to obtain a first comparison result; and upgrading the client version according to the first comparison result. The invention can realize the automatic update synchronization of the version of the application update associated to the server, so that the application function is robust and long, and the abnormal matching of the application logic of the server response to the client is avoided.

Description

Method and device for upgrading associated server version application and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and an electronic device for upgrading a version application of an associated server.
Background
In the current main flow trend of front-end and back-end separation, the front-end and back-end function iteration version upgrading is relatively independent, strict time nodes are required to be protected in the release deployment of a production environment, namely, the release deployment of a back-end server is finished, and the front-end should release the deployment simultaneously to finish the application upgrading so as to avoid abnormal functions caused by mismatching of the application and the server;
Front-end issuing personnel need to monitor operation instructions of back-end issuing personnel, and after the back-end is finished, the front-end can start formal operation version deployment, so that automatic synchronous application upgrading cannot be realized;
the front-end personnel issue and deploy the iterative version of the front-end application function in advance, the application obtains an upgrade information instruction to upgrade, but the server does not issue and deploy, and then the server responds to the abnormal function caused by the fact that the application logic of the client cannot be matched normally.
Disclosure of Invention
The invention provides a method, a device and electronic equipment for upgrading an associated server version application, which realize automatic update synchronization of the application upgrading associated to a server version, so that the application function is robust and long, and abnormal logic matching of the server response to the client application is avoided.
The embodiment of the specification provides a method for upgrading an associated server version application, which comprises the following steps:
the client reads the cache version information;
the client initiates an upgrade request parameter to a server upgrade interface based on the cache version information, and acquires resource data returned by a server based on interaction with the server upgrade interface;
comparing the client application version information with the server application version information to obtain a first comparison result;
And upgrading the client version according to the first comparison result.
Preferably, the cached version information includes a history version information record, and the client initiates a first upgrade request parameter to the server upgrade interface, and acquires first return resource data based on interaction with the server upgrade interface;
the first returned resource data is associated with a server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, whether the server application version number before updating is consistent with the server application version number after updating is compared, and a second comparison result is obtained;
and applying upgrading to the client version based on the second comparison result.
Preferably, the applying the upgrade to the client version based on the second comparison result includes:
when the version number of the client application before updating is consistent with the version number of the client application after updating and the version number of the server application before updating is consistent with the version number of the server application after updating, the client version application is not updated;
and when the version number of the client application before updating is inconsistent with the version number of the client application after updating and/or the version number of the server application before updating is inconsistent with the version number of the server application after updating, downloading a corresponding version increment packet to the client according to the first returned resource data, and incrementally upgrading the client version application.
Preferably, the first returned resource data is not associated with a server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, and a third comparison result is obtained;
and applying upgrading to the client version based on the third comparison result.
Preferably, the applying the upgrade to the client version based on the third comparison result includes:
when the version number of the client application before updating is consistent with the version number of the client application after updating, the client version application is not updated;
and when the version number of the client application before updating is inconsistent with the version number of the client application after updating, downloading a corresponding version increment packet to the client according to the first return resource data, and incrementally upgrading the client version application.
Preferably, when the cached version information does not include the history version information record, the client initiates a second upgrade request parameter to the server upgrade interface, and acquires second return resource data based on interaction with the server upgrade interface;
and pulling a corresponding version full package to the local according to the second returned resource data, and upgrading the client version application in full.
Preferably, before the reading of the cached version information, the method further includes:
the server completes server version deployment, records the version number, time and related information of the current version of the server, and stores and updates the version number, time and related information to a record file of version information;
the client executes deployment to generate resource data, the resource data comprising: full package, delta package and configuration file;
and the client encrypts the resource data according to the unused channel.
Preferably, the configuration file includes: version number, full packet download address, delta packet download address, public key.
Preferably, the client initiates a first request parameter to the server upgrade interface, and obtains first return resource data based on interaction with the server upgrade interface, including:
the server analyzes the first upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the recorded file of the client version information, the recorded file of the server version information and the parsed first upgrading request parameters;
and comparing the client version information with the server version information to acquire the first returned resource data.
Preferably, the client initiates a second upgrade request parameter to the server upgrade interface, and obtains second return resource data based on interaction with the server upgrade interface, including:
the server analyzes the second upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the record file of the client version information, the record file of the server version information and the parsed second upgrading request parameters;
and acquiring the second return resource.
Preferably, after the client version application completes updating and upgrading, the cache version information is updated.
The embodiment of the specification also provides a device for upgrading the version application of the associated server, which is characterized by comprising:
the information reading module is used for reading the cache version information by the client;
the interface request module initiates an upgrade request parameter to a server upgrade interface based on the cache version information, and acquires resource data returned by a server based on interaction with the server upgrade interface;
the information comparison module is used for comparing the client application version information with the server application version information to obtain a first comparison result;
And the application upgrading module is used for upgrading the client version application according to the first comparison result.
Preferably, the cached version information includes a history version information record, and the client initiates a first upgrade request parameter to the server upgrade interface, and acquires first return resource data based on interaction with the server upgrade interface;
the first returned resource data is associated with a server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, whether the server application version number before updating is consistent with the server application version number after updating is compared, and a second comparison result is obtained;
and applying upgrading to the client version based on the second comparison result.
Preferably, the applying the upgrade to the client version based on the second comparison result includes:
when the version number of the client application before updating is consistent with the version number of the client application after updating and the version number of the server application before updating is consistent with the version number of the server application after updating, the client version application is not updated;
and when the version number of the client application before updating is inconsistent with the version number of the client application after updating and/or the version number of the server application before updating is inconsistent with the version number of the server application after updating, downloading a corresponding version increment packet to the client according to the first returned resource data, and incrementally upgrading the client version application.
Preferably, the first returned resource data is not associated with a server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, and a third comparison result is obtained;
and applying upgrading to the client version based on the third comparison result.
Preferably, the applying the upgrade to the client version based on the third comparison result includes:
when the version number of the client application before updating is consistent with the version number of the client application after updating, the client version application is not updated;
and when the version number of the client application before updating is inconsistent with the version number of the client application after updating, downloading a corresponding version increment packet to the client according to the first return resource data, and incrementally upgrading the client version application.
Preferably, when the cached version information does not include the history version information record, the client initiates a second upgrade request parameter to the server upgrade interface, and acquires second return resource data based on interaction with the server upgrade interface;
and pulling a corresponding version full package to the local according to the second returned resource data, and upgrading the client version application in full.
Preferably, before the reading of the cached version information, the method further includes:
the server completes server version deployment, records the version number, time and related information of the current version of the server, and stores and updates the version number, time and related information to a record file of version information;
the client executes deployment to generate resource data, the resource data comprising: full package, delta package and configuration file;
and the client encrypts the resource data according to the unused channel.
Preferably, the configuration file includes: version number, full packet download address, delta packet download address, public key.
Preferably, the client initiates a first request parameter to the server upgrade interface, and obtains first return resource data based on interaction with the server upgrade interface, including:
the server analyzes the first upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the recorded file of the client version information, the recorded file of the server version information and the parsed first upgrading request parameters;
and comparing the client version information with the server version information to acquire the first returned resource data.
Preferably, the client initiates a second upgrade request parameter to the server upgrade interface, and obtains second return resource data based on interaction with the server upgrade interface, including:
the server analyzes the second upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the record file of the client version information, the record file of the server version information and the parsed second upgrading request parameters;
and acquiring the second return resource.
Preferably, after the client version application completes updating and upgrading, the cache version information is updated.
An electronic device, wherein the electronic device comprises:
a processor and a memory storing computer executable instructions that, when executed, cause the processor to perform the method of any of the above.
A computer readable storage medium storing one or more programs which, when executed by a processor, implement the method of any of the preceding claims.
The beneficial effects are that:
the application can realize the automatic update synchronization of the version of the application update associated to the server, so that the application function is robust and long, and the abnormal matching of the application logic of the server response to the client is avoided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a schematic diagram of an associated server version application upgrading method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an associated server version application upgrading device according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer readable medium according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present application will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the application to those skilled in the art. The same reference numerals in the drawings denote the same or similar elements, components or portions, and thus a repetitive description thereof will be omitted.
The features, structures, characteristics or other details described in a particular embodiment do not exclude that may be combined in one or more other embodiments in a suitable manner, without departing from the technical idea of the invention.
In the description of specific embodiments, features, structures, characteristics, or other details described in the present invention are provided to enable one skilled in the art to fully understand the embodiments. However, it is not excluded that one skilled in the art may practice the present invention without one or more of the specific features, structures, characteristics, or other details.
The drawings shown in the figures are merely exemplary and do not necessarily include all of the content and operations/steps nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Referring to fig. 1, a schematic diagram of an associated server version application upgrading method according to an embodiment of the present disclosure includes:
s101: the client reads the cache version information;
in the preferred embodiment of the invention, the application program is started first and then the application program reads the own cache version information, thereby providing contrast information for updating the application program.
S102: the client initiates an upgrade request parameter to a server upgrade interface based on the cache version information, and acquires resource data returned by a server based on interaction with the server upgrade interface;
in the preferred embodiment of the invention, after the self cache version information is read, an application program of the client side immediately initiates upgrade request information to the server upgrade interface, and performs resource interaction with the server to acquire resource data returned by the server, and encrypts front-end resources according to different channels when performing resource interaction. Wherein the resource data includes a full package, an incremental package, a configuration file, a version number, and the like.
S103: comparing the client application version information with the server application version information to obtain a first comparison result;
in a preferred embodiment of the present invention, after resource data returned by a server is obtained, comparing client application version information with server application version information, and when the first returned resource data is associated with a server version, comparing whether the client application version number before updating is consistent with the client application version number after updating, and comparing whether the server application version number before updating is consistent with the server application version number after updating; and when the first returned resource data is not associated with the server version, comparing whether the client application version number before updating is consistent with the client application version number after updating.
S104: and upgrading the client version according to the first comparison result.
In a preferred embodiment of the present invention, on the premise that the first returned resource data is associated with the server version, when the client application version number before updating is consistent with the client application version number after updating and the server application version number before updating is consistent with the server application version number after updating, the client version application is not updated; and when the version number of the client application before updating is inconsistent with the version number of the client application after updating and/or the version number of the server application before updating is inconsistent with the version number of the server application after updating, downloading a corresponding version increment packet to the client according to the first returned resource data, and incrementally upgrading the client version application.
On the premise that the first returned resource data is not associated with the server version, when the version number of the client application before updating is consistent with the version number of the client application after updating, the client version application is not updated; and when the version number of the client application before updating is inconsistent with the version number of the client application after updating, downloading a corresponding version increment packet to the client according to the first return resource data, and incrementally upgrading the client version application.
Further, the cached version information comprises a history version information record, and the client initiates a first upgrade request parameter to the server upgrade interface and acquires first return resource data based on interaction with the server upgrade interface;
the first returned resource data is associated with a server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, whether the server application version number before updating is consistent with the server application version number after updating is compared, and a second comparison result is obtained;
and applying upgrading to the client version based on the second comparison result.
In a preferred embodiment of the present invention, the client initiates a request parameter requesting version information to the server upgrade interface. The server receives the upgrade information of the client application request, generates a table according to the comparison and identification of the version interval number of the version numbers, and simultaneously returns the combined data of the current version information of the server to the client. After receiving the resource data returned by the server, the client application decrypts the resource data, compares whether the version number of the client application before updating is consistent with the version number of the client application after updating, compares whether the version number of the server application before updating is consistent with the version number of the server application after updating, and decides whether the application is upgraded, iterated or not according to the comparison result.
Further, the applying the upgrade to the client version based on the second comparison result includes:
when the version number of the client application before updating is consistent with the version number of the client application after updating and the version number of the server application before updating is consistent with the version number of the server application after updating, the client version application is not updated;
and when the version number of the client application before updating is inconsistent with the version number of the client application after updating and/or the version number of the server application before updating is inconsistent with the version number of the server application after updating, downloading a corresponding version increment packet to the client according to the first returned resource data, and incrementally upgrading the client version application.
In a preferred embodiment of the present invention, on the premise that a server version is associated based on first returned resource data, when the client application version number before updating is consistent with the client application version number after updating and the server application version number before updating is consistent with the server application version number after updating, the client version application is not updated; and when the version number of the client application before updating is inconsistent with the version number of the client application after updating and/or the version number of the server application before updating is inconsistent with the version number of the server application after updating, downloading a corresponding version increment packet to the client according to the first returned resource data, incrementally upgrading the client version application, and updating local cache version information to be used as a next version judgment standard after the application is successfully upgraded.
Further, the first returned resource data is not associated with a server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, and a third comparison result is obtained;
and applying upgrading to the client version based on the third comparison result.
In a preferred embodiment of the present invention, on the premise that the first returned resource data is not associated with the server version, comparing whether the client application version number before updating is consistent with the client application version number after updating, and when the client application version number before updating is consistent with the client application version number after updating, not upgrading the client application; and when the version number of the client application before updating is inconsistent with the version number of the client application after updating, downloading a corresponding version increment packet to the client according to the first return resource data, and incrementally upgrading the client version application.
Further, the applying the upgrade to the client version based on the third comparison result includes:
when the version number of the client application before updating is consistent with the version number of the client application after updating, the client version application is not updated;
And when the version number of the client application before updating is inconsistent with the version number of the client application after updating, downloading a corresponding version increment packet to the client according to the first return resource data, and incrementally upgrading the client version application.
In a preferred embodiment of the present invention, on the premise that the first returned resource data is not associated with the server version, when the version number of the client application before updating is consistent with the version number of the client application after updating, the client version application is not updated; and when the version number of the client application before updating is inconsistent with the version number of the client application after updating, downloading a corresponding version increment packet to the client according to the first return resource data, incrementally upgrading the client version application, and updating the local cache version information to serve as a next version judgment standard after the application is successfully upgraded.
Further, when the cached version information does not include the history version information record, the client initiates a second upgrade request parameter to the server upgrade interface, and acquires second return resource data based on interaction with the server upgrade interface;
and pulling a corresponding version full package to the local according to the second returned resource data, and upgrading the client version application in full.
In a preferred embodiment of the present invention, when the cached version information does not include the history version information record, the client initiates request information requesting for a null instruction to the server upgrade interface, the server directly returns a full package resource link according to the request information of the null instruction, the client directly pulls the full package resource from the server through the resource link to perform version upgrade, and updates the local cached version information to be used as a next version judgment reference after the application upgrade is successful.
Further, before the reading of the cached version information, the method further includes:
the server completes server version deployment, records the version number, time and related information of the current version of the server, and stores and updates the version number, time and related information to a record file of version information;
the client executes deployment to generate resource data, the resource data comprising: full package, delta package and configuration file;
and the client encrypts the resource data according to the unused channel.
In the preferred embodiment of the invention, before the cached version information is read, server version resources are required to be deployed, after the server finishes the deployment of the server version, the version number, time and related information of the current version of the server are recorded, and the version number, time and related information are stored and updated to a record file of the version information; the client then performs deployment, generating resource data, wherein the resource data comprises: the full package, the increment package, the configuration file and the like, and meanwhile, the client encrypts the resource data according to different channels, so that the resource is prevented from being damaged or maliciously changed, and the stability and the safety of the resource are ensured.
Further, the configuration file includes: version number, full packet download address, delta packet download address, public key.
In a preferred embodiment of the present invention, the configuration file is generated when the client executes the deployment, wherein the configuration file includes information such as a version number, a full package download address, a package download address, and a public key.
Further, the client initiates a first request parameter to the server upgrade interface, and obtains first return resource data based on interaction with the server upgrade interface, including:
the server analyzes the first upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the recorded file of the client version information, the recorded file of the server version information and the parsed first upgrading request parameters;
and comparing the client version information with the server version information to acquire the first returned resource data.
In the preferred embodiment of the invention, when the client and the server perform data interaction, the server firstly analyzes the request parameters initiated by the client and reads the record file of the version information of the client and the record file of the version information of the server; then the server upgrade interface carries out dictionary data structure processing on the record file of the version information of the client, the record file of the version information of the server and the analyzed version information request information parameters; and then comparing the version information of the client with the version information of the server to generate incremental version data, and finally returning the resource data such as the version information parameters, the version numbers and the like to the client.
Further, the client initiates a second upgrade request parameter to the server upgrade interface, and obtains second return resource data based on interaction with the server upgrade interface, including:
the server analyzes the second upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the record file of the client version information, the record file of the server version information and the parsed second upgrading request parameters;
and acquiring the second return resource.
In the preferred embodiment of the invention, when the client and the server perform data interaction, the server firstly analyzes the request parameters initiated by the client and reads the record file of the version information of the client and the record file of the version information of the server; then, the server upgrading interface carries out dictionary data structure processing on the record file of the version information of the client, the record file of the version information of the server and the parsed blank instruction information request parameters; and then directly generating full version data, and finally returning the version information parameters, version numbers and other resource data to the client.
Further, after the client version application finishes updating and upgrading, the cache version information is updated.
In the preferred embodiment of the invention, after the client version application finishes updating and upgrading, the cache version information is updated at the same time, and after the application is successfully upgraded, the local cache version information is updated to be used as the next version judgment standard.
In the preferred embodiment of the invention, when the application program belongs to the first installation, the client does not have history version cache information, and the client pulls a full package through the full Bao Lianjie to update the application; when the application program has history version cache information, various situations exist, which specifically include:
when the version number of the server update application version server changes and the version number of the client is unchanged, the client application is not updated; when the version number of the server is unchanged, the version number of the server of the update application version of the client is changed, and the resource data is not associated with the version of the server, the client pulls an increment packet to update the application increment; when the version number of the server is unchanged, the version number of the server of the client updating application version changes, and the resource data is associated with the version of the server, the client application is not updated; when the version number of the server is unchanged and the version number of the client is unchanged, the client application is not updated; when the version number of the server of the multiple updated version changes and the version number of the server is unchanged, the client application is not updated; when the version number of the server is changed after the server updates the version number of the version server for a plurality of times, the client updates the version number of the version server for a plurality of times, and then the client application is iteratively updated; and when the version number of the server is unchanged, the client updates the version number of the version server for a plurality of times, and then the client application is iteratively updated. When the client application is updated iteratively, the client application is updated iteratively to the last associated server version of the table. The above embodiments satisfy the association of an application upgrade to a server version automated synchronization update.
The invention can realize the automatic update synchronization of the version of the application update associated to the server, so that the application function is robust and long, and the abnormal matching of the application logic of the server response to the client is avoided.
Fig. 2 is a schematic structural diagram of an associated server version application upgrading device according to an embodiment of the present disclosure, including:
an information reading module 201, wherein the client reads the cache version information;
in the preferred embodiment of the present invention, the application program is started first, and then the information reading module 201 reads the cached version information of itself, so as to provide contrast information for updating the application program.
The interface request module 202 initiates an upgrade request parameter to a server upgrade interface based on the cache version information, and acquires resource data returned by a server based on interaction with the server upgrade interface;
in the preferred embodiment of the invention, after the self cache version information is read, an application program of the client side immediately initiates upgrade request information to the server upgrade interface, and performs resource interaction with the server to acquire resource data returned by the server, and encrypts front-end resources according to different channels when performing resource interaction. Wherein the resource data includes a full package, an incremental package, a configuration file, a version number, and the like.
The information comparison module 203 compares the client application version information with the server application version information to obtain a first comparison result;
in a preferred embodiment of the present invention, after resource data returned by a server is obtained, the information comparison module 203 compares client application version information with server application version information, and when the first returned resource data is associated with a server version, compares whether the client application version number before updating is consistent with the client application version number after updating, and compares whether the server application version number before updating is consistent with the server application version number after updating; and when the first returned resource data is not associated with the server version, comparing whether the client application version number before updating is consistent with the client application version number after updating.
And the application upgrading module 204 is used for upgrading the client version application according to the first comparison result.
In a preferred embodiment of the present invention, on the premise that the first returned resource data is associated with the server version, when the client application version number before updating is consistent with the client application version number after updating and the server application version number before updating is consistent with the server application version number after updating, the client version application is not updated; and when the version number of the client application before updating is inconsistent with the version number of the client application after updating and/or the version number of the server application before updating is inconsistent with the version number of the server application after updating, downloading a corresponding version increment packet to the client according to the first returned resource data, and incrementally upgrading the client version application.
On the premise that the first returned resource data is not associated with the server version, when the version number of the client application before updating is consistent with the version number of the client application after updating, the client version application is not updated; and when the version number of the client application before updating is inconsistent with the version number of the client application after updating, downloading a corresponding version increment packet to the client according to the first return resource data, and incrementally upgrading the client version application.
Further, the cached version information comprises a history version information record, and the client initiates a first upgrade request parameter to the server upgrade interface and acquires first return resource data based on interaction with the server upgrade interface;
the first returned resource data is associated with a server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, whether the server application version number before updating is consistent with the server application version number after updating is compared, and a second comparison result is obtained;
and applying upgrading to the client version based on the second comparison result.
Further, the applying the upgrade to the client version based on the second comparison result includes:
When the version number of the client application before updating is consistent with the version number of the client application after updating and the version number of the server application before updating is consistent with the version number of the server application after updating, the client version application is not updated;
and when the version number of the client application before updating is inconsistent with the version number of the client application after updating and/or the version number of the server application before updating is inconsistent with the version number of the server application after updating, downloading a corresponding version increment packet to the client according to the first returned resource data, and incrementally upgrading the client version application.
Further, the first returned resource data is not associated with a server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, and a third comparison result is obtained;
and applying upgrading to the client version based on the third comparison result.
Further, the applying the upgrade to the client version based on the third comparison result includes:
when the version number of the client application before updating is consistent with the version number of the client application after updating, the client version application is not updated;
And when the version number of the client application before updating is inconsistent with the version number of the client application after updating, downloading a corresponding version increment packet to the client according to the first return resource data, and incrementally upgrading the client version application.
Further, when the cached version information does not include the history version information record, the client initiates a second upgrade request parameter to the server upgrade interface, and acquires second return resource data based on interaction with the server upgrade interface;
and pulling a corresponding version full package to the local according to the second returned resource data, and upgrading the client version application in full.
Further, before the reading of the cached version information, the method further includes:
the server completes server version deployment, records the version number, time and related information of the current version of the server, and stores and updates the version number, time and related information to a record file of version information;
the client executes deployment to generate resource data, the resource data comprising: full package, delta package and configuration file;
and the client encrypts the resource data according to the unused channel.
Further, the configuration file includes: version number, full packet download address, delta packet download address, public key.
Further, the client initiates a first request parameter to the server upgrade interface, and obtains first return resource data based on interaction with the server upgrade interface, including:
the server analyzes the first upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the recorded file of the client version information, the recorded file of the server version information and the parsed first upgrading request parameters;
and comparing the client version information with the server version information to acquire the first returned resource data.
Further, the client initiates a second upgrade request parameter to the server upgrade interface, and obtains second return resource data based on interaction with the server upgrade interface, including:
the server analyzes the second upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the record file of the client version information, the record file of the server version information and the parsed second upgrading request parameters;
And acquiring the second return resource.
Further, after the client version application finishes updating and upgrading, the cache version information is updated.
The invention can realize the automatic update synchronization of the version of the application update associated to the server, so that the application function is robust and long, and the abnormal matching of the application logic of the server response to the client is avoided.
Based on the same inventive concept, the embodiments of the present specification also provide an electronic device.
The following describes an embodiment of an electronic device according to the present invention, which may be regarded as a specific physical implementation of the above-described embodiment of the method and apparatus according to the present invention. Details described in relation to the embodiments of the electronic device of the present invention should be considered as additions to the embodiments of the method or apparatus described above; for details not disclosed in the embodiments of the electronic device of the present invention, reference may be made to the above-described method or apparatus embodiments.
Referring to fig. 3, a schematic structural diagram of an electronic device according to an embodiment of the present disclosure is provided. An electronic device 300 according to this embodiment of the present invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 3, the electronic device 300 is embodied in the form of a general purpose computing device. Components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting the different device components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code that is executable by the processing unit 310 such that the processing unit 310 performs the steps according to various exemplary embodiments of the invention described in the above processing method section of the present specification. For example, the processing unit 310 may perform the steps shown in fig. 1.
The memory unit 320 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 3201 and/or cache memory 3202, and may further include Read Only Memory (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: operating devices, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 300, and/or any device (e.g., router, modem, etc.) that enables the electronic device 300 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 350. Also, electronic device 300 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 360. The network adapter 360 may communicate with other modules of the electronic device 300 via the bus 330. It should be appreciated that although not shown in fig. 3, other hardware and/or software modules may be used in connection with electronic device 300, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, data backup storage devices, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the exemplary embodiments described herein may be implemented in software, or may be implemented in software in combination with necessary hardware. Thus, the technical solution according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a computer readable storage medium (may be a CD-ROM, a usb disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, or a network device, etc.) to perform the above-mentioned method according to the present invention. The computer program, when executed by a data processing device, enables the computer readable medium to carry out the above-described method of the present invention, namely: such as the method shown in fig. 1.
Referring to fig. 4, a schematic diagram of a computer readable medium according to an embodiment of the present disclosure is provided.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an apparatus, device, or means for electronic, magnetic, optical, electromagnetic, infrared, or semiconductor, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in accordance with embodiments of the present invention may be implemented in practice using a general purpose data processing device such as a microprocessor or Digital Signal Processor (DSP). The present invention can also be implemented as an apparatus or device program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
The above-described specific embodiments further describe the objects, technical solutions and advantageous effects of the present invention in detail, and it should be understood that the present invention is not inherently related to any particular computer, virtual device or electronic apparatus, and various general-purpose devices may also implement the present invention. The foregoing description of the embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. An associated server version application upgrade method, comprising:
the client reads the cache version information;
the client initiates an upgrade request parameter to a server upgrade interface based on the cache version information, and acquires resource data returned by a server based on interaction with the server upgrade interface, and the method specifically comprises the following steps: when the cached version information comprises a history version information record, the client initiates a first upgrade request parameter to the server upgrade interface, and acquires first return resource data based on interaction with the server upgrade interface; when the cached version information does not comprise the history version information record, the client initiates a second upgrade request parameter to the server upgrade interface, and acquires second return resource data based on interaction with the server upgrade interface;
Comparing the client application version information with the server application version information to obtain a first comparison result, wherein the method specifically comprises the following steps: when the cached version information comprises a history version information record, the first comparison result comprises a second comparison result, the first returned resource data is related to the server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, whether the server application version number before updating is consistent with the server application version number after updating is compared, and a second comparison result is obtained; when the cache version information does not comprise the history version information record, the first comparison result is the second returned resource data;
according to the first comparison result, upgrading the client version application, which specifically comprises: when the cached version information comprises a history version information record, upgrading the client version application based on the second comparison result; and when the cached version information does not comprise the history version information record, pulling a corresponding version full package to the local according to the second returned resource data, and fully upgrading the client version application.
2. The method of claim 1, wherein the client initiates a first upgrade request parameter to the server upgrade interface and obtains the first return resource data based on interaction with the server upgrade interface, comprising:
The server analyzes the first upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the recorded file of the client version information, the recorded file of the server version information and the parsed first upgrading request parameters;
and comparing the client version information with the server version information to acquire the first returned resource data.
3. The method for upgrading an associated server version application according to claim 2, wherein said upgrading said client version application based on said second comparison result comprises:
when the version number of the client application before updating is consistent with the version number of the client application after updating and the version number of the server application before updating is consistent with the version number of the server application after updating, the client version application is not updated;
and when the version number of the client application before updating is inconsistent with the version number of the client application after updating and/or the version number of the server application before updating is inconsistent with the version number of the server application after updating, downloading a corresponding version increment packet to the client according to the first returned resource data, and incrementally upgrading the client version application.
4. The method for upgrading associated server version applications as claimed in claim 3, wherein said first returned resource data does not have associated server version, compares whether said client application version number before updating is consistent with said client application version number after updating, and obtains a third comparison result;
and applying upgrading to the client version based on the third comparison result.
5. The method for upgrading an associated server version application according to claim 4, wherein said upgrading said client version application based on said third comparison result comprises:
when the version number of the client application before updating is consistent with the version number of the client application after updating, the client version application is not updated;
and when the version number of the client application before updating is inconsistent with the version number of the client application after updating, downloading a corresponding version increment packet to the client according to the first return resource data, and incrementally upgrading the client version application.
6. The method of claim 2, wherein the client initiates a second upgrade request parameter to the server upgrade interface and obtains second return resource data based on interaction with the server upgrade interface, comprising:
The server analyzes the second upgrading request parameters and reads a record file of the version information of the client and a record file of the version information of the server;
dictionary data structure processing is carried out on the record file of the client version information, the record file of the server version information and the parsed second upgrading request parameters;
and acquiring the second returned resource data.
7. The method for upgrading an associated server version application according to claim 1, further comprising, before said reading the cached version information:
the server completes server version deployment, records the version number, time and related information of the current version of the server, and stores and updates the version number, time and related information to a record file of version information;
the client executes deployment to generate resource data, the resource data comprising: full package, increment package and configuration file, the configuration file includes: version number, full packet download address, delta packet download address, public key;
and the client encrypts the resource data according to the unused channel.
8. An associated server version application upgrade apparatus, comprising:
the information reading module is used for reading the cache version information by the client;
The interface request module, the said customer end initiates the upgrade request parameter to the upgrade interface of the server based on the said cached version information, and obtain the resource data returned by the server based on the interaction with upgrade interface of the said server, include specifically: when the cached version information comprises a history version information record, the client initiates a first upgrade request parameter to the server upgrade interface, and acquires first return resource data based on interaction with the server upgrade interface; when the cached version information does not comprise the history version information record, the client initiates a second upgrade request parameter to the server upgrade interface, and acquires second return resource data based on interaction with the server upgrade interface;
the information comparison module compares the client application version information with the server application version information to obtain a first comparison result, and specifically comprises the following steps: when the cached version information comprises a history version information record, the first comparison result comprises a second comparison result, the first returned resource data is related to the server version, whether the client application version number before updating is consistent with the client application version number after updating is compared, whether the server application version number before updating is consistent with the server application version number after updating is compared, and a second comparison result is obtained; when the cache version information does not comprise the history version information record, the first comparison result is the second returned resource data;
The application upgrading module upgrades the client version application according to the first comparison result, and specifically comprises the following steps: when the cached version information comprises a history version information record, upgrading the client version application based on the second comparison result; and when the cached version information does not comprise the history version information record, pulling a corresponding version full package to the local according to the second returned resource data, and fully upgrading the client version application.
9. An electronic device, wherein the electronic device comprises:
a processor and a memory storing computer executable instructions that, when executed, cause the processor to perform the method of any of claims 1-7.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-7.
CN202110109017.0A 2021-01-27 2021-01-27 Method and device for upgrading associated server version application and electronic equipment Active CN112764792B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110109017.0A CN112764792B (en) 2021-01-27 2021-01-27 Method and device for upgrading associated server version application and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110109017.0A CN112764792B (en) 2021-01-27 2021-01-27 Method and device for upgrading associated server version application and electronic equipment

Publications (2)

Publication Number Publication Date
CN112764792A CN112764792A (en) 2021-05-07
CN112764792B true CN112764792B (en) 2023-08-29

Family

ID=75705999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110109017.0A Active CN112764792B (en) 2021-01-27 2021-01-27 Method and device for upgrading associated server version application and electronic equipment

Country Status (1)

Country Link
CN (1) CN112764792B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113741931B (en) * 2021-08-18 2023-07-25 苏州浪潮智能科技有限公司 Software upgrading method and device, electronic equipment and readable storage medium
CN114281395B (en) * 2021-11-21 2023-08-18 苏州浪潮智能科技有限公司 Method, system, device and storage medium for maintaining consistency of online upgrade data
CN116088926B (en) * 2023-01-10 2023-10-20 睿智合创(北京)科技有限公司 Decision component version management method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302601A (en) * 2015-10-22 2016-02-03 四川长虹电器股份有限公司 System and method for software upgrade server
CN107203395A (en) * 2017-05-19 2017-09-26 北京京东尚科信息技术有限公司 Resource graded method, device and computer-readable recording medium and electronic equipment
CN107301051A (en) * 2017-06-27 2017-10-27 深圳市金立通信设备有限公司 The caching of terminal dynamic data and exchange method, terminal, system and computer-readable recording medium
CN109656595A (en) * 2018-12-10 2019-04-19 北京百家互联科技有限公司 The method, apparatus and system that client-side program updates
CN110362333A (en) * 2019-06-29 2019-10-22 上海淇馥信息技术有限公司 A kind of quick solution, device and electronic equipment that client upgrading hinders

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724308A (en) * 2012-06-13 2012-10-10 腾讯科技(深圳)有限公司 Software update method and software update system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302601A (en) * 2015-10-22 2016-02-03 四川长虹电器股份有限公司 System and method for software upgrade server
CN107203395A (en) * 2017-05-19 2017-09-26 北京京东尚科信息技术有限公司 Resource graded method, device and computer-readable recording medium and electronic equipment
CN107301051A (en) * 2017-06-27 2017-10-27 深圳市金立通信设备有限公司 The caching of terminal dynamic data and exchange method, terminal, system and computer-readable recording medium
CN109656595A (en) * 2018-12-10 2019-04-19 北京百家互联科技有限公司 The method, apparatus and system that client-side program updates
CN110362333A (en) * 2019-06-29 2019-10-22 上海淇馥信息技术有限公司 A kind of quick solution, device and electronic equipment that client upgrading hinders

Also Published As

Publication number Publication date
CN112764792A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
CN112764792B (en) Method and device for upgrading associated server version application and electronic equipment
US8549490B2 (en) Static code analysis for packaged application customization
EP2786246B1 (en) Deployment and updating of applications and drivers on a client device using and extensible markup language (xml) configuration file
CN110032392B (en) Service management method and device, storage medium and electronic equipment
US10310900B2 (en) Operating programs on a computer cluster
CN109656618A (en) Source code edition control method, configuration server, medium, electronic equipment
US7770167B1 (en) Method and system for installing software
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
US20120096453A1 (en) Software Package Management Mechanism
CN113760306A (en) Method and device for installing software, electronic equipment and storage medium
US10445084B1 (en) Method and system for installing software
WO2024001240A1 (en) Task integration method and apparatus for multiple technology stacks
CN111258618A (en) File configuration method and device, computer equipment and storage medium
CN113568623A (en) Application deployment method and device and electronic equipment
US8566820B1 (en) Method and system for installing software
CN111209018B (en) Method and device for processing application upgrading prompt information and electronic equipment
CN112988192A (en) Version updating method and device, electronic equipment and storage medium
CN112783529B (en) Method and device for controlling pre-release and upgrading of application program and electronic equipment
CN113535221A (en) Method and device for managing application version
CN113220507B (en) Version consistency checking method and device for double-master control system
CN111414175A (en) Network installation method, system and device of operating system and readable storage medium
CN112783528B (en) Resource online method and device and electronic equipment
CN112615918B (en) Network management system and information synchronization method thereof
CN116991355B (en) Method, system and device for supporting LED driving chip by modifying and iterating script
CN114253615B (en) Method and device for setting bootstrap program, electronic 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
GR01 Patent grant
GR01 Patent grant