CN112559001A - Method and device for updating application - Google Patents

Method and device for updating application Download PDF

Info

Publication number
CN112559001A
CN112559001A CN201910918423.4A CN201910918423A CN112559001A CN 112559001 A CN112559001 A CN 112559001A CN 201910918423 A CN201910918423 A CN 201910918423A CN 112559001 A CN112559001 A CN 112559001A
Authority
CN
China
Prior art keywords
application
name
update code
client
code
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
CN201910918423.4A
Other languages
Chinese (zh)
Other versions
CN112559001B (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.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN201910918423.4A priority Critical patent/CN112559001B/en
Publication of CN112559001A publication Critical patent/CN112559001A/en
Application granted granted Critical
Publication of CN112559001B publication Critical patent/CN112559001B/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

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)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for updating an application, and relates to the technical field of computers. One embodiment of the method comprises: receiving an update code and a name of an application to which the update code points; acquiring target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code; sending the update code and the name of the application pointed by the update code to a target client according to the target client information; wherein the update code is used for updating the application pointed by the update code. The embodiment improves the updating efficiency and the updating automation degree.

Description

Method and device for updating application
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for updating an application.
Background
At present, applications are generally deployed in a distributed manner, that is, the applications are respectively deployed on a plurality of clients, if the applications are to be updated, codes need to be manually uploaded to each client, and the clients update the applications deployed on the clients with the codes.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
because manual uploading is needed, the problems of low updating efficiency and low automation degree exist. This problem is particularly acute in the case of a large number of applications that need to be updated.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for updating an application, which can improve an updating efficiency and an updating automation degree.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of updating an application.
The method for updating the application of the embodiment of the invention comprises the following steps:
receiving an update code and a name of an application to which the update code points;
acquiring target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code;
sending the update code and the name of the application pointed by the update code to a target client according to the target client information;
wherein the update code is used for updating the application pointed by the update code.
In one embodiment, prior to receiving the update code and the name of the application to which the update code points, comprising:
receiving the client information sent by at least one client and the name of an application deployed on the client;
and matching and storing the client information and the name of the application deployed on the client into a local cache.
In one embodiment, obtaining the target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code includes:
and if the name of the application stored in the local cache comprises the name of the application pointed by the updating code, the client information matched with and stored in the name of the application pointed by the updating code is taken as the target client information.
In one embodiment, the method is applied to a server;
before receiving an update code and a name of an application to which the update code points, comprising:
receiving the client information sent by at least one client and the name of an application deployed on the client;
and matching and storing the identification of the server, the client information and the name of the application deployed on the client in a database.
In one embodiment, obtaining the target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code includes:
and if the name of the application stored in the database comprises the name of the application pointed by the update code, matching the name of the application pointed by the update code with the identifier of the server and storing the client information as target client information.
In one embodiment, the update code and the name of the application to which the update code points are sent by a management cluster;
the mode of acquiring the update code and the name of the application pointed by the update code by the management cluster comprises manual input or code library uploading.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for updating an application.
The device for updating the application of the embodiment of the invention comprises:
a receiving unit configured to receive an update code and a name of an application to which the update code points;
the processing unit is used for acquiring target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code;
a sending unit, configured to send the update code and the name of the application to which the update code points to a target client according to the target client information; wherein the update code is used for updating the application pointed by the update code.
In one embodiment, the receiving unit is to:
before receiving an update code and a name of an application pointed by the update code, receiving client information sent by at least one client and a name of an application deployed on the client;
and matching and storing the client information and the name of the application deployed on the client into a local cache.
In one embodiment, the processing unit is to:
and if the name of the application stored in the local cache comprises the name of the application pointed by the updating code, the client information matched with and stored in the name of the application pointed by the updating code is taken as the target client information.
In one embodiment, the method is applied to a server;
the receiving unit is used for:
before receiving an update code and a name of an application pointed by the update code, receiving client information sent by at least one client and a name of an application deployed on the client;
and matching and storing the identification of the server, the client information and the name of the application deployed on the client in a database.
In one embodiment, the processing unit is to:
and if the name of the application stored in the database comprises the name of the application pointed by the update code, matching the name of the application pointed by the update code with the identifier of the server and storing the client information as target client information.
In one embodiment, the update code and the name of the application to which the update code points are sent by a management cluster;
the mode of acquiring the update code and the name of the application pointed by the update code by the management cluster comprises manual input or code library uploading.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for updating the application provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, which when executed by a processor implements the method for updating an application provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: receiving an update code and a name of an application to which the update code points; acquiring target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code; and sending the update code and the name of the application pointed by the update code to the target client according to the target client information, so that the target client updates the application pointed by the update code by using the update code. The codes are manually uploaded to the corresponding clients and are automatically uploaded to the corresponding clients, so that the updating efficiency is improved, the updating automation degree is improved, and the workload of research and development personnel is reduced.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a method of updating an application according to an embodiment of the invention;
FIG. 2 is an application scenario of a method of updating an application according to an embodiment of the present invention;
FIG. 3 is an interaction diagram of a method of updating an application according to another embodiment of the invention;
FIG. 4 is a schematic diagram of the main elements of an apparatus for updating an application, according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The time consumed by the existing updating application is 2 minutes to 3 minutes at a high speed and is tens of minutes at a low speed. In a microservice architecture or a cluster architecture, updating applications takes longer. If the application is on-line, the application is not allowed to be updated for a long time, and the long time for updating the application is easy to cause customer dissatisfaction. In addition, the code is manually uploaded to the client, and the requirement on the authority of the client is high.
In order to solve the problems in the prior art, an embodiment of the present invention provides a method for updating an application, as shown in fig. 1, the method includes:
step S101, receiving an update code and a name of an application pointed by the update code.
And step S102, acquiring target client information matched with the application name pointed by the update code according to the application name pointed by the update code.
Step S103, sending the update code and the name of the application pointed by the update code to a target client according to the target client information; wherein the update code is used for updating the application pointed by the update code.
In this embodiment, in specific implementation, as shown in fig. 2, a Service cluster (i.e., the Service cluster in fig. 2) includes a plurality of servers, and each server includes an Agent Service module (Agent Service) and a user management Service module (Manager Service). The management cluster (i.e., the Manager cluster in fig. 2) sends the obtained update code and the name of the application to which the update code points to each server, which may be a Manager Service of each server. The embodiment of the invention is applied to each server.
It should be noted that, as for the Client in the embodiment of the present invention, the Client may be a Server in a Client/Server architecture and a Browser/Server architecture, as compared with the Server in the service cluster.
In the embodiment, the manual uploading is converted into the automatic uploading, so that the updating efficiency is improved, the automation degree is improved, the workload of research and development personnel is reduced, the time consumed by updating the application is reduced, and the permission requirement on the client is reduced.
In the embodiment of the present invention, before step S101, the method includes:
receiving the client information sent by at least one client and the name of an application deployed on the client; and matching and storing the client information and the name of the application deployed on the client into a local cache.
It should be noted that, as shown in fig. 2, this step may be performed by Agent Service of each server.
In specific implementation, a sending end sends a request to load balancing; wherein the request includes client information and a name of any one of the respective applications deployed on the client.
Load balancing adopts a load balancing algorithm to distribute the request to one server in a service cluster, for example, the server a; the service cluster comprises a plurality of service terminals. The load balancing algorithm is mainly divided into static and dynamic types, the static load balancing algorithm distributes tasks with fixed probability, and state information of a server side is not considered, such as a round robin algorithm, a weighted round robin algorithm and the like; the dynamic load balancing algorithm determines the distribution of tasks according to the real-time load state information of the server, such as a minimum connection method, a weighted minimum connection method and the like.
And the server a receives the request, and stores the client information included in the request and any application in various applications deployed on the client into a local cache of the server a in a matching manner.
The client information may include the IP of the client or the name of the client, etc.
Step S102 may include:
and if the name of the application stored in the local cache comprises the name of the application pointed by the updating code, the client information matched with and stored in the name of the application pointed by the updating code is taken as the target client information.
In this embodiment, in specific implementation, for each server in a service cluster, the server receives an update code sent by a management cluster and a name of an application to which the update code points; if the application name stored in the local cache of the server side comprises the name of the application pointed by the update code, the server side takes the client information which is matched with the name of the application pointed by the update code and stored as target client information; and the server side sends the update code and the name of the application pointed by the update code to the target client side according to the target client side information. And the target client updates the application pointed by the update code by using the update code.
In the embodiment, before receiving the update code and the name of the application pointed by the update code, the client information sent by at least one client and the name of the application deployed on the client are received and matched and stored in the local cache. After receiving the update code and the name of the application pointed by the update code, if the name of the application stored in the local cache comprises the name of the application pointed by the update code, the client information matched with the name of the application pointed by the update code is taken as the target client information. Therefore, the final receiving party, namely the target client, of the update codes and the names of the applications pointed by the update codes is directly determined, the update codes and the names of the applications pointed by the update codes are sent to the target client, manual uploading is converted into automatic uploading, the update efficiency is further improved, the update automation degree is further improved, and the workload of research and development personnel is further reduced.
In the embodiment of the present invention, the method, applied to the server, before step S101, includes:
receiving the client information sent by at least one client and the name of an application deployed on the client; and matching and storing the identification of the server, the client information and the name of the application deployed on the client in a database.
In specific implementation, a sending end sends a request to load balancing; wherein the request includes client information and a name of any one of the respective applications deployed on the client.
Load balancing adopts a load balancing algorithm to distribute the request to one server in a service cluster, for example, the server a; the service cluster comprises a plurality of service terminals. The load balancing algorithm is mainly divided into static and dynamic types, the static load balancing algorithm distributes tasks with fixed probability, and state information of a server side is not considered, such as a round robin algorithm, a weighted round robin algorithm and the like; the dynamic load balancing algorithm determines the distribution of tasks according to the real-time load state information of the server, such as a minimum connection method, a weighted minimum connection method and the like.
And the server a receives the request and sends the identifier of the server a, the client information included in the request and the name of any application in various applications deployed on the client to a database.
And the database receives the identification of the server a, the client information included in the request and the name of any one of the applications deployed on the client, and matches and stores the client information and the name.
For each client, the number of applications deployed on the client may be multiple. Thus, for each application deployed on the client, there is an identification of the server stored in the database that matches the name of the application deployed on the client. In this way, automatic uploading can be achieved.
The identification of the server may include the address of the server (i.e., IP) or the name of the server, etc.
Step S102 may include:
and if the name of the application stored in the database comprises the name of the application pointed by the update code, matching the name of the application pointed by the update code with the identifier of the server and storing the client information as target client information.
In this embodiment, in specific implementation, as shown in fig. 2, for each server in a service cluster, the server receives an update code sent by a management cluster and a name of an application to which the update code points; and the server sends a query request to a database, wherein the query request carries the identifier of the server and the name of the application pointed by the update code.
The database receives the query request and queries whether to store the name of the application pointed by the update code; if so, taking the client information which is matched with the identifier of the server and the name of the application pointed by the update code and stored as target client information, and sending the target client information to the server; if not, sending the prompt information of the failure query to the server.
And if the server receives the target client information, the server sends the update code and the name of the application pointed by the update code to the target client according to the target client information, and the target client updates the application pointed by the update code by using the update code. If the server receives the prompt message indicating that the query fails, it may be that the load balancing does not allocate the client deploying the application pointed by the update code to the server.
In the embodiment, the application is applied to the server, before receiving the update code and the name of the application pointed by the update code, the client information sent by at least one client and the name of the application deployed on the client are received, and the identification of the server, the client information and the name of the application deployed on the client are matched and stored in the database. After receiving the update code and the name of the application pointed by the update code, if the name of the application stored in the database comprises the name of the application pointed by the update code, matching the name of the application pointed by the update code and the identifier of the server with the stored client information to serve as target client information. Therefore, the final receiving party, namely the target client, of the update codes and the names of the applications pointed by the update codes is directly determined, the update codes and the names of the applications pointed by the update codes are sent to the target client, manual uploading is converted into automatic uploading, the update efficiency is further improved, the update automation degree is further improved, and the workload of research and development personnel is further reduced.
In the embodiment of the invention, the update code comprises a class name, a method name and a code block; the client updating the application pointed by the update code comprises the following steps:
finding out codes which are the same as the class name and the method name from codes of the application pointed by the updating codes, and replacing the codes which are the same as the class name and the method name with the code blocks.
It should be noted that a class is a collection of objects having common attributes and behaviors, and a class includes attributes and methods (also called behaviors), and in java, only methods in the class can be changed, so that code replacement can be performed by a class name, a method name, and a code block. In addition, in Java, a code enclosed using { }isreferred to as a code block.
As shown in fig. 2, the following describes, by way of a specific example, a process of updating, by a client, an application pointed to by an update code, where the process includes:
the monitoring thread of the client side initiates an http (hypertext transfer protocol) long round training request to the server side at regular time, for example, one round training for 60 s. If an update code (the update code comprises a class name, a method name and a code block) and an application name pointed by the update code are received from an Agent Service of the server according to an http long round training request in a round training period, the client immediately updates the application; and the Agent Service of the server side obtains the update code and the name of the application pointed by the update code from the Manager Service of the server side. And if the monitoring thread of the client does not receive the update code and the name of the application pointed by the update code according to the http long round training request in the round training period, initiating the next round of long round training request after the 60-second request is overtime.
A listening thread of the client is connected (namely Attach) to a thread of an application pointed by the updating code deployed on the client, for example, thread 1, and thread 1 loads an agent (agent is a tool for loading code in java) program in a jar package; thread 1 uses an agent program to find the codes of the applications pointed by the updated codes, and finds out the codes which are the same as the class names and the method names from the codes of the applications pointed by the updated codes; replacing the code with the same class name and method name by the thread 1 through java assist in the agent program by the code block; and the thread 1 reloads the class to which the code block belongs through the translation, and the application update is completed.
It should be noted that, by updating the codes including the class name, the method name, and the code block, the client finds out the codes that are the same as the class name and the method name from the codes of the application to which the update codes point, and replaces the codes that are the same as the class name and the method name with the code block. Therefore, the codes needing to be updated are found out from the original codes of the applications by utilizing the class names and the method names, the codes needing to be updated are replaced by the code blocks, the applications are automatically updated, the updating efficiency is further improved, and the updating automation degree is further improved.
In the embodiment of the present invention, the update code and the name of the application to which the update code points are sent by a management cluster;
the mode of acquiring the update code and the name of the application pointed by the update code by the management cluster comprises manual input or code library uploading.
In this embodiment, in specific implementation, the update code and the name of the application to which the update code points are automatically uploaded to the management cluster through a git (git is an open-source distributed version control system) code library or a svn (svn is an open-source version control system, which is fully called subversion) code library. The management cluster can be one server or a distributed system consisting of a plurality of servers.
In addition, the research and development personnel input the update code and the name of the application pointed by the update code into the management cluster through a World Wide Web (Web). And the updating codes and the names of the applications pointed by the updating codes are subjected to persistence processing to obtain persistent data, so that the development personnel can conveniently perform version management, and the applications are updated by utilizing the persistent data under the condition that the service cluster is down, and the high availability of the service cluster is ensured.
The following describes the update code and the application to which the update code points with a specific example: if the research and development personnel determine that the original code of the application has a problem, the original code of the application is modified, compiled and packaged respectively to obtain an updated code, and the application with the problem in the original code is the application pointed by the updated code. The update code may be in binary format.
In this embodiment, the name of the application pointed to by the update code and the update code is sent by the management cluster; the way for the management cluster to obtain the update code and the name of the application to which the update code points includes manual input or code library upload. The research and development personnel are only responsible for compiling the update codes, the operation of the research and development personnel is simple, the research and development personnel are relieved from the work of uploading the update codes to the corresponding clients, and the workload of the research and development personnel is further reduced.
Modifying existing code to implement new functionality is a frequent matter for developers to do during the development of a schedule. For example, a bug (bug for short) occurs in the code, and the code needs to be modified; for another example, the key node does not log, and the code needs to be modified, so that logging for the key node is realized, and the log information of the key node is used for debugging and analyzing; for another example, when the environment test is performed, it is found that the interface has a problem, which results in a blocked flow, and the interface with the problem needs to be simulated, and the code for environment test is modified, and the modified code for environment test calls the simulated interface to complete the environment test. The method provided by the embodiment of the invention can be adopted to realize the update of the application pointed by the modified code by using the modified code. Specifically, the application may be an application program or application software or the like, for example, a kyoto application program.
In order to solve the problems in the prior art, another embodiment of the present invention provides a method for updating an application.
In this embodiment, the applications deployed on client a include application 1 and application 2;
the applications deployed on the client b include application 2 and application 3;
the applications deployed on the client c include application 1, application 2, and application 3.
The service cluster comprises a first service end and a second service end, wherein the information of the client a and the name of the application 1 are matched and stored in a local cache of the first service end, and the information of the client c and the name of the application 1 are also matched and stored in the local cache of the first service end.
The client a information and the name of the application 2, the client b information and the name of the application 3, the client c information and the name of the application 2, and the client c information and the name of the application 3 are matched and stored in a local cache of the server II.
The research and development personnel determine that the original code of the application 1 has a problem, and modify the original code of the application 1 to obtain an updated code, wherein the application pointed by the updated code is the application 1.
As shown in fig. 3, the method includes:
step S301, the management cluster receives the update code and the name of the application 1 input by the research and development personnel, and respectively sends the update code and the name of the application 1 to the first server and the second server.
Step S302, the first server receives the update code and the name of the application 1.
Step S303, the name of the application 1 is stored in the local cache of the first server, and the first server acquires the information of the client a which is stored in a matching way with the name of the application 1 and the information of the client c which is stored in a matching way with the name of the application 1 from the local cache of the first server.
And step S304, the server side sends the update code and the name of the application 1 to the client side a according to the information of the client side a, and sends the update code and the name of the application 1 to the client side c according to the information of the client side c.
Step S305, the client a receives the update code and the name of the application 1, and the client a updates the application 1 deployed on the client a with the update code.
Step S306, the client c receives the update code and the name of the application 1, and the client c updates the application 1 deployed on the client c with the update code.
It should be understood that step S305 and step S306 may be performed simultaneously, or sequentially.
Step S307, the second server receives the update code and the name of the application 1.
It should be understood that step S307 and step S302 may be performed simultaneously, or sequentially.
In step S308, the local cache of the second server does not store the name of the application 1, and thus the second server does not process the name.
In order to solve the problems in the prior art, an embodiment of the present invention provides an apparatus for updating an application, as shown in fig. 4, the apparatus includes:
a receiving unit 401, configured to receive an update code and a name of an application pointed to by the update code.
A processing unit 402, configured to obtain, according to the name of the application pointed by the update code, target client information matched with the name of the application pointed by the update code.
A sending unit 403, configured to send the update code and the name of the application pointed by the update code to a target client according to the target client information; wherein the update code is used for updating the application pointed by the update code.
In this embodiment of the present invention, the receiving unit 401 is configured to:
before receiving an update code and a name of an application pointed by the update code, receiving client information sent by at least one client and a name of an application deployed on the client;
and matching and storing the client information and the name of the application deployed on the client into a local cache.
In this embodiment of the present invention, the processing unit 402 is configured to:
and if the name of the application stored in the local cache comprises the name of the application pointed by the updating code, the client information matched with and stored in the name of the application pointed by the updating code is taken as the target client information.
In the embodiment of the invention, the method is applied to the server side;
the receiving unit 401 is configured to:
before receiving an update code and a name of an application pointed by the update code, receiving client information sent by at least one client and a name of an application deployed on the client;
and matching and storing the identification of the server, the client information and the name of the application deployed on the client in a database.
In this embodiment of the present invention, the processing unit 402 is configured to:
and if the name of the application stored in the database comprises the name of the application pointed by the update code, matching the name of the application pointed by the update code with the identifier of the server and storing the client information as target client information.
In the embodiment of the present invention, the update code and the name of the application to which the update code points are sent by a management cluster;
the mode of acquiring the update code and the name of the application pointed by the update code by the management cluster comprises manual input or code library uploading.
It should be understood that the functions performed by the components of the apparatus for updating an application according to the embodiments of the present invention have been described in detail in the method for updating an application according to the above embodiments, and are not described herein again.
Fig. 5 illustrates an exemplary system architecture 500 of an apparatus for updating an application or a method for updating an application to which embodiments of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 501, 502, 503. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for updating an application provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the apparatus for updating an application is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, a processing unit, and a transmitting unit. Where the names of these elements do not in some cases constitute a limitation of the element itself, for example, a receiving element may also be described as an "element receiving the update code and the name of the application to which the update code points".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving an update code and a name of an application to which the update code points; acquiring target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code; sending the update code and the name of the application pointed by the update code to a target client according to the target client information; wherein the update code is used for updating the application pointed by the update code.
According to the technical scheme of the embodiment of the invention, the updating code and the name of the application pointed by the updating code are received; acquiring target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code; and sending the update code and the name of the application pointed by the update code to the target client according to the target client information, so that the target client updates the application pointed by the update code by using the update code. The codes are manually uploaded to the corresponding clients and are automatically uploaded to the corresponding clients, so that the updating efficiency is improved, the updating automation degree is improved, and the workload of research and development personnel is reduced.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of updating an application, comprising:
receiving an update code and a name of an application to which the update code points;
acquiring target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code;
sending the update code and the name of the application pointed by the update code to a target client according to the target client information;
wherein the update code is used for updating the application pointed by the update code.
2. The method of claim 1, prior to receiving update code and a name of an application to which the update code points, comprising:
receiving the client information sent by at least one client and the name of an application deployed on the client;
and matching and storing the client information and the name of the application deployed on the client into a local cache.
3. The method of claim 2, wherein obtaining the target client information matching the name of the application pointed to by the update code according to the name of the application pointed to by the update code comprises:
and if the name of the application stored in the local cache comprises the name of the application pointed by the updating code, the client information matched with and stored in the name of the application pointed by the updating code is taken as the target client information.
4. The method of claim 1, applied to a server;
before receiving an update code and a name of an application to which the update code points, comprising:
receiving the client information sent by at least one client and the name of an application deployed on the client;
and matching and storing the identification of the server, the client information and the name of the application deployed on the client in a database.
5. The method of claim 4, wherein obtaining the target client information matching the name of the application pointed to by the update code according to the name of the application pointed to by the update code comprises:
and if the name of the application stored in the database comprises the name of the application pointed by the update code, matching the name of the application pointed by the update code with the identifier of the server and storing the client information as target client information.
6. The method of claim 1, wherein the update code and the name of the application to which the update code points are sent by a management cluster;
the mode of acquiring the update code and the name of the application pointed by the update code by the management cluster comprises manual input or code library uploading.
7. An apparatus for updating an application, comprising:
a receiving unit configured to receive an update code and a name of an application to which the update code points;
the processing unit is used for acquiring target client information matched with the name of the application pointed by the update code according to the name of the application pointed by the update code;
a sending unit, configured to send the update code and the name of the application to which the update code points to a target client according to the target client information; wherein the update code is used for updating the application pointed by the update code.
8. The apparatus of claim 7, wherein the receiving unit is configured to:
before receiving an update code and a name of an application pointed by the update code, receiving client information sent by at least one client and a name of an application deployed on the client;
and matching and storing the client information and the name of the application deployed on the client into a local cache.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201910918423.4A 2019-09-26 2019-09-26 Method and device for updating application Active CN112559001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910918423.4A CN112559001B (en) 2019-09-26 2019-09-26 Method and device for updating application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910918423.4A CN112559001B (en) 2019-09-26 2019-09-26 Method and device for updating application

Publications (2)

Publication Number Publication Date
CN112559001A true CN112559001A (en) 2021-03-26
CN112559001B CN112559001B (en) 2023-09-26

Family

ID=75029903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910918423.4A Active CN112559001B (en) 2019-09-26 2019-09-26 Method and device for updating application

Country Status (1)

Country Link
CN (1) CN112559001B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296828A (en) * 2021-05-26 2021-08-24 北京京东振世信息技术有限公司 Method, server and system for issuing application

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013118956A1 (en) * 2012-02-10 2013-08-15 에스케이플래닛 주식회사 System and method for providing integrated membership service
CN104580159A (en) * 2014-12-12 2015-04-29 西安酷派软件科技有限公司 Method and device for event notice as well as terminal device
CN105511914A (en) * 2015-12-01 2016-04-20 百度在线网络技术(北京)有限公司 Application update method, device and system
CN106569844A (en) * 2016-09-23 2017-04-19 北京五八信息技术有限公司 Processing method, processing device and equipment for program code update
WO2018019241A1 (en) * 2016-07-29 2018-02-01 腾讯科技(深圳)有限公司 Update processing method and device for terminal application, and computer storage medium
CN108984197A (en) * 2018-07-12 2018-12-11 北京京东金融科技控股有限公司 A kind of code update method and device
CN109495433A (en) * 2017-09-13 2019-03-19 腾讯科技(深圳)有限公司 Data download method and device, storage medium and electronic device
CN109697075A (en) * 2017-10-20 2019-04-30 北京京东尚科信息技术有限公司 File updating method, system and device
US20190196805A1 (en) * 2017-12-21 2019-06-27 Apple Inc. Controlled rollout of updates for applications installed on client devices

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013118956A1 (en) * 2012-02-10 2013-08-15 에스케이플래닛 주식회사 System and method for providing integrated membership service
CN104580159A (en) * 2014-12-12 2015-04-29 西安酷派软件科技有限公司 Method and device for event notice as well as terminal device
CN105511914A (en) * 2015-12-01 2016-04-20 百度在线网络技术(北京)有限公司 Application update method, device and system
WO2018019241A1 (en) * 2016-07-29 2018-02-01 腾讯科技(深圳)有限公司 Update processing method and device for terminal application, and computer storage medium
CN106569844A (en) * 2016-09-23 2017-04-19 北京五八信息技术有限公司 Processing method, processing device and equipment for program code update
CN109495433A (en) * 2017-09-13 2019-03-19 腾讯科技(深圳)有限公司 Data download method and device, storage medium and electronic device
CN109697075A (en) * 2017-10-20 2019-04-30 北京京东尚科信息技术有限公司 File updating method, system and device
US20190196805A1 (en) * 2017-12-21 2019-06-27 Apple Inc. Controlled rollout of updates for applications installed on client devices
CN108984197A (en) * 2018-07-12 2018-12-11 北京京东金融科技控股有限公司 A kind of code update method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘黎志;: "基于SingalR的Web实时应用程序框架设计", 计算机工程与设计, no. 10 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296828A (en) * 2021-05-26 2021-08-24 北京京东振世信息技术有限公司 Method, server and system for issuing application

Also Published As

Publication number Publication date
CN112559001B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
CN107590001B (en) Load balancing method and device, storage medium and electronic equipment
CN112860451A (en) Multi-tenant data processing method and device based on SaaS
CN111460129A (en) Method and device for generating identification, electronic equipment and storage medium
CN110830374A (en) Method and device for gray level release based on SDK
CN107347093B (en) Configuration method and device for distributed server system
CN110888639A (en) Business code compiling and packaging method and device
CN110795741A (en) Method and device for carrying out security processing on data
CN109828830B (en) Method and apparatus for managing containers
CN112947919A (en) Method and device for constructing service model and processing service request
CN112817562A (en) Service processing method and device
CN109873731B (en) Test method, device and system
CN113282589A (en) Data acquisition method and device
CN112596897A (en) Method and system for multi-tenant isolation
CN112559001B (en) Method and device for updating application
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN113779122B (en) Method and device for exporting data
CN113765983A (en) Site service deployment method and device
CN113448602A (en) Version updating method and device
CN112099841A (en) Method and system for generating configuration file
CN112463616A (en) Chaos testing method and device for Kubernetes container platform
CN113779018A (en) Data processing method and device
CN112214500A (en) Data comparison method and device, electronic equipment and storage medium
CN112131095A (en) Pressure testing method and device
CN111949472A (en) Method and device for recording application logs
CN113495747B (en) Gray scale release method and 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