CN109298880B - Multi-version code generation method and device and electronic device - Google Patents

Multi-version code generation method and device and electronic device Download PDF

Info

Publication number
CN109298880B
CN109298880B CN201810903755.0A CN201810903755A CN109298880B CN 109298880 B CN109298880 B CN 109298880B CN 201810903755 A CN201810903755 A CN 201810903755A CN 109298880 B CN109298880 B CN 109298880B
Authority
CN
China
Prior art keywords
kernel
code generation
code
version
branch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810903755.0A
Other languages
Chinese (zh)
Other versions
CN109298880A (en
Inventor
秦元
王小恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hundsun Technologies Inc
Original Assignee
Hundsun Technologies Inc
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 Hundsun Technologies Inc filed Critical Hundsun Technologies Inc
Priority to CN201810903755.0A priority Critical patent/CN109298880B/en
Publication of CN109298880A publication Critical patent/CN109298880A/en
Application granted granted Critical
Publication of CN109298880B publication Critical patent/CN109298880B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/545Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space

Landscapes

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

Abstract

The invention provides a multi-version code generation method, equipment and electronic equipment, belonging to the field of programming and comprising the steps of extracting a project version number from a source code generation request; if the item version number is consistent with the version number corresponding to the main line code generation kernel, calling the main line code generation kernel to generate a source code; and if not, acquiring a branch code generation kernel corresponding to the item version number, and calling the branch code generation kernel to generate a source code. The method only uses one code generation device and a plurality of code generation kernels, only loads the main line code generation kernel corresponding to the latest project version number and does not load other branch code generation kernels during starting, reduces the memory occupancy rate of the computer, and only needs to summarize the existing main line code generation kernels into the historical version code generation kernels if the code generation kernels of new project versions need to be developed, and the code generation kernels corresponding to the new project version numbers are used as the main line code generation kernels, thereby improving the code development efficiency.

Description

Multi-version code generation method and device and electronic device
Technical Field
The invention belongs to the field of programming, and particularly relates to a multi-version code generation method, multi-version code generation equipment and electronic equipment.
Background
In the software development process, the versions of the project are gradually increased after the project is online, and the corresponding version numbers are increased. After a certain time has elapsed, it may happen that multiple version numbers exist at the same time.
At this time, if some source codes with version numbers are generated based on engineering requirements, two processing modes exist.
And firstly, opening all code generation devices corresponding to the version numbers at the same time so as to obtain the source codes of the corresponding version numbers from each code generation device. When the method is used, the performance of the computer is seriously consumed when the source codes with more version numbers are obtained, so that other development services are influenced.
And secondly, acquiring the source code generation content of the required version number in a code generation device based on a judgment branch statement reserved in the code writing process. When the method is used, a large number of judgment branch statements are mixed in the multi-version code generation logic, so that the maintainability of the code is reduced, and the development difficulty is increased.
Disclosure of Invention
In order to solve the defects and shortcomings in the prior art, the invention provides a multi-version code generation method and equipment which only use one set of code generation device, can reduce the performance occupation and improve the code maintainability.
In order to achieve the above technical object, according to a first aspect of an embodiment of the present disclosure, the present invention provides a multi-version code generating method, including:
acquiring a source code generation request, and extracting an item version number corresponding to a source code of the request from the source code generation request;
if the item version number is consistent with the version number corresponding to the main line code generating kernel, directly calling the main line code generating kernel in the code generating device to generate a source code;
if the project version number is not consistent with the version number corresponding to the main line code generation kernel, acquiring a branch code generation kernel corresponding to the project version number, and calling the branch code generation kernel in a code generation device to generate a source code;
transmitting the generated source code to a device that sends the source code generation request.
Optionally, if the item version number is not consistent with the version number corresponding to the main line code generation kernel, acquiring the branch code generation kernel corresponding to the item version number includes:
if the item version number is not consistent with the version number corresponding to the main line code generation kernel, calling a branch code generation kernel corresponding to the item version number from a kernel library of a local computer, and calling the branch code generation kernel in a code generation device to generate a source code.
Optionally, if the item version number is not consistent with the version number corresponding to the main line code generation kernel, acquiring the branch code generation kernel corresponding to the item version number includes:
if the branch code generation kernel corresponding to the project version number does not exist in the local computer kernel library, acquiring the branch code generation kernel corresponding to the project version number from the multi-version kernel server;
downloading the branch code generation kernel to a local computer kernel library, and calling the branch code generation kernel in a code generation device to generate a source code.
Optionally, before the branch code generation kernel corresponding to the item version number is called from the local computer kernel library, the generation method further includes:
acquiring feature codes of a remote branch code generation kernel, which are stored on a multi-version kernel server and have the same project version number as that corresponding to the branch code generation kernel;
comparing the feature code with the feature code of the branch code generation kernel;
when the feature codes are consistent, calling the branch code generation kernel in a code generation device to generate a source code;
and when the feature codes are not consistent, updating the branch code generation kernel.
Optionally, the updating the branch code generation kernel includes:
deleting a branch code generation kernel corresponding to the source code version number from the local computer kernel library;
and downloading a remote code generation kernel corresponding to the project version number from the multi-version kernel server, and storing the remote code generation kernel to a local computer kernel library.
Optionally, the updating the branch code generation kernel includes:
and performing incremental updating on the branch code generation kernel by taking a remote branch code generation kernel which is stored on the multi-version kernel server and has the same item version number as the branch code generation kernel as a sample.
Optionally, the generating method includes:
before the source code generation request is received, downloading branch code generation kernels related to the item to which the source code generation request belongs in batch.
Optionally, the generating method further includes:
and if the version number of the current project is updated to obtain the version number of the new version project, storing a main line code generation kernel corresponding to the version number of the new version project, and replacing the version number of the current project in the code generation device with the version number of the project corresponding to the source code used by the new version project.
Optionally, the generating method further includes:
and after the code generation kernel including the main line code generation kernel and the branch code generation kernel obtains the source code, terminating the process corresponding to the code generation kernel and releasing the memory.
According to a second aspect of the embodiments of the present disclosure, the present application further proposes a multi-version code generating apparatus, including:
the file extraction unit is used for acquiring a source code generation request and extracting an item version number corresponding to a source code of the request from the source code generation request;
a code direct generation unit, configured to directly call the main line code generation kernel in the code generation apparatus to generate the source code if the item version number is consistent with a version number corresponding to the main line code generation kernel;
the code branch generation unit is further used for acquiring a branch code generation kernel corresponding to the project version number and calling the branch code generation kernel in a code generation device to generate a source code if the project version number is inconsistent with the version number corresponding to the main line code generation kernel;
and the file sending unit is used for transmitting the generated source code to a device sending the source code generation request.
Optionally, the code branch generating unit includes:
a local code branch generation subunit, configured to, if the item version number is not consistent with the version number corresponding to the main line code generation kernel, call a branch code generation kernel corresponding to the item version number from a local computer kernel library, and call the branch code generation kernel in a code generation apparatus to generate a source code.
Optionally, the code branch generating unit further includes:
a remote kernel obtaining subunit, configured to obtain, from the multi-version kernel server, a branch code generation kernel corresponding to the item version number if the branch code generation kernel corresponding to the item version number does not exist in the local computer kernel library;
and the remote code branch generation subunit is used for downloading the branch code generation kernel to a local computer kernel library and calling the branch code generation kernel in the code generation device to generate the source code.
Optionally, the code direct generating unit includes:
the characteristic code acquiring subunit is used for acquiring the characteristic codes of the remote branch code generating kernels, which are stored on the multi-version kernel server and have the same project version numbers as the corresponding branch code generating kernels;
the feature code comparison subunit is used for comparing the feature code with the feature code of the branch code generation kernel;
the first source code generation subunit is used for calling the branch code generation kernel in the code generation device to generate a source code when the feature codes are consistent;
and the second source code generation subunit is used for updating the branch code generation kernel when the feature codes are inconsistent.
Optionally, the second source code generating subunit includes:
a kernel deleting subunit, configured to delete the branch code generation kernel corresponding to the source code version number from the local computer kernel library;
and the kernel saving subunit is used for downloading the remote code generation kernel corresponding to the project version number from the multi-version kernel server and saving the remote code generation kernel to a local computer kernel library.
Optionally, the second source code generating subunit includes:
and the kernel increment updating subunit is used for performing increment updating on the branch code generation kernel by taking the remote branch code generation kernel which is stored on the multi-version kernel server and has the same item version number as the branch code generation kernel as a sample.
Optionally, the multi-version code generating device includes:
and the kernel downloading unit is used for downloading branch code generation kernels related to the items to which the source code generation requests belong in batch before receiving the source code generation requests.
Optionally, the multi-version code generating device includes:
and the version number replacing unit is used for storing the main line code generating kernel corresponding to the version number of the new version project and replacing the version number of the current project in the code generating device with the version number of the project corresponding to the source code used by the new version project if the version number of the current project is updated to obtain the version number of the new version project.
Optionally, the multi-version code generating device includes:
and the memory release unit is used for terminating the process corresponding to the code generation kernel and releasing the memory after the code generation kernel including the main line code generation kernel and the branch code generation kernel obtains the source code.
According to a third aspect of the embodiments of the present disclosure, the present application further provides an electronic device, including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the steps of the aforementioned multi-version code generation method via execution of the executable instructions.
According to a fourth aspect of the embodiments of the present disclosure, the present application also proposes a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to perform the steps of the aforementioned multi-version code generation method.
The technical scheme provided by the invention has the beneficial effects that:
the memory occupancy rate of the computer is reduced by only using a combination mode of one code generation device and a plurality of code generation kernels, only loading a main line code generation kernel representing the latest project version number and not loading other branch codes to generate the kernels when the computer is started, only automatically calling the branch code generation kernel corresponding to the project version number when other versions of codes are required to be generated, automatically releasing the memory after the generation is finished, if the code generation kernel of a new project version is required to be developed, only needing to summarize the existing main line code generation kernel into a history version code generation kernel, and only needing to use the code generation kernel corresponding to the newly developed project version number as the main line code generation kernel, thereby greatly improving the code development efficiency.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flow chart of a multi-version code generation method provided by the present invention;
FIG. 2 is a flow chart of different generation modes of source code provided by the present invention;
FIG. 3 is a schematic flow chart of determining whether kernel update is required according to the present invention;
FIG. 4 is a schematic flow chart of updating a code generation kernel according to the present invention;
FIG. 5 is a flow diagram of multi-version code generation kernel iteration provided by the present invention;
FIG. 6 is a schematic structural diagram of a multi-version code generation apparatus provided by the present invention;
FIG. 7 is a schematic structural diagram of a code branch generation unit provided by the present invention;
FIG. 8 is a schematic structural diagram of a code direct generation unit provided in the present invention;
FIG. 9 is a schematic structural diagram of a second source code generation subunit provided by the present invention;
FIG. 10 is a first schematic diagram of another structure of a multi-version code generation apparatus provided by the present invention;
FIG. 11 is a schematic diagram of another structure of a multi-version code generation apparatus provided by the present invention;
FIG. 12 is a schematic diagram of another structure of a multi-version code generation apparatus provided by the present invention;
fig. 13 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
To make the structure and advantages of the present invention clearer, the structure of the present invention will be further described with reference to the accompanying drawings.
Example one
For ease of understanding, several names involved in the present embodiment are explained first:
the code generation device: and (3) a tool for generating source code which can be compiled and run finally by the system, such as generating the source code in a C language form by using a natural language in a text format (the natural language in the text format has item version numbers, such as V1.0 and V2.0).
A code generation kernel: the executable program of the packaging code generation engine is a program which can be called by a code generation device, and the code generation kernel of the invention comprises a main line code generation kernel and a plurality of branch code generation kernels.
The main line code generation kernel: and packaging the executable program of the code generation engine with the latest version, namely the code generation kernel with the latest version.
The branch code generation kernel: and encapsulating the executable program of the code generation engine with the non-latest version.
Local computer kernel library: and the main line code generation kernel and the branch code generation kernel are used for caching the calls of the code generation device.
The multi-version kernel server: a server deployed with all versions of the code generation kernel.
The invention provides a multi-version code generation method, which mainly solves the technical problems of the background technology and comprises the following steps:
providing a code generating device, wherein the code generating device contains a main line code generating kernel of a source code used by a corresponding latest project version number, and simultaneously provides a plurality of version branch code generating kernels, the code generating device only contains a latest code generating engine, and the different version code generating kernels respectively contain corresponding different version code generating engines; when the code is generated, if the code of the latest version needs to be generated, the code generating device is started to directly generate the code.
And if other version codes need to be generated, automatically calling a code generation kernel corresponding to the item version number in the source code generation request to generate codes. When the method is used for generating the source code, the branch code generation kernel of the corresponding version is preferably searched from the kernel library of the local computer, and then the branch code generation kernel generates the source code. And if the local computer kernel library does not have a branch code generation kernel which meets the requirement, downloading the branch code generation kernel corresponding to the item version number from the multi-version kernel server. And if the local computer kernel library has a branch code generation kernel corresponding to the project version number but is inconsistent with the multi-version kernel server, updating the branch code generation kernel on the multi-version kernel server into the local computer kernel library, and calling to generate the source code.
Based on the above technical concept, the present application provides a multi-version code generation method, as shown in fig. 1, specifically performing the steps of:
and S11, acquiring the source code generation request, and extracting the item version number corresponding to the requested source code from the source code generation request.
In order to generate a source code corresponding to a source code generation request as soon as possible after acquiring the source code generation request transmitted from, for example, a client or another device, it is necessary to extract an item version number corresponding to a requested source code from the source code generation request, so that a source code corresponding to a source code version number can be obtained by a code generation device in a subsequent step based on the item version number.
And S12, if the item version number is consistent with the version number corresponding to the main line code generating kernel, directly calling the main line code generating kernel in the code generating device to generate the source code.
Since the amount of the source code of the latest version is usually large, the code generation apparatus mentioned in this embodiment always stores the main line code generation kernel capable of generating the latest version, so that the code generation apparatus can be called at the first time to obtain the source code representing the current latest version number.
Considering that there is a need to retrieve the source code of the history version due to requirement tracing and the like in the process of project development, when a request for the source code of the history version is received, the determination step shown in step S13 needs to be executed.
And S13, if the item version number is not consistent with the version number corresponding to the main line code generating kernel, acquiring a branch code generating kernel corresponding to the item version number, and calling the branch code generating kernel in the code generating device to generate a source code.
Based on the above determination process, if the historical version source code needs to be generated, the code generation kernel corresponding to the item version number needs to be called, unlike in step S12, the branch code generation kernel is used here, and a branch code generation kernel different from the main line code generation kernel is called in the code generation apparatus to generate the historical version source code corresponding to the source code generation request.
As can be seen from the noun explanation in the beginning of the present embodiment, in the process of generating the source code of the historical version, only one code generation apparatus is started, and the difference from the content in step S12 is that the kernel used in the code generation apparatus is not the preset kernel for generating the mainline code corresponding to the latest version. Since a plurality of code generation devices are not started, a large amount of consumption of computer performance in the background art does not exist in the process of generating the source code.
Regarding the difference of the code generation kernels in step S13, two cases are described in this embodiment, and the specific process is as shown in fig. 2.
S131, if the item version number is not consistent with the version number corresponding to the main line code generating kernel, calling a branch code generating kernel corresponding to the item version number from a kernel library of the local computer, and calling the branch code generating kernel in the code generating device to generate a source code. Or
S132, if the branch code generation kernel corresponding to the project version number does not exist in the kernel library of the local computer, acquiring the branch code generation kernel corresponding to the project version number from the multi-version kernel server;
s133, downloading the branch code generation kernel to a local computer kernel library, and calling the branch code generation kernel in the code generation device to generate a source code.
Step S131 represents that the code generation kernel is from the local computer kernel library. Steps S132-S133 represent the code generation kernel coming from a multi-version kernel server communicatively connected to the local computer.
The local computer kernel library is used as an area for storing code generation kernels corresponding to different project version numbers in the local computer, stores code generation kernels of common or project version numbers related to software functions responsible for current developers, is equivalent to a cache area for responding to a source code generation request, and can process historical version source code requests in time.
However, the storage capacity of the local computer is limited, and it is impossible or unnecessary to store the entire version code generation kernel of the item in the local computer kernel library, so that once the item version number corresponding to the source code in the source code generation request exceeds the storage range of the local computer kernel library, the branch code generation kernel corresponding to the item version number needs to be acquired from the multi-version kernel server.
Because the multi-version kernel server is not limited by storage capacity, the code generation kernels corresponding to the version numbers of all projects of the project are stored in the multi-version kernel server, and the local computer can acquire branch code generation kernels with any version number from the multi-version kernel server. The server is used for storing the multi-version code generation kernels, so that the capacity is not limited, a plurality of computers can obtain the latest code generation kernels corresponding to the version numbers of each item, and the source code generation failure caused by the code generation kernels containing bugs is prevented.
In order to ensure timeliness and accuracy of the code generation kernel stored in the local computer kernel library, the code generation kernel stored therein needs to be updated, and the step of determining whether the update is needed is shown in fig. 3:
s1301, acquiring feature codes of a remote code generation kernel, which are stored on a multi-version kernel server and have the same project version number as that of a branch code generation kernel;
s1302, comparing the feature codes with the feature codes of the branch code generation kernel;
s1303, calling a branch code generation kernel in the code generation device to generate a source code when the feature codes are consistent;
and S1304, updating the branch code generation kernel when the feature codes are not consistent.
It is noted that the verification update operation of the code generation kernel needs to be completed before the code generation kernel stored in the local computer kernel library is called.
The feature code involved in steps S1301-S1303 is typically MD 5. MD5, Message-Digest Algorithm5, is used to ensure that the information transfer is complete and consistent. Is one of the hash algorithms widely used by computers.
The specific operation mode for executing steps S1301-S1304 based on MD5 is as follows:
the code generation kernel file stored in the local computer kernel library is calculated to obtain a first MD5 value, and the remote code generation kernel file with the same item version number as the code generation kernel in the multi-version kernel server is calculated to obtain a second MD5 value (here, the code generation kernel in the multi-version kernel server is named as a remote code generation kernel, so as to be distinguished from the code generation kernel in the local computer kernel library, and the two are only different in relative storage position and have no essential difference).
Since the completely same file in the prior art must have a unique MD5 value corresponding to it, if the first MD5 value is the same as the second MD5 value, it means that the two code generation kernels are consistent, i.e. it indicates that the code generation kernel of the version stored in the local computer kernel library is up to date and does not need to be updated; instead, the update step of the execution code generation kernel mentioned below is required.
The step of updating the code generation kernel is as shown in fig. 4, and includes:
s1305, deleting a branch code generation kernel corresponding to the source code version number from a kernel library of the local computer;
and S1306, downloading a remote code generation kernel corresponding to the project version number from the multi-version kernel server, and storing the remote code generation kernel to a local computer kernel library. Or
And S1307, performing incremental updating on the branch code generation kernel by taking the remote branch code generation kernel which is stored on the multi-version kernel server and has the same item version number as the corresponding branch code generation kernel as a sample.
Based on steps S1305-S1307, the updating step includes two ways, one is based on the overall updating way shown in steps S1305-S1306, and the other is based on the incremental updating way of step S1307.
The former updating mode is more thorough, but needs longer updating time; the latter updating method is short in time consumption, but the situation of incomplete updating is easy to occur, and the two updating methods need to be selected at any time. And will not be described in detail herein.
S14, the generated source code is transmitted to the device that transmitted the source code generation request.
And after the source code corresponding to the source code generation request is obtained based on the steps, the source code is directly transmitted to the client side or other devices sending the generation request, so that the generation flow of the source code is completed.
The deployment method for the local cache corresponding to the version code generation kernel and the server to deploy the multi-version kernel specifically comprises the steps of storing the latest code generation kernels of all versions on the server, wherein a kernel library of the local computer can be empty, downloading and caching the branch code generation kernels of the corresponding versions from the server when a source code needs to be generated, or downloading the branch code generation kernels corresponding to project version numbers which are possibly required from the server to the kernel library of the local computer in advance, and directly calling the existing branch code generation kernels in the kernel library of the local computer when the codes are generated, so that the code generation efficiency is improved. By the technical scheme, local resource overhead can be effectively saved, and meanwhile, the accuracy of generating the kernel by the local cache code can be ensured in a feature code comparison mode.
In addition to the above steps, in order to provide a better source code generation method, the multi-version code generation method provided in this embodiment further includes:
and S15, before the source code generation request is received, downloading branch code generation kernels related to the item to which the source code generation request belongs in batch.
The step S15 is executed to reduce the time waste caused by that no required branch code generation kernel exists in the local computer kernel library and only downloading from the multi-version kernel server is possible by downloading the branch code generation kernel in advance.
Considering that each local computer is used by a specific developer, and the development task for each developer is relatively single, executing step S15 can significantly improve the hit rate of the core library of the local computer on the source code generation request.
On the premise that the step S15 is executed to raise the hit rate of the kernel library in the local computer, the hit rate of the main line code generation core stored in the code generation apparatus to the source code generation request needs to be raised, and for this purpose, the item version number iteration operation of step S16 needs to be executed.
And S16, if the version number of the current project is updated to obtain the version number of the new version project, storing the main line code generation kernel corresponding to the version number of the new version project, and replacing the version number of the current project in the code generation device with the version number of the project corresponding to the source code used by the new version project.
As shown in fig. 5, assuming that the item version number corresponding to the current mainline code generation kernel is V1.0.0, if a new function is developed, the current version is reduced to the history version, then the V1.1.0 version is developed, and when the v1.2.0 version is developed, the V1.1.0 version is reduced to the history version. Branch V1.0.0 version where the current item version number is modified to be fixed if the user made a defect at V1.1.0 version; if the current version is a universal defect, merging the general version into a main line so as to ensure that the later item version has no defect, if the general version is a personalized V1.1.0 version defect, only modifying the current code to generate the kernel code to obtain a branch of V1.1.0, wherein other versions have no influence; other versions are developed iteratively and so on.
In code generation kernel iterative development, if a new function is added, the current mainline version is automatically summarized into a historical version, and the newly developed version is developed as the mainline version, so that the code generation kernels of different versions can be effectively decoupled, and the maintainability of the code generation kernel code is improved.
It should be noted that, in order to reduce the performance consumption of the source code generating operation on the computer to the maximum extent, after the source code is obtained based on the code generating kernel including the main line code generating kernel and the branch code generating kernel, the process corresponding to the code generating kernel is terminated, and the memory is released. So that other running items on the computer are not affected by the generation of the source code.
The invention provides a multi-version code generation method, which comprises the steps of obtaining a source code generation request, and extracting an item version number corresponding to a source code of the request from the source code generation request; if the item version number is consistent with the version number corresponding to the main line code generating kernel, directly calling the main line code generating kernel in the code generating device to generate a source code; if the project version number is not consistent with the version number corresponding to the main line code generation kernel, acquiring a branch code generation kernel corresponding to the project version number, and calling the branch code generation kernel in the code generation device to generate a source code; the generated source code is transmitted to the apparatus that transmitted the source code generation request. The memory occupancy rate of the computer is reduced by only using a combination mode of one code generation device and a plurality of code generation kernels, only loading a main line code generation kernel representing the latest project version number and not loading other branch codes to generate the kernels when the computer is started, only automatically calling the branch code generation kernel corresponding to the project version number when other versions of codes are required to be generated, automatically releasing the memory after the generation is finished, if the code generation kernel of a new project version is required to be developed, only needing to summarize the existing main line code generation kernel into a history version code generation kernel, and only needing to use the code generation kernel corresponding to the newly developed project version number as the main line code generation kernel, thereby greatly improving the code development efficiency.
Example two
The present application also proposes a multi-version code generation device 2, as shown in fig. 6, the generation device including:
a file extracting unit 21, configured to obtain a source code generation request, and extract an item version number corresponding to a source code of the request from the source code generation request;
a code direct generation unit 22, configured to, if the item version number is consistent with the version number corresponding to the main line code generation kernel, directly call the main line code generation kernel in the code generation apparatus to generate a source code;
the code branch generating unit 23 is further configured to, if the item version number is not consistent with the version number corresponding to the main line code generating kernel, obtain a branch code generating kernel corresponding to the item version number, and call the branch code generating kernel in the code generating device to generate a source code;
a file transmitting unit 24 for transmitting the generated source code to a device that transmits the source code generation request.
Specifically, the multi-version code generating apparatus 2 includes a file extracting unit 21, a code generating unit 22, a code branch generating unit 23, and a file transmitting unit 24. Wherein
The file extracting unit 21 is used to complete the relevant operation of step S11 in the first embodiment,
the code direct generation unit 22 is used to complete the relevant operation of step S12 in the first embodiment,
the code branch generating unit 23 is used to complete the relevant operation of step S13 in the first embodiment,
the file sending unit 24 is configured to complete the relevant operation of step S14 in the first embodiment.
The present invention provides a multi-version code generating apparatus including a file extracting unit 21, a code directly generating unit 22, a code branch generating unit 23, and a file transmitting unit 24.
Providing a code generating device, wherein the code generating device contains a main line code generating kernel of a source code used by a corresponding latest project version number, and simultaneously provides a plurality of version branch code generating kernels, the code generating device only contains a latest code generating engine, and the different version code generating kernels respectively contain corresponding different version code generating engines; when the code is generated, if the code of the latest version needs to be generated, the code generating device is started to directly generate the code.
And if other version codes need to be generated, automatically calling a code generation kernel corresponding to the item version number in the source code generation request to generate codes. When the method is used for generating the source code, the branch code generation kernel of the corresponding version is preferably searched from the kernel library of the local computer, and then the branch code generation kernel generates the source code. And if the local computer kernel library does not have a branch code generation kernel which meets the requirement, downloading the branch code generation kernel corresponding to the item version number from the multi-version kernel server. And if the local computer kernel library has a branch code generation kernel corresponding to the project version number but is inconsistent with the multi-version kernel server, updating the branch code generation kernel on the multi-version kernel server into the local computer kernel library, and calling to generate the source code.
The memory occupancy rate of the computer is reduced by only using a combination mode of one code generation device and a plurality of code generation kernels, only loading a main line code generation kernel representing the latest project version number and not loading other branch codes to generate the kernels when the computer is started, only automatically calling the branch code generation kernel corresponding to the project version number when other versions of codes are required to be generated, automatically releasing the memory after the generation is finished, if the code generation kernel of a new project version is required to be developed, only needing to summarize the existing main line code generation kernel into a history version code generation kernel, and only needing to use the code generation kernel corresponding to the newly developed project version number as the main line code generation kernel, thereby greatly improving the code development efficiency.
Since the amount of the source code of the latest version is usually large, the code generation apparatus mentioned in this embodiment always stores the main line code generation kernel capable of generating the latest version, so that the code generation apparatus can be called at the first time to obtain the source code representing the current latest version number.
Considering that there is a need to call the history version source code also for the reason of tracing the source of the requirement in the process of developing the project, the code branch generating unit 23 is further required to execute the following determination steps when receiving a request for the history version source code.
The code branch generating unit 23 is further configured to, if the item version number is not consistent with the version number corresponding to the main line code generating kernel, obtain a branch code generating kernel corresponding to the item version number, and call the branch code generating kernel in the code generating device to generate a source code;
based on the above determination process, if the historical version source code needs to be generated, the code generation kernel corresponding to the item version number needs to be called, where the branch code generation kernel is used, and a branch code generation kernel different from the main line code generation kernel is called in the code generation device to generate the historical version source code corresponding to the source code generation request.
As can be seen from the explanation of the noun at the beginning of this embodiment, in the process of generating the source code of the historical version, only one code generation apparatus is started, and the difference is that the kernel used in the code generation apparatus is not the preset kernel for generating the main line code corresponding to the latest version. Since a plurality of code generation devices are not started, a large amount of consumption of computer performance in the background art does not exist in the process of generating the source code.
Regarding the difference of the code generation kernels, two cases are described in the present embodiment.
The code branch generating unit 23, as shown in fig. 7, includes:
a local code branch generating sub-unit 231, configured to, if the item version number is not consistent with the version number corresponding to the main line code generating kernel, call a branch code generating kernel corresponding to the item version number from a local computer kernel library, and call the branch code generating kernel in the code generating device to generate a source code. Or
A remote kernel obtaining subunit 232, configured to obtain, from the multi-version kernel server, a branch code generation kernel corresponding to the item version number if the branch code generation kernel corresponding to the item version number does not exist in the local computer kernel library;
the remote code branch generation subunit 233 is configured to download the branch code generation kernel to the local computer kernel library, and call the branch code generation kernel in the code generation apparatus to generate the source code.
The step of calling from the local computer kernel library represents the code generation kernel coming from the local computer kernel library. The step of obtaining from the multi-version kernel server represents the code generation kernel being from a multi-version kernel server communicatively coupled to the local computer.
The local computer kernel library is used as an area for storing code generation kernels corresponding to different project version numbers in the local computer, stores code generation kernels of common or project version numbers related to software functions responsible for current developers, is equivalent to a cache area for responding to a source code generation request, and can process historical version source code requests in time.
However, the storage capacity of the local computer is limited, and it is impossible or unnecessary to store the entire version code generation kernel of the item in the local computer kernel library, so that once the item version number corresponding to the source code in the source code generation request exceeds the storage range of the local computer kernel library, the branch code generation kernel corresponding to the item version number needs to be acquired from the multi-version kernel server.
Because the multi-version kernel server is not limited by storage capacity, the code generation kernels corresponding to the version numbers of all projects of the project are stored in the multi-version kernel server, and the local computer can acquire branch code generation kernels with any version number from the multi-version kernel server. The server is used for storing the multi-version code generation kernels, so that the capacity is not limited, a plurality of computers can obtain the latest code generation kernels corresponding to the version numbers of each item, and the source code generation failure caused by the code generation kernels containing bugs is prevented.
In order to ensure timeliness and accuracy of the code generation kernel stored in the local computer kernel library, the code generation kernel stored therein needs to be updated, as shown in fig. 8, the code direct generation unit 22 further includes the following structure for performing judgment on whether the update is needed:
a feature code obtaining subunit 221, configured to obtain a feature code of a remote branch code generation kernel, which is stored in the multi-version kernel server and has the same item version number as that of the branch code generation kernel;
a feature code comparison subunit 222, configured to compare the feature code with the feature code of the branch code generation core;
a first source code generation subunit 223, configured to call the branch code generation kernel in the code generation apparatus to generate a source code when the feature codes are consistent;
a second source code generation subunit 224, configured to update the branch code generation kernel when the feature codes are inconsistent.
It is noted that the verification update operation of the code generation kernel needs to be completed before the code generation kernel stored in the local computer kernel library is called.
The signature involved in the above steps is typically MD 5. MD5, Message-Digest Algorithm5 (Message-Digest Algorithm 5), is used to ensure that the information transfer is complete and consistent. Is one of the hash algorithms widely used by computers.
The specific operation mode based on the MD5 includes:
the code generation kernel file stored in the local computer kernel library is calculated to obtain a first MD5 value, and the remote code generation kernel file with the same item version number as the code generation kernel in the multi-version kernel server is calculated to obtain a second MD5 value (here, the code generation kernel in the multi-version kernel server is named as a remote code generation kernel, so as to be distinguished from the code generation kernel in the local computer kernel library, and the two are only different in relative storage position and have no essential difference).
Since the completely same file in the prior art must have a unique MD5 value corresponding to it, if the first MD5 value is the same as the second MD5 value, it means that the two code generation kernels are consistent, i.e. it indicates that the code generation kernel of the version stored in the local computer kernel library is up to date and does not need to be updated; instead, the update step of the execution code generation kernel mentioned below is required.
As shown in fig. 9, the structure of the second source code generation subunit 224, which needs to perform the step of updating the code generation kernel, includes:
a kernel deleting subunit 2241, configured to delete the branch code generation kernel corresponding to the source code version number from the local computer kernel library;
a kernel saving subunit 2242, configured to download the remote code generation kernel corresponding to the project version number from the multi-version kernel server, and save the remote code generation kernel to a local computer kernel library. Or
A kernel incremental update subunit 2243, configured to take the remote branch code generation kernel stored in the multi-version kernel server and having the same item version number as that of the branch code generation kernel as a sample, and perform incremental update on the branch code generation kernel.
Based on the above steps, the updating step includes two ways, one is an overall updating way based on the previous two steps, and the other is an incremental updating way based on the third step.
The former updating mode is more thorough, but needs longer updating time; the latter updating method is short in time consumption, but the situation of incomplete updating is easy to occur, and the two updating methods need to be selected at any time. And will not be described in detail herein.
A file transmitting unit 24 for transmitting the generated source code to a device that transmits the source code generation request. And after the source code corresponding to the source code generation request is obtained based on the steps, the source code is directly transmitted to the client side or other devices sending the generation request, so that the generation flow of the source code is completed.
The multi-version code generation device provided by the embodiment includes a code generation kernel for storing the latest version of each version in the server, the local computer kernel library may be empty, the branch code generation kernel for the corresponding version is downloaded from the server and cached when the source code needs to be generated, or the branch code generation kernel corresponding to the item version number which may be required is downloaded from the server to the local computer kernel library in advance, and the existing branch code generation kernel in the local computer kernel library is directly called when the code is generated, so that the code generation efficiency is improved. By the technical scheme, local resource overhead can be effectively saved, and meanwhile, the accuracy of generating the kernel by the local cache code can be ensured in a feature code comparison mode.
In addition to the above steps, in order to provide a better source code generation manner, as shown in fig. 10, the multi-version code generation apparatus 2 proposed in this embodiment further includes:
and the kernel downloading unit 25 is configured to download, in batch, the branch code generation kernels related to the items to which the source code generation requests belong before receiving the source code generation requests.
The purpose of executing the batch downloading step is to adopt a mode of downloading the branch code generation kernel in advance, so that the defect of time waste caused by that the required branch code generation kernel is not available in the kernel library of the local computer and only can be downloaded from the multi-version kernel server is overcome.
Considering that each local computer is used by a specific developer, and the development task for each developer is single, executing the batch downloading step can obviously improve the hit rate of the core library of the local computer to the source code generation request.
On the premise of performing the batch downloading step to increase the hit rate of the kernel library in the local computer, the hit rate of the main line code generation kernel stored in the code generation device to the source code generation request needs to be increased, and for this reason, the multi-version code generation device further includes a unit that performs an item version number iteration operation of the batch downloading step as shown in fig. 11.
A version number replacing unit 26, configured to, if the version number of the current item is updated to obtain a version number of the new version item, save the main line code generation kernel corresponding to the version number of the new version item, and replace the version number of the current item in the code generation apparatus with the version number of the item corresponding to the source code used by the new version item.
As shown in fig. 5, assuming that the item version number corresponding to the current mainline code generation kernel is V1.0.0, if a new function is developed, the current version is reduced to the history version, then the V1.1.0 version is developed, and when the v1.2.0 version is developed, the V1.1.0 version is reduced to the history version. Branch V1.0.0 version where the current item version number is modified to be fixed if the user made a defect at V1.1.0 version; if the current version is a universal defect, merging the general version into a main line so as to ensure that the later item version has no defect, if the general version is a personalized V1.1.0 version defect, only modifying the current code to generate the kernel code to obtain a branch of V1.1.0, wherein other versions have no influence; other versions are developed iteratively and so on.
In code generation kernel iterative development, if a new function is added, the current mainline version is automatically summarized into a historical version, and the newly developed version is developed as the mainline version, so that the code generation kernels of different versions can be effectively decoupled, and the maintainability of the code generation kernel code is improved.
It should be noted that, as shown in fig. 12, the multi-version code generating device 2 further includes a memory releasing unit 27, configured to terminate a process corresponding to the code generating kernel and release the memory after obtaining the source code based on the code generating kernel including the main line code generating kernel and the branch code generating kernel.
In order to reduce the performance consumption of the source code generation operation on the computer to the maximum extent, after the source code is obtained based on the code generation kernel comprising the main line code generation kernel and the branch code generation kernel, the process corresponding to the code generation kernel is terminated, and the memory is released. So that other running items on the computer are not affected by the generation of the source code.
The invention provides multi-version code generation equipment which comprises a file extraction unit, a source code generation unit and a multi-version code generation unit, wherein the file extraction unit is used for acquiring a source code generation request and extracting an item version number corresponding to a source code of the request from the source code generation request; the code generation unit is used for directly calling the main line code generation kernel to generate a source code in the code generation device if the item version number is consistent with the version number corresponding to the main line code generation kernel; the code generation unit is also used for acquiring a branch code generation kernel corresponding to the project version number and calling the branch code generation kernel in the code generation device to generate a source code if the project version number is not consistent with the version number corresponding to the main line code generation kernel; a file transmitting unit for transmitting the generated source code to a device that transmits the source code generation request. The memory occupancy rate of the computer is reduced by only using a combination mode of one code generation device and a plurality of code generation kernels, only loading a main line code generation kernel representing the latest project version number and not loading other branch codes to generate the kernels when the computer is started, only automatically calling the branch code generation kernel corresponding to the project version number when other versions of codes are required to be generated, automatically releasing the memory after the generation is finished, if the code generation kernel of a new project version is required to be developed, only needing to summarize the existing main line code generation kernel into a history version code generation kernel, and only needing to use the code generation kernel corresponding to the newly developed project version number as the main line code generation kernel, thereby greatly improving the code development efficiency.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units. The components shown as modules or units may or may not be physical units, i.e. may be located in one place or may also be distributed over a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the wood-disclosed scheme. One of ordinary skill in the art can understand and implement it without inventive effort.
In this example embodiment, there is also provided a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the multi-version code generation method described in any of the above embodiments. For the specific steps of the multi-version code generation method, reference may be made to the detailed description of the above steps of real-time monitoring in the foregoing embodiments, and details are not repeated here. The computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
There is also provided in this example embodiment an electronic device that may include a processor and a memory to store executable instructions for the processor. Wherein the processor is configured to perform the steps of the multi-version code generation method of any of the above embodiments via execution of the executable instructions. The steps of the multi-version code generation method can refer to the detailed description in the foregoing method embodiments, and are not repeated herein.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
FIG. 13 shows a schematic diagram of an electronic device in an example embodiment according to the present disclosure. For example, the electronic device may be provided as a server or client. Referring to fig. 13, the electronic device includes a processing component 422, which further includes one or more processors, and memory resources, represented by memory 432, for storing instructions, such as application programs, that are executable by the processing component 422. The application programs stored in memory 432 may include one or more modules that each correspond to a set of instructions. Further, the processing component 422 is configured to execute instructions to perform the above-described methods.
The electronic device may also include a power component 426 configured to perform power management of the electronic device, a wired or wireless network interface 450 configured to connect the electronic device to a network, and an input/output (I/O) interface 458. The electronic device may operate based on an operating system stored in memory 432, such as Windows Server (TM), Mac OS XTM, Unix (TM), Linux (TM), FreeBSDTM, or the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (14)

1. A multi-version code generation method, characterized in that the generation method comprises:
acquiring a source code generation request, and extracting an item version number corresponding to a source code of the request from the source code generation request;
if the item version number is consistent with the version number corresponding to the main line code generating kernel, directly calling the main line code generating kernel in the code generating device to generate a source code;
if the project version number is not consistent with the version number corresponding to the main line code generation kernel, acquiring a branch code generation kernel corresponding to the project version number, and calling the branch code generation kernel in a code generation device to generate a source code;
transmitting the generated source code to a device that transmits the source code generation request;
before the source code generation request is received, downloading branch code generation kernels related to the item to which the source code generation request belongs in batch;
if the project version number is not consistent with the version number corresponding to the main line code generation kernel, acquiring the branch code generation kernel corresponding to the project version number, including:
if the project version number is not consistent with the version number corresponding to the main line code generation kernel, calling a branch code generation kernel corresponding to the project version number from a kernel library of a local computer, and calling the branch code generation kernel in a code generation device to generate a source code;
if the branch code generation kernel corresponding to the project version number does not exist in the local computer kernel library, acquiring the branch code generation kernel corresponding to the project version number from the multi-version kernel server;
downloading the branch code generation kernel to a local computer kernel library, and calling the branch code generation kernel in a code generation device to generate a source code.
2. The multi-version code generation method according to claim 1, wherein before calling a branch code generation kernel corresponding to the item version number from a local computer kernel library, the generation method further comprises:
acquiring feature codes of a remote branch code generation kernel, which are stored on a multi-version kernel server and have the same project version number as that corresponding to the branch code generation kernel;
comparing the feature code with the feature code of the branch code generation kernel;
when the feature codes are consistent, calling the branch code generation kernel in a code generation device to generate a source code;
and when the feature codes are not consistent, updating the branch code generation kernel.
3. The multi-version code generation method of claim 2, wherein the updating the branch code generation kernel comprises:
deleting a branch code generation kernel corresponding to the source code version number from the local computer kernel library;
and downloading a remote code generation kernel corresponding to the project version number from the multi-version kernel server, and storing the remote code generation kernel to a local computer kernel library.
4. The multi-version code generation method of claim 2, wherein the updating the branch code generation kernel comprises:
and performing incremental updating on the branch code generation kernel by taking a remote branch code generation kernel which is stored on the multi-version kernel server and has the same item version number as the branch code generation kernel as a sample.
5. The multi-version code generation method according to claim 1, characterized in that the generation method further comprises:
and if the version number of the current project is updated to obtain the version number of the new version project, storing a main line code generation kernel corresponding to the version number of the new version project, and replacing the version number of the current project in the code generation device with the version number of the project corresponding to the source code used by the new version project.
6. The multi-version code generation method according to any one of claims 1 to 5, characterized in that the generation method further comprises:
and after the code generation kernel including the main line code generation kernel and the branch code generation kernel obtains the source code, terminating the process corresponding to the code generation kernel and releasing the memory.
7. A multi-version code generation apparatus, characterized in that the generation apparatus comprises:
the file extraction unit is used for acquiring a source code generation request and extracting an item version number corresponding to a source code of the request from the source code generation request;
a code direct generation unit, configured to directly call the main line code generation kernel in the code generation apparatus to generate the source code if the item version number is consistent with a version number corresponding to the main line code generation kernel;
the code branch generation unit is further used for acquiring a branch code generation kernel corresponding to the project version number and calling the branch code generation kernel in a code generation device to generate a source code if the project version number is inconsistent with the version number corresponding to the main line code generation kernel;
a file transmitting unit for transmitting the generated source code to a device that transmits the source code generation request;
the system also comprises a kernel downloading unit, a branch code generating kernel downloading unit and a branch code generating unit, wherein the kernel downloading unit is used for downloading the branch code generating kernels related to the items to which the source code generating requests belong in batch before receiving the source code generating requests;
the code branch generation unit includes:
a local code branch generation subunit, configured to, if the item version number is not consistent with the version number corresponding to the main line code generation kernel, call a branch code generation kernel corresponding to the item version number from a local computer kernel library, and call the branch code generation kernel in a code generation apparatus to generate a source code;
the code branch generating unit further includes:
a remote kernel obtaining subunit, configured to obtain, from the multi-version kernel server, a branch code generation kernel corresponding to the item version number if the branch code generation kernel corresponding to the item version number does not exist in the local computer kernel library;
and the remote code branch generation subunit is used for downloading the branch code generation kernel to a local computer kernel library and calling the branch code generation kernel in the code generation device to generate the source code.
8. The multi-version code generation apparatus according to claim 7, wherein the code direct generation unit includes:
the characteristic code acquiring subunit is used for acquiring the characteristic codes of the remote branch code generating kernels, which are stored on the multi-version kernel server and have the same project version numbers as the corresponding branch code generating kernels;
the feature code comparison subunit is used for comparing the feature code with the feature code of the branch code generation kernel;
the first source code generation subunit is used for calling the branch code generation kernel in the code generation device to generate a source code when the feature codes are consistent;
and the second source code generation subunit is used for updating the branch code generation kernel when the feature codes are inconsistent.
9. The multi-version code generation apparatus of claim 8, wherein the second source code generation subunit comprises:
a kernel deleting subunit, configured to delete the branch code generation kernel corresponding to the source code version number from the local computer kernel library;
and the kernel saving subunit is used for downloading the remote code generation kernel corresponding to the project version number from the multi-version kernel server and saving the remote code generation kernel to a local computer kernel library.
10. The multi-version code generation apparatus of claim 8, wherein the second source code generation subunit comprises:
and the kernel increment updating subunit is used for performing increment updating on the branch code generation kernel by taking the remote branch code generation kernel which is stored on the multi-version kernel server and has the same item version number as the branch code generation kernel as a sample.
11. The multi-version code generation apparatus according to claim 7, characterized in that the multi-version code generation apparatus comprises:
and the version number replacing unit is used for storing the main line code generating kernel corresponding to the version number of the new version project and replacing the version number of the current project in the code generating device with the version number of the project corresponding to the source code used by the new version project if the version number of the current project is updated to obtain the version number of the new version project.
12. The multi-version code generation apparatus according to any one of claims 7 to 11, characterized by comprising:
and the memory release unit is used for terminating the process corresponding to the code generation kernel and releasing the memory after the code generation kernel including the main line code generation kernel and the branch code generation kernel obtains the source code.
13. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the steps of the multi-version code generation method of any one of claims 1 to 6 via execution of the executable instructions.
14. A computer-readable storage medium, having stored thereon a computer program for executing the steps of the multi-version code generation method according to any one of claims 1 to 6 by a processor.
CN201810903755.0A 2018-08-09 2018-08-09 Multi-version code generation method and device and electronic device Active CN109298880B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810903755.0A CN109298880B (en) 2018-08-09 2018-08-09 Multi-version code generation method and device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810903755.0A CN109298880B (en) 2018-08-09 2018-08-09 Multi-version code generation method and device and electronic device

Publications (2)

Publication Number Publication Date
CN109298880A CN109298880A (en) 2019-02-01
CN109298880B true CN109298880B (en) 2022-02-18

Family

ID=65168302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810903755.0A Active CN109298880B (en) 2018-08-09 2018-08-09 Multi-version code generation method and device and electronic device

Country Status (1)

Country Link
CN (1) CN109298880B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760765B (en) * 2021-09-09 2022-07-19 北京百度网讯科技有限公司 Code testing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929716A (en) * 2012-11-07 2013-02-13 北京亿赛通科技发展有限责任公司 Method for starting multiple processes
CN104267978A (en) * 2014-09-16 2015-01-07 青岛海信移动通信技术股份有限公司 Method and device for generating differential packet
CN105022956A (en) * 2015-08-14 2015-11-04 中国科学院计算技术研究所 Method for protecting against code reuse attack
CN106293744A (en) * 2016-08-11 2017-01-04 中国银行股份有限公司 A kind of application version dynamic switching method and device
CN107894895A (en) * 2017-11-06 2018-04-10 网易(杭州)网络有限公司 Processing method, device, storage medium, processor and the server of code update

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7814486B2 (en) * 2006-06-20 2010-10-12 Google Inc. Multi-thread runtime system
CN106919434B (en) * 2017-03-22 2021-02-12 恒生电子股份有限公司 Code generation method and device
CN107908421B (en) * 2017-09-29 2022-06-24 北京创鑫旅程网络技术有限公司 Software code version management and release method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929716A (en) * 2012-11-07 2013-02-13 北京亿赛通科技发展有限责任公司 Method for starting multiple processes
CN104267978A (en) * 2014-09-16 2015-01-07 青岛海信移动通信技术股份有限公司 Method and device for generating differential packet
CN105022956A (en) * 2015-08-14 2015-11-04 中国科学院计算技术研究所 Method for protecting against code reuse attack
CN106293744A (en) * 2016-08-11 2017-01-04 中国银行股份有限公司 A kind of application version dynamic switching method and device
CN107894895A (en) * 2017-11-06 2018-04-10 网易(杭州)网络有限公司 Processing method, device, storage medium, processor and the server of code update

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Linux内核的配置与编译;胡庆烈;《电脑知识与技术》;20090403;第05卷(第03期);730-731,735 *

Also Published As

Publication number Publication date
CN109298880A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
US11467816B1 (en) Method and system of running an application
US10242023B2 (en) Programming model for synchronizing browser caches across devices and web services
TWI705336B (en) Equipment and method for supporting online upgrade
CN101719073B (en) Intelligent client-based on-demand downloading realization method
US8239662B1 (en) Network based operating system across devices
US11016785B2 (en) Method and system for mirror image package preparation and application operation
CN107291481B (en) Component updating method, device and system
CN112162795B (en) Plug-in starting method and device, computer equipment and storage medium
WO2021115177A1 (en) Application installation method and apparatus, terminal device, server and storage medium
US9904574B2 (en) Parallel computing without requiring antecedent code deployment
WO2020199543A1 (en) Method and apparatus applicable to release and upgrade of hybrid application, and intelligent device
CN109298880B (en) Multi-version code generation method and device and electronic device
US10467027B1 (en) Dynamic script loading resource files
CN106293790B (en) application program upgrading method and device based on Firefox operating system
US9760364B2 (en) Checks for software extensions
CN109739579B (en) Application starting method and device based on feedback protocol and storage medium
CN109753321B (en) Application starting method, device, terminal and storage medium based on protocol registration
WO2017036197A1 (en) Method and device for managing network element model
WO2023060893A1 (en) Storage space management method and apparatus, and device and storage medium
CN111090442A (en) Application updating method and device and storage medium
WO2022078280A1 (en) Artificial intelligence (ai) training method, system, and device
CN113590179B (en) Plug-in detection method and device, electronic equipment and storage medium
CN109901849A (en) Application program installation method, device, electronic equipment and storage medium
CN114860202A (en) Project operation method, device, server and storage medium
CN112988277A (en) Rule file loading method, device, server and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant