CN111158716A - Version upgrade calling method and device, computer system and readable storage medium - Google Patents

Version upgrade calling method and device, computer system and readable storage medium Download PDF

Info

Publication number
CN111158716A
CN111158716A CN201911321639.9A CN201911321639A CN111158716A CN 111158716 A CN111158716 A CN 111158716A CN 201911321639 A CN201911321639 A CN 201911321639A CN 111158716 A CN111158716 A CN 111158716A
Authority
CN
China
Prior art keywords
version
information
calling
request
application program
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.)
Granted
Application number
CN201911321639.9A
Other languages
Chinese (zh)
Other versions
CN111158716B (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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201911321639.9A priority Critical patent/CN111158716B/en
Publication of CN111158716A publication Critical patent/CN111158716A/en
Application granted granted Critical
Publication of CN111158716B publication Critical patent/CN111158716B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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 discloses a version upgrading calling method, a version upgrading calling device, a computer system and a readable storage medium, which are based on a pedestal operation and maintenance and comprise the following steps: obtaining a differential list, and generating local upgrade information or overall upgrade information according to upgrade data of the differential list; creating a target calling method according to the local upgrade information version calling interface; or creating a target controller according to the whole upgrading information, and creating a version calling interface with a target calling method in the controller; receiving a request message sent by a user side, and traversing the calling method of the version calling interface according to the request message to obtain a request calling method; obtaining a request result according to the request message and sending the request result to the user side; or acquiring the version designation information and the no-version information by a request calling method, forming a request result, and sending the request result to the user side. The invention realizes the technical effects of processing the request messages sent by the clients with different versions and sending the corresponding request results to the clients according to the request messages.

Description

Version upgrade calling method and device, computer system and readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a version upgrade calling method and apparatus, a computer system, and a readable storage medium.
Background
The APP of the current client acquires information from the server through the version calling interface, and a user often ignores or rejects the APP upgrade of the client for various reasons, so that the request message output by the client is often sent by aiming at an old version application program, namely the version number in the request message is an old version number;
when the version calling interface used by the current server receives the upgrade data packet, the calling method in the version calling interface is modified to output information based on the new version application program to the client, so that when the version calling interface receives a request message with an old version number, the request message cannot be identified, the request message cannot call the version calling interface to acquire information from the server, and the APP of the client cannot be normally used.
Disclosure of Invention
The invention aims to provide a version upgrade calling method, a version upgrade calling device, a computer system and a readable storage medium, which are used for solving the problem that in the prior art, because a current version calling interface cannot identify a request message of an old version number, the request message cannot acquire information from a server through the version calling interface, and the APP of a client cannot be normally used.
In order to achieve the above object, the present invention provides a version upgrade calling method, which comprises the following steps:
receiving a new version application program sent by a control end, acquiring a current application program corresponding to the new version application program, comparing the current application program with the new version application program to acquire a differential list, and generating local upgrade information or overall upgrade information according to upgrade data of the differential list; the differential list is a differential packet storing upgrading data, and the upgrading data is code data used for describing the difference between the code of the new version application program and the code of the current application program;
creating a target calling method in the version calling interface of the current application program according to the local upgrading information and the upgrading data of the differential list, or
Creating a target controller according to the whole upgrading information, and creating a version calling interface with a target calling method in the target controller according to the upgrading data of the differential list;
receiving a request message sent by a user side, and traversing the method of the version calling interface according to the request message to obtain a request calling method;
if the request calling method is the target calling method, obtaining a request result according to the request message and sending the request result to the user side; if the request calling method is not the target calling method, acquiring version designation information and version-free information through the request calling method, forming a request result, and sending the request result to the user side; wherein the version designation information is information obtained based on a version number and a request field of the request message, and the no-version information is information obtained based only on the request field of the request message.
In the above scheme, the comparing the current application program with the new version application program to obtain the difference list currently includes:
extracting a current application program;
and comparing the data in the new version application program with the data in the current application program one by one to obtain a difference list for describing the difference between the new version application program and the current application program.
In the foregoing solution, the generating local upgrade information or global upgrade information according to the upgrade data of the differential manifest includes:
detecting whether the differential list has upgrading data with the content being replacement information or logic information; if not, generating local upgrading information; if yes, generating integral upgrading information;
the replacement information is data for replacing the whole interface of the application program, and the logic information is data for changing the business logic of the application program.
In the foregoing solution, the creating a target call method in the version call interface of the current application program according to the local upgrade information and through the upgrade data of the differential manifest includes:
identifying a version calling interface for calling the current application program according to the local upgrading information, and copying a calling method for calling the current application program in the version calling interface as a copying method;
extracting upgrading data in the differential list, and modifying the copying method according to the upgrading data to obtain a target calling method for calling a new version application program;
and loading the version number of the new version application program in the target calling method as the version information of the target calling method, and storing the target calling method loaded with the version information into a version calling interface of the current application program.
In the foregoing solution, the creating a version calling interface having a target calling method in the target controller according to the upgrade data of the differential manifest includes:
creating a calling interface in the target controller;
copying the data of the version calling interface of the current application program and loading the data into the calling interface of the target controller;
modifying a calling method in a calling interface of the target controller according to the upgrading data in the differential list to obtain a target calling method;
and loading the version number of the new version application program in the target calling method as the version information of the target calling method, and converting the calling interface into a version calling interface with the target calling method.
In the foregoing solution, traversing the calling method of the version calling interface according to the request message to obtain the request calling method includes:
extracting the version number of the request message;
and traversing the version calling interface to compare the version number with a calling method in the version calling interface, acquiring a calling method with version information consistent with the version number, and setting the calling method as a request calling method.
In the foregoing solution, the obtaining version designation information and version-free information and forming a request result by the request invoking method includes:
extracting the version number and the request field of the request message;
obtaining no-version information according to the request field through the request calling method, and obtaining version designation information according to the version number and the request field;
and summarizing the non-version information and the version designation information to form a request result.
In order to achieve the above object, the present invention further provides a version upgrade invoking device, including:
the differential identification module is used for receiving a new version application program sent by the control end, acquiring a current application program corresponding to the new version application program, comparing the current application program with the new version application program to acquire a differential list, and generating local upgrade information or overall upgrade information according to upgrade data of the differential list; the differential list is a differential packet storing upgrading data, and the upgrading data is code data used for describing the difference between the code of the new version application program and the code of the current application program;
the upgrade management module is used for creating a target calling method in a version calling interface of the current application program according to the local upgrade information and the upgrade data of the differential list, or creating a target controller according to the overall upgrade information, and creating a version calling interface with the target calling method in the target controller according to the upgrade data of the differential list;
the calling management module is used for receiving a request message sent by a user side and traversing the calling method of the version calling interface according to the request message to obtain a request calling method; if the request calling method is the target calling method, obtaining a request result according to the request message and sending the request result to the user side; if the request calling method is not the target calling method, acquiring version designation information and version-free information through the request calling method, forming a request result, and sending the request result to the user side; wherein the version designation information is information obtained based on a version number and a request field of the request message, and the no-version information is information obtained based only on the request field of the request message.
The processor and the computer program stored on the memory and capable of running on the processor jointly realize the steps of the version upgrade calling method when the processor of the plurality of computer devices executes the computer program.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, which includes a plurality of storage media, each storage medium storing a computer program, and the computer programs stored in the storage media, when executed by a processor, collectively implement the steps of the version-up calling method.
According to the version upgrade calling method, the version upgrade calling device, the computer system and the readable storage medium, the difference of the new version and the old version is obtained by adopting the difference list, and the local upgrade information and the whole upgrade information are generated according to the difference to realize the difference upgrade, so that the change of the version calling interface of the application program in the server is reduced to the maximum extent, the upgrade efficiency is improved, and the running reliability of the application program is ensured; creating a target calling method in a version calling interface according to local upgrading information, and upgrading an application program to ensure that the version calling interface can simultaneously store calling methods of a new version and an old version so as to process requests sent by user terminals of different versions; the controller is newly built according to the whole upgrading information, the calling method of the new version is built in the version calling interface of the controller, the application program is upgraded, and the controller of the old version application program and the version calling interface thereof are reserved, so that the technical effects of processing request messages sent by user terminals of different versions and sending corresponding request results to the user terminals according to the request messages are achieved.
Drawings
FIG. 1 is a flowchart of a version upgrade calling method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an environment application of a version upgrade calling method according to a first embodiment of the present application;
fig. 3 is a specific flowchart of obtaining a difference list in S1 according to a first version upgrade invoking method embodiment of the present invention;
fig. 4 is a specific flowchart of generating local upgrade information or global upgrade information in S1 according to the first version upgrade invoking method in the present invention;
fig. 5 is a specific flowchart of creating a target calling method according to the local upgrade information in S2 according to the first embodiment of the version upgrade calling method of the present invention;
fig. 6 is a specific flowchart of creating a version call interface in the controller in S2 according to the first version upgrade call method embodiment of the present invention;
fig. 7 is a specific flowchart of the get request calling method in S3 according to the first embodiment of the version upgrade calling method of the present invention;
fig. 8 is a specific flowchart of obtaining a request result and sending the request result to the user side in S3 according to the first version upgrade invoking method embodiment of the present invention;
FIG. 9 is a schematic diagram of program modules of a second version upgrade patch device according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a hardware structure of a computer device in the third embodiment of the computer system according to the present invention.
Reference numerals:
1. version upgrade calling device 2, server 3, control terminal 4 and user terminal
5. Computer equipment 11, differential identification module 12 and upgrade management module
13. Call management module 51, memory 52, processor
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the 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.
The invention provides a version upgrading calling method, a version upgrading calling device, a computer system and a readable storage medium, which are suitable for the technical field of communication and are based on a differential identification module, an upgrading management module and a version upgrading calling method for calling the management module. The invention obtains the difference of the new version and the old version by adopting the difference list, and generates local upgrading information and integral upgrading information according to the difference so as to realize the difference upgrading; creating a target calling method in the version calling interface according to the local upgrading information, and upgrading the application program; or a controller is newly built according to the whole upgrading information, a calling method of a new version is built in a version calling interface of the controller, and the application program is upgraded; receiving a request message sent by a user side, traversing a calling method of a version calling interface according to the request message to obtain a request calling method, and obtaining a request result according to the request message through the request calling method and sending the request result to the user side.
Example one
Referring to fig. 1, a version upgrade calling method according to the embodiment includes the following steps:
s1: receiving a new version application program sent by a control end, acquiring a current application program corresponding to the new version application program, comparing the current application program with the new version application program to acquire a differential list, and generating local upgrade information or overall upgrade information according to upgrade data of the differential list; the differential list is a differential packet storing upgrading data, and the upgrading data is code data used for describing the difference between the code of the new version application program and the code of the current application program;
s2: creating a target calling method in a version calling interface of the current application program according to the local upgrading information and through upgrading data of the differential list; or
Creating a target controller according to the whole upgrading information, and creating a version calling interface with a target calling method in the target controller according to the upgrading data of the differential list;
s3: receiving a request message sent by a user side, and traversing the calling method of the version calling interface according to the request message to obtain a request calling method; if the request calling method is the target calling method, obtaining a request result according to the request message and sending the request result to the user side; if the request calling method is not the target calling method, acquiring version designation information and version-free information through the request calling method, forming a request result, and sending the request result to the user side; wherein the version designation information is information obtained based on a version number and a request field of the request message, and the no-version information is information obtained based only on the request field of the request message.
Referring to fig. 2, the version upgrade invoking method of the present embodiment is executed in the server 2, and the server 2 is connected to the control end 3 and the plurality of user ends 4 through a network.
When the server 2 receives a new version application program output by the control end 3 through a network, extracting the current application program in the server 2 and comparing the current application program with the new version application program to obtain the upgrade data for describing the difference between the new version application program and the current application program of the server 2, and summarizing the upgrade data to obtain a difference list; if the upgrading data of the differential list only relates to the change, abandon, newly add or exchange positions of the fields, generating local upgrading information; and if the upgrading data of the differential list relates to the interface integral replacement or the service logic change, generating integral upgrading information.
The server 2 copies the calling method of the current application program in the version calling interface according to the local upgrading information, loads the calling method into the version calling interface to serve as a target calling method, and modifies the target calling method according to the upgrading data of the differential list so as to realize the version upgrading of the server 2; or the server 2 copies the version calling interface in the controller thereof according to the whole upgrading information, loads the version calling interface into the controller to realize the creation of the version calling interface, and modifies the calling method of the created version calling interface according to the upgrading data of the differential list to realize the version upgrading of the server 2.
The server 2 receives a request message sent by the user terminal 4 through a network, traverses a calling method of a version calling interface in the server 2 according to the request message, sets the calling method matched with the request message as a request calling method, and the server 2 obtains a request result according to the request message through the request calling method and sends the request result to the user terminal 4.
Therefore, the difference of the new version and the old version is obtained by adopting the difference list, and the local upgrading information and the whole upgrading information are generated according to the difference to realize the difference upgrading, so that the change of the version calling interface of the application program in the server 2 is reduced to the maximum extent, the upgrading efficiency is improved, and the running reliability of the application program is ensured; a target calling method is established in the version calling interface according to the local upgrading information, and the application program is upgraded, so that the version calling interface can simultaneously store calling methods of a new version and an old version, and the requests sent by the user terminals 4 of different versions can be processed conveniently; the controller is newly built according to the whole upgrading information, the calling method of the new version is built in the version calling interface of the controller, the application program is upgraded, and the controller of the old version application program and the version calling interface thereof are reserved, so that the technical effects of processing the request messages sent by the user terminals 4 of different versions and sending corresponding request results to the user terminals 4 according to the request messages are achieved.
The server 2 may provide services through one or more networks, which may include various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. The network may include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like. The network may include wireless links, such as cellular links, satellite links, Wi-Fi links, and/or the like. The control terminal 3 may include various terminal devices, such as a mobile phone, a desktop computer, a notebook computer and/or the like. The user end 4 may include various end devices, such as a cell phone, a desktop computer, a notebook computer, and/or the like.
The server 2 may be composed of a single or a plurality of computer devices (e.g., servers). The single or multiple computing devices may include virtualized compute instances. The virtualized computing instance may include a virtual machine, such as an emulation of a computer system, an operating system, a server, and so forth. The computing device may load the virtual machine based on a virtual image and/or other data that defines the particular software (e.g., operating system, dedicated application, server) used for emulation. As the demand for different types of processing services changes, different virtual machines may be loaded and/or terminated on one or more computing devices. A hypervisor may be implemented to manage the use of different virtual machines on the same computing device.
In an exemplary embodiment, the obtaining of the current application corresponding to the new version application in S1 includes:
extracting the program number of the new version application program; and searching the current application program corresponding to the program number in the server to achieve the technical effect of acquiring the current application program corresponding to the new version application program. Because the server is provided with at least one application program, the technical effect of accurately upgrading the application program is realized by acquiring the current application program corresponding to the new version application program.
In a preferred embodiment, referring to fig. 3, the comparing the new version application program with the current application program to obtain the differential list in S1 includes:
s101: and extracting the current application program.
Illustratively, the source code of the server's current application is extracted.
S102: and comparing the data in the new version application program with the data in the current application program one by one to obtain a difference list for describing the difference between the new version application program and the current application program.
Illustratively, the source code of the new version application program and the source code of the current application program are compared one by one, the difference part between the two codes is used as upgrading data, and the upgrading data is collected to form a difference list.
In a preferred embodiment, referring to fig. 4, the generating partial upgrade information or overall upgrade information according to the upgrade data of the differential manifest in S1 includes:
s111: detecting whether the differential list has upgrading data with the content being replacement information or logic information;
s112: if not, generating local upgrading information;
s113: and if so, generating the whole upgrading information.
The replacement information is data for replacing the whole interface of the application program, and the logic information is data for changing the business logic of the application program. It can therefore be understood that the overall upgrade information is generated upon detecting that the upgrade data in the differential manifest relates to data for an overall replacement of the interface, or data for a change in business logic.
It should be noted that, the interface of the application program is implemented by the human-computer interaction, the operation logic, the inlet arrangement and the aesthetic design of the UI code, and therefore, the overall replacement of the interface is implemented by replacing the currently running UI code with the target UI code. The business logic change is used for performing some validity verification work so as to better ensure the robustness of program operation. Such as completing data addition, modification and query services; allowing no empty character string to be input into the specified text box, judging whether the data format is correct and verifying the data type; judging the legality of the user authority, and the like; through the judgment, whether the operation is continuously transmitted backwards is determined, and the normal operation of the program is ensured as much as possible, wherein the operation is a code in a business logic layer.
Furthermore, the differential list may further include upgrade data whose contents are field information, where the field information is data for describing a change, or a discard, or an addition or a replacement of a field.
It should be noted that the field information is code data for modifying a field of a current application program according to a field of a new version application program, and therefore, if data related to the entire replacement of the interface or data related to the change of the service logic is not detected in the upgrade data in the differential list, local upgrade information is generated.
In a preferred embodiment, referring to fig. 5, the creating a target call method in the version call interface of the current application according to the local upgrade information and through the upgrade data of the differential manifest in S2 includes:
s201: identifying a version calling interface for calling the current application program according to the local upgrading information, and copying a calling method for calling the current application program in the version calling interface as a copying method;
it should be noted that the version calling interface is a program interface for calling instructions or functions in the server, and is composed of a set of statements, functions, options, other forms for expressing the program structure, and data provided by a program or a program language used by a programmer.
S202: extracting upgrading data in the differential list, and modifying the copying method according to the upgrading information to obtain a target calling method for calling a new version application program;
wherein, according to the upgrade information, such as: and changing, abandoning, newly adding or exchanging the position of the field, and modifying the calling method to achieve the aim of creating the target calling method.
S203: and loading the version number of the new version application program in the target calling method as the version information of the target calling method, and storing the target calling method loaded with the version information into a version calling interface of the current application program. According to the version upgrading method, the calling method in the version calling interface is modified by using the differential list, the version upgrading of the application program can be realized only by modifying the calling method without unloading the application program originally operated by the server 2, the version upgrading efficiency is improved, and the flow required by the version upgrading is saved.
In a preferred embodiment, referring to fig. 6, the creating, in the S2, a version call interface having a target call method in the target controller according to the upgrade data of the difference list includes:
s211: creating a calling interface in the target controller;
the upgrading of the application program (such as logic adjustment, interface large-scale modification and the like) performed according to the whole upgrading information cannot be compatible with a new version calling method and an old version calling method in the same version calling interface, so that the controller with the version calling interface is created to eliminate the defects when the upgrading is performed according to the whole upgrading information.
S212: copying the data of the version calling interface of the current application program and loading the data into the calling interface of the target controller;
in the step, the data of the version calling interface corresponding to the current application program is copied to the target controller, so that the creation time of the controller is saved, and the data accuracy of the controller is also ensured.
S213: and modifying the calling method in the calling interface of the target controller according to the upgrading data in the differential list to obtain the target calling method.
In the step, the calling method is modified through the differential list, so that the calling method is converted into a target calling method, and the application program in the server is upgraded; at this time, the server can simultaneously be compatible with the version calling interfaces of a plurality of application programs with different versions through a plurality of controllers, so as to ensure that the requests output by the user terminals with different versions can be correctly replied.
S214: and loading the version number of the new version application program in the target calling method as the version information of the target calling method, and converting the calling interface into a version calling interface with the target calling method.
In this step, the version number is loaded in the target calling method, so that the server can quickly obtain the calling method corresponding to the request message when receiving the request message.
In an exemplary embodiment, after the creating, in the target controller, a version call interface having a target call method according to the upgrade data of the differential manifest further includes:
creating an application service module in the server based on the architecture of the server, wherein the application service module is used for shunting the received request message to corresponding application services so as to ensure the independence of the application programs and the programs among the application programs;
creating a reverse proxy module in the server, for receiving the request message output by the user end and outputting it to the server; the reverse proxy module is also used for receiving the request result output by the server and outputting the request result to the user side.
In a preferred embodiment, referring to fig. 7, traversing the calling method of the version calling interface according to the request message in S3 to obtain a request calling method includes:
s301: and extracting the version number of the request message.
Specifically, whether the URI in the request message has a version number is judged; if so, acquiring a version number in the URI; and if not, acquiring the version number in the HEADER in the request message.
For example, the URI in the request message is: https:// xxxhost/api/V2/account/user/xxx, wherein the version number is V2; since the URI has a version number therein, a version number V2 in the URI is obtained;
if the request message does not have the version number, extracting the HEADER in the request message:
(Host: Host and port in original URL)
:method:GET
Path:/api/account/user/(environmental variables)
Scheme https (hypertext transfer security protocol)
Accept: application/json, text/plane (Accept: MIME type acceptable to browser.)
Accept-encoding: gzip, deflate, br (specifying the type of encoding. its value is usually gzip or compress)
api-version:V2]
Xxxhost is used for representing the host and the port;
GET, used for expressing the operation of the solicited message is a read operation;
path,/api/account/user/is an environment variable, and is used for representing the position of the information to be read by the request message;
https is a protocol of a request message, namely a hypertext transfer security protocol;
application/json, text/plane is the Accept acceptable by the browser at the user end, MIME type acceptable by the browser, and MIME (multipurpose Internet Mail extensions) multipurpose Internet Mail extension type. Is a type of manner in which a file with a certain extension is set to be opened by an application, and when the extension file is accessed, the browser is automatically opened using the specified application. Gzip, deflate, br are the specified coding types. Its value is typically gzip or compress;
thus, the version number of HEADER in the get request message, i.e.: api-version V2.
S302: and traversing the version calling interface to compare the version number with a calling method in the version calling interface, acquiring a calling method with version information consistent with the version number, and setting the calling method as a request calling method.
Specifically, traversing version calling interfaces of the server to extract calling methods in all the version calling interfaces; and comparing the version number with the version information of each calling method in sequence, and identifying the version information consistent with the version number to obtain the calling method matched with the version number.
In a preferred embodiment, referring to fig. 8, the step of obtaining version specifying information and no version information and forming a request result through the request invoking method in S3 includes:
s311: and extracting the version number and the request field of the request message.
In this step, the request message includes a URI (uniform resource identifier) and a HEADER. Specifically, whether the URI in the request message has a version number is judged; if so, acquiring a version number in the URI; if not, acquiring the version number in the HEADER in the request message; and releasing the version number from the URI to obtain a request field, or setting the URI as the request field.
Based on the above example, the version number V2 of the URI in the request message is extracted and the version number is stripped from the URI to obtain the request field: https:// xxxhost/api/account/user/xxx;
if the URI does not have a version number, V2 is the version number, and the URI of the request message is used as the request field.
S312: and acquiring no-version information according to the request field and acquiring version designation information according to the version number and the request field by the request calling method.
Specifically, the non-version information is obtained by:
acquiring no-version information from a server according to the request field and through the request calling method; and if the acquisition fails, acquiring no-version information from the server according to the request field and a default calling rule.
Further, the application program in the server is also provided with a default area for storing default data; the default region is set by the application program when the application program is initially created, and the stored content of the default region does not change along with the upgrading of the application program.
The default scheduling rule includes:
querying a default zone in the server; the default area is set when the application program is initially created, and the stored data of the default area is not changed along with the upgrading of the application program;
and extracting default data matched with the request field from the default area according to the request field, and setting the default data as no version information.
For example, the non-version information required to be acquired by the request field through a request calling method comprises name, age and gender; if the acquisition is successful, the information "Zhang III, 23 and Man" acquired from the server is taken as no-version information; if the acquisition fails, inquiring a default area in the server through a default scheduling rule; assuming that the default data in the default field includes name and age, i.e., "zhang san, 23", it is taken as no version information.
Specifically, the version specifying information is obtained by:
acquiring quasi-specific information from a server through the request calling method and the version number according to the request field;
judging whether the version number is a target version number, wherein the target version number is the target version number of the target calling method;
if so, setting the quasi-specific information as version specific information;
if not, acquiring compatible information from the server through the target calling method according to the request field and the latest version number, summarizing and de-duplicating the quasi-specific information and the compatible information, and acquiring version specific information.
Further, the obtaining of the quasi-specific information from the server by the request calling method according to the request field and the version number includes:
acquiring information from a server through the request calling method according to the request field;
if the acquisition is successful, setting the information as quasi-specified information;
and if the acquisition fails, modifying the version number into the version number of the previous application program of the server, traversing a version calling interface of the server to acquire a calling method matched with the version number, taking the calling method as a request calling method, and acquiring information from the server again through the request calling method according to the request field until the information is successfully acquired from the server and is set as quasi-specified information.
Further, the determining whether the version number is the latest version number includes:
extracting version information of all calling methods in the server, and acquiring a target version number from the version information;
and judging whether the version number is consistent with the latest version number.
Further, the obtaining of the compatibility information from the server according to the request field and the latest version number includes:
acquiring version information consistent with the latest version number from the server, acquiring a calling method corresponding to the version information and a version calling interface where the calling method is located;
and acquiring compatible information from the server through a calling method in the version calling interface according to the request field and the latest version number.
For example, the version designation information obtained from the server by the request field and version number V2 through the request calling method is occupation and income; if the acquisition is successful, setting the information 'worker, 5000 Yuan' acquired from the server as quasi-specified information;
if the acquisition fails, modifying the version number into a version number V2 of a previous application program of the server to be V1, acquiring a calling method matched with V1, and acquiring information from the server again; the version number V2 and the version designation information acquired from the server by the request field are assumed to be 'occupation, working age'; if the acquisition is successful, setting the information 'worker and 10 years' acquired from the server as quasi-specified information;
assuming that the version number of the request message is V1, the version number V1 is successfully obtained, and the target version number in the version information is V2, therefore, the compatible information "worker, 5000 yuan" is again obtained from the server according to the request field and the version number V2; and summarizing and de-duplicating the worker and 10 years serving as the quasi-specified information and the worker and 5000 yuan serving as the compatible information to obtain the version specified information of the worker, 5000 yuan and 10 years, so that the condition that the obtained request result is insufficient due to the fact that the user side is not upgraded in time is avoided.
S313: and summarizing the non-version information and the version designation information to form a request result.
The non-version information and the version designation information are collected and de-duplicated to obtain a request result, so that information redundancy in the request result is eliminated.
For example, for a new version of the user terminal, when a request message output by the new version of the user terminal is received, the information is extracted from the server through the new version calling interface and returned.
For the user side of the old version, when receiving the request message output by the user side of the old version, firstly obtaining no-version information from the server through a new version calling interface according to the request field of the request message, then obtaining the old version calling interface according to the version number of the request message, and obtaining version designation information from the server through the old version calling interface according to the request field and the version number of the request message; and combining the non-version information with the version designation information, removing the duplicate to form a request result, and returning the request result to the user side. Therefore, the problem of incomplete information return caused by the fact that the user side of the old version is not upgraded along with the server is avoided, and comprehensiveness of information return is guaranteed.
The information matched with the request field is acquired from the server only through the version calling system to serve as the non-version information, so that the reliability of information acquisition is guaranteed, and the situation that the information cannot be acquired due to the fact that the version number in the request field is not matched with the version information in the version calling interface is avoided; meanwhile, when no-version information acquisition fails, default data matched with the request field can be extracted and set as no-version information by accessing a default area to extract the default data, so that the success rate and the reliability of information acquisition are ensured.
Example two
Referring to fig. 9, a version upgrade invoking device 1 of the present embodiment includes:
the differential identification module 11 is configured to receive a new version application program sent by a control end, acquire a current application program corresponding to the new version application program, compare the current application program with the new version application program to acquire a differential list, and generate local upgrade information or overall upgrade information according to upgrade data of the differential list; the differential list is a differential packet storing upgrading data, and the upgrading data is code data used for describing the difference between the code of the new version application program and the code of the current application program;
the upgrade management module 12 is configured to create a target calling method in the version calling interface of the current application program according to the local upgrade information and the upgrade data of the differential manifest, or create a target controller according to the overall upgrade information, and create a version calling interface having the target calling method in the target controller according to the upgrade data of the differential manifest;
the calling management module 13 is configured to receive a request message sent by a user side, and traverse a calling method of the version calling interface according to the request message to obtain a request calling method; if the request calling method is the target calling method, obtaining a request result according to the request message and sending the request result to the user side; if the request calling method is not the target calling method, acquiring version designation information and version-free information through the request calling method, forming a request result, and sending the request result to the user side; wherein the version designation information is information obtained based on a version number and a request field of the request message, and the no-version information is information obtained based only on the request field of the request message.
The technical scheme is based on the operation and maintenance technology in the field of pedestal operation and maintenance, the difference of the new version and the old version is obtained by adopting the difference list, and the local upgrade information and the whole upgrade information are generated according to the difference to realize the difference upgrade, so that the change of the version calling interface of the application program in the server is reduced to the maximum extent, the upgrade efficiency is improved, and the operation reliability of the application program is ensured; creating a target calling method in a version calling interface according to local upgrading information, and upgrading an application program to ensure that the version calling interface can simultaneously store calling methods of a new version and an old version so as to process requests sent by user terminals of different versions; the controller is newly built according to the whole upgrading information, the application program is upgraded by the calling method of creating the new version in the version calling interface of the controller, and the controller of the application program of the old version and the version calling interface thereof are reserved, so that the request messages sent by the user terminals of different versions are processed, the corresponding request results are sent to the user terminals according to the request messages, the operation experience of the mobile terminal is optimized, and the process optimization of the server and the user terminals is further realized.
Example three:
in order to achieve the above object, the present invention further provides a computer system, where the computer system includes a plurality of computer devices 5, and components of the version upgrade invoking device 1 in the second embodiment may be distributed in different computer devices, and the computer devices may be smartphones, tablet computers, notebook computers, desktop computers, rack servers, blade servers, tower servers, or rack servers (including independent servers, or a server cluster formed by a plurality of servers) that execute programs, and the like. The computer device of the embodiment at least includes but is not limited to: a memory 51, a processor 52, which may be communicatively coupled to each other via a system bus, as shown in FIG. 10. It should be noted that fig. 10 only shows a computer device with components, but it should be understood that not all of the shown components are required to be implemented, and more or fewer components may be implemented instead.
In this embodiment, the memory 51 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 51 may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 51 may be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device. Of course, the memory 51 may also include both internal and external storage devices of the computer device. In this embodiment, the memory 51 is generally used to store an operating system and various application software installed on the computer device, such as a program code of the version upgrade calling apparatus in the first embodiment. Further, the memory 51 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 52 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 52 is typically used to control the overall operation of the computer device. In this embodiment, the processor 52 is configured to run a program code stored in the memory 51 or process data, for example, run a version upgrade calling apparatus, so as to implement the version upgrade calling method according to the first embodiment.
Example four:
to achieve the above objects, the present invention also provides a computer-readable storage system including a plurality of storage media such as a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor 52, implements corresponding functions. The computer-readable storage medium of this embodiment is used to store a version upgrade invoking device, and when executed by the processor 52, implements the version upgrade invoking method of the first embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
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.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A version upgrade calling method is characterized by comprising the following steps:
receiving a new version application program sent by a control end, acquiring a current application program corresponding to the new version application program, comparing the current application program with the new version application program to acquire a differential list, and generating local upgrade information or overall upgrade information according to upgrade data of the differential list; the differential list is a differential packet storing upgrading data, and the upgrading data is code data used for describing the difference between the code of the new version application program and the code of the current application program;
creating a target calling method in the version calling interface of the current application program according to the local upgrading information and the upgrading data of the differential list, or
Creating a target controller according to the whole upgrading information, and creating a version calling interface with a target calling method in the target controller according to the upgrading data of the differential list;
receiving a request message sent by a user side, and traversing the calling method of the version calling interface according to the request message to obtain a request calling method; if the request calling method is the target calling method, obtaining a request result according to the request message and sending the request result to the user side; if the request calling method is not the target calling method, acquiring version designation information and version-free information through the request calling method, forming a request result, and sending the request result to the user side; wherein the version designation information is information obtained based on a version number and a request field of the request message, and the no-version information is information obtained based only on the request field of the request message.
2. The version upgrade calling method according to claim 1, wherein the comparing the current application program with the new version application program to obtain the differential manifest currently comprises:
extracting a current application program;
and comparing the data in the new version application program with the data in the current application program one by one to obtain a difference list for describing the difference between the new version application program and the current application program.
3. The version upgrade calling method according to claim 1, wherein the generating of the local upgrade information or the entire upgrade information according to the upgrade data of the differential manifest includes:
detecting whether the differential list has upgrading data with the content being replacement information or logic information; if not, generating local upgrading information; if yes, generating integral upgrading information;
the replacement information is data for replacing the whole interface of the application program, and the logic information is data for changing the business logic of the application program.
4. The version upgrade calling method according to claim 1, wherein the creating a target calling method in the version calling interface of the current application program according to the local upgrade information and through the upgrade data of the differential manifest comprises:
identifying a version calling interface for calling the current application program according to the local upgrading information, and copying a calling method for calling the current application program in the version calling interface as a copying method;
extracting upgrading data in the differential list, and modifying the copying method according to the upgrading data to obtain a target calling method for calling a new version application program;
and loading the version number of the new version application program in the target calling method as the version information of the target calling method, and storing the target calling method loaded with the version information into a version calling interface of the current application program.
5. The version upgrade calling method according to claim 1, wherein the creating a version calling interface having a target calling method in the target controller according to the upgrade data of the differential manifest comprises:
creating a calling interface in the target controller;
copying the data of the version calling interface of the current application program and loading the data into the calling interface of the target controller;
modifying a calling method in a calling interface of the target controller according to the upgrading data in the differential list to obtain a target calling method;
and loading the version number of the new version application program in the target calling method as the version information of the target calling method, and converting the calling interface into a version calling interface with the target calling method.
6. The version upgrade call method according to claim 1, wherein traversing the call method of the version call interface according to the request message to obtain a request call method comprises:
extracting the version number of the request message;
and traversing the version calling interface to compare the version number with a calling method in the version calling interface, acquiring a calling method with version information consistent with the version number, and setting the calling method as a request calling method.
7. The version upgrade calling method according to claim 1, wherein the obtaining version specifying information and no version information and forming a request result by the request calling method includes:
extracting the version number and the request field of the request message;
obtaining no-version information according to the request field through the request calling method, and obtaining version designation information according to the version number and the request field;
and summarizing the non-version information and the version designation information to form a request result.
8. A version-up calling apparatus, comprising:
the differential identification module is used for receiving a new version application program sent by the control end, acquiring a current application program corresponding to the new version application program, comparing the current application program with the new version application program to acquire a differential list, and generating local upgrade information or overall upgrade information according to upgrade data of the differential list; the differential list is a differential packet storing upgrading data, and the upgrading data is code data used for describing the difference between the code of the new version application program and the code of the current application program;
the upgrade management module is used for creating a target calling method in a version calling interface of the current application program according to the local upgrade information and the upgrade data of the differential list, or creating a target controller according to the overall upgrade information, and creating a version calling interface with the target calling method in the target controller according to the upgrade data of the differential list;
the calling management module is used for receiving a request message sent by a user side and traversing the calling method of the version calling interface according to the request message to obtain a request calling method; if the request calling method is the target calling method, obtaining a request result according to the request message and sending the request result to the user side; if the request calling method is not the target calling method, acquiring version designation information and version-free information through the request calling method, forming a request result, and sending the request result to the user side; wherein the version designation information is information obtained based on a version number and a request field of the request message, and the no-version information is information obtained based only on the request field of the request message.
9. A computer system comprising a plurality of computer devices, each computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processors of the plurality of computer devices when executing the computer program collectively implement the steps of the version-up call method of any one of claims 1 to 7.
10. A computer-readable storage medium comprising a plurality of storage media, each storage medium having a computer program stored thereon, wherein the computer programs stored in the storage media, when executed by a processor, collectively implement the steps of the version-up call method of any one of claims 1 to 7.
CN201911321639.9A 2019-12-20 2019-12-20 Version upgrade calling method and device, computer system and readable storage medium Active CN111158716B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911321639.9A CN111158716B (en) 2019-12-20 2019-12-20 Version upgrade calling method and device, computer system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911321639.9A CN111158716B (en) 2019-12-20 2019-12-20 Version upgrade calling method and device, computer system and readable storage medium

Publications (2)

Publication Number Publication Date
CN111158716A true CN111158716A (en) 2020-05-15
CN111158716B CN111158716B (en) 2022-05-03

Family

ID=70557449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911321639.9A Active CN111158716B (en) 2019-12-20 2019-12-20 Version upgrade calling method and device, computer system and readable storage medium

Country Status (1)

Country Link
CN (1) CN111158716B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111736869A (en) * 2020-06-19 2020-10-02 浙江大搜车软件技术有限公司 Version updating method of server-side interface and calling method of server-side interface
CN113918209A (en) * 2021-12-16 2022-01-11 深圳市明源云科技有限公司 Method and device for generating upgrade list and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120222025A1 (en) * 2011-02-25 2012-08-30 Red Hat, Inc. Version compatibility determination
CN103699408A (en) * 2013-12-12 2014-04-02 乐视网信息技术(北京)股份有限公司 Software updating method and equipment
CN107948239A (en) * 2017-10-16 2018-04-20 大唐网络有限公司 Version upgrading method and its system based on android system
CN108509211A (en) * 2018-02-07 2018-09-07 深圳壹账通智能科技有限公司 Application program updating method, apparatus, mobile terminal and storage medium
CN109634636A (en) * 2018-12-17 2019-04-16 百度在线网络技术(北京)有限公司 Application processing method, device, equipment and medium
CN110221840A (en) * 2019-06-05 2019-09-10 百度在线网络技术(北京)有限公司 The function realizing method and device of application program, equipment and storage medium
CN110377321A (en) * 2019-07-22 2019-10-25 平安科技(深圳)有限公司 Method, apparatus, terminal and the storage medium of application program updating

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120222025A1 (en) * 2011-02-25 2012-08-30 Red Hat, Inc. Version compatibility determination
CN103699408A (en) * 2013-12-12 2014-04-02 乐视网信息技术(北京)股份有限公司 Software updating method and equipment
CN107948239A (en) * 2017-10-16 2018-04-20 大唐网络有限公司 Version upgrading method and its system based on android system
CN108509211A (en) * 2018-02-07 2018-09-07 深圳壹账通智能科技有限公司 Application program updating method, apparatus, mobile terminal and storage medium
CN109634636A (en) * 2018-12-17 2019-04-16 百度在线网络技术(北京)有限公司 Application processing method, device, equipment and medium
CN110221840A (en) * 2019-06-05 2019-09-10 百度在线网络技术(北京)有限公司 The function realizing method and device of application program, equipment and storage medium
CN110377321A (en) * 2019-07-22 2019-10-25 平安科技(深圳)有限公司 Method, apparatus, terminal and the storage medium of application program updating

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111736869A (en) * 2020-06-19 2020-10-02 浙江大搜车软件技术有限公司 Version updating method of server-side interface and calling method of server-side interface
CN113918209A (en) * 2021-12-16 2022-01-11 深圳市明源云科技有限公司 Method and device for generating upgrade list and readable storage medium
CN113918209B (en) * 2021-12-16 2022-04-15 深圳市明源云科技有限公司 Method and device for generating upgrade list and readable storage medium

Also Published As

Publication number Publication date
CN111158716B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
US10516526B2 (en) Data transmitting method, server and client
CN110602056B (en) Service parameter transmission method and device
CN114500690B (en) Interface data processing method and device, electronic equipment and storage medium
CN111158716B (en) Version upgrade calling method and device, computer system and readable storage medium
CN113190778A (en) Business data pushing method, system, computer equipment and computer storage medium
CN104301875A (en) Short message processing method and device
CN115208951B (en) Request processing method, request processing device, electronic equipment and computer readable storage medium
CN113330419A (en) Equipment application installation method and device
CN110188038B (en) Parameter verification method and device and verification framework
WO2022245294A2 (en) Method and apparatus for managing accounts, and server and storage medium thereof
CN112052141B (en) Data fragment verification method and device, computer equipment and readable storage medium
CN112579958A (en) Webpage conversion method and device, computer equipment and readable storage medium
CN112052256A (en) Multi-version request returning method and device, computer equipment and readable storage medium
CN114374686A (en) File processing method, device and equipment based on browser
CN114978902A (en) Information processing method, apparatus, device, storage medium, and program product
CN114925044A (en) Data synchronization method, device and equipment based on cloud storage and storage medium
CN113986289A (en) Firmware upgrading method and device for edge computing gateway
CN114489754A (en) Configurable service management method and device
CN110022310B (en) Authorization method and device based on cloud computing open network operating system
CN114090055A (en) Application program updating method and device, terminal and storage medium
CN111585897A (en) Request route management method, system, computer system and readable storage medium
CN111752559A (en) Front-end and back-end separation system, method, device and storage medium
CN113989011B (en) Market data processing method and device, computer equipment and readable storage medium
CN113055412B (en) Sample collection method, apparatus, system, computer device, and readable storage medium
CN112527780B (en) Redis cluster creation and management method, system, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant