CN110119279A - A kind of method and apparatus applied and its upgrade - Google Patents

A kind of method and apparatus applied and its upgrade Download PDF

Info

Publication number
CN110119279A
CN110119279A CN201810117579.8A CN201810117579A CN110119279A CN 110119279 A CN110119279 A CN 110119279A CN 201810117579 A CN201810117579 A CN 201810117579A CN 110119279 A CN110119279 A CN 110119279A
Authority
CN
China
Prior art keywords
upgrade
application
main program
upgrade procedure
upgrading
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
CN201810117579.8A
Other languages
Chinese (zh)
Other versions
CN110119279B (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 Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810117579.8A priority Critical patent/CN110119279B/en
Publication of CN110119279A publication Critical patent/CN110119279A/en
Application granted granted Critical
Publication of CN110119279B publication Critical patent/CN110119279B/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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

The invention discloses the method and apparatus of a kind of application and its upgrading, are related to field of computer technology.One specific embodiment of this method includes: that the main program process of application instructs starting upgrade procedure process according to application upgrade, and the main program and upgrade procedure of application are encapsulated in a data packet, and main program and upgrade procedure have different starting entrances;After upgrade procedure process initiation, upgrade procedure process stops main program process, and executes application upgrade operation;After application upgrade operates, upgrade procedure process initiation main program process simultaneously exits upgrade procedure process to complete application upgrade.The embodiment can not only carry out the upgrading using main program, but also carry out the upgrading of upgrade procedure, and without disposing independent upgrade procedure, support the centralized management of edition upgrading, can greatly shorten deployment time.

Description

A kind of method and apparatus applied and its upgrade
Technical field
The present invention relates to field of computer technology more particularly to the method and apparatus of a kind of application and its upgrading.
Background technique
Application upgrade refers to update of the application program from lowest version to highest version.Since highest version usually repairs lowest version Part loophole, so experienced the upgrading of application program, it generally all can be more preferable than the performance of original version, the effect optimized, User can also have better experience.
Traditional application upgrade scheme, commonly used in the trade at present mainly has the following two kinds:
1, independent upgrade procedure is disposed for application, upgrade procedure is periodically checked whether generally as timing task There is new version, if there is new version, then prompts customer upgrade;
2, it in some Large-Scale Interconnected nets enterprise, in order to support faster and more frequently to deliver complicated applications, all constructs certainly Dynamic deployment platform, by unified automatic deployment tool, by installation and deployment tool on the server, automatically dispose is various to be answered With.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:
1, scheme 1 needs to install different upgrade procedure for different applications, comparatively laborious, and upgrade procedure itself is such as What upgrading is also a problem;
2, scheme 2 needs to affix one's name to tool agent program in the server upper mounting portion where application, and deployment tool passes through the generation It manages program to execute using mapping out the work, scheme 2 is suitble to the deployment of enterprises application, it can be difficult to competent intranet and extranet combination is answered With deployment;
3, simultaneously, scheme 2 is difficult to support the control agent towards grouping to calculate mode.As shown in Figure 1, being towards grouping Control agent calculates the schematic diagram of mode, and controller and agency need to issue with version in this mode.And due to controller The deployment designed and developed and acted on behalf of is different team, the deployment for designing and developing team although not responsible agency of controller, but Be but the upgrading of agency is responsible for the consistency of maintenance application version and the errors repair of agency, therefore scheme 2 into It needs the cooperation of different team to cooperate when row application upgrade, realizes that difficulty is high.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus applied and its upgrade, can both be applied The upgrading of main program, and the upgrading of upgrade procedure is carried out, and without disposing independent upgrade procedure, support the concentration of edition upgrading Management, can greatly shorten deployment time.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of method of application upgrade is provided.
A kind of method of application upgrade, comprising: the main program process of application instructs starting upgrade procedure according to application upgrade Process, the main program and upgrade procedure of the application are encapsulated in a data packet, and the main program and the upgrade procedure With different starting entrances;After the upgrade procedure process initiation, the upgrade procedure process stops the main program process, And execute application upgrade operation;After the application upgrade operation, main program process described in the upgrade procedure process initiation And the upgrade procedure process is exited to complete application upgrade.
Optionally, before the upgrade procedure process stopping main program process, further includes: downloading is for this upgrading Upgrading data packet, the upgrading data packet is used to upgrade the main program and/or upgrade procedure of the application;And to described The main program of application and the current version of upgrade procedure are backed up.
Optionally, executing application upgrade operation includes: to execute the upgrading data packet, by the main program of the application and Upgrade procedure is upgraded to new version.
Optionally, further includes: if main program process described in the upgrade procedure process initiation fails, the upgrade procedure The application is rolled back to the version of the backup by process.
Optionally, the data packet and the upgrading data packet are that data are carried out packing life in the way of Fat-Jar At.
According to another aspect of an embodiment of the present invention, a kind of device of application upgrade is provided.
A kind of device of application upgrade, comprising: starting and upgrading module, for rising the main program process of application according to application Grade instruction starting upgrade procedure process, the main program and upgrade procedure of the application are encapsulated in a data packet, and the master Program and the upgrade procedure have different starting entrances;Application upgrade module, in the upgrade procedure process initiation Afterwards, so that the upgrade procedure process is stopped the main program process, and execute application upgrade operation;Module is exited in upgrading, is used for After application upgrade operation, makes main program process described in the upgrade procedure process initiation and exit the upgrading journey Sequence process is to complete application upgrade.
Optionally, further include upgrading preparation module, be used for: the upgrade procedure process being made to stop the main program process Before, downloading for this upgrading upgrading data packet, the upgrading data packet be used for upgrade the application main program and/or Upgrade procedure;And the main program of the application and the current version of upgrade procedure are backed up.
Optionally, executing application upgrade operation includes: to execute the upgrading data packet, by the main program of the application and Upgrade procedure is upgraded to new version.
Optionally, further include version rollback module, be used for: if main program process described in the upgrade procedure process initiation is lost It loses, then makes the upgrade procedure process that the application is rolled back to the version of the backup.
Optionally, the data packet and the upgrading data packet are that data are carried out packing life in the way of Fat-Jar At.
Another aspect according to an embodiment of the present invention, provides a kind of application.
A kind of application, comprising: main program, upgrade procedure and upgrading control programs, the upgrading control programs are according to this hair The method of application upgrade provided by bright embodiment using the upgrade procedure to the main program of the application and upgrade procedure into Row upgrading.
Another aspect according to an embodiment of the present invention, provides a kind of electronic equipment of application upgrade.
A kind of electronic equipment of application upgrade, comprising: one or more processors;Storage device, for store one or Multiple programs, when one or more of programs are executed by one or more of processors, so that one or more of places Manage the method that device realizes application upgrade provided by the embodiment of the present invention.
It is according to an embodiment of the present invention in another aspect, providing a kind of computer-readable medium.
A kind of computer-readable medium is stored thereon with computer program, realizes this when described program is executed by processor The method of application upgrade provided by inventive embodiments.
One embodiment in foregoing invention have the following advantages that or the utility model has the advantages that by will the main program process that apply and Upgrade procedure process is encapsulated in a data packet, can easily be realized the data sharing of main program and upgrade procedure, be made The process number of main program can easily be obtained by obtaining upgrade procedure process, so as to accurately, easily realize the liter of application Stopping of the grade program process to main program process;By making main program and upgrade procedure that there is different starting entrances, Ke Yishi The main program now applied does not start simultaneously with upgrade procedure;By stopping main program process after upgrade procedure process initiation, And after upgrading process, start main program process and exit upgrade procedure process, so that upgrade procedure process is only needing Just start when upgrading, and automatically exited from after the completion of application upgrade, main program process and upgrade procedure may be implemented Process is not performed simultaneously, to reduce system loading, has saved system resource.The present invention is based on the packing sides of Fat-Jar All resources that program relies on are packaged with by formula, and such upgrade procedure only needs to download upgrading data packet, and replaces the number Edition upgrading work can be completed according to packet, not only may be employed the upgrading of main program, but also the liter of upgrade procedure may be implemented Grade, and without disposing independent upgrade procedure, it supports the centralized management of edition upgrading, can greatly shorten deployment time.According to Technical solution of the present invention also solves the deployment issue of agent side application upgrade program under GCP mode, supports control terminal to generation The centralized management at end is managed, while the gray scale of version can be supported to issue.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is the schematic diagram that the control agent towards grouping calculates mode;
Fig. 2 is the schematic diagram of the main flow of the method for application upgrade according to an embodiment of the present invention;
Fig. 3 is the timing flow chart of the application upgrade of the embodiment of the present invention;
Fig. 4 is the schematic diagram of the main modular of the device of application upgrade according to an embodiment of the present invention;
Fig. 5 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 6 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present invention Figure.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
In order to solve the problems in the existing technology, the invention proposes a kind of technical solution of new application upgrade, Upgrade procedure is disposed without independent, supports the agency in GCP mode to upgrade automatically, escalation policy can be controlled in controller end. Technical solution of the present invention is realized based on Fat-Jar technology, all to be used based on the application that Fat-Jar mode is packaged The technical solution.In the Java ecosystem, so-called Fat-Jar refer to by application rely on all resources (class file, class libraries, Resource file etc.) it is packaged into single executable Jar file.Using being packaged into Fat-Jar, will can make the deployment of application, starting, The operations such as stopping become very simple, therefore more and more Development Frameworks (such as: SpringBoot, WildFlySwarm, Dropwizard) all start the packing manner using Fat-Jar.It will be recognized by those skilled in the art that other are with Fat-Jar's Function of the invention also may be implemented in functionally similar packing manner.Wherein, refer to the functionally similar packing manner of Fat-Jar : all resources (including class file, class libraries, resource file etc.) that application relies on can be packaged into single executable text Part, and the data packing manner that distinct program corresponds to different starting entrances may be implemented.
Technical solution of the present invention can solve the problem of agent side applications automatic upgrade under GCP mode.Skill of the invention In art scheme, control terminal can control the synchronization updating operation of all agent sides, meanwhile, control terminal can also be to different grouping Agent side carries out upgrading and the rolling back action of version, issues (so-called gray scale with the gray scale for the upgrade procedure for supporting agent side to apply Publication refers to a kind of published method that can be seamlessly transitted between black and white, and a part of user is allowed to continue to use product characteristic A, A part of user starts to use product characteristic B, if user is to product characteristic B without what opposing views, gradually expansion production The use scope of product characteristic B all moves to all users to come above product characteristic B).Also, the application upgrade of agent side is grasped Work is executed by the operation personnel of control terminal completely, and the operation personnel without agent side participates in.
Specifically, control terminal may include data management module, agency of trademark registration module and operational administrative according to function realization Module.Wherein, data management module is mainly responsible for the management of the application upgrade data packet of agent side, such as: application upgrade data The upload of packet updates, storage etc.;Agency of trademark registration module is responsible for handling the registration request of agent side, and can manage registered Agent side;Operational administrative module is mainly responsible for agent side and sends the operational orders such as upgrading, rollback.Control terminal passes through setting one Display device can check the information of all registered agent sides, such as: point of the application version information of agent side, agent side Group information, etc..And when needing the application to agent side to upgrade, selection needs the agent side upgraded, and generates upgrading Instruction is sent to agent side.
The main program and upgrade procedure of agent side application deployment simultaneously, for providing specific business service.Upgrade journey It is carried in sequence using information such as current version numbers.When the starting of the main program of the application of agent side, version number can be believed Breath extracts, and the version number information is sent to the agency of trademark registration module of control terminal together with the grouping information where agent side Agent side is registered to control terminal, such control terminal can view the version information and grouping information of all agent sides Deng.
The detailed process of the application upgrade of agent side of the invention is described below.
Fig. 2 is the schematic diagram of the main flow of the method for application upgrade according to an embodiment of the present invention.As shown in Fig. 2, this The method of the application upgrade of inventive embodiments mainly includes the following steps, namely S201 to step S203.
Step S201: the main program process of application instructs starting upgrade procedure process, the main journey of application according to application upgrade Sequence and upgrade procedure are encapsulated in a data packet, and main program and upgrade procedure have different starting entrances;
Step S202: after upgrade procedure process initiation, upgrade procedure process stops main program process, and executes application upgrade Operation;
Step S203: after application upgrade operates, upgrade procedure process initiation main program process simultaneously exits upgrade procedure Process is to complete application upgrade.
In an embodiment of the present invention, data packet is to carry out data in the way of Fat-Jar to be packaged generation.It is based on Fat-Jar mode carries out data packing, can support that there are multiple starting entrances in a data packet (Jar packet).The present invention Technical solution in, there are two starting entrances: main program starts entrance, for starting regular traffic main program code; One upgrade procedure starts entrance, for starting upgrade procedure code.By the way that the main program applied and upgrade procedure are packaged in In one data packet, the data sharing of main program and upgrade procedure can be easily realized, so that upgrade procedure process can be with The process number of main program is obtained, easily so as to accurately, easily realize the upgrade procedure process of application to main program The stopping of process.It is different from upgrade procedure is individually disposed in the prior art, in the prior art, the upgrade procedure process conduct of application System process, be with main program process and meanwhile run, even if application main program process can stop application upgrade procedure Process, it is also desirable to which main program process is searched from process list according to the process name of upgrade procedure and stopped, low efficiency, and works as Have multiple processes it is of the same name when, it may appear that maloperation affects user experience.And in the present invention, upgrade procedure process only exists Just start when needing to upgrade, and automatically exited from after the completion of application upgrade, therefore, system resource is greatly saved.
Application upgrade instruction can be in the present invention is sent by control terminal, is also possible to by agent side actively application.
According to an embodiment of the invention, before upgrade procedure process stops main program process, it can be with:
Upgrading data packet of the downloading for this upgrading, main program and/or upgrading of the upgrading data packet for upgrade application Program;And
The current version of main program and upgrade procedure to application backs up.
Wherein, the behaviour that downloading is used for the operation of the upgrading data packet of this upgrading and is backed up to the current version of application The execution sequence of work can flexibly be set, and two operations may be performed simultaneously, and can also first carry out downloading for this upgrading The operation of upgrading data packet, then the operation backed up to the current version of application is executed, it can also first carry out and application is worked as The operation that preceding version is backed up, then execute operation of the downloading for the upgrading data packet of this upgrading.
By in an embodiment of the present invention, the main program of application and upgrade procedure are encapsulated in a data packet, and it is every When secondary upgrading, carried out in the form of upgrading data packet to be replaced to former data packet completely, therefore, the main program and upgrading journey of application Sequence version number having the same.
If upgrade procedure process initiation main program process fails, application is rolled back to the version of backup by upgrade procedure process This.Here, the version of backup refers to the main program and upgrade procedure for the application backed up before this executes upgrading data packet Version.
In addition, no matter needing the main program or upgrade procedure of upgrade application in the present invention, being all to pass through upgrading data packet Come what is realized.When due to carrying out data packing based on Fat-Jar mode, all resources (class file, class that application can be relied on Library, resource file etc.) it is packaged into single executable Jar file, therefore upgrading data packet both may include for application The data that main program is upgraded, and may include the data for being upgraded to the upgrade procedure of application.According to ascending series Different according to the content for including in packet, the content updated after execution upgrading data packet is also different, and the content specifically upgraded is by ascending series It is determined according to the content in packet.
In an embodiment of the present invention, executing application upgrade operation is, for example: executing upgrading data packet, the master that will be applied Program and upgrade procedure are upgraded to new version.
Fig. 3 is the timing flow chart of the application upgrade of the embodiment of the present invention.As shown in figure 3, being sent when receiving control terminal Application upgrade instruction after, agent side deployment application main program process according to application upgrade instruct starting application upgrading journey Sequence process.After the success of upgrade procedure process initiation, upgrading preparation will be first carried out in advance: from control terminal (data management module) Downloading is used for the upgrading data packet of this application upgrade, and the main program of the application and the progress of the current version of upgrade procedure is standby Part.After the completion of upgrading preparation, upgrade procedure process stops the main program process of application, so that the main program of application moves back Out, upgrading data packet is then executed, replacement is using current version with by application upgrade to new version.Later, upgrade procedure Process will start the main program of new version application, so that main program process can start main journey by the new version of load application Sequence, then, upgrade procedure process automatically exit from, this application upgrade is completed.
Fig. 4 is the schematic diagram of the main modular of the device of application upgrade according to an embodiment of the present invention.As shown in figure 4, this The device 400 of the application upgrade of inventive embodiments mainly includes that starting and upgrading module 401, upgrade execution module 402 and upgrading are moved back Module 403 out.
Starting and upgrading module 401 be used for make application main program process according to application upgrade instruct starting upgrade procedure into Journey, the main program and upgrade procedure of application are encapsulated in a data packet, and main program and upgrade procedure have different startings Entrance;
Upgrade execution module 402 is used for after upgrade procedure process initiation, and upgrade procedure process is made to stop main program process, And execute application upgrade operation;
Upgrading exits module 403 for making upgrade procedure process initiation main program process after application upgrade operation And exit upgrade procedure process.
The device 400 of the application upgrade of the embodiment of the present invention can also include upgrading preparation module (not shown), use In:
Make upgrade procedure process before stopping main program process, upgrading data packet of the downloading for this upgrading, upgrading Data packet is used for the main program and/or upgrade procedure of upgrade application;And
The current version of main program and upgrade procedure to application backs up.
Wherein, executing application upgrade operation for example may include: execution upgrading data packet, by the main program applied and liter Grade program is upgraded to new version.
In addition, the device 400 of the application upgrade of the embodiment of the present invention can also include that version rollback module (is not shown in figure Out), it is used for:
If upgrade procedure process initiation main program process fails, make upgrade procedure process that application to be rolled back to the version of backup This.
In an embodiment of the present invention, data packet and upgrading data packet are to be beaten data in the way of Fat-Jar What packet generated.
In addition, the present invention also provides a kind of applications, comprising: main program, upgrade procedure and upgrading control programs, upgrading control Processing procedure sequence according to embodiments of the present invention provided by application upgrade method use main program and upgrading of the upgrade procedure to application Program is upgraded.
Technical solution according to an embodiment of the present invention is encapsulated in by main program process and upgrade procedure process that will apply In one data packet, the data sharing of main program and upgrade procedure can be easily realized, so that upgrade procedure process can be with The process number of main program is obtained, easily so as to accurately, easily realize the upgrade procedure process of application to main program The stopping of process;By making main program and upgrade procedure that there is different starting entrances, the main program and liter of application may be implemented Grade program does not start simultaneously;Terminate by stopping main program process after upgrade procedure process initiation, and in upgrading process Afterwards, start main program process and exit upgrade procedure process, so that upgrade procedure process only just starts when needing to upgrade, And automatically exited from after the completion of application upgrade, not being performed simultaneously for main program process and upgrade procedure process may be implemented, from And system loading is reduced, save system resource.The present invention is based on the packing manners of Fat-Jar, program are relied on all Resource is packaged with, and such upgrade procedure only needs to download upgrading data packet, and is replaced the data packet and can be completed version Upgrade job, not only may be employed the upgrading of main program, but also the upgrading of upgrade procedure may be implemented, and independent without disposing Upgrade procedure supports the centralized management of edition upgrading, can greatly shorten deployment time.In addition, technical solution of the present invention is also It solves the deployment issue of agent side application upgrade program under GCP mode, supports centralized management of the control terminal to agent side, simultaneously The gray scale of version can be supported to issue.
Fig. 5 is shown can be using the exemplary of the device of the method or application upgrade of the application upgrade of the embodiment of the present invention System architecture 500.
As shown in figure 5, system architecture 500 may include terminal device 501,502,503, network 504 and server 505. Network 504 between terminal device 501,502,503 and server 505 to provide the medium of communication link.Network 504 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 501,502,503 and be interacted by network 504 with server 505, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 501,502,503 (merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 501,502,503 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 505 can be to provide the server of various services, such as utilize terminal device 501,502,503 to user The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception To the data such as information query request analyze etc. processing, and by processing result (such as target push information, product letter Breath -- merely illustrative) feed back to terminal device.
It should be noted that the method for application upgrade provided by the embodiment of the present invention is generally executed by server 505, phase Ying Di, the device of application upgrade are generally positioned in server 505.
It should be understood that the number of terminal device, network and server in Fig. 5 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Below with reference to Fig. 6, it illustrates the calculating of the terminal device or server that are suitable for being used to realize the embodiment of the present invention The structural schematic diagram of machine system 600.Terminal device or server shown in Fig. 6 are only an example, should not be to of the invention real The function and use scope for applying example bring any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 609, and/or from can Medium 611 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 601, system of the invention is executed The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in the embodiment of the present invention involved unit or module can be realized by way of software, can also be with It is realized by way of hardware.Described unit or module also can be set in the processor, for example, can be described as: A kind of processor includes that module is exited in starting and upgrading module, upgrade execution module and upgrading.Wherein, the name of these units or module Claim not constituting the restriction to the unit or module itself under certain conditions, for example, starting and upgrading module can also be described For " for making the main program process of application according to the module of application upgrade instruction starting upgrade procedure process ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes It obtains the main program process that the equipment includes: application and starting upgrade procedure process, the main journey of the application is instructed according to application upgrade Sequence and upgrade procedure are encapsulated in a data packet, and the main program and the upgrade procedure have different starting entrances; After the upgrade procedure process initiation, the upgrade procedure process stops the main program process, and executes application upgrade operation; After application upgrade operation, main program process described in the upgrade procedure process initiation and exit the upgrade procedure into Application upgrade is completed in journey.
Technical solution according to an embodiment of the present invention is encapsulated in by main program process and upgrade procedure process that will apply In one data packet, the data sharing of main program and upgrade procedure can be easily realized, so that upgrade procedure process can be with The process number of main program is obtained, easily so as to accurately, easily realize the upgrade procedure process of application to main program The stopping of process;By making main program and upgrade procedure that there is different starting entrances, the main program and liter of application may be implemented Grade program does not start simultaneously;Terminate by stopping main program process after upgrade procedure process initiation, and in upgrading process Afterwards, start main program process and exit upgrade procedure process, so that upgrade procedure process only just starts when needing to upgrade, And automatically exited from after the completion of application upgrade, not being performed simultaneously for main program process and upgrade procedure process may be implemented, from And system loading is reduced, save system resource.The present invention is based on the packing manners of Fat-Jar, program are relied on all Resource is packaged with, and such upgrade procedure only needs to download upgrading data packet, and is replaced the data packet and can be completed version Upgrade job, not only may be employed the upgrading of main program, but also the upgrading of upgrade procedure may be implemented, and independent without disposing Upgrade procedure supports the centralized management of edition upgrading, can greatly shorten deployment time.In addition, technical solution of the present invention is also It solves the deployment issue of agent side application upgrade program under GCP mode, supports centralized management of the control terminal to agent side, simultaneously The gray scale of version can be supported to issue.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (13)

1. a kind of method of application upgrade characterized by comprising
The main program process of application instructs starting upgrade procedure process, the main program and upgrading journey of the application according to application upgrade Sequence is encapsulated in a data packet, and the main program and the upgrade procedure have different starting entrances;
After the upgrade procedure process initiation, the upgrade procedure process stops the main program process, and executes application upgrade Operation;
After the application upgrade operation, main program process described in the upgrade procedure process initiation simultaneously exits the upgrading journey Sequence process is to complete application upgrade.
2. the method according to claim 1, wherein the upgrade procedure process stop the main program process it Before, further includes:
Downloading for this upgrading upgrading data packet, the upgrading data packet be used for upgrade the application main program and/or Upgrade procedure;And
The current version of main program and upgrade procedure to the application backs up.
3. according to the method described in claim 2, it is characterized in that, execution application upgrade operation includes:
The upgrading data packet is executed, the main program of the application and upgrade procedure are upgraded to new version.
4. according to the method described in claim 3, it is characterized by further comprising:
If main program process described in the upgrade procedure process initiation fails, the upgrade procedure process applies rollback for described To the version of the backup.
5. the method according to claim 1, wherein the data packet and the upgrading data packet are according to Fat- The mode of Jar carries out data to be packaged generation.
6. a kind of device of application upgrade characterized by comprising
Starting and upgrading module, it is described for making the main program process of application instruct starting upgrade procedure process according to application upgrade The main program and upgrade procedure of application are encapsulated in a data packet, and the main program and the upgrade procedure are with different Start entrance;
Application upgrade module, for after the upgrade procedure process initiation, making the upgrade procedure process stop the main journey Sequence process, and execute application upgrade operation;
Module is exited in upgrading, for making main journey described in the upgrade procedure process initiation after application upgrade operation Sequence process simultaneously exits the upgrade procedure process to complete application upgrade.
7. device according to claim 6, which is characterized in that further include upgrading preparation module, be used for:
Make the upgrade procedure process before stopping the main program process, upgrading data packet of the downloading for this upgrading, The upgrading data packet is used to upgrade the main program and/or upgrade procedure of the application;And
The current version of main program and upgrade procedure to the application backs up.
8. device according to claim 7, which is characterized in that executing application upgrade operation includes:
The upgrading data packet is executed, the main program of the application and upgrade procedure are upgraded to new version.
9. device according to claim 8, which is characterized in that further include version rollback module, be used for:
If main program process described in the upgrade procedure process initiation fails, return the upgrade procedure process by the application It is rolled into the version of the backup.
10. device according to claim 6, which is characterized in that the data packet and the upgrading data packet be according to The mode of Fat-Jar carries out data to be packaged generation.
11. a kind of application characterized by comprising main program, upgrade procedure and upgrading control programs, the upgrading control journey Sequence according to claim 1 in -5 any method using the upgrade procedure to the main program and upgrade procedure of the application Upgraded.
12. a kind of electronic equipment of application upgrade characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 5.
13. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor Such as method as claimed in any one of claims 1 to 5 is realized when row.
CN201810117579.8A 2018-02-06 2018-02-06 Application and upgrading method and device thereof Active CN110119279B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810117579.8A CN110119279B (en) 2018-02-06 2018-02-06 Application and upgrading method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810117579.8A CN110119279B (en) 2018-02-06 2018-02-06 Application and upgrading method and device thereof

Publications (2)

Publication Number Publication Date
CN110119279A true CN110119279A (en) 2019-08-13
CN110119279B CN110119279B (en) 2024-05-17

Family

ID=67519842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810117579.8A Active CN110119279B (en) 2018-02-06 2018-02-06 Application and upgrading method and device thereof

Country Status (1)

Country Link
CN (1) CN110119279B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112564956A (en) * 2020-11-30 2021-03-26 山东亚华电子股份有限公司 Remote upgrading method, equipment and device for client and storage medium
CN112783547A (en) * 2019-11-01 2021-05-11 中车株洲电力机车研究所有限公司 Version backtracking method for software update, computer device and storage medium
CN113312068A (en) * 2020-02-27 2021-08-27 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for upgrading a system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038549A (en) * 2007-03-28 2007-09-19 北京启明星辰信息技术有限公司 A software updating method capable of crossing system
CN103761115A (en) * 2013-11-30 2014-04-30 北京中启智源数字信息技术有限责任公司 Method for achieving self-update of software
US20140325140A1 (en) * 2013-04-29 2014-10-30 International Business Machines Corporation Automatic creation, deployment, and upgrade of disk images
CN104572222A (en) * 2015-02-02 2015-04-29 深圳市新联锋科技有限公司 Main program upgrading method and device for supporting upgrading of main program
CN104702631A (en) * 2013-12-04 2015-06-10 航天信息股份有限公司 Method and system for upgrading client software
CN105893091A (en) * 2016-01-29 2016-08-24 北京云迹科技有限公司 Method and system for upgrading software program of intelligent robot

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038549A (en) * 2007-03-28 2007-09-19 北京启明星辰信息技术有限公司 A software updating method capable of crossing system
US20140325140A1 (en) * 2013-04-29 2014-10-30 International Business Machines Corporation Automatic creation, deployment, and upgrade of disk images
CN103761115A (en) * 2013-11-30 2014-04-30 北京中启智源数字信息技术有限责任公司 Method for achieving self-update of software
CN104702631A (en) * 2013-12-04 2015-06-10 航天信息股份有限公司 Method and system for upgrading client software
CN104572222A (en) * 2015-02-02 2015-04-29 深圳市新联锋科技有限公司 Main program upgrading method and device for supporting upgrading of main program
CN105893091A (en) * 2016-01-29 2016-08-24 北京云迹科技有限公司 Method and system for upgrading software program of intelligent robot

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783547A (en) * 2019-11-01 2021-05-11 中车株洲电力机车研究所有限公司 Version backtracking method for software update, computer device and storage medium
CN113312068A (en) * 2020-02-27 2021-08-27 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for upgrading a system
CN113312068B (en) * 2020-02-27 2024-05-28 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for upgrading a system
CN112564956A (en) * 2020-11-30 2021-03-26 山东亚华电子股份有限公司 Remote upgrading method, equipment and device for client and storage medium

Also Published As

Publication number Publication date
CN110119279B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
CN107666525B (en) Method and device for IP allocation of cluster container
CN109542445A (en) A kind of method and apparatus that Android plug-in unit melts hair
CN107656748B (en) Application publishing method and device
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN104731706A (en) Method and device for test management using distributed computing
CN109905286A (en) A kind of method and system of monitoring device operating status
CN110119279A (en) A kind of method and apparatus applied and its upgrade
CN110895472A (en) Method and device for identifying service change
CN110019123A (en) A kind of data migration method and device
CN110019539A (en) A kind of method and apparatus that the data of data warehouse are synchronous
CN110297659A (en) Algorithm model disposes loading method and device
CN110784347A (en) Node management method, system, equipment and storage medium for container cluster
CN111444077A (en) Method and device for generating flow node test data
CN111158752A (en) SAAS multi-version control system and use method thereof
CN112398669B (en) Hadoop deployment method and device
CN110515741A (en) A kind of degradation processing method and device based on local task queue
CN111666079B (en) Method, apparatus, system, device and computer readable medium for software upgrade
CN109960212A (en) Task sending method and device
CN112817562A (en) Service processing method and device
CN109144843A (en) The method and apparatus for testing environment deployment
CN113535220B (en) Code packet management method and device
CN109725913A (en) The method and apparatus that data update
CN116974716A (en) Scheduling task issuing method and device, electronic equipment and storage medium
JP2020017053A (en) Environment construction support system and environment construction support method
CN110019059A (en) A kind of method and apparatus of Timing Synchronization

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