CN112540783B - Client upgrading method and device, storage medium and electronic equipment - Google Patents

Client upgrading method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112540783B
CN112540783B CN202011511318.8A CN202011511318A CN112540783B CN 112540783 B CN112540783 B CN 112540783B CN 202011511318 A CN202011511318 A CN 202011511318A CN 112540783 B CN112540783 B CN 112540783B
Authority
CN
China
Prior art keywords
client
information
update
server
update information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011511318.8A
Other languages
Chinese (zh)
Other versions
CN112540783A (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.)
Aisino Software Technology Co ltd
Original Assignee
Aisino Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Software Technology Co ltd filed Critical Aisino Software Technology Co ltd
Priority to CN202011511318.8A priority Critical patent/CN112540783B/en
Publication of CN112540783A publication Critical patent/CN112540783A/en
Application granted granted Critical
Publication of CN112540783B publication Critical patent/CN112540783B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure relates to a method, a device, a storage medium and an electronic device for upgrading a client, which belong to the field of information technology, wherein the method is applied to a server, and the server and the client are connected through mqtt protocol lengths, and the method comprises: inquiring version configuration information in a database, and caching the version configuration information in a Redis cache; receiving an update request sent by the client, and sending corresponding target update information in the version configuration information according to the update request, wherein the target update information is used for updating the version of the client, and the update request is sent to the server according to local information of the client when the client monitors that a topic identifier in a long connection channel is changed based on mqtt protocol long connection; the version configuration information comprises one or more of middle-platform client side update information, unified update information and test point update information, wherein the test point update information comprises update information corresponding to different areas.

Description

Client upgrading method and device, storage medium and electronic equipment
Technical Field
The disclosure relates to the field of information technology, and in particular relates to a client upgrading method, a device, a storage medium and electronic equipment.
Background
For a long time, whether a client/server is used or a browser/server structure is used in technology architecture selection is controversial, in the controversy, the maintainability of a program of a c/s structure is poor, the arrangement is difficult, the inconvenient maintenance cost is high, which is a quite important factor, many enterprise users abandon the use of the c/s for the reason, but specific services still need the c/s structure to realize the functions of the service, the deployment and automatic upgrading of the client are needed to be solved, the deployment is simple, only downloading and installation are needed, but the difficulty is that how to quickly and effectively upgrade the client becomes the primary problem when a new version is released.
Disclosure of Invention
In order to solve the technical problems in the related art, the present disclosure provides a method, an apparatus, a storage medium, and an electronic device for upgrading a client.
A first aspect of the present disclosure provides a method for upgrading a client, where the method is applied to a server, and the server is connected with the client through mqtt protocol long, and the method includes:
Inquiring version configuration information in a database, and caching the version configuration information in a Redis cache;
receiving an update request sent by the client, and sending corresponding target update information in the version configuration information according to the update request, wherein the target update information is used for updating the version of the client by the client, and the update request is sent to the server according to local information of the client when the client monitors that a topic identifier in a long connection channel is changed based on mqtt protocol long connection;
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
Optionally, the issuing, according to the update request, the corresponding target update information in the version configuration information includes:
Inquiring whether the update information of the middle client exists in the Redis cache under the condition that the update request is the update request of the middle client;
Under the condition that the update information of the middle client exists in the Redis cache, the update information of the middle client is sent to the client;
and under the condition that the update information of the middle client is not existed in the Redis cache, inquiring version information of local information corresponding to the client in the database, and caching the version information into the Redis cache as the update information of the middle client.
Optionally, the issuing, according to the update request, the corresponding target update information in the version configuration information includes:
Inquiring whether unified update information exists in the Redis cache under the condition that the update request is a unified update request;
Under the condition that unified update information exists in the Redis cache, the unified update information is sent to the client;
and under the condition that the uniform updating information does not exist in the Redis cache, caching the updating information configured as the default version in the database into the Redis as the uniform updating information and sending the uniform updating information to the client.
Optionally, the issuing, according to the update request, the corresponding target update information in the version configuration information includes:
Under the condition that the update request is a trial update request, determining a target upgrade version according to the region code and/or tax number carried in the trial update request;
And sending the update information corresponding to the target upgrade version in the trial update information to the client.
A second aspect of the present disclosure provides a method for upgrading a client, where the method is applied to a client, and the client is connected to a server through mqtt protocol long, and the method includes:
monitoring whether the server receives new version configuration information or not in real time based on mqtt protocol long connection, wherein when a topic identifier in a long connection channel between the client and the server is changed, the server is indicated to receive the new version configuration information;
Under the condition that the server receives new version configuration information, an update request is sent to the server according to the local information of the client, wherein the update request is used for requesting the server to send corresponding update information in the version configuration information to the client;
Receiving the update information sent by the server, and updating the client version according to the update information;
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
Optionally, the sending an update request to the server according to the local information of the client includes:
Sending a middle client update request to the server under the condition that the local information of the client characterizes the client as the middle client;
under the condition that the local information of the client characterizes the client as a unified client without distinguishing test points, a unified update request is sent to the server;
and sending a trial update request to the server, wherein the trial update request comprises a region code and/or tax number, under the condition that the local information of the client characterizes the client as the client for distinguishing the trial points.
A third aspect of the present disclosure provides a client upgrade apparatus as part of a server connected with a client through mqtt protocols, the apparatus comprising:
the query module is used for querying version configuration information in the database and caching the version configuration information in a Redis cache;
The updating module is used for receiving an updating request sent by the client, issuing corresponding target updating information in the version configuration information according to the updating request, wherein the target updating information is used for updating the version of the client by the client, and the updating request is sent to the server according to the local information of the client when the client monitors that the topic identifier in the long connection channel is changed based on the mqtt protocol long connection;
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
A fourth aspect of the present disclosure provides a client upgrade apparatus as part of a client connected with a server through mqtt protocol long, the apparatus comprising:
A monitoring module, configured to monitor, in real time, whether the server receives new version configuration information based on the mqtt protocol long connection, where when a topic identifier in a long connection channel between the client and the server is changed, the server indicates that the server receives the new version configuration information;
The request module is used for sending an update request to the server according to the local information of the client under the condition that the server receives new version configuration information, wherein the update request is used for requesting the server to send corresponding update information in the version configuration information to the client;
the updating module is used for receiving the updating information sent by the server and updating the version of the client according to the updating information;
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
A fifth aspect of the present disclosure provides a computer readable storage medium having stored thereon a computer program which when executed by a processor provides the steps of any one of the methods provided in the first or second aspects of the present disclosure.
A fifth aspect of the present disclosure provides an electronic device, comprising:
A memory having a computer program stored thereon;
A processor for executing the computer program in the memory to implement the steps of any one of the methods provided in the first or second aspects of the present disclosure.
Through the technical scheme, the instant communication between the client and the server is maintained by adopting mqtt protocol long connection, version update is determined by timely monitoring the update of the topic identifier, so that the client sends an update request according to local information of the client, the server can issue update information according to different requests and different request parameters and different service requirements, the client can perform instant update according to different service requirements, the configuration is more flexible by Redis technology, and more complex requirements can be met.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
FIG. 1 is a flow chart illustrating a method of client upgrade according to an exemplary embodiment.
FIG. 2 is another flow chart illustrating a method of client upgrade according to an exemplary embodiment.
FIG. 3 is a block diagram illustrating a client upgrade apparatus according to an example embodiment.
FIG. 4 is another block diagram illustrating a client upgrade apparatus according to an example embodiment.
Fig. 5 is a block diagram of an electronic device, according to an example embodiment.
Fig. 6 is another block diagram of an electronic device, according to an example embodiment.
Detailed Description
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
In order to enable a person skilled in the art to quickly understand the technical solutions provided by the embodiments of the present disclosure as compared with the prior art, the application scenario of the present disclosure in specific implementation is first described below. Because different client users have different service demands, users can install clients of different versions according to the service demands, for example, some tax administration institutions of middle business need all functions of the software, namely, can install clients of versions comprising all functions, and some tax administration branches of city and county only need part of the functions of the software, namely, can only install clients of versions comprising the part of the functions. Further, in order to avoid unexpected harm caused by the loopholes of the client version which is updated by the client, trial updating can be performed on the clients in different areas based on the division of the region or tax number, and further comprehensive updating is performed when the version is determined to have no security loopholes.
Fig. 1 is a flow chart illustrating a method of client upgrade applied to a server connected with a client through mqtt (Message Queuing Telemetry Transport, message queue telemetry transport protocol) protocol long, as shown in fig. 1, comprising the steps of:
S101, inquiring version configuration information in a database, and caching the version configuration information in a Redis (Remote Dictionary Server, remote dictionary service) cache.
Wherein the database may be a MySQL relational database.
S102, receiving an update request sent by the client, and issuing corresponding target update information in the version configuration information according to the update request, wherein the target update information is used for updating the version of the client by the client.
And the update request is sent to the server according to the local information of the client when the client monitors that the topic identifier in the long connection channel is changed based on the mqtt protocol long connection.
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
In implementation, the server may determine what kind of client is the client sending the request according to the request mode of the update request and whether the request is with a parameter, for example, when the update request is a get request, it may determine that the update request is a middle client update request, when the update request is a post request without a parameter, it may determine that the update request is a unified update request, and when the update request is a post request with a parameter, it may determine that the update request is a trial update request. The present disclosure is not limited with respect to how the server determines what the client sending the request is based on the request pattern of the update request and whether or not to bring the parameters.
In the embodiment of the disclosure, the mqtt protocol long connection is adopted to keep the instant communication between the client and the server, so that the version update can be timely monitored, the client can send the update request according to the local information of the client, the server can send the update information according to different requests and different request parameters and aiming at different clients and different service requirements, the client can perform instant update according to different service requirements, the configuration is more flexible through the Redis technology, and more complex requirements can be met.
In some optional embodiments, the issuing, according to the update request, the corresponding target update information in the version configuration information includes:
Inquiring whether the update information of the middle client exists in the Redis cache under the condition that the update request is the update request of the middle client;
Under the condition that the update information of the middle client exists in the Redis cache, the update information of the middle client is sent to the client;
And under the condition that the update information of the middle-stage client is not existed in the Redis cache, inquiring version information of local information corresponding to the client in a database, and caching the version information into the Redis cache as the update information of the middle-stage client.
By adopting the scheme, the server can respond to the update request of the middle client to return the update information so as to update the client, if the related update information is not cached in the Redis cache, the version of the current client is used as the latest version, the update information of the version is queried from the database and cached in the Redis cache, and thus, other clients can return the update information more quickly when calling the interface.
In other optional embodiments, the issuing, according to the update request, the corresponding target update information in the version configuration information includes:
Inquiring whether unified update information exists in the Redis cache under the condition that the update request is a unified update request;
Under the condition that unified update information exists in the Redis cache, the unified update information is sent to the client;
And under the condition that unified updating information does not exist in the Redis cache, sending the middle client updating information configured as a default version or trial updating information configured as a default version in the Redis cache to the client.
In the implementation, the method can determine whether unified update information exists by inquiring whether information with key of clientUpdate: defaultRtn in redis exists or not, and when the unified update information does not exist, the method inquires information with field name of defaultVersion in a database and with value of 1, namely the update information configured as a default version, and takes the update information as the unified update information. By adopting the scheme, when the update request is that the client without distinguishing the test points needs to be updated, the update information is returned so that the client is updated, the configuration is more flexible through the Redis technology, and the query efficiency is improved.
In other optional embodiments, the issuing, according to the update request, the corresponding target update information in the version configuration information includes:
Under the condition that the update request is a trial update request, determining a target upgrade version according to the region code and/or tax number carried in the trial update request;
And sending the update information corresponding to the target upgrade version in the trial update information to the client.
By adopting the scheme, the updating information can be sent according to the parameters uploaded by the client and the requirements of the client, so that the clients of different test point areas can be updated according to the preset information.
FIG. 2 illustrates another flow chart of a client upgrade method applied to a client connected with a server through mqtt protocol long, as shown in FIG. 2, according to an example embodiment, the method includes:
And S201, monitoring whether the server receives new version configuration information or not in real time based on the mqtt protocol length connection.
When the topic identifier in the long connection channel between the client and the server is changed, the server is indicated to receive new version configuration information;
and S202, sending an update request to the server according to the local information of the client under the condition that the server is monitored to receive the new version configuration information.
The update request is used for requesting the server to send corresponding update information in the version configuration information to the client.
S203, receiving the update information sent by the server, and updating the client version according to the update information.
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
In the embodiment of the disclosure, the mqtt protocol long connection is adopted to keep the instant communication between the client and the server, so that the version update can be timely monitored, the client can send the update request according to the local information of the client, the server can send the update information according to different requests and different request parameters and aiming at different clients and different service requirements, the client can perform instant update according to different service requirements, the configuration is more flexible through the Redis technology, and more complex requirements can be met.
Optionally, the sending an update request to the server according to the local information of the client includes:
Sending a middle client update request to the server under the condition that the local information of the client characterizes the client as the middle client;
under the condition that the local information of the client characterizes the client as a unified client without distinguishing test points, a unified update request is sent to the server;
and sending a trial update request to the server, wherein the trial update request comprises a region code and/or tax number, under the condition that the local information of the client characterizes the client as the client for distinguishing the trial points.
By adopting the scheme, the client can send different update requests according to different client information to acquire different update information, so that the client can update correspondingly according to different service requirements.
Fig. 3 is a block diagram illustrating a client upgrade apparatus 30 according to an exemplary embodiment, the client upgrade apparatus 30 may be part of a server, which is connected with a client through mqtt protocol long, as shown in fig. 3, the apparatus 30 includes:
and the query module 31 is configured to query version configuration information in the database and cache the version configuration information in the Redis cache.
And the updating module 32 is configured to receive an updating request sent by the client, send target updating information corresponding to the version configuration information according to the updating request, where the target updating information is used for updating the version of the client by the client, and the updating request is sent to the server according to local information of the client when the client monitors that a topic identifier in a long connection channel is changed based on the mqtt protocol long connection.
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
Optionally, the update module 32 includes:
And the first inquiry submodule is used for inquiring whether the update information of the middle client exists in the Redis cache under the condition that the update request is the update request of the middle client.
And the first sending sub-module is used for sending the update information of the middle client to the client under the condition that the update information of the middle client exists in the Redis cache.
And the cache sub-module is used for inquiring version information of local information corresponding to the client in the database under the condition that the update information of the middle client does not exist in the Redis cache, and caching the version information into the Redis cache as the update information of the middle client.
Optionally, the update module 32 includes:
and the second inquiry submodule is used for inquiring whether unified update information exists in the Redis cache or not under the condition that the update request is a unified update request.
And the second sending submodule is used for sending the unified updating information to the client under the condition that the unified updating information exists in the Redis cache.
And the second sending submodule is used for caching the update information configured as the default version in the database into the Redis as the unified update information and sending the unified update information to the client under the condition that the unified update information does not exist in the Redis cache.
Optionally, the update module 32 includes:
And the determining submodule is used for determining a target upgrading version according to the region code and/or tax number carried in the trial update request under the condition that the update request is the trial update request.
And the third sending sub-module is used for sending the updating information corresponding to the target updating version in the trial updating information to the client.
In the embodiment of the disclosure, the mqtt protocol long connection is adopted to keep the instant communication between the client and the server, so that the version update can be timely monitored, the client can send the update request according to the local information of the client, the server can send the update information according to different requests and different request parameters and aiming at different clients and different service requirements, the client can perform instant update according to different service requirements, the configuration is more flexible through the Redis technology, and more complex requirements can be met.
Fig. 4 is a block diagram illustrating a client upgrade apparatus 40, the apparatus 40 may be part of a client, the client and server being connected by a mqtt protocol long, the apparatus 40 comprising:
And the monitoring module 41 is configured to monitor, in real time, whether the server receives new version configuration information based on the mqtt protocol long connection, where when a topic identifier in a long connection channel between the client and the server is changed, the server indicates that the server receives the new version configuration information.
And the request module 42 is configured to send an update request to the server according to the local information of the client when the server is monitored to receive new version configuration information, where the update request is used to request the server to send corresponding update information in the version configuration information to the client.
And the updating module 43 is configured to receive the update information sent by the server, and update the client version according to the update information.
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
Optionally, the request module 42 includes:
And the first request submodule is used for sending a middle client updating request to the server under the condition that the local information of the client characterizes the client as the middle client.
And the second request sub-module is used for sending a unified update request to the server under the condition that the local information of the client characterizes the client as a unified client without distinguishing test points.
And the third request sub-module is used for sending a test point update request to the server under the condition that the local information of the client characterizes the client as a client for distinguishing test points, wherein the test point update request comprises a region code and/or a tax number.
In the embodiment of the disclosure, the mqtt protocol long connection is adopted to keep the instant communication between the client and the server, so that the version update can be timely monitored, the client can send the update request according to the local information of the client, the server can send the update information according to different requests and different request parameters and aiming at different clients and different service requirements, the client can perform instant update according to different service requirements, the configuration is more flexible through the Redis technology, and more complex requirements can be met.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 5 illustrates a block diagram of an electronic device 50, according to an exemplary embodiment. As shown in fig. 5, the electronic device 50 may include: a processor 51, a memory 52. The electronic device 50 may also include one or more of a multimedia component 53, an input/output (I/O) interface 54, and a communication component 55.
The processor 51 is configured to control the overall operation of the electronic device 50 to perform all or part of the steps in the client upgrade method described above. The memory 52 is used to store various types of data to support operation at the electronic device 50, which may include, for example, instructions for any application or method operating on the electronic device 50, as well as application-related data, such as client version information, client files, tax numbers, and the like. The Memory 52 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 53 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 52 or transmitted through the communication component 55. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 54 provides an interface between the processor 51 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 55 is used for wired or wireless communication between the electronic device 50 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, near Field Communication (NFC) for short, 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or one or a combination of more of them, is not limited herein. The corresponding communication assembly 55 may thus comprise: wi-Fi module, bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic device 50 may be implemented by one or more Application-specific integrated circuits (ASIC), digital signal Processor (DIGITAL SIGNAL Processor, DSP), digital signal processing device (DIGITAL SIGNAL Processing Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field Programmable GATE ARRAY, FPGA), controller, microcontroller, microprocessor, or other electronic components for performing the above-described client upgrade method.
In another exemplary embodiment, a computer readable storage medium is also provided, comprising program instructions which, when executed by a processor, implement the steps of the client upgrade method described above. For example, the computer readable storage medium may be the memory 52 described above including program instructions executable by the processor 51 of the electronic device 50 to perform the client upgrade method described above.
Fig. 6 is a block diagram of an electronic device 60, according to an example embodiment. For example, the electronic device 60 may be provided as a server. Referring to fig. 6, the electronic device 60 comprises a processor 61, which may be one or more in number, and a memory 62 for storing a computer program executable by the processor 61. The computer program stored in memory 62 may include one or more modules each corresponding to a set of instructions. Further, the processor 61 may be configured to execute the computer program to perform the client upgrade method described above.
In addition, the electronic device 60 may further include a power supply component 63 and a communication component 64, the power supply component 63 may be configured to perform power management of the electronic device 60, and the communication component 64 may be configured to enable communication of the electronic device 60, e.g., wired or wireless communication. In addition, the electronic device 60 may also include an input/output (I/O) interface 65. The electronic device 60 may operate based on an operating system stored in the memory 62, such as Windows Server TM,Mac OS XTM,UnixTM,LinuxTM or the like.
In another exemplary embodiment, a computer readable storage medium is also provided, comprising program instructions which, when executed by a processor, implement the steps of the client upgrade method described above. For example, the computer readable storage medium may be the memory 62 described above including program instructions executable by the processor 61 of the electronic device 60 to perform the client upgrade method described above.
In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described client upgrade method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the embodiments described above, and various simple modifications may be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure, and all the simple modifications belong to the protection scope of the present disclosure.
In addition, the specific features described in the foregoing embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, the present disclosure does not further describe various possible combinations.
Moreover, any combination between the various embodiments of the present disclosure is possible as long as it does not depart from the spirit of the present disclosure, which should also be construed as the disclosure of the present disclosure.

Claims (10)

1. A method for upgrading a client, the method being applied to a server, the server and the client being connected by mqtt protocol long, the method comprising:
Inquiring version configuration information in a database, and caching the version configuration information in a Redis cache;
Receiving an update request sent by the client, and issuing corresponding target update information in the version configuration information according to the update request, wherein the target update information is used for updating a version of the client, the update request is sent to the server according to local information of the client when the client monitors that a topic identifier in a long connection channel changes based on mqtt protocol long connection, and the local information of the client characterizes that the client is a middle client, the client is a unified client without a distinguishing test point or the client is a client with a distinguishing test point;
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
2. The method according to claim 1, wherein the issuing the corresponding target update information in the version configuration information according to the update request includes:
Inquiring whether the update information of the middle client exists in the Redis cache under the condition that the update request is the update request of the middle client;
Under the condition that the update information of the middle client exists in the Redis cache, the update information of the middle client is sent to the client;
and under the condition that the update information of the middle client is not existed in the Redis cache, inquiring version information of local information corresponding to the client in the database, and caching the version information into the Redis cache as the update information of the middle client.
3. The method according to claim 1, wherein the issuing the corresponding target update information in the version configuration information according to the update request includes:
Inquiring whether unified update information exists in the Redis cache under the condition that the update request is a unified update request;
Under the condition that unified update information exists in the Redis cache, the unified update information is sent to the client;
and under the condition that the uniform updating information does not exist in the Redis cache, caching the updating information configured as the default version in the database into the Redis as the uniform updating information and sending the uniform updating information to the client.
4. The method according to claim 1, wherein the issuing the corresponding target update information in the version configuration information according to the update request includes:
Under the condition that the update request is a trial update request, determining a target upgrade version according to the region code and/or tax number carried in the trial update request;
And sending the update information corresponding to the target upgrade version in the trial update information to the client.
5. A method for upgrading a client, the method being applied to the client, the client and a server being connected by mqtt protocol long, the method comprising:
monitoring whether the server receives new version configuration information or not in real time based on mqtt protocol long connection, wherein when a topic identifier in a long connection channel between the client and the server is changed, the server is indicated to receive the new version configuration information;
Under the condition that the server receives new version configuration information, an update request is sent to the server according to the local information of the client, wherein the update request is used for requesting the server to send the corresponding update information in the version configuration information to the client, and the local information of the client characterizes that the client is a middle client, the client is a unified client without a test point or the client is a client with a test point;
Receiving the update information sent by the server, and updating the client version according to the update information;
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
6. The method of claim 5, wherein the sending an update request to the server based on the local information of the client comprises:
Sending a middle client update request to the server under the condition that the local information of the client characterizes the client as the middle client;
under the condition that the local information of the client characterizes the client as a unified client without distinguishing test points, a unified update request is sent to the server;
and sending a trial update request to the server, wherein the trial update request comprises a region code and/or tax number, under the condition that the local information of the client characterizes the client as the client for distinguishing the trial points.
7. A client upgrade apparatus, said apparatus being part of a server, said server being connected to a client via a mqtt protocol length, said apparatus comprising:
the query module is used for querying version configuration information in the database and caching the version configuration information in a Redis cache;
The updating module is used for receiving an updating request sent by the client, issuing corresponding target updating information in the version configuration information according to the updating request, wherein the target updating information is used for updating the version of the client, the updating request is sent to the server according to local information of the client when the client monitors that a topic identifier in a long connection channel changes based on mqtt protocol long connection, and the local information of the client characterizes the client as a middle client, a unified client without distinguishing test points or a client with distinguishing test points;
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
8. A client upgrade apparatus, the apparatus being part of a client, the client and server being connected by a mqtt protocol long connection, the apparatus comprising:
A monitoring module, configured to monitor, in real time, whether the server receives new version configuration information based on the mqtt protocol long connection, where when a topic identifier in a long connection channel between the client and the server is changed, the server indicates that the server receives the new version configuration information;
The request module is used for sending an update request to the server according to the local information of the client under the condition that the server receives new version configuration information is monitored, wherein the update request is used for requesting the server to send the corresponding update information in the version configuration information to the client, and the local information of the client characterizes that the client is a middle client, the client is a unified client without distinguishing test points or the client is a client with distinguishing test points;
the updating module is used for receiving the updating information sent by the server and updating the version of the client according to the updating information;
The version configuration information comprises one or more of middle client side update information, unified update information and test point update information, and the test point update information comprises update information corresponding to different areas.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1-6.
10. An electronic device, comprising:
A memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-6.
CN202011511318.8A 2020-12-18 2020-12-18 Client upgrading method and device, storage medium and electronic equipment Active CN112540783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011511318.8A CN112540783B (en) 2020-12-18 2020-12-18 Client upgrading method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011511318.8A CN112540783B (en) 2020-12-18 2020-12-18 Client upgrading method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112540783A CN112540783A (en) 2021-03-23
CN112540783B true CN112540783B (en) 2024-05-24

Family

ID=75019270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011511318.8A Active CN112540783B (en) 2020-12-18 2020-12-18 Client upgrading method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112540783B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914329A (en) * 2021-09-28 2023-04-04 中国联合网络通信集团有限公司 Information pushing method and device, electronic equipment and readable storage medium
CN114025207A (en) * 2021-12-07 2022-02-08 贵阳朗玛视讯科技有限公司 Method and device for starting APK plug-in based on IPTV system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868731A (en) * 2012-08-27 2013-01-09 济南大学 Method and device for software online updating and downloading acceleration
CN106406943A (en) * 2016-09-06 2017-02-15 厦门蓝斯通信股份有限公司 Customized upgrading method and system for clients of different versions
CN106790629A (en) * 2017-01-03 2017-05-31 努比亚技术有限公司 Data synchronization unit and its realize the method for data syn-chronization, client access system
KR101818977B1 (en) * 2017-06-27 2018-01-16 주식회사 인터엠 Method of providing batch process of software upgrade for pluralities of heterogeneous broadcasting equipments
CN107608701A (en) * 2017-10-20 2018-01-19 深圳市道通科技股份有限公司 A kind of method and apparatus of firmware updating
CN109495532A (en) * 2017-09-13 2019-03-19 北京京东尚科信息技术有限公司 Client update method and device
CN110908683A (en) * 2019-10-22 2020-03-24 深圳市广和通无线通信软件有限公司 Software system upgrading method and device of hardware module, storage medium and terminal
CN111147585A (en) * 2019-12-27 2020-05-12 南京甄视智能科技有限公司 Equipment upgrading method, device, storage medium and system
CN111143383A (en) * 2019-12-20 2020-05-12 五八有限公司 Data updating method and device, electronic equipment and storage medium
CN111556488A (en) * 2020-04-13 2020-08-18 易视腾科技股份有限公司 OTA (over the air) upgrading method and system for terminal equipment
CN111949302A (en) * 2020-09-18 2020-11-17 苏州浪潮智能科技有限公司 Method, system and equipment for updating instantaneity of industrial computer management system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868731A (en) * 2012-08-27 2013-01-09 济南大学 Method and device for software online updating and downloading acceleration
CN106406943A (en) * 2016-09-06 2017-02-15 厦门蓝斯通信股份有限公司 Customized upgrading method and system for clients of different versions
CN106790629A (en) * 2017-01-03 2017-05-31 努比亚技术有限公司 Data synchronization unit and its realize the method for data syn-chronization, client access system
KR101818977B1 (en) * 2017-06-27 2018-01-16 주식회사 인터엠 Method of providing batch process of software upgrade for pluralities of heterogeneous broadcasting equipments
CN109495532A (en) * 2017-09-13 2019-03-19 北京京东尚科信息技术有限公司 Client update method and device
CN107608701A (en) * 2017-10-20 2018-01-19 深圳市道通科技股份有限公司 A kind of method and apparatus of firmware updating
CN110908683A (en) * 2019-10-22 2020-03-24 深圳市广和通无线通信软件有限公司 Software system upgrading method and device of hardware module, storage medium and terminal
CN111143383A (en) * 2019-12-20 2020-05-12 五八有限公司 Data updating method and device, electronic equipment and storage medium
CN111147585A (en) * 2019-12-27 2020-05-12 南京甄视智能科技有限公司 Equipment upgrading method, device, storage medium and system
CN111556488A (en) * 2020-04-13 2020-08-18 易视腾科技股份有限公司 OTA (over the air) upgrading method and system for terminal equipment
CN111949302A (en) * 2020-09-18 2020-11-17 苏州浪潮智能科技有限公司 Method, system and equipment for updating instantaneity of industrial computer management system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张程.《分布式系统架构:技术栈详解与快速进阶》.北京:机械工业出版社,2020,第204-206页. *
曹鹏飞,等.云环境下实时消息推送服务构建研究.《计算机技术与发展》.2020,204-208. *

Also Published As

Publication number Publication date
CN112540783A (en) 2021-03-23

Similar Documents

Publication Publication Date Title
CN106897086B (en) Method, device and system for upgrading robot operating system
US7191180B2 (en) Data access
CN112540783B (en) Client upgrading method and device, storage medium and electronic equipment
US20040230965A1 (en) Mobile handset network that facilitates interaction between a generic intelligent responsive agent and a service broker server
US20060253548A1 (en) Method and system for hosting and executing a component application
KR20100137323A (en) Client, brokerage sever and method for providing cloud storage
JP2006517694A (en) A system that automatically handles components on the device
US20060259523A1 (en) System and method of synchronization of internal data cache with wireless device application data repositories
EP1872256B1 (en) System and method of waste management
CN110741617A (en) Resource updating method and device, computer equipment and storage medium
JP2006511872A (en) System for registry-based automated installation and component handling on devices
US20090037493A1 (en) Method and device for updating an object with copyright attribute
CN114500630A (en) Message pushing method, device, system, storage medium and electronic equipment
US7933880B2 (en) System and method of application persistence
KR100578029B1 (en) Interface architecture of subscriber information management system for mobile network system
CN116151903B (en) Service processing method and device based on sales promotion management system
KR100456720B1 (en) Control Apparatus And Method For Configuration Management In EMS System
JP7051601B2 (en) Management device, control method of management device, and program
JP2003216458A (en) Updating method for data bank
EP1909466B1 (en) Access control system and method for wireless application provisioning
KR20090018564A (en) Method for transmitting/receiving customized content and terminal thereof
KR100716171B1 (en) Apparatus and method for pooling the object of distributed system
KR101141651B1 (en) Mobile Terminal and Method for Providing Driver File and System for Providing Driver File
CN114077619A (en) Data query method and device, electronic equipment and storage medium
KR100981006B1 (en) Method, apparatus, and system for sensing change in content of terminal look and feel customization

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