CN110874249B - Method for increasing starting speed of client and storage medium - Google Patents

Method for increasing starting speed of client and storage medium Download PDF

Info

Publication number
CN110874249B
CN110874249B CN201910963068.2A CN201910963068A CN110874249B CN 110874249 B CN110874249 B CN 110874249B CN 201910963068 A CN201910963068 A CN 201910963068A CN 110874249 B CN110874249 B CN 110874249B
Authority
CN
China
Prior art keywords
version number
interface
client
global
global version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910963068.2A
Other languages
Chinese (zh)
Other versions
CN110874249A (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.)
Fujian Tianquan Educational Technology Ltd
Original Assignee
Fujian Tianquan Educational Technology 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 Fujian Tianquan Educational Technology Ltd filed Critical Fujian Tianquan Educational Technology Ltd
Priority to CN201910963068.2A priority Critical patent/CN110874249B/en
Publication of CN110874249A publication Critical patent/CN110874249A/en
Application granted granted Critical
Publication of CN110874249B publication Critical patent/CN110874249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44536Selecting among different versions

Landscapes

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

Abstract

The invention provides a method and a storage medium for improving the starting speed of a client, wherein the method comprises the following steps: after calling the global version number interface, the client transmits a local global version number stored in the client to the server, wherein the global version number is associated with the independent version number corresponding to each interface; the server side judges whether the local global version number is consistent with the latest global version number of the server side; if not, returning the latest global version number and the latest independent version number corresponding to each interface to the client; and if the judgment result is consistent with the judgment result, returning the result without interface judgment. The invention not only saves unnecessary interface calling time, but also reduces the request amount of the server; the starting efficiency of the client can be remarkably improved, and therefore user experience is optimized.

Description

Method for increasing starting speed of client and storage medium
Technical Field
The invention relates to the field of interaction between a server and a client, in particular to a method and a storage medium for improving the starting speed of the client.
Background
In the interaction scene of the APP client and the server, a lot of information can be interacted. In the process of starting the APP each time, an interface call for initializing configuration information needs to be performed to acquire the configuration information, and whether version upgrade needs to be performed or not needs to be determined through the interface call, or other interface calls are used to perform service judgment or perform data acquisition. However, in general, these configuration information will not change every time, so the client will cache one copy locally; similarly, the upgrade information may not be changed frequently, and may only need to be upgraded occasionally. However, these information are acquired or compared each time the APP is started.
In the existing system, the solution to the above problem is: in the configuration information obtaining interface, a version number is newly added, the version number of the client side brought by the configuration information obtaining interface is called each time, and if the version numbers are consistent, information does not need to be returned; and if the information is inconsistent, returning the latest information of the server. In this way, the judgment and the flow rate are reduced. Similarly, the upgrade determination interface and other similar interfaces also operate as described above. However, there are version numbers of multiple interface calls for the client, and it is still necessary to call these interfaces one by one to determine each time the client is started.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a method and a storage medium for improving the starting speed of a client are provided, and user experience is optimized.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
the method for improving the starting speed of the client, after the client calls a global version number interface, the execution comprises the following steps:
the method comprises the steps of transmitting a local global version number stored in a client to a server, wherein the global version number is associated with an independent version number corresponding to each interface;
the server side judges whether the local global version number is consistent with the latest global version number of the server side;
if not, returning the latest global version number and the latest independent version number corresponding to each interface to the client;
and if the judgment result is consistent with the judgment result, returning the result without interface judgment.
The invention provides another technical scheme as follows:
a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the steps of the method of increasing the client startup speed as described above.
The invention has the beneficial effects that: the method introduces the concept of a global version number, wherein the global version number corresponds to the independent version number of each interface; the independent version number corresponds to the version of the interface. The global version number can be used to identify whether the version of any interface of the client has changed. Whether the client needs to call the port to update the version can be quickly confirmed by comparing the local global version number of the client with the global version number of the server, and if the global version number is not changed, the client can be informed to skip the interface calling stage and be directly started; therefore, the starting speed can be obviously increased, and meanwhile, the flow is saved.
Drawings
FIG. 1 is a flowchart illustrating a method for increasing the client booting speed according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for increasing a client booting speed according to an embodiment of the invention.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
The most key concept of the invention is as follows: and introducing a global version number concept associated with all independent version numbers for confirming whether the version of the interface is changed or not so as to skip the interface calling phase and quickly start when no change is direct.
The technical terms related to the invention are explained as follows:
Figure BDA0002229588330000021
Figure BDA0002229588330000031
referring to fig. 1, the present invention provides a method for increasing the starting speed of a client, wherein after the client calls a global version number interface, the execution includes:
the method comprises the steps of transmitting a local global version number stored in a client to a server, wherein the global version number is associated with an independent version number corresponding to each interface;
the server side judges whether the local global version number is consistent with the latest global version number of the server side;
if not, returning the latest global version number and the latest independent version number corresponding to each interface to the client;
and if the judgment result is consistent with the judgment result, returning the result without interface judgment.
From the above description, the beneficial effects of the present invention are: whether the interface call is needed to update the version can be quickly confirmed according to the interface return result, and the client can be directly started without the need; if necessary, calls are made only for interfaces that need to be updated. The method and the device for starting the client obviously improve the starting efficiency of the client, reduce the request amount of the server and optimize the user experience.
Further, the client finishes calling the global version number interface, receives the latest global version number and the latest independent version number corresponding to each interface, and then, the method further includes:
the client compares whether the local independent version number of each interface is consistent with the latest independent version number one by one;
if not, calling the corresponding interface;
if the interfaces are consistent, the next interface is continuously compared.
From the above description, even if it is confirmed that there is an interface to be version-updated, the interface to be called can be quickly locked by changing the independent version number without calling one by one, thereby not only saving unnecessary interface calling time, but also reducing the request amount of the server.
Further, the client finishes calling the global version number interface, receives a result that interface judgment is not needed, and then further comprises:
and the client controls to skip the interface judgment step and enters a starting page.
Therefore, the client can realize efficient starting according to the return result of the global version interface.
Further, the global version number is associated with the independent version number corresponding to each interface, specifically:
and if the version corresponding to any interface of the client on the server side is changed, the global version number corresponding to the client on the server side and the independent version number of the interface with the changed version are changed.
According to the description, whether the client interface needs to be updated or not and the specific interface needing to be updated are quickly and accurately determined through the association between the global version number and the independent version number and the association between the independent version number and the interface version, and the interface needing to be updated can be skipped to be called without being upgraded.
The invention provides another technical scheme as follows:
a computer-readable storage medium, on which a computer program is stored which, when executed by a processor, enables:
after the client calls the global version number interface, the execution comprises the following steps:
the method comprises the steps of transmitting a local global version number stored in a client to a server, wherein the global version number is associated with an independent version number corresponding to each interface;
the server side judges whether the local global version number is consistent with the latest global version number of the server side;
if not, returning the latest global version number and the latest independent version number corresponding to each interface to the client;
and if the judgment result is consistent with the judgment result, returning the result without interface judgment.
Further, the client finishes calling the global version number interface, receives the latest global version number and the latest independent version number corresponding to each interface, and then, the method further includes:
the client compares whether the local independent version number of each interface is consistent with the latest independent version number one by one;
if not, calling the corresponding interface;
if the interfaces are consistent, the next interface is continuously compared.
Further, the client finishes calling the global version number interface, receives a result that the interface judgment is not needed, and then further comprises:
and the client controls to skip the interface judgment step and enters a starting page.
Further, the global version number is associated with the independent version number corresponding to each interface, specifically:
and if the version corresponding to any interface of the client on the server side is changed, the global version number corresponding to the client on the server side and the independent version number of the interface with the changed version are changed.
Referring to fig. 2, a first embodiment of the present invention is:
the embodiment adopts a concept of global version number, and provides a method for calling a global version number interface to quickly start a client.
When the client is started each time, the interface is required to be called, and the following steps are determined according to the interface return result: when the global version number changes, the step of determining the interface to be upgraded and upgrading is executed; when the global version number is not changed, the calling steps of obtaining the configuration information interface, upgrading the interface and the like in the prior art are directly skipped, and the local memory is directly used for starting, so that the starting time is reduced and the flow is saved.
The method of the embodiment comprises the following steps:
firstly, a global version number corresponding to a client and independent version numbers corresponding to interfaces are respectively preset, the global version number is associated with all the independent version numbers, and if any independent version number changes, the global version number also changes.
Then, when the client is started each time, the step of calling the global version number interface is executed. After the global version number interface is called, the execution comprises the following steps:
transmitting the global version number in the local cache of the client to the server;
the server side obtains the latest global version number corresponding to the client side;
the server side judges whether the local global version number of the client side is consistent with the latest global version number stored by the server side;
if the interfaces on the server side are consistent with the previous request of the client side, the interfaces on the server side are proved to be consistent with the previous request of the client side, and no change occurs, namely, all the interfaces on the client side do not need to be updated. Therefore, in this embodiment, the interface returns the result that the client does not need to perform interface judgment, so that the client directly skips the step of calling and judging each interface one by one in the prior art according to the returned information, and directly starts to enter the APP page.
And if not, returning the latest global version number of the server and the latest independent version number corresponding to each interface to the client.
After the client receives the return of the global version number interface call, and the returned content is the latest global version number and the latest independent version number corresponding to each interface, the execution comprises the following steps:
the client compares whether the local independent version number of each interface is consistent with the latest independent version number corresponding to the local independent version number one by one;
if the independent version numbers are inconsistent, the interface corresponding to the inconsistent independent version number is called, the step of acquiring the interface configuration information and upgrading in the prior art is executed, and the interface is upgraded.
If the interfaces are consistent, the next interface is continuously compared.
For example, if the independent version number corresponding to the interface for obtaining configuration information is updated at the server side, and the independent version number of the interface for upgrading is not changed, the client side only calls the interface for obtaining configuration information, and the interface for upgrading does not need to call.
When the background maintains the relevant information, if the configuration information is modified, the independent version number and the global version number of the configuration information interface need to be changed, so as to maintain the global version number.
The method can reduce the request amount of the server and improve the starting efficiency of the APP.
The second embodiment of the invention is as follows:
corresponding to the first embodiment, the present embodiment provides a specific application scenario, which includes:
an APP start will generally call at least 2 interfaces, one for obtaining configuration information, one for upgrading the interface, and one for possibly calling: an interface for a list of regions is obtained.
The data of each interface generally has no change, so each interface actually has an independent version number. The interface internal judgment rules are generally the following: the client transmits a version number, the inside of the server interface is compared, and if the version number of the client is smaller than that of the server, the interface returns all data to the client; if the data is equal to the local cache data, returning a mark that the information does not need to be acquired, and directly using the local cache data by the client.
In the prior art, the above logic is referred to for the interface for obtaining configuration information, whether to upgrade the interface, and the interface for obtaining the area list. When the data of the server side changes, for example, the server side is newly added with a region. The separate version number of the get region list interface is automatically incremented by 1. The next time the client transmits the independent version number of the local list acquisition interface again, the version number is smaller than that of the server. Therefore, the server will return all the area lists. And the client caches the region list and the version number returned by the server again. And if the client accesses the server again next time and the client and the server correspondingly acquire the independent version numbers of the region list interfaces to be consistent, returning information again is not needed.
Therefore, each time the APP is started, the 3 interfaces need to be called for judgment, and the 3 interfaces need to be called for judgment even if information does not need to be acquired. The present embodiment provides a concept of a global version number interface corresponding to the first embodiment. The server and the client continue to have independent version numbers of each interface, and only when any one independent version number changes, the information of the global version number needs to be synchronously updated. Therefore, when the client is started each time, the client only needs to transmit the local global version number, the server judges the local global version number, and if the global version numbers of the client and the server are consistent, other independent interfaces are not needed to be called, so that the calling times are reduced. If the global version numbers on the two sides are not consistent, comparison needs to be carried out on each independent version number to determine the interface with the changed version.
For example, version numbers corresponding to the 3 independent interfaces currently exist, namely, a configuration information version number is obtained, an upgrade version number is obtained, and a region list version number is obtained. When one independent version number changes, the information of the interface corresponding to the independent version number is acquired, and the calling acquisition of each interface is not performed when the independent version number is started every time, so that the flow is reduced, and the efficiency is improved.
EXAMPLE III
Corresponding to the first embodiment or the second embodiment, this embodiment provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the steps included in the method for increasing the client booting speed according to any one of the first embodiment and the second embodiment. The detailed steps are not repeated here, and refer to the descriptions of the first embodiment and the second embodiment in detail.
In summary, the method and the storage medium for increasing the client starting speed provided by the invention not only save unnecessary interface calling time, but also reduce the request amount of the server; the starting efficiency of the client can be remarkably improved, and therefore user experience is optimized.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (4)

1. The method for improving the starting speed of the client is characterized in that after the client calls a global version number interface, the execution comprises the following steps:
the method comprises the steps of transmitting a local global version number stored in a client to a server, wherein the global version number is associated with an independent version number corresponding to each interface;
the server side judges whether the local global version number is consistent with the latest global version number of the server side;
if not, returning the latest global version number and the latest independent version number corresponding to each interface to the client;
if the two are consistent, returning a result without interface judgment;
the client terminal finishes calling the global version number interface, receives the latest global version number and the latest independent version number corresponding to each interface, and then the method further comprises the following steps:
the client compares whether the local independent version number of each interface is consistent with the latest independent version number one by one;
if not, calling the corresponding interface;
if the interfaces are consistent, the next interface is continuously compared.
2. The method for increasing the client startup speed according to claim 1, wherein the client finishes calling the global version number interface and receives a result that the interface judgment is not needed, and then further comprising:
and the client controls to skip the interface judgment step and enters a starting page.
3. The method for increasing the client startup speed according to claim 1, wherein the global version number is associated with an independent version number corresponding to each interface, specifically:
and if the version corresponding to any interface of the client on the server side is changed, the global version number corresponding to the client on the server side and the independent version number of the interface with the changed version are changed.
4. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, is adapted to carry out the steps of the method for increasing client startup speed according to any one of claims 1 to 3.
CN201910963068.2A 2019-10-11 2019-10-11 Method for increasing starting speed of client and storage medium Active CN110874249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910963068.2A CN110874249B (en) 2019-10-11 2019-10-11 Method for increasing starting speed of client and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910963068.2A CN110874249B (en) 2019-10-11 2019-10-11 Method for increasing starting speed of client and storage medium

