CN110389773A - Software publication and dispositions method, apparatus and system - Google Patents

Software publication and dispositions method, apparatus and system Download PDF

Info

Publication number
CN110389773A
CN110389773A CN201810366893.XA CN201810366893A CN110389773A CN 110389773 A CN110389773 A CN 110389773A CN 201810366893 A CN201810366893 A CN 201810366893A CN 110389773 A CN110389773 A CN 110389773A
Authority
CN
China
Prior art keywords
version number
software
code
version
server
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.)
Pending
Application number
CN201810366893.XA
Other languages
Chinese (zh)
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.)
BYD Co Ltd
Original Assignee
BYD 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 BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201810366893.XA priority Critical patent/CN110389773A/en
Publication of CN110389773A publication Critical patent/CN110389773A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention discloses a kind of publication of software and dispositions methods, apparatus and system, wherein, method includes: when receiving software upgrading request, according to software upgrading request on the destination server that carries software current version number, version repository is inquired, code variations part of the new version number relative to current version number of software is obtained;Code variations part and new version number are sent to destination server, so that destination server is updated software, it avoids whole codes of updated software being sent to destination server, to reduce volume of transmitted data when software upgrading, data transmission efficiency and software upgrading efficiency are improved, the version switch speed of software is improved.

Description

Software publication and dispositions method, apparatus and system
Technical field
The present invention relates to Internet technical field, in particular to a kind of software publication and dispositions method, apparatus and system.
Background technique
Currently, when carrying out software publication and deployment needing that the source code of software is sent to compiling clothes by git server Business device, compiler server are compiled source code, obtain executable code, and executable code is compressed and is packaged, Compressed package is obtained, compressed package is sent to destination server;After destination server receives compressed package, by the container of website Tomcat decompressed, installation and deployment and operation;When software upgrading, compiler server be also required to updated software into Row compiling, is packaged and sends compression.
It further include vast resources file and middleware other than the code write in current software.Wherein, resource text Part and middleware account for the 90% of entire software, and frequently change seldom occurs in software life-cycle.And above-mentioned software hair In cloth and dispositions method, the Data duplication for requiring not to change resource file, intermediate file etc. is updated to each of software Transmission, volume of transmitted data is big, reduces data transmission efficiency, reduces software upgrading efficiency.In addition, in software rollback process In, it is also desirable to compiler server is compiled the source code of rollback version, compresses, is packaged and sends, and leads to software version Switching time is long, it is difficult to quickly switch software version.
Summary of the invention
The present invention is directed to solve one of the technical problem in above-mentioned technology at least to a certain extent.
For this purpose, an object of the present invention is to provide a kind of publication of software and dispositions methods, for solving the prior art Middle software upgrading inefficient, the problem of software version switching time length.
Second object of the present invention is to propose that device is issued and disposed to a kind of software.
Third object of the present invention is to propose a kind of software publication and deployment system.
Fourth object of the present invention is to propose another software publication and deployment device.
5th purpose of the invention is to propose a kind of non-transitorycomputer readable storage medium.
6th purpose of the invention is to propose a kind of computer program product.
In order to achieve the above objectives, first aspect present invention embodiment proposes a kind of publication of software and dispositions method, comprising:
Judge whether that the software upgrading for receiving destination server is requested;It is carried in the software upgrading request: the mesh Mark the current version number of software on server;
When receiving software upgrading request, version repository is inquired, obtains the new version number of the software relative to institute State the code variations part of current version number;
The code variations part and the new version number are sent to the destination server, so that the target takes Business device is updated the software.
Further, the method further include:
Obtain the executable code of the software for the new version number that compiler server is sent;
When the new version number is non-initial version number, the version repository is inquired, obtains the described of a upper version number The executable code of software;It is preserved in the version repository: each version number and corresponding code;Wherein, initial version number Corresponding code is executable code;The corresponding code of non-initial version number is non-initial version number relative to a upper version number Code variations part;
By the executable code of the executable code of the software of new version number and the software of a upper version number It is compared, determines code variations part of the new version number relative to a upper version number;
The new version number and the code variations part relative to a upper version number are saved in version repository.
Further, it is to receive compiling clothes that the destination server, which sends the trigger condition of the software upgrading request, First instruction information of business device;The first instruction information is the executable of the software that the compiler server sends new version number It is sent after code.
Further, the method further include:
Judge whether that the downgrading software version for receiving the destination server is requested;In the downgrading software version request It carries: the current version number of software and rollback version number on the destination server;
When receiving downgrading software version request, the version repository is inquired, it is opposite to obtain the rollback version number In the code variations part of the current version number;
The code variations part is sent to the destination server, so that the destination server is by current version number The software rollback to the rollback version number software.
Further, the inquiry version repository, obtains the rollback version number relative to the current version number Code variations part, comprising:
When the rollback version number is a upper version number for the current version number, according to the version repository The corresponding code of current version number determines code variations part of the rollback version number relative to the current version number;
When the rollback version number is not a upper version number for the current version number, the rollback version number is determined With the intermediate releases number between the current version number, according to the corresponding code of current version number in the version repository and described The corresponding code of intermediate releases number determines code variations part of the rollback version number relative to the current version number.
Further, it is to receive compiling clothes that the destination server, which sends the trigger condition of downgrading software version request, The second indication information of business device;It is carried in the second indication information: rollback version number.
In the software publication of the embodiment of the present invention and dispositions method, when receiving software upgrading request, more according to software The current version number of software, inquires version repository on the destination server carried in new request, and the new version number for obtaining software is opposite In the code variations part of current version number;Code variations part and new version number are sent to destination server, so that mesh Mark server is updated software, avoids whole codes of updated software being sent to destination server, to reduce Volume of transmitted data when software upgrading, improves data transmission efficiency and software upgrading efficiency, the version for improving software is cut Throw-over degree.
In order to achieve the above objectives, second aspect of the present invention embodiment proposes a kind of publication of software and deployment device, comprising:
Judgment module, for judging whether that the software upgrading for receiving destination server is requested;The software upgrading request Middle carrying: the current version number of software on the destination server;
Enquiry module, for inquiring version repository, obtaining the new edition of the software when receiving software upgrading request This number code variations part relative to the current version number;
Sending module, for the code variations part and the new version number to be sent to the destination server, So that the destination server is updated the software.
Further, the device further include: obtain module, comparison module and preserving module;
The acquisition module, the executable code of the software of the new version number for obtaining compiler server transmission;
The enquiry module is also used to inquire the version repository when the new version number is non-initial version number, obtain The executable code of the software of a upper version number;It is preserved in the version repository: each version number and corresponding generation Code;Wherein, the corresponding code of initial version number is executable code;The corresponding code of non-initial version number is non-initial version number Code variations part relative to a upper version number;
The comparison module, for will be described in the executable code of the software of new version number and a upper version number The executable code of software is compared, and determines code variations part of the new version number relative to a upper version number;
The preserving module, for by the new version number and relative to the code variations part guarantor of a upper version number It is stored in version repository.
Further, it is to receive compiling clothes that the destination server, which sends the trigger condition of the software upgrading request, First instruction information of business device;The first instruction information is the executable of the software that the compiler server sends new version number It is sent after code.
Further, the judgment module, the software version for being also used to judge whether to receive the destination server return Move back request;It is carried in the downgrading software version request: the current version number of software and rollback version on the destination server This number;
The enquiry module is also used to inquire the version repository when receiving downgrading software version request, obtain Code variations part of the rollback version number relative to the current version number;
The sending module is also used to the code variations part being sent to the destination server, so that the mesh Server is marked by the software rollback of current version number to the software of the rollback version number.
Further, the enquiry module is specifically used for,
When the rollback version number is a upper version number for the current version number, according to the version repository The corresponding code of current version number determines code variations part of the rollback version number relative to the current version number;
When the rollback version number is not a upper version number for the current version number, the rollback version number is determined With the intermediate releases number between the current version number, according to the corresponding code of current version number in the version repository and described The corresponding code of intermediate releases number determines code variations part of the rollback version number relative to the current version number.
Further, it is to receive compiling clothes that the destination server, which sends the trigger condition of downgrading software version request, The second indication information of business device;It is carried in the second indication information: rollback version number.
The software of the embodiment of the present invention is issued and is disposed in device, when receiving software upgrading request, more according to software The current version number of software, inquires version repository on the destination server carried in new request, and the new version number for obtaining software is opposite In the code variations part of current version number;Code variations part and new version number are sent to destination server, so that mesh Mark server is updated software, avoids whole codes of updated software being sent to destination server, to reduce Volume of transmitted data when software upgrading, improves data transmission efficiency and software upgrading efficiency, the version for improving software is cut Throw-over degree.
Third object of the present invention is to propose a kind of software publication and deployment system, comprising: compiler server, git Server and destination server;
The compiler server, the source code of the software for obtaining new version number, is compiled the source code, obtains To executable code, the executable code is submitted into git server;
The destination server, for software described in installation and operation;
The git server, connect with the compiler server and the destination server respectively, for executing institute as above The software publication stated and dispositions method.
Fourth object of the present invention is to propose another software publication and deployment device, comprising: memory, processor And the computer program that can be run on a memory and on a processor is stored, the processor is realized such as when executing described program Upper the software publication and dispositions method.
5th purpose of the invention be to propose a kind of non-transitorycomputer readable storage medium, is stored thereon with meter Calculation machine program, the program realize software publication as described above and dispositions method when being executed by processor.
6th purpose of the invention is to propose a kind of computer program product, when in the computer program product When instruction processing unit executes, software publication as described above and dispositions method are realized.
The advantages of additional aspect of the invention, will be set forth in part in the description, and will partially become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Fig. 1 is the flow diagram of a kind of software publication provided in an embodiment of the present invention and dispositions method;
Fig. 2 is the flow diagram of another software publication provided in an embodiment of the present invention and dispositions method;
Fig. 3 is the flow diagram of another software publication provided in an embodiment of the present invention and dispositions method;
Fig. 4 is the structural schematic diagram of a kind of software publication provided in an embodiment of the present invention and deployment device;
Fig. 5 is the structural schematic diagram of another software publication provided in an embodiment of the present invention and deployment device;
Fig. 6 is the structural schematic diagram of a kind of software publication provided in an embodiment of the present invention and deployment system;
Fig. 7 is the structural schematic diagram of another software publication provided in an embodiment of the present invention and deployment device.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
With reference to the accompanying drawing come describe the embodiment of the present invention software publication and dispositions method, apparatus and system.
Fig. 1 is the flow diagram of software publication according to an embodiment of the invention and dispositions method.As shown in Figure 1, The software of the embodiment of the present invention is issued and dispositions method includes:
S101, judge whether to receive the software upgrading request of destination server;It is carried in software upgrading request: target clothes The current version number of software on business device.
The executing subject of software publication provided by the invention and dispositions method is that device, software publication are issued and disposed to software And deployment device is specifically as follows the publication of execution software and software of dispositions method etc. on git server or git server. Git server, the executable code for the software to publication carry out Version Control etc..Wherein, destination server is practical fortune The server of row software, according to the scale of system, the quantity of destination server can be several to several hundred in system.Wherein, System can be for example AFC system etc..System be AFC system in the case where, software be specially and from It is dynamic to sell ticket checking relevant software.
In the present embodiment, the trigger condition that destination server sends software upgrading request is to receive compiler server First instruction information;It is sent after the executable code for the software that first instruction information sends new version number for compiler server. Wherein, corresponding software source code can be sent to compiler server, compiling clothes after the completion of software upgrading by exploitation server Business device is compiled source code, obtains the executable code of software, the executable code of software is sent to git server Afterwards, the first instruction information is sent to destination server, instruction destination server has the software of new version to send out on git server Cloth.
In addition, it is necessary to explanation, if compiler server be sent to git server be initial version number software can It, can be to target after compiler server sends the executable code of the software of initial version number to git server when executing code Server sends third and indicates information, and instruction destination server sends software installation request, software installation request to git server In do not carry version number so that the executable code of the software of initial version number is sent to destination server, mesh by git server Mark installation and operation that server carries out software.
In addition, it is also necessary to be illustrated, in the present embodiment, can be arranged on compiler server and destination server Corresponding git script.Git script automatic running on compiler server compiles to obtain the executable of software in compiler server After code, the first instruction information, third instruction information etc. are sent to destination server.The git script being arranged on destination server Automatic running sends software upgrading request to git server when destination server receives the first instruction information;In target When server receives third instruction information, software installation request is sent to git server.
S102, receive software upgrading request when, inquire version repository, obtain the new version number of software relative to current version This number code variations part.
It wherein, may include: each version number and corresponding code in version repository;Wherein, initial version number is corresponding Code is executable code;The corresponding code of non-initial version number is code of the non-initial version number relative to a upper version number Change part.Corresponding, the process that software distributing device executes step 102 is specifically as follows, and is new version in current version number Number a upper version number when, by the corresponding code of new version number in version repository, be determined as the new version number of software relative to working as The code variations part of preceding version number;When current version number is not a upper version number for new version number, current version is obtained Intermediate releases number number between new version number, according to the corresponding code of new version number in version repository and intermediate releases correspondence Code;The corresponding code of new version number in version repository and the corresponding code combination of intermediate releases number are got up, as software Code variations part of the new version number relative to current version number.
S103, code variations part and new version number are sent to destination server, so that destination server is to software It is updated.
In the present embodiment, git server is before being sent to destination server for code variations part and new version number, mesh Mark server needs are registered on git server.The process of registration is specifically as follows, and destination server is by the shh of generation Public key and sshkey private key are sent to git server, and git server saves shh public key and sshkey private key.It is corresponding, git clothes Business device is specifically as follows in the process that code variations part and new version number are sent to destination server, obtains destination service The sshkey private key of device, whether verifying sshkey private key is correct, if correctly, being verified, by code variations part and newly Version number is sent to destination server.
In addition, it is necessary to explanation, sshkey private key can also carry destination server software upgrading request or In software installation request, so that git server is first after destination server sends software upgrading request or software installation request Sshkey private key is verified, after being verified, then executes step 102 and step 103.
In addition, destination server is after receiving code variations part and new version number, it can be to the software generation of installation Code and version number are updated, and call and be easy Tomcat runs software code, realize the operation of software.
It include nearly 5000 object codes in the executable code of software by taking the software of AFC system AFC as an example, A subdirectory more than 800 generates the file that size is 120M after compression.It puts in place right from the exploitation server of research and development department, Pekinese In a destination server of Shenzhen HQ's computer room, needed using the mode that traditional ftp file transmits about 10 minutes time-consuming.Such as Fruit will dispose more destination servers, and time-consuming will 1 hour or more.Using the software publication of the embodiment of the present invention and portion Arranging method, each software upgrading are about less than 100 files, and the network transmission volume used is reduced to the left side 1M from original 120M It is right.For time-consuming at 10 to 20 seconds, efficiency of transmission improved tens times.
The software of the embodiment of the present invention is issued and dispositions method, when receiving software upgrading request, according to software upgrading The current version number of software on the destination server carried in request inquires version repository, obtain the new version number of software relative to The code variations part of current version number;Code variations part and new version number are sent to destination server, so that target Server is updated software, avoids whole codes of updated software being sent to destination server, to reduce Volume of transmitted data when software upgrading improves data transmission efficiency and software upgrading efficiency, improves the version switching of software Speed.
Further, in conjunction with reference Fig. 2, in the embodiment shown in fig. 1 on the basis of, the method can also include with Lower step:
The executable code of the software for the new version number that S104, acquisition compiler server are sent.
S105, when new version number is non-initial version number, inquire version repository, obtain the software of a upper version number can Execute code;It is preserved in version repository: each version number and corresponding code;Wherein, the corresponding code of initial version number is Executable code;The corresponding code of non-initial version number is code variations portion of the non-initial version number relative to a upper version number Point.
In the present embodiment, when a upper version number is initial version, git server can be by upper one in version repository The corresponding code of version number is determined as the executable code of the software of a upper version number.It is non-initial in a upper version number When version number, the corresponding code of the available upper version number of git server, the corresponding code of Shang Shangyige version number, directly To getting the corresponding code of initial version number;By a upper version number into initial version number, each version number corresponding generation Code is combined, and obtains the executable code of the software of a version number.
S106, the executable code of the executable code of the software of new version number and the software of a upper version number is carried out It compares, determines code variations part of the new version number relative to a upper version number.
S107, new version number and code variations part relative to a upper version number are saved in version repository.
In the present embodiment, git server can be after the above process be finished, then to the destination server received Software upgrading request is handled.
Fig. 3 is the flow diagram of software publication in accordance with another embodiment of the present invention and dispositions method.Such as Fig. 3 institute Show, on the basis of embodiment shown in Fig. 1, the method can with the following steps are included:
S108, judge whether to receive the downgrading software version request of destination server;It is taken in downgrading software version request Band: the current version number of software and rollback version number on destination server.
In the present embodiment, user generally requires when needing to debug software and returns the software on destination server Some version is fallen back on, then connect exploitation server with destination server, to the code of some version on destination server It is run, the problems of code is determined, and then modify in exploitation server to source code, on destination server The corresponding executable code of modified source code is run again, is looped back and forth like this, realizes the debugging to software.
And by the software rollback on destination server to the software of rollback version number, user needs in exploitation server First send the source code of the software for the version number that retracts on compiler server;Compiler server is to the software of rollback version number Source code is compiled, and obtains the executable code of the software of rollback version number, by the executable generation of the software for the version number that retracts Code is sent to git server, and the second indication information for carrying rollback version number is then sent to destination server.Destination service Device sends downgrading software version request when receiving the second indication information of compiler server transmission, to git server.
S109, inquiry version repository, obtain code variations part of the rollback version number relative to current version number.
In the present embodiment, the process that git server executes step 109 is specifically as follows, and is current version in rollback version number When this number upper version number, according to the corresponding code of current version number in version repository, determine rollback version number relative to working as The code variations part of preceding version number;When rollback version number is not a upper version number for current version number, rollback version is determined Intermediate releases number between this number and current version number, according to the corresponding code of current version number in version repository and intermediate releases Number corresponding code, determines code variations part of the rollback version number relative to current version number.
S110, code variations part is sent to destination server, so that destination server is by the software of current version number It retracts to the software of rollback version number.
In the software publication of the embodiment of the present invention and dispositions method, when receiving downgrading software version request, version query This library obtains code variations part of the rollback version number relative to current version number;Code variations part is sent to target clothes It is engaged in device, so that destination server is by the software rollback of current version number to the software of rollback version number;To reduce software version Volume of transmitted data in this handoff procedure improves software exchange efficiency, allows users to exploitation server and mesh in time Server connection is marked, realizes to the debugging of the software of rollback version number, improves debugging efficiency.
Fig. 4 is the structural schematic diagram of software publication according to an embodiment of the invention and deployment device.As shown in figure 4, It include: judgment module 41, enquiry module 42 and sending module 43.
Wherein, judgment module 41, for judging whether that the software upgrading for receiving destination server is requested;The software is more It is carried in new request: the current version number of software on the destination server;
Enquiry module 42, for inquiring version repository, obtaining the new of the software when receiving software upgrading request Code variations part of the version number relative to the current version number;
Sending module 43, for the code variations part and the new version number to be sent to the destination service Device, so that the destination server is updated the software.
Software publication provided by the invention and deployment device, which are specifically as follows on git server or git server, to be executed Software publication and the software of dispositions method etc..Git server, the executable code for the software to publication carry out Version Control Deng.Wherein, destination server is the server of actual motion software, according to the scale of system, the number of destination server in system Amount can be several to several hundred.Wherein, system can be for example AFC system etc..It is automatic ticket inspection system in system In the case where system, software is specially software relevant to automatic ticket inspection.
In the present embodiment, the trigger condition that destination server sends software upgrading request is to receive compiler server First instruction information;It is sent after the executable code for the software that first instruction information sends new version number for compiler server. Wherein, corresponding software source code can be sent to compiler server, compiling clothes after the completion of software upgrading by exploitation server Business device is compiled source code, obtains the executable code of software, the executable code of software is sent to git server Afterwards, the first instruction information is sent to destination server, instruction destination server has the software of new version to send out on git server Cloth.
In addition, it is necessary to explanation, if compiler server be sent to git server be initial version number software can It, can be to target after compiler server sends the executable code of the software of initial version number to git server when executing code Server sends third and indicates information, and instruction destination server sends software installation request, software installation request to git server In do not carry version number so that the executable code of the software of initial version number is sent to destination server, mesh by git server Mark installation and operation that server carries out software.
It wherein, may include: each version number and corresponding code in version repository;Wherein, initial version number is corresponding Code is executable code;The corresponding code of non-initial version number is code of the non-initial version number relative to a upper version number Change part.Corresponding, enquiry module 42 specifically can be used for, in the upper version number that current version number is new version number When, by the corresponding code of new version number in version repository, the new version number for being determined as software becomes relative to the code of current version number Dynamic part;When current version number is not a upper version number for new version number, obtain between current version number and new version number Intermediate releases number, according to the corresponding code of new version number in version repository and the corresponding code of intermediate releases number;By version repository The corresponding code of middle new version number and the corresponding code combination of intermediate releases number get up, as software new version number relative to The code variations part of current version number.
Further, in conjunction with reference Fig. 5, on the basis of the embodiment shown in fig. 4, the device can also include: to obtain Modulus block 44, comparison module 45 and preserving module 46.
Wherein, the acquisition module 44, the software of the new version number for obtaining compiler server transmission are held Line code;
The enquiry module 42 is also used to inquire the version repository when the new version number is non-initial version number, obtain The executable code of the software of Qu Shangyige version number;It is preserved in the version repository: each version number and corresponding Code;Wherein, the corresponding code of initial version number is executable code;The corresponding code of non-initial version number is non-initial version Code variations part number relative to a upper version number;
The comparison module 45, for by the institute of the executable code of the software of new version number and a upper version number The executable code for stating software is compared, and determines code variations part of the new version number relative to a upper version number;
The preserving module 46, for by the new version number and relative to the code variations part of a upper version number It is saved in version repository.
In the present embodiment, when a upper version number is initial version, git server can be by upper one in version repository The corresponding code of version number is determined as the executable code of the software of a upper version number.It is non-initial in a upper version number When version number, the corresponding code of the available upper version number of git server, the corresponding code of Shang Shangyige version number, directly To getting the corresponding code of initial version number;By a upper version number into initial version number, each version number corresponding generation Code is combined, and obtains the executable code of the software of a version number.
The software of the embodiment of the present invention is issued and is disposed in device, when receiving software upgrading request, more according to software The current version number of software, inquires version repository on the destination server carried in new request, and the new version number for obtaining software is opposite In the code variations part of current version number;Code variations part and new version number are sent to destination server, so that mesh Mark server is updated software, avoids whole codes of updated software being sent to destination server, to reduce Volume of transmitted data when software upgrading, improves data transmission efficiency and software upgrading efficiency, the version for improving software is cut Throw-over degree.
Further, on the basis of the above embodiments, the judgment module 41 is also used to judge whether to receive described The downgrading software version of destination server is requested;It is carried in the downgrading software version request: software on the destination server Current version number and rollback version number;
The enquiry module 42 is also used to inquire the version repository when receiving downgrading software version request, obtain Take the rollback version number relative to the code variations part of the current version number;
The sending module 43 is also used to the code variations part being sent to the destination server, so that described Destination server is by the software rollback of current version number to the software of the rollback version number.
In the present embodiment, user generally requires when needing to debug software and returns the software on destination server Some version is fallen back on, then connect exploitation server with destination server, to the code of some version on destination server It is run, the problems of code is determined, and then modify in exploitation server to source code, on destination server The corresponding executable code of modified source code is run again, is looped back and forth like this, realizes the debugging to software.
And by the software rollback on destination server to the software of rollback version number, user needs in exploitation server First send the source code of the software for the version number that retracts on compiler server;Compiler server is to the software of rollback version number Source code is compiled, and obtains the executable code of the software of rollback version number, by the executable generation of the software for the version number that retracts Code is sent to git server, and the second indication information for carrying rollback version number is then sent to destination server.Destination service Device sends downgrading software version request when receiving the second indication information of compiler server transmission, to git server.
In the present embodiment, enquiry module 42 specifically can be used for, in the upper version that rollback version number is current version number At this number, according to the corresponding code of current version number in version repository, code of the rollback version number relative to current version number is determined Change part;When rollback version number is not a upper version number for current version number, rollback version number and current version are determined Intermediate releases number between number, according to the corresponding code of current version number in version repository and the corresponding code of intermediate releases number, Determine code variations part of the rollback version number relative to current version number.
The software of the embodiment of the present invention is issued and is disposed in device, when receiving downgrading software version request, version query This library obtains code variations part of the rollback version number relative to current version number;Code variations part is sent to target clothes It is engaged in device, so that destination server is by the software rollback of current version number to the software of rollback version number;To reduce software version Volume of transmitted data in this handoff procedure improves software exchange efficiency, allows users to exploitation server and mesh in time Server connection is marked, realizes to the debugging of the software of rollback version number, improves debugging efficiency.
Fig. 6 is the structural schematic diagram of a kind of software publication provided in an embodiment of the present invention and deployment system, as shown in fig. 6, It include: compiler server 61, git server 62 and destination server 63;
The compiler server 61, the source code of the software for obtaining new version number, is compiled the source code, Executable code is obtained, the executable code is submitted into git server 62;
The destination server 63, for software described in installation and operation;
The git server 62 is connect, for executing respectively with the compiler server 61 and the destination server 63 As shown in Figure 1, Figure 2 or software described in Fig. 3 is issued and dispositions method.
Fig. 7 is the structural schematic diagram of another software publication provided in an embodiment of the present invention and deployment device.Software hair Cloth and deployment device include:
Memory 1001, processor 1002 and it is stored in the calculating that can be run on memory 1001 and on processor 1002 Machine program.
Processor 1002 realizes the software publication provided in above-described embodiment and dispositions method when executing described program.
Further, software publication and deployment device further include:
Communication interface 1003, for the communication between memory 1001 and processor 1002.
Memory 1001, for storing the computer program that can be run on processor 1002.
Memory 1001 may include high speed RAM memory, it is also possible to further include nonvolatile memory (non- Volatile memory), a for example, at least magnetic disk storage.
Processor 1002 realizes the publication of software described in above-described embodiment and dispositions method when for executing described program.
If memory 1001, processor 1002 and the independent realization of communication interface 1003, communication interface 1003, memory 1001 and processor 1002 can be connected with each other by bus and complete mutual communication.The bus can be industrial standard Architecture (Industry Standard Architecture, referred to as ISA) bus, external equipment interconnection (Peripheral Component, referred to as PCI) bus or extended industry-standard architecture (Extended Industry Standard Architecture, referred to as EISA) bus etc..The bus can be divided into address bus, data/address bus, control Bus processed etc..Only to be indicated with a thick line in Fig. 7, it is not intended that an only bus or a type of convenient for indicating Bus.
Optionally, in specific implementation, if memory 1001, processor 1002 and communication interface 1003, are integrated in one It is realized on block chip, then memory 1001, processor 1002 and communication interface 1003 can be completed mutual by internal interface Communication.
Processor 1002 may be a central processing unit (Central Processing Unit, referred to as CPU), or Person is specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC) or quilt It is configured to implement one or more integrated circuits of the embodiment of the present invention.
The present embodiment also provides a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, It is characterized in that, which realizes software publication as described above and dispositions method when being executed by processor.
The present embodiment also provides a kind of computer program product, when the instruction processing unit in the computer program product is held When row, software publication as described above and dispositions method are realized.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, three It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.Such as, if realized with hardware in another embodiment, following skill well known in the art can be used Any one of art or their combination are realized: have for data-signal is realized the logic gates of logic function from Logic circuit is dissipated, the specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compile Journey gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the invention System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the invention Type.

Claims (16)

1. a kind of software publication and dispositions method characterized by comprising
Judge whether that the software upgrading for receiving destination server is requested;It is carried in the software upgrading request: the target clothes The current version number of software on business device;
When receiving software upgrading request, version repository is inquired, the new version number for obtaining the software is worked as relative to described The code variations part of preceding version number;
The code variations part and the new version number are sent to the destination server, so that the destination server The software is updated.
2. the method according to claim 1, wherein further include:
Obtain the executable code of the software for the new version number that compiler server is sent;
When the new version number is non-initial version number, the version repository is inquired, obtains the software of a upper version number Executable code;It is preserved in the version repository: each version number and corresponding code;Wherein, initial version correspondence Code be executable code;The corresponding code of non-initial version number is generation of the non-initial version number relative to a upper version number Code changes part;
The executable code of the executable code of the software of new version number and the software of a upper version number is carried out It compares, determines code variations part of the new version number relative to a upper version number;
The new version number and the code variations part relative to a upper version number are saved in version repository.
3. method according to claim 1 or 2, which is characterized in that the destination server sends the software upgrading and asks The trigger condition asked is to receive the first instruction information of compiler server;The first instruction information is compiling service It is sent after the executable code of the software of device transmission new version number.
4. method according to claim 1 or 2, which is characterized in that further include:
Judge whether that the downgrading software version for receiving the destination server is requested;It is taken in the downgrading software version request Band: the current version number of software and rollback version number on the destination server;
When receiving downgrading software version request, the version repository is inquired, obtains the rollback version number relative to institute State the code variations part of current version number;
The code variations part is sent to the destination server, so that the destination server is by the institute of current version number State the software of software rollback to the rollback version number.
5. according to the method described in claim 4, it is characterized in that, the inquiry version repository, obtains the rollback version Code variations part number relative to the current version number, comprising:
It is current according to the version repository when the rollback version number is a upper version number for the current version number The corresponding code of version number determines code variations part of the rollback version number relative to the current version number;
When the rollback version number is not a upper version number for the current version number, the rollback version number and institute are determined The intermediate releases number between current version number are stated, according to the corresponding code of current version number and the centre in the version repository The corresponding code of version number determines code variations part of the rollback version number relative to the current version number.
6. according to the method described in claim 4, it is characterized in that, the destination server sends downgrading software version request Trigger condition is to receive the second indication information of compiler server;It is carried in the second indication information: rollback version number.
7. a kind of software publication and deployment device characterized by comprising
Judgment module, for judging whether that the software upgrading for receiving destination server is requested;It is taken in the software upgrading request Band: the current version number of software on the destination server;
Enquiry module, for inquiring version repository, obtaining the new version number of the software when receiving software upgrading request Code variations part relative to the current version number;
Sending module, for the code variations part and the new version number to be sent to the destination server, so that The destination server is updated the software.
8. device according to claim 7, which is characterized in that further include: obtain module, comparison module and preserving module;
The acquisition module, the executable code of the software of the new version number for obtaining compiler server transmission;
The enquiry module is also used to inquire the version repository when the new version number is non-initial version number, obtain upper one The executable code of the software of a version number;It is preserved in the version repository: each version number and corresponding code;Its In, the corresponding code of initial version number is executable code;The corresponding code of non-initial version number is that non-initial version number is opposite In the code variations part of a upper version number;
The comparison module, for by the software of the executable code of the software of new version number and a upper version number Executable code be compared, determine code variations part of the new version number relative to a upper version number;
The preserving module, for the new version number and code variations part relative to a upper version number to be saved in In version repository.
9. device according to claim 7 or 8, which is characterized in that the destination server sends the software upgrading and asks The trigger condition asked is to receive the first instruction information of compiler server;The first instruction information is compiling service It is sent after the executable code of the software of device transmission new version number.
10. device according to claim 7 or 8, which is characterized in that
The judgment module is also used to judge whether to receive the downgrading software version request of the destination server;It is described soft It is carried in the request of part version rollback: the current version number of software and rollback version number on the destination server;
The enquiry module is also used to the version repository be inquired, described in acquisition when receiving downgrading software version request Code variations part of the rollback version number relative to the current version number;
The sending module is also used to the code variations part being sent to the destination server, so that the target takes Device be engaged in for the software rollback of current version number to the software of the rollback version number.
11. device according to claim 10, which is characterized in that the enquiry module is specifically used for,
It is current according to the version repository when the rollback version number is a upper version number for the current version number The corresponding code of version number determines code variations part of the rollback version number relative to the current version number;
When the rollback version number is not a upper version number for the current version number, the rollback version number and institute are determined The intermediate releases number between current version number are stated, according to the corresponding code of current version number and the centre in the version repository The corresponding code of version number determines code variations part of the rollback version number relative to the current version number.
12. device according to claim 10, which is characterized in that the destination server sends downgrading software version request Trigger condition be to receive the second indication information of compiler server;It is carried in the second indication information: rollback version Number.
13. a kind of software publication and deployment system characterized by comprising compiler server, git server and destination service Device;
The compiler server, the source code of the software for obtaining new version number, is compiled the source code, and obtaining can Code is executed, the executable code is submitted into git server;
The destination server, for software described in installation and operation;
The git server, connect with the compiler server and the destination server respectively, for executing such as claim The described in any item software publications of 1-6 and dispositions method.
14. a kind of software publication and deployment device characterized by comprising
Memory, processor and storage are on a memory and the computer program that can run on a processor, which is characterized in that institute It states when processor executes described program and realizes such as software as claimed in any one of claims 1 to 6 publication and dispositions method.
15. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, which is characterized in that the program It is realized when being executed by processor such as software as claimed in any one of claims 1 to 6 publication and dispositions method.
16. a kind of computer program product realizes such as right when the instruction processing unit in the computer program product executes It is required that any the software publication and dispositions method in 1-6.
CN201810366893.XA 2018-04-23 2018-04-23 Software publication and dispositions method, apparatus and system Pending CN110389773A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810366893.XA CN110389773A (en) 2018-04-23 2018-04-23 Software publication and dispositions method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810366893.XA CN110389773A (en) 2018-04-23 2018-04-23 Software publication and dispositions method, apparatus and system

Publications (1)

Publication Number Publication Date
CN110389773A true CN110389773A (en) 2019-10-29

Family

ID=68284594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810366893.XA Pending CN110389773A (en) 2018-04-23 2018-04-23 Software publication and dispositions method, apparatus and system

Country Status (1)

Country Link
CN (1) CN110389773A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104125A (en) * 2019-11-19 2020-05-05 泰康保险集团股份有限公司 Intelligent integrated version management method, device, medium and electronic equipment
CN111722945A (en) * 2020-06-22 2020-09-29 重庆忽米网络科技有限公司 Industrial Internet application system realized based on middleware and realization method
CN111813430A (en) * 2020-07-08 2020-10-23 杭州安森智能信息技术有限公司 Robot cluster intelligent updating and deploying method and system
CN113127429A (en) * 2021-06-16 2021-07-16 北京车智赢科技有限公司 Compression processing method and system and computing equipment
CN116048601A (en) * 2022-05-17 2023-05-02 荣耀终端有限公司 Software version information synchronization method, system and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428188A (en) * 2012-05-25 2013-12-04 北京小米科技有限责任公司 Method and apparatus for file updating, and associated equipment
CN103544033A (en) * 2013-09-30 2014-01-29 小米科技有限责任公司 Method, device and associated equipment for rolling back application program
CN104035800A (en) * 2014-06-19 2014-09-10 广州金山网络科技有限公司 Incremental packet generation method and device, version upgrade method and device, and version upgrade system
WO2015180304A1 (en) * 2014-05-30 2015-12-03 广州市动景计算机科技有限公司 Increment upgrade method and device
CN107643895A (en) * 2017-09-29 2018-01-30 郑州云海信息技术有限公司 A kind of Software package method and apparatus
CN107908421A (en) * 2017-09-29 2018-04-13 北京创鑫旅程网络技术有限公司 The method and device of software code versions management and issue

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428188A (en) * 2012-05-25 2013-12-04 北京小米科技有限责任公司 Method and apparatus for file updating, and associated equipment
CN103544033A (en) * 2013-09-30 2014-01-29 小米科技有限责任公司 Method, device and associated equipment for rolling back application program
WO2015180304A1 (en) * 2014-05-30 2015-12-03 广州市动景计算机科技有限公司 Increment upgrade method and device
CN104035800A (en) * 2014-06-19 2014-09-10 广州金山网络科技有限公司 Incremental packet generation method and device, version upgrade method and device, and version upgrade system
CN107643895A (en) * 2017-09-29 2018-01-30 郑州云海信息技术有限公司 A kind of Software package method and apparatus
CN107908421A (en) * 2017-09-29 2018-04-13 北京创鑫旅程网络技术有限公司 The method and device of software code versions management and issue

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104125A (en) * 2019-11-19 2020-05-05 泰康保险集团股份有限公司 Intelligent integrated version management method, device, medium and electronic equipment
CN111104125B (en) * 2019-11-19 2023-09-08 泰康保险集团股份有限公司 Intelligent integrated version management method, device, medium and electronic equipment
CN111722945A (en) * 2020-06-22 2020-09-29 重庆忽米网络科技有限公司 Industrial Internet application system realized based on middleware and realization method
CN111813430A (en) * 2020-07-08 2020-10-23 杭州安森智能信息技术有限公司 Robot cluster intelligent updating and deploying method and system
CN113127429A (en) * 2021-06-16 2021-07-16 北京车智赢科技有限公司 Compression processing method and system and computing equipment
CN116048601A (en) * 2022-05-17 2023-05-02 荣耀终端有限公司 Software version information synchronization method, system and device

Similar Documents

Publication Publication Date Title
CN110389773A (en) Software publication and dispositions method, apparatus and system
CN110297766A (en) Method for testing software and software testing system based on distributed test node cluster
CN108287758A (en) A kind of application resource management method, application method and device
CN103077024B (en) A kind of device and method supporting the on-demand customization of SaaS application flow and operation
CN109614262B (en) Service checking method, device and computer readable storage medium
CN108874559A (en) electronic device, distributed system service link analysis method and storage medium
CN109471845A (en) Blog management method, server and computer readable storage medium
CN109739770A (en) The adjustment method and device of small routine
CN105281955A (en) Business and resource orchestration system, method and device
CN109409096A (en) Kernel loophole restorative procedure, device, server and system
CN108681504A (en) Automated testing method, test server and computer readable storage medium
CN106060004A (en) Database access method and database agent node
JP6324534B2 (en) Promotion status data monitoring method, apparatus, device, and non-executable computer storage medium
CN109615091A (en) The fault data processing methods of household electrical appliance, device, server and system after sale
CN109284321A (en) Data load method, calculates equipment and computer readable storage medium at device
CN111522728A (en) Method for generating automatic test case, electronic device and readable storage medium
CN104408073A (en) Data operation method and device
CN103186463B (en) Determine the method and system of the test specification of software
CN106992940B (en) Message processing method, device, system and terminal
CN111367792A (en) Test method, test device, storage medium and electronic equipment
CN105095263A (en) Generation method for card number and apparatus thereof
CN106843818B (en) Business model generation method and device
CN109672534A (en) Processing method, device, storage medium and the electronic device of Internet resources
RU2532714C2 (en) Method of acquiring data when evaluating network resources and apparatus therefor
CN109032930A (en) System detection 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191029

RJ01 Rejection of invention patent application after publication