CN117421029A - Upgrading method and device of software system, electronic equipment and storage medium - Google Patents

Upgrading method and device of software system, electronic equipment and storage medium Download PDF

Info

Publication number
CN117421029A
CN117421029A CN202311443661.7A CN202311443661A CN117421029A CN 117421029 A CN117421029 A CN 117421029A CN 202311443661 A CN202311443661 A CN 202311443661A CN 117421029 A CN117421029 A CN 117421029A
Authority
CN
China
Prior art keywords
code
customized
new version
branch
software system
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
CN202311443661.7A
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.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics 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 Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN202311443661.7A priority Critical patent/CN117421029A/en
Publication of CN117421029A publication Critical patent/CN117421029A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application relates to a method and a device for upgrading a software system, electronic equipment and a storage medium, wherein the method comprises the following steps: when the target software system is updated, creating a code branch corresponding to the new version of the target software system; obtaining a new version of the first customized code from the first customized development branch of the target software system, and merging the new version of the first customized code into the code branch; extracting the increment codes in the new version of the first customized code from the code branch, and merging the increment codes into a second customized development branch of the target software system; compiling the codes on the second customized development branch, if the compiling is successful, submitting the second customized codes with the new version to the first customized development branch so as to develop the target software system based on the first customized development branch, and obtaining the target software system with the new version. Therefore, the period of upgrading projects of the customized software system can be shortened, and the upgrading efficiency can be improved.

Description

Upgrading method and device of software system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of software, and in particular, to a method and apparatus for upgrading a software system, an electronic device, and a storage medium.
Background
With the development of the internet and computer technology, various open source operating systems (such as android systems) are also being upgraded gradually to provide more functionality for users. Correspondingly, a terminal manufacturer (such as a television manufacturer) does not need to upgrade a customized software system developed based on a starting operating system.
At present, when upgrading a customized software system developed based on an open source operating system, a terminal manufacturer firstly obtains a solution formed by the chip manufacturer aiming at a new version of the open source operating system from a chip manufacturer, and then integrates the solution and the solution aiming at the new version of the system together on the new version of the software system, and finally, a new version of customized software system is formed.
In the above process, since the solutions of the chip manufacturer and the terminal manufacturer for the new version of the software system are transplanted to the new version of the software system, a great deal of workload of code transplantation, verification and modification is involved, so that the period of upgrading the customized software system is long and the upgrading efficiency is low.
Disclosure of Invention
The application provides a method, a device, electronic equipment and a storage medium for upgrading a software system, which are used for solving the technical problems of long period and low efficiency of upgrading a customized software system by a terminal manufacturer in the prior art.
In a first aspect, the present application provides a method for upgrading a software system, the method including:
when a target software system is updated, creating a code branch corresponding to a new version of the target software system;
obtaining the new version of the first customized code from the first customized development branch of the target software system, and merging the new version of the first customized code into the code branch;
extracting the increment code in the new version of the first customized code from the code branch, and merging the increment code into a second customized development branch of the target software system, wherein the second customized development branch further comprises the new version of the second customized code;
compiling the codes on the second customized development branch, if the compiling is successful, submitting the second customized codes to the first customized development branch so as to develop the target software system based on the first customized development branch, and obtaining a new version of the target software system.
In a possible implementation manner, the obtaining the new version of the first customized code from the first customized development branch of the target software system includes:
In response to a code pulling instruction, resolving a code warehouse address of a first customized development branch of the target software system from the code pulling instruction;
and pulling the new version of the first customized code from a code repository of the first customized development branch of the target software system according to the code repository address.
In a possible implementation manner, the extracting the incremental code in the new version of the first customized code from the code branch includes:
obtaining a first customized code of a historical version of the target software system from the code branch;
and comparing the historical version of the first customized code with the new version of the first customized code to obtain the increment code in the new version of the first customized code.
In a possible implementation manner, the comparing the historical version of the first customized code with the new version of the first customized code to obtain the incremental code in the new version of the first customized code includes:
loading an increment comparison tool;
and inputting the historical version of the first customized code and the new version of the first customized code into the increment comparison tool so as to compare the historical version of the first customized code and the new version of the first customized code by the increment comparison tool to obtain the increment code in the new version of the first customized code.
In a possible implementation manner, before the extracting the incremental code in the new version of the first customized code from the code branch, the method further includes:
testing the new version of the first customized code on the code branch;
if the test is passed, executing the step of extracting the incremental code in the new version of the first customized code from the code branch;
if the test is not passed, the new version of the first customized code is deleted from the code branch.
In one possible implementation, after the deleting the new version of the first customized code from the code branch, the method further includes:
and returning to the steps after the step of acquiring the new version of the first customized code from the first customized development branch of the target software system until the set software system pause upgrading condition is met.
In a possible embodiment, the method further includes:
and under the condition that the compiling of the codes on the second customized development branch fails, performing a rollback operation on the second customized development branch so as to restore the second customized development branch to a pre-compiling state.
In a second aspect, the present application provides an upgrade apparatus for a software system, the apparatus comprising:
the system comprises a branch creation module, a code generation module and a code generation module, wherein the branch creation module is used for creating a code branch corresponding to a new version of a target software system when the target software system is updated;
a customized code obtaining module, configured to obtain the new version of the first customized code from the first customized development branch of the target software system, and merge the new version of the first customized code into the code branch;
the incremental code acquisition module is used for extracting the incremental code in the new version of first customized code from the code branch, merging the incremental code into a second customized development branch of the target software system, and the second customized development branch further comprises the new version of second customized code;
and the customized code merging module is used for compiling the codes on the second customized development branch, and if the compiling is successful, the second customized codes are submitted to the first customized development branch so as to develop the target software system based on the first customized development branch, and a new version of the target software system is obtained.
In one possible implementation manner, the customized code acquisition module includes:
the analysis unit is used for responding to the code pulling instruction and analyzing the code warehouse address of the first customized development branch of the target software system from the code pulling instruction;
and the code pulling unit is used for pulling the new version of the first customized code from the code warehouse of the first customized development branch of the target software system according to the code warehouse address.
In a possible implementation manner, the incremental code obtaining module includes:
a history code obtaining unit for obtaining a first customized code of a history version of the target software system from the code branch;
and the code comparison unit is used for comparing the historical version of the first customized code with the new version of the first customized code to obtain the increment code in the new version of the first customized code.
In a possible implementation manner, the code comparison unit is specifically configured to:
loading an increment comparison tool;
and inputting the historical version of the first customized code and the new version of the first customized code into the increment comparison tool so as to compare the historical version of the first customized code and the new version of the first customized code by the increment comparison tool to obtain the increment code in the new version of the first customized code.
In a possible embodiment, the method further includes:
a test module for testing the new version of the first customized code on the code branch before the extracting of the delta code in the new version of the first customized code from the code branch;
the incremental code obtaining module is used for executing the step of extracting the incremental code in the new version of the first customized code from the code branch if the test passes;
and the code deleting module is used for deleting the new version of the first customized code from the code branch if the test is not passed.
In a possible implementation manner, the customized code acquisition module is further configured to:
after the new version of the first customized code is deleted from the code branch, the steps of obtaining the new version of the first customized code from the first customized development branch of the target software system and thereafter are performed until a set software system pause upgrade condition is satisfied.
In a possible embodiment, the method further includes:
and the rollback module is used for executing rollback operation on the second customized development branch under the condition that the compiling of the codes on the second customized development branch fails, so as to restore the second customized development branch to a pre-compiling state.
In a third aspect, the present application provides an electronic device, including: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; at least one memory coupled to the at least one bus, wherein the processor is configured to:
when a target software system is updated, creating a code branch corresponding to a new version of the target software system;
obtaining the new version of the first customized code from the first customized development branch of the target software system, and merging the new version of the first customized code into the code branch;
extracting the increment code in the new version of the first customized code from the code branch, and merging the increment code into a second customized development branch of the target software system, wherein the second customized development branch further comprises the new version of the second customized code;
compiling the codes on the second customized development branch, if the compiling is successful, submitting the second customized codes to the first customized development branch so as to develop the target software system based on the first customized development branch, and obtaining a new version of the target software system.
In a fourth aspect, the present application also provides a computer storage medium storing computer executable instructions for performing the method of upgrading a software system according to any one of the first aspects.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, when the target software system is upgraded, the code branch corresponding to the new version of the target software system is created, the new version of the first customized code is acquired from the first customized development branch of the target software system, the new version of the first customized code is merged into the code branch, the increment code in the new version of the first customized code is extracted from the code branch, the increment code is merged into the second customized development branch of the target software system, the code on the second customized development branch is compiled, if the compiling is successful, the second customized code is submitted to the first customized development branch, so that the target software system is developed based on the first customized development branch, and the new version of the target software system is obtained.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
FIG. 1 is a flowchart of an embodiment of a method for upgrading a software system according to an embodiment of the present application;
FIG. 2 is a flowchart of an embodiment of another method for upgrading a software system according to an embodiment of the present application;
fig. 3 is a block diagram of an embodiment of an upgrade apparatus of a software system according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
The following disclosure provides many different embodiments, or examples, for implementing different structures of the invention. In order to simplify the present disclosure, components and arrangements of specific examples are described below. They are, of course, merely examples and are not intended to limit the invention. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed.
In order to solve the technical problems of long period and low efficiency of upgrading projects of a customized software system by a terminal manufacturer in the prior art, the application provides a software system upgrading method which can shorten the period of upgrading projects of the customized software system and improve the upgrading efficiency.
Fig. 1 is a flowchart of an embodiment of a method for upgrading a software system according to an embodiment of the present application. As shown in fig. 1, the method comprises the following steps:
and step 101, when the target software system is upgraded, creating a code branch corresponding to the new version of the target software system.
Firstly, it is explained that the execution body of the embodiment of the present application is an electronic device on the terminal manufacturer side, that is, the terminal manufacturer may execute the technical solution provided in the embodiment of the present application when upgrading a customized software system developed based on the open source operating system.
The target software system refers to a customized software system which needs to be updated at the terminal manufacturer side. The customized software system is a customized software system, and is developed and provided with corresponding services according to specific requirements of terminal manufacturers.
The code branch corresponding to the new version of the target software system is a development branch of a customized solution proposed by a terminal manufacturer for managing the new version of the target software system.
In an embodiment, an execution body of the embodiment of the present application creates a code branch corresponding to a new version of a target software system in response to an instruction to upgrade the target software system. It can be seen that, when the target software system is upgraded once, a code branch corresponding to the new version to be upgraded can be created, that is, different version software systems correspond to different code branches, so that the software system upgrading process of different versions can be managed and traced back easily.
Step 102, obtaining the first customized code of the new version from the first customized development branch of the target software system, and merging the first customized code into the code branch.
The first customized development branch is a customized development branch maintained by a chip manufacturer for a target software system, the chip manufacturer incorporates a customized solution (called a new version of a first customized code for convenience of description) designed for a new version of the target software system into a code repository of the first customized development branch, and subsequently incorporates a customized solution (called a new version of a second customized code for convenience of description) designed for the target software system by a terminal manufacturer into a code repository of the first customized development branch.
Based on this, in step 102, the execution body of the embodiment of the present application may obtain, from the first custom development branch maintained by the chip vendor for the target software system, the first custom code designed by the chip vendor for the new version, and merge the new version of the first custom code into the code branch.
In an embodiment, the execution body of the embodiment of the present application, in response to a code pulling instruction, analyzes a code repository address of the first customized development branch from the code pulling instruction, and then pulls a new version of the first customized code from the code repository of the first customized development branch of the target software system according to the code repository address. Optionally, the code repository address of the first customized development branch may be written in the execution body of the embodiment of the present application in advance, that is, the chip manufacturer and the terminal manufacturer make a negotiation in advance, and then when upgrading the target software system, a code pulling instruction is constructed, and the code repository address of the first customized development branch may be obtained from the execution body of the embodiment of the present application. Optionally, when upgrading the target software system, the execution body in the embodiment of the present application may interact with a chip manufacturer, for example, send a corresponding request to the chip manufacturer to request to obtain the code repository address of the first customized development branch.
Step 103, extracting the increment code in the new version of the first customized code from the code branch, and merging the increment code into a second customized development branch of the target software system, wherein the second customized development branch also comprises the new version of the second customized code.
The second customized development branch is a customized development branch maintained by a terminal manufacturer aiming at the target software system, and the terminal manufacturer merges the customized solution designed by the terminal manufacturer aiming at the new version of the target software system, namely the second customized code into a code warehouse of the second customized development branch.
In step 103, unlike the prior art in which the new version of the customized solution of the chip manufacturer is transplanted to the new version of the customized software system, in this embodiment of the present application, the incremental code of the first customized code of the new version of the chip manufacturer is extracted and only the incremental code is merged to the second customized development branch maintained by the terminal manufacturer, where the incremental code refers to the change portion of the proposed solution of the chip manufacturer for the target software system due to the upgrade of the software system. Therefore, only the incremental code is required to be verified or modified later, so that the period of upgrading projects of the customized software system can be shortened, and the upgrading efficiency is improved.
As can be seen from the above description, in each software system upgrade process, the customized solution of the chip vendor for the target software system of the current version to be upgraded is migrated to the code branch, that is, the customized solution of the chip vendor for each version of the target software system is maintained on the code branch, so that when the incremental code in the current version of the first customized code is extracted from the code branch, the historical version of the first customized code of the target software system, which is generally referred to as the previous version, is obtained from the code branch, and then the first customized code of the historical version and the first customized code of the new version are compared, so as to obtain the incremental code in the first customized code of the new version.
As an alternative implementation manner, comparing the historical version of the first customized code with the new version of the first customized code to obtain the specific implementation of the increment code in the new version of the first customized code includes: and loading an increment comparison tool, and inputting the historical version of the first customized code and the new version of the first customized code into the increment comparison tool so as to compare the historical version of the first customized code and the new version of the first customized code by the increment comparison tool to obtain the increment code in the new version of the first customized code. The incremental comparison tool is, for example, an open source Beyond computer comparison tool. By the processing, the efficiency of determining the increment codes in the new version of the first customized code can be improved, so that the period of upgrading projects of the customized software system can be shortened in an auxiliary mode, and the upgrading efficiency is improved.
After the incremental comparison tool is used for obtaining the incremental codes in the new version of the first customized code, a comparison result can be displayed through a visual interface, for example, under the corresponding code warehouse path, if the same code file has a difference, the code file is filtered out and is displayed in red, and other code files without the difference can be hidden and processed, so that the reading interference to a user is reduced. Further, in the above visual interface, for the filtered code file, the user may open the code file to view the specific difference portion. Through the processing, the user experience can be improved.
It is further added here that the delta code is the first customized code itself of the first version when the target software system is first developed, i.e. when the first version of the target software system is developed.
And 104, compiling the codes on the second customized development branch, and if the compiling is successful, submitting the second customized codes to the first customized development branch so as to develop the target software system based on the first customized development branch, thereby obtaining a new version of the target software system.
As can be seen from the above description of the steps, the code on the second customized development branch in the step 104 includes both the second customized code designed by the terminal manufacturer for the new version of the target system software, and the first customized code of the first version, and the incremental code in each subsequent new version of the first customized code, which also makes the second customized development branch include the complete new version of the first customized code when the version of the target software system is upgraded. Therefore, in step 104, the code on the second custom development branch may be compiled, which means that if the compiling is successful, the custom solution designed by the terminal manufacturer for the new version of the target system software is adapted to the custom solution designed by the chip manufacturer for the new version of the target system software, so that the two can be integrated. Based on this, if the compilation is successful, the second customized code is committed to the first customized development branch. It should be noted here that only the second customized code is submitted from the second customized development branch to the first customized development branch, because the first customized development branch itself maintains a complete new version of the first customized code. So far, the first customized development branch maintains not only the customized solution designed by the chip manufacturer for the new version of the target software system, but also the customized solution designed by the terminal manufacturer for the new version of the target system software, so that the chip manufacturer only needs to butt-joint the first customized branch, the codes on the first customized branch are integrated into the corresponding mass production branch, and finally the new version of the target software system is produced through the mass production branch.
Here, it is further explained that, in combination with the above description, the first custom development branch maintains not only the custom solution designed by the chip manufacturer for the new version of the target software system, but also the custom solution designed by the terminal manufacturer for the new version of the target system software, and the second custom development branch maintains not only the custom solution designed by the terminal manufacturer for the new version of the target system software, but also the custom solution designed by the chip manufacturer for the new version of the target software system, so that by applying the technical scheme provided by the embodiment of the present application, the first custom development branch and the second custom development branch can be aligned, that is, the code warehouse of the chip manufacturer and the code warehouse of the terminal manufacturer can be aligned to the paths thereof, which can reduce errors of code submission and code merging performed by people in different code warehouse paths, and even if errors are encountered in later period, whether the custom solution is not the problem is caused by the fact that the code warehouse is quickly aligned, and the code warehouse is aligned to the code warehouse is well aligned, and the reasons of comparing the code warehouse and the code warehouse are well compared with each other.
In addition, in the event that compilation of code on the second custom development branch fails, a rollback operation is performed on the second custom development branch to restore the second custom development branch to a pre-compilation state.
According to the technical scheme provided by the embodiment of the application, when the target software system is upgraded, the code branch corresponding to the new version of the target software system is created, the new version of the first customized code is acquired from the first customized development branch of the target software system, the new version of the first customized code is merged to the code branch, the increment code in the new version of the first customized code is extracted from the code branch, the increment code is merged to the second customized development branch of the target software system, the code on the second customized development branch is compiled, if the compiling is successful, the second customized code is submitted to the first customized development branch, so that the target software system is developed based on the first customized development branch, and the new version of the target software system is obtained.
Fig. 2 is a flowchart of an embodiment of another method for upgrading a software system according to an embodiment of the present application. As shown in fig. 2, the method comprises the following steps:
step 201, when upgrading the target software system, creating a code branch corresponding to the new version of the target software system.
Step 202, merging the new version of the first customized code from the first customized development branch of the target software system to the code branch.
The explanation of the above steps 201 and 202 may be referred to the related description in the embodiment shown in fig. 1, and will not be repeated here.
Step 203, test the new version of the first customized code on the code branch.
And 204, if the test is passed, extracting the increment code in the new version of the first customized code from the code branch, and merging the increment code into the second customized development branch of the target software system.
The flow shown in fig. 2 is proposed on the basis of the flow shown in fig. 1, a new version of the first customized code is tested on the code branch, if the test passes, the incremental code in the new version of the first customized code is extracted from the code branch, and the incremental code is merged into the second customized development branch of the target software system, so that the vulnerability of the developed new version of the software system caused by the defect or vulnerability of the code can be avoided through the processing.
In addition, if the test is not passed, the new version of the first customized code is deleted from the code branch, and further, the steps of acquiring the new version of the first customized code from the first customized development branch of the target software system and thereafter can be performed to provide a fault tolerance mechanism. Here, after a period of time, the method may return to executing the steps of acquiring the new version of the first customized code from the first customized development branch of the target software system, thereby giving the chip manufacturer modification time to avoid acquiring the first customized code which fails the test again.
Further, the steps of acquiring the new version of the first customized code from the first customized development branch of the target software system and thereafter may be repeated for a plurality of times, if the test is not passed, until the set condition for the software system to suspend the upgrade is satisfied. Here, the set software system suspension upgrade condition is, for example, that the number of execution times of the above steps reaches a set number of times threshold, for example, 3 times. By the aid of the processing, the steps can be repeatedly executed under the condition that the new version of the first customized code is not tested all the time, so that the period of the whole software system upgrading project is infinitely prolonged, and the waste of computing resources is caused. The software system upgrade suspension condition set above may also be that a upgrade suspension instruction is received. Specifically, in the case that the test is not passed, a corresponding prompt message may be triggered to select whether to trigger the suspension of the upgrade according to the actual situation by the user.
And 205, compiling the codes on the second customized development branch, and if the compiling is successful, submitting the second customized codes to the first customized development branch so as to develop the target software system based on the first customized development branch, thereby obtaining a new version of the target software system.
The explanation of step 205 may be referred to the related description in the embodiment shown in fig. 1, and will not be repeated here.
According to the technical scheme, in the process of upgrading the customized software system, only the transplanting of the increment codes and the second customized codes is involved, so that compared with the prior art that a solution of a chip manufacturer and a terminal manufacturer aiming at a new version of the software system is transplanted to the new version of the software system, the method of transplanting, verifying and modifying a large amount of codes can greatly shorten the period of upgrading projects of the customized software system and improve the upgrading efficiency.
Fig. 3 is a block diagram of an embodiment of an upgrade apparatus of a software system according to an embodiment of the present application. As shown in fig. 3, the apparatus includes:
the branch creation module 31 is configured to create a code branch corresponding to a new version of a target software system when the target software system is upgraded;
A customized code obtaining module 32, configured to obtain the new version of the first customized code from the first customized development branch of the target software system, and merge the new version of the first customized code into the code branch;
an incremental code obtaining module 33, configured to extract an incremental code from the code branch in the new version of the first customized code, and merge the incremental code into a second customized development branch of the target software system, where the second customized development branch further includes the new version of the second customized code;
and the customized code merging module 34 is configured to compile the code on the second customized development branch, and if the compiling is successful, submit the second customized code to the first customized development branch, so as to develop the target software system based on the first customized development branch, and obtain a new version of the target software system.
In one possible implementation, the customized code acquisition module 34 includes:
the analysis unit is used for responding to the code pulling instruction and analyzing the code warehouse address of the first customized development branch of the target software system from the code pulling instruction;
And the code pulling unit is used for pulling the new version of the first customized code from the code warehouse of the first customized development branch of the target software system according to the code warehouse address.
In a possible implementation manner, the incremental code obtaining module 33 includes:
a history code obtaining unit for obtaining a first customized code of a history version of the target software system from the code branch;
and the code comparison unit is used for comparing the historical version of the first customized code with the new version of the first customized code to obtain the increment code in the new version of the first customized code.
In a possible implementation manner, the code comparison unit is specifically configured to:
loading an increment comparison tool;
and inputting the historical version of the first customized code and the new version of the first customized code into the increment comparison tool so as to compare the historical version of the first customized code and the new version of the first customized code by the increment comparison tool to obtain the increment code in the new version of the first customized code.
In a possible embodiment, the method further includes:
A test module for testing the new version of the first customized code on the code branch before the extracting of the delta code in the new version of the first customized code from the code branch;
the incremental code obtaining module is used for executing the step of extracting the incremental code in the new version of the first customized code from the code branch if the test passes;
and the code deleting module is used for deleting the new version of the first customized code from the code branch if the test is not passed.
In a possible implementation manner, the customized code acquisition module 32 is further configured to:
after the new version of the first customized code is deleted from the code branch, the steps of obtaining the new version of the first customized code from the first customized development branch of the target software system and thereafter are performed until a set software system pause upgrade condition is satisfied.
In a possible embodiment, the method further includes:
and the rollback module is used for executing rollback operation on the second customized development branch under the condition that the compiling of the codes on the second customized development branch fails, so as to restore the second customized development branch to a pre-compiling state.
As shown in fig. 4, the embodiment of the present application provides an electronic device, which includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 perform communication with each other through the communication bus 114,
a memory 113 for storing a computer program;
in one embodiment of the present application, the processor 111 is configured to implement the method for upgrading a software system provided in any one of the foregoing method embodiments when executing a program stored in the memory 113, where the method includes:
when a target software system is updated, creating a code branch corresponding to a new version of the target software system;
obtaining the new version of the first customized code from the first customized development branch of the target software system, and merging the new version of the first customized code into the code branch;
extracting the increment code in the new version of the first customized code from the code branch, and merging the increment code into a second customized development branch of the target software system, wherein the second customized development branch further comprises the new version of the second customized code;
Compiling the codes on the second customized development branch, if the compiling is successful, submitting the second customized codes to the first customized development branch so as to develop the target software system based on the first customized development branch, and obtaining a new version of the target software system.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the software system upgrade method provided by any one of the method embodiments described above.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the related art in the form of a software system, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the respective embodiments or some parts of the embodiments.
It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only, and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," "includes," "including," and "having" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order described or illustrated, unless an order of performance is explicitly stated. It should also be appreciated that additional or alternative steps may be used.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for upgrading a software system, the method comprising:
when a target software system is updated, creating a code branch corresponding to a new version of the target software system;
obtaining the new version of the first customized code from the first customized development branch of the target software system, and merging the new version of the first customized code into the code branch;
extracting the increment code in the new version of the first customized code from the code branch, and merging the increment code into a second customized development branch of the target software system, wherein the second customized development branch further comprises the new version of the second customized code;
compiling the codes on the second customized development branch, if the compiling is successful, submitting the second customized codes to the first customized development branch so as to develop the target software system based on the first customized development branch, and obtaining a new version of the target software system.
2. The method of claim 1, wherein the retrieving the new version of the first customized code from the first customized development branch of the target software system comprises:
In response to a code pulling instruction, resolving a code warehouse address of a first customized development branch of the target software system from the code pulling instruction;
and pulling the new version of the first customized code from a code repository of the first customized development branch of the target software system according to the code repository address.
3. The method of claim 1, wherein the extracting the delta code in the new version of the first customized code from the code branch comprises:
obtaining a first customized code of a historical version of the target software system from the code branch;
and comparing the historical version of the first customized code with the new version of the first customized code to obtain the increment code in the new version of the first customized code.
4. The method of claim 3, wherein the comparing the historical version of the first customized code with the new version of the first customized code to obtain the delta code in the new version of the first customized code comprises:
loading an increment comparison tool;
and inputting the historical version of the first customized code and the new version of the first customized code into the increment comparison tool so as to compare the historical version of the first customized code and the new version of the first customized code by the increment comparison tool to obtain the increment code in the new version of the first customized code.
5. The method of claim 1, further comprising, prior to said extracting the delta code in the new version of the first customized code from the code branch:
testing the new version of the first customized code on the code branch;
if the test is passed, executing the step of extracting the incremental code in the new version of the first customized code from the code branch;
if the test is not passed, the new version of the first customized code is deleted from the code branch.
6. The method of claim 5, further comprising, after said deleting the new version of the first customized code from the code branch:
and returning to the steps after the step of acquiring the new version of the first customized code from the first customized development branch of the target software system until the set software system pause upgrading condition is met.
7. The method as recited in claim 1, further comprising:
and under the condition that the compiling of the codes on the second customized development branch fails, performing a rollback operation on the second customized development branch so as to restore the second customized development branch to a pre-compiling state.
8. An upgrade apparatus for a software system, said apparatus comprising:
the system comprises a branch creation module, a code generation module and a code generation module, wherein the branch creation module is used for creating a code branch corresponding to a new version of a target software system when the target software system is updated;
a customized code obtaining module, configured to obtain the new version of the first customized code from the first customized development branch of the target software system, and merge the new version of the first customized code into the code branch;
the incremental code acquisition module is used for extracting the incremental code in the new version of first customized code from the code branch, merging the incremental code into a second customized development branch of the target software system, and the second customized development branch further comprises the new version of second customized code;
and the customized code merging module is used for compiling the codes on the second customized development branch, and if the compiling is successful, the second customized codes are submitted to the first customized development branch so as to develop the target software system based on the first customized development branch, and a new version of the target software system is obtained.
9. An electronic device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; at least one memory coupled to the at least one bus, wherein the processor is configured to:
when a target software system is updated, creating a code branch corresponding to a new version of the target software system;
obtaining the new version of the first customized code from the first customized development branch of the target software system, and merging the new version of the first customized code into the code branch;
extracting the increment code in the new version of the first customized code from the code branch, and merging the increment code into a second customized development branch of the target software system, wherein the second customized development branch further comprises the new version of the second customized code;
compiling the codes on the second customized development branch, if the compiling is successful, submitting the second customized codes to the first customized development branch so as to develop the target software system based on the first customized development branch, and obtaining a new version of the target software system.
10. A storage medium storing computer executable instructions for performing the method of upgrading a software system according to any one of the preceding claims 1-7.
CN202311443661.7A 2023-11-01 2023-11-01 Upgrading method and device of software system, electronic equipment and storage medium Pending CN117421029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311443661.7A CN117421029A (en) 2023-11-01 2023-11-01 Upgrading method and device of software system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311443661.7A CN117421029A (en) 2023-11-01 2023-11-01 Upgrading method and device of software system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117421029A true CN117421029A (en) 2024-01-19

Family

ID=89526219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311443661.7A Pending CN117421029A (en) 2023-11-01 2023-11-01 Upgrading method and device of software system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117421029A (en)

Similar Documents

Publication Publication Date Title
KR101989802B1 (en) Method for performing test using test case and apparatus for the same
US10019256B2 (en) Systems and methods for incremental software development
CN107678748B (en) Source code file compiling method and device
US9063819B2 (en) Extensible patch management
US9274930B2 (en) Debugging system using static analysis
US11748245B2 (en) Object-oriented regression-candidate filter
JP5396979B2 (en) Software development support device, system, software development support device function expansion method, and program
WO2021057252A1 (en) Service processing flow configuration method and apparatus, and service request processing method and apparatus
CN111930398B (en) Application program updating method, device, system, medium and equipment
US10248409B1 (en) Limiting the effects of source code patches on corresponding native-code patches
CN111414169B (en) BMC (baseboard management controller) image upgrading method and related components
CN109614107B (en) Integration method and device of software development kit
JP2002196937A (en) Method for compiling assembly language code for instruction set architecture including new instruction using conventional assembler
EP3974965A1 (en) Adaptive hot reload for class changes
Zhao et al. Towards automatically repairing compatibility issues in published android apps
US11544050B1 (en) Software patch automation
CN113721948A (en) Database upgrading method, system and storage medium
CN107729043B (en) Method and device for checking increment upgrade package and computer readable storage medium
CN111061486B (en) Android application program increment method
CN112052037A (en) Application software development method, device, equipment and medium
CN117421029A (en) Upgrading method and device of software system, electronic equipment and storage medium
US9396239B2 (en) Compiling method, storage medium and compiling apparatus
CN115964045A (en) Method, device and medium for quickly and automatically constructing cross-architecture operating system
CN115034165A (en) Chip simulation verification method, system, equipment and storage medium
CN117813586A (en) Hot reloading running applications with unsaved source code changes

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