Publications (2)

Publication Number Publication Date
CN110874249A CN110874249A (en) 2020-03-10
CN110874249B true CN110874249B (en) 2022-07-05

Family

ID=69717803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910963068.2A Active CN110874249B (en) 2019-10-11 2019-10-11 Method for increasing starting speed of client and storage medium

Country Status (1)

Country Link
CN (1) CN110874249B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933547A (en) * 2015-12-29 2017-07-07 阿里巴巴集团控股有限公司 Method, device and more new system that global information is obtained and processed
CN107357557A (en) * 2016-05-09 2017-11-17 阿里巴巴集团控股有限公司 A kind of information updating method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8627292B2 (en) * 2009-02-13 2014-01-07 Microsoft Corporation STM with global version overflow handling

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933547A (en) * 2015-12-29 2017-07-07 阿里巴巴集团控股有限公司 Method, device and more new system that global information is obtained and processed
CN107357557A (en) * 2016-05-09 2017-11-17 阿里巴巴集团控股有限公司 A kind of information updating method and device

Also Published As

Publication number Publication date
CN110874249A (en) 2020-03-10

Similar Documents

Publication Publication Date Title
CN108595207B (en) Gray scale publishing method, rule engine, system, terminal and storage medium
US10712915B2 (en) Information presentation using a client on a terminal
US20120210317A1 (en) Method and apparatus for updating data card
CN108874427B (en) Updating progress obtaining method and device and readable storage medium
CN1991794A (en) Method and system for maintaining data coherency in multiprocessor system
CN110851165A (en) Method and device for automatically acquiring BIOS drive and upgrading, computer equipment and storage medium
CN115373877A (en) Control method and device for ensuring consistency of shared cache by heterogeneous multi-core processor
CN113064625A (en) Method, device, equipment and medium for upgrading BIOS outside band
US20220039001A1 (en) Network search method and apparatus, device and storage medium
CN108459868A (en) A kind of software start-up method, device, terminal and storage medium
CN111125170A (en) Cross-service data acquisition method and device of micro-service and micro-service equipment
CN110874249B (en) Method for increasing starting speed of client and storage medium
CN106293790B (en) application program upgrading method and device based on Firefox operating system
CN113778581A (en) Page loading method, electronic equipment and storage medium
CN111736883A (en) Computer management system hot upgrading method and device based on data delay upgrading
CN110806888A (en) Application program upgrading method and device and electronic equipment
CN111125156A (en) Data query method and device and electronic equipment
CN109254797B (en) Mobile terminal, starting control method thereof and storage medium
CN114117280A (en) Page static resource using method and device, terminal equipment and storage medium
CN113138785A (en) Application program updating method and device
US20030126135A1 (en) Remote resource management of local devices
CN111736869A (en) Version updating method of server-side interface and calling method of server-side interface
KR20150139241A (en) Electronic control unit upgrade system and method by wireless network
CN117891628B (en) Cloud management platform long-time task execution result tracking method and system
US20240168783A1 (en) Application control method and system, and electronic device

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