CN106990960B - Code deployment method and device - Google Patents

Code deployment method and device Download PDF

Info

Publication number
CN106990960B
CN106990960B CN201710193565.XA CN201710193565A CN106990960B CN 106990960 B CN106990960 B CN 106990960B CN 201710193565 A CN201710193565 A CN 201710193565A CN 106990960 B CN106990960 B CN 106990960B
Authority
CN
China
Prior art keywords
code
code file
file
subsystem
target
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
CN201710193565.XA
Other languages
Chinese (zh)
Other versions
CN106990960A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201710193565.XA priority Critical patent/CN106990960B/en
Publication of CN106990960A publication Critical patent/CN106990960A/en
Application granted granted Critical
Publication of CN106990960B publication Critical patent/CN106990960B/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/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Landscapes

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

Abstract

The embodiment of the application provides a code deployment method and a device, wherein the method comprises the following steps: obtaining an environment identifier corresponding to a target subsystem under a service system; determining a code module corresponding to the environment identifier based on a configuration file; extracting an object code file corresponding to the determined code module from an original code file corresponding to the service system; installing the target code file to the target subsystem. According to the method and the system, the purpose of respectively deploying the codes in the subsystems can be achieved by developing a set of original code files, and the code development cost is reduced. And only one set of codes needs to be maintained subsequently, and one set of codes does not need to be maintained for each subsystem respectively, so that the code maintenance efficiency is improved to a certain extent.

Description

Code deployment method and device
Technical Field
The present application relates to the field of software development technologies, and in particular, to a code deployment method and apparatus.
Background
Currently, a service system will include one or more subsystems with a homogeneous service requirement according to the development of actual services and requirements. In the related art, for a homogeneous service, a set of corresponding implementation codes needs to be deployed for each subsystem in the service system, and since multiple sets of codes need to be developed and deployed for each subsystem in the same service system, the development cost of the codes is increased, and the subsequent maintenance of the codes is not facilitated.
Disclosure of Invention
In view of this, the present application provides a code deployment method and apparatus.
In order to achieve the above purpose, the present application provides the following technical solutions:
according to a first aspect of the present application, a code deployment method is provided, including:
obtaining an environment identifier corresponding to a target subsystem under a service system;
determining a code module corresponding to the environment identifier based on a configuration file;
extracting an object code file corresponding to the determined code module from an original code file corresponding to the service system;
installing the target code file to the target subsystem.
According to a second aspect of the present application, there is provided a code deployment apparatus, comprising:
the obtaining unit is used for obtaining an environment identifier corresponding to a target subsystem under a service system;
a determining unit, configured to determine, based on a configuration file, a code module corresponding to the environment identifier;
the extracting unit is used for extracting an object code file corresponding to the determined code module from an original code file corresponding to the service system;
and the installation unit is used for installing the target code file to the target subsystem.
As can be seen from the above technical solutions, in the process of deploying a code, when a business system includes one or more subsystems, in the embodiment of the present application, a code module corresponding to an environment identifier is determined by obtaining the environment identifier of a target subsystem to be deployed with the code, and based on a configuration file; then, extracting an object code file corresponding to the determined code module from an original code file corresponding to the business system; finally, the target code file is installed onto the target subsystem. Therefore, in the embodiment of the application, a set of original code files corresponding to the same service system is developed for the same service system, and when a code is deployed, the target code file required to be deployed for each subsystem is extracted from the original code files according to the environment identifier so as to complete deployment. According to the method and the system, the purpose of respectively deploying the codes in the subsystems can be achieved by developing a set of original code files, and the code development cost is reduced. And only one set of codes needs to be maintained subsequently, and one set of codes does not need to be maintained for each subsystem respectively, so that the code maintenance efficiency is improved to a certain extent.
Drawings
FIG. 1 is a flowchart of a method for deploying code provided by an exemplary embodiment of the present application;
FIG. 2 is a block diagram of a code framework provided by an exemplary embodiment of the present application;
FIG. 3 is a block diagram of a method for deploying code according to an exemplary embodiment of the present application;
FIG. 4 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application;
fig. 5 is a block diagram of a code deployment apparatus according to an exemplary embodiment of the present application.
Detailed Description
Generally, according to various functions to be implemented by a service system, corresponding function implementation codes need to be developed and deployed on the service system. For example, for an internet financial platform, the functions (or services) that it needs to implement may include: members, accounts, assets, etc. need to develop implementation codes of corresponding functions respectively. Currently, with the development of services of various service systems, one or more sub-service systems (hereinafter, referred to as "subsystems") having a service homogenization requirement are generated, where "homogenization" refers to that some common or similar implementation processes exist in some services of these sub-service systems. For example, for an internet financial platform, as a business develops, the business may be distributed over multiple domains (e.g., master, international, internet, etc.), where each "domain" corresponds to a subsystem. In the related art, for a certain homogeneous service in a service system, it is generally required to deploy a set of corresponding implementation codes for each subsystem under the service system, for example: if the services of the internet financial platform are distributed in multiple domains such as the master station, the international domain, the network provider and the like, for the service of the "member", a set of implementation codes for implementing the service of the "member" in each domain needs to be deployed in the multiple domains such as the master station, the international domain, the network provider and the like. Therefore, as the number of subsystems increases, developers need to develop and deploy multiple sets of codes for each subsystem in the same service system, which causes the cost of code development to rise to a certain extent, and multiple sets of codes need to be maintained in the later period, which results in time and labor consumption in the code maintenance process. In order to solve the above problems, the following solutions of the embodiments of the present application are proposed.
Fig. 1 is a flowchart of a code deployment method provided in an exemplary embodiment of the present application, and referring to fig. 1, in this embodiment, the code deployment method may be applied to an electronic device (the device may be installed with a corresponding code deployment tool) for deploying code onto each subsystem, and the code deployment method includes the following steps 101 to 104, where:
in step 101, an environment identifier corresponding to a target subsystem in a service system is obtained.
The method comprises the steps of defining an environment identifier for each subsystem under a service system in advance, wherein the environment identifier is unique in the service system and is used for identifying each subsystem. For example, for a certain internet financial platform, if the subsystems a and b are included, the environment identifier of the subsystem a may be defined as "XXX" and the environment identifier of the subsystem b may be defined as "YYY". In the embodiment of the present application, the "target subsystem" is a subsystem that needs to deploy code.
Before deploying the code to the target subsystem, a set of original code files needs to be developed for the service system according to a preset code framework, wherein the original code files may include code files to be deployed for each subsystem under the service system. The code framework employed by the original code file will be described in detail below.
In an embodiment of the present application, the step 101 may be implemented by the following processes:
and when the codes are packed, reading the environment identification corresponding to the target subsystem from the identification incoming command.
For example, a developer may initiate a packed command via a Software Configuration Management (SCM) tool (e.g.: Maven), such as: the mvn package. During packaging, an app corresponding to the subsystem to be deployed may be transmitted by identifying an incoming command, where the identifying the incoming command is, for example: mvn-Dapp ═ xxx. Of course, in other possible embodiments, the environment identification may also be carried in the code-packaged command.
In step 102, a code module corresponding to the environment identifier is determined based on a configuration file.
In the embodiment of the present application, for each subsystem in a service system, differences of implementation codes are mainly reflected in that:
1. the file packages (such as jar packages and the like) depended by each subsystem are different. For example: different subsystems rely on different versions of jar packages.
2. The interfaces to be realized and the models used in the process of realizing the interfaces are different. For example: the member IDs returned by the member interfaces of different subsystems are inconsistent, and the member ID returned by the network provider subsystem is as follows: the member ID returned by iRoleId and the international subsystem is as follows: the userId.
Although the above differences exist in the code implementation of each subsystem, the overall business implementation flows of the subsystems are similar or substantially consistent due to the homogeneous business requirements.
In view of the basic consistency of the overall business implementation process of each subsystem, in the embodiment of the application, a developer develops a set of code framework which can be commonly used by a plurality of subsystems, and the developer can write an original code file according to the code framework. As shown in fig. 2, the code framework may be divided into a plurality of functional layers according to implementation functions, and each functional layer may further include one or more components (components), where each component may represent a code module. For example, the functional layers may include: test layer, core layer, service layer, etc. Wherein certain dependencies may exist between various components (the arrows in the figure represent dependent and depended relationships). In the embodiment of the present application, the code frame may be a java code frame, and the like.
In an embodiment of the present application, the code framework may include an adapter layer 10 and one or more integration layers, where each subsystem corresponds to one integration layer, so as to implement services of the corresponding subsystem through a code file in the integration layer. In an exemplary embodiment, assuming that a service system includes subsystems a and b, the subsystem a may correspond to the integration layer 21 and the subsystem b may correspond to the integration layer 22. For convenience of description, the remaining functional layers except the adapter layer and the integration layer in the code framework may be defined as "common functional layers", the code file existing in the integration layer may be defined as "integration layer code files", the code file existing in the adapter layer may be defined as "adapter layer code files", and the code file existing in the common functional layers may be defined as "common functional layer code files".
In this embodiment of the present application, the adapter layer code file is used to define an object used by the target subsystem, and the integration layer code file is used to implement the object according to a service logic of the target subsystem. The object includes: interface, and/or model, and/or an in-call and an out-call contained in the interface. Wherein, the model refers to an object used by the input parameter and the output parameter, such as: the interface is as follows: "custview", the corresponding entries are: "vcauthorsteresequest. java", the argument is: "vcauthorstylrulecheckresult. java", then the model used by the interface may include: "VcaurorityrRucCheckView. java", "aurorityrRucCheckclient. java", and the like.
For example:
in an adapter layer code file (e.g., a pom. xml file), an interface1 may be defined for subsystem a and an interface2 may be defined for subsystem b, where: the code format defining the interface is for example:
[ modifier ] interface name [ extensions father interface name list ] (retaining face)
[ public ] [ static ] [ final ] constant;
[ public ] [ abstrat ] method;
}
after the adapter layer defines the interface, the interface1 can be realized through a code file in the integration layer 21 corresponding to the subsystem a; the interface2 can be realized by code file at the integration layer 22 corresponding to the subsystem b. For example, implementing an interface in a class may use keyword instantiations, whose basic format is as follows:
[ modifier ] class < class name > [ extensions parent class name ] [ instances interface List ] (chromatic) pocket
}
In this embodiment, the object defined by the adapter layer code file may be an object (such as an interface, and/or a model, and/or a parameter, etc.) common to each subsystem. So that a generic object can be provided to other functional layers in the code framework for invocation. For example, the member IDs returned by the "member interfaces" of the different subsystems are not consistent, and the member ID returned by the "network provider subsystem" is: the member ID returned by iRoleId and the international subsystem is as follows: customerId. At the adapter layer, a uniform membership ID may be defined as userId.
In the adapter layer, if a universal interface and a universal model used by the universal interface are defined for different subsystems, the function of the universal interface can be realized by adopting the unique realization logic of the subsystem in the integration layer corresponding to each subsystem. In this way, other code modules in the code framework need only sense or invoke the userId, which may somewhat simplify the code.
In the embodiment of the present application, the dependent file package and the code module of different subsystems may be defined in advance by a configuration file (e.g., pom. The code content in the configuration file is, for example:
Figure BDA0001256830210000061
Figure BDA0001256830210000071
Figure BDA0001256830210000081
assuming that the environment of subsystem a is identified as "ifcvoucherfront" and the environment of system b is identified as "fcvoucherfront", based on the profile contents of the above example, it can be seen that:
when the environment identifies the app as: in the case of "ifcvoucherfront", information such as a directory, a name, and a version number of a dependent file package that the subsystem a needs to use may be determined according to a code content between "< dependency >" and "</dependency >", and a code module that the subsystem a needs to be constructed using the dependent file package may be determined according to a code content between "< modules >" and "</modules >", for example: xml, app/common/service/integration/ap. When the environment identifies the app as: when the code content is "fcvoucherfront", the information such as the directory, name, version number and the like of the dependent file package required to be used by the subsystem b can be determined through the code content between "< dependency >" and "</dependency >", and the code module required to be constructed by the subsystem b by using the dependent file package can be determined through the code content between "< modules >" and "</modules >", such as: xml, app/common/service/integration/bk.
In step 103, an object code file corresponding to the determined code module is extracted from an original code file corresponding to the business system.
In an embodiment of the present application, the step 103 may specifically include:
step 1031: and extracting an adapter layer code file and a public function layer code file corresponding to the environment identifier from the original code file.
Bearing the above example, when the environment identifies the app as: when the "ifcvoucherfront" is used, the adapter layer code file to be extracted is: adaptor/pom-ap.xml (individual objects used by subsystem a may be defined in pom-ap.xml); when the environment identifies the app as: when the code is fcvoucherfront, the adapter layer code file to be extracted is: adaptor/pom-bk.xml (individual objects used by subsystem b can be defined in pom-bk.xml).
Step 1032: and extracting an integration layer code file corresponding to the environment identifier from the original code file.
Bearing the above example, when the environment identifies the app as: when the "ifcvoucherfront" is used, the adapter layer code file to be extracted is: a code file existing under the adapter layer 21; when the environment identifies the app as: when the code is fcvoucherfront, the adapter layer code file to be extracted is: a code file exists under the adapter layer 22.
Step 1033: and packaging the extracted adapter layer code file, the common functional layer code file and the integration layer code file into an object code file.
In step 104, the target code file is installed to the target subsystem.
In the embodiment of the application, for different subsystems, when deploying codes, some code modules matched with own services are correspondingly extracted from an original code file for code deployment according to the difference of service implementation. After extracting the object code file corresponding to the determined code module from the original code file corresponding to the business system, and before installing the object code file in the object subsystem, the method may further include:
and obtaining a test case corresponding to the environment identifier, and testing the target code file by using the test case.
In view of the difference of each subsystem, test cases can be compiled for each subsystem respectively, and the test cases are marked through the environment identifiers, so that in the test process, the corresponding test cases can be automatically obtained and the test can be completed only by inputting the environment identifiers, the test efficiency is high, the test cases do not need to be searched manually, and meanwhile, the test cases are convenient to manage.
Fig. 3 is a scene diagram of a code deployment method according to an exemplary embodiment of the present application, and as shown in fig. 3, a developer writes an original code file through the above general code framework and in combination with service differences of each subsystem, and uploads the original code file to a code library. When the code needs to be deployed to each subsystem of the business system, the environment identification app of the subsystem where the code needs to be deployed may be introduced during packaging, so that the code deployment device extracts an object code file matching with the environment identification app from the code library and deploys the object code file to a specified subsystem device (server).
In the embodiment of the application, under the condition that a business system comprises one or more subsystems (such as subsystems a and b), in the process of deploying codes, the embodiment of the application determines a code module corresponding to an environment identifier by obtaining the environment identifier (such as ifcvoucherfront) of a target subsystem of the codes to be deployed and based on a configuration file pom.xml; then, extracting an object code file corresponding to the determined code module from an original code file corresponding to the business system; finally, the target code file is installed onto the target subsystem. Therefore, in the embodiment of the application, a set of original code files corresponding to the same service system is developed for the same service system, and when a code is deployed, the target code file required to be deployed for each subsystem is extracted from the original code files according to the environment identifier so as to complete deployment. In the embodiment of the application, a universal code framework (as shown in fig. 2) is adopted to develop a set of original code files, so that the purpose of respectively deploying codes in a plurality of subsystems can be achieved, and the code development cost is reduced. Meanwhile, when the code is subsequently maintained, only one set of original code file needs to be maintained, and one set of code file does not need to be maintained for each subsystem, so that the subsequent maintenance efficiency of the code is greatly improved. In addition, when a new subsystem is continuously derived from the service system, the code deployment of the newly added subsystem can be realized only by adding a corresponding integration layer code file in the code framework, and the expansion compatibility of the service system is enhanced.
Fig. 4 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application. The electronic device may be a code deployment device (e.g., a device installed with a code management tool), and referring to fig. 4, at a hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required by other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program, and the code deploying device is formed on a logic level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Referring to fig. 5, in an embodiment of the present application, a code deployment apparatus includes:
an obtaining unit 201, configured to obtain an environment identifier corresponding to a target subsystem in a service system;
a determining unit 202, configured to determine, based on a configuration file, a code module corresponding to the environment identifier;
an extracting unit 203, configured to extract an object code file corresponding to the determined code module from an original code file corresponding to the business system;
an installation unit 204, configured to install the object code file into the target subsystem.
In an embodiment of the present application, the code module includes an adapter layer code file and an integration layer code file, where the adapter layer code file is used to define an object used by the target subsystem, and the integration layer code file is used to implement the object according to a service logic of the target subsystem.
In an embodiment of the present application, the object defined by the adapter layer code file is an object common to all subsystems.
In an embodiment of the present application, the object includes an interface, and/or a model, and/or an entry and an exit contained in the interface.
In an embodiment of the present application, the determining unit 202 is specifically configured to:
and determining a dependent file package and a code module corresponding to the environment identifier based on a configuration file, wherein the dependent file package is used for constructing the code module.
In an embodiment of the present application, the extracting unit 203 may specifically include:
the first extraction subunit is used for extracting an adapter layer code file and a public function layer code file corresponding to the environment identifier from an original code file; the original code file comprises code files of all subsystems under the service system;
a second extraction subunit, configured to extract an integration layer code file corresponding to the environment identifier from an original code file;
and the packaging unit is used for packaging the extracted adapter layer code file, the common function layer code file and the integration layer code file into a target code file.
In an embodiment of the present application, the obtaining unit 201 may be specifically configured to:
and when the codes are packed, reading the environment identification corresponding to the target subsystem from the identification incoming command.
In an embodiment of the present application, the apparatus may further include:
and the test unit is used for obtaining a test case corresponding to the environment identifier and testing the target code file by using the test case.
It should be noted that the above-mentioned apparatus embodiments and the above-mentioned method embodiments can be mutually complementary without violating the present invention.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (16)

1. A method for code deployment, the method comprising:
obtaining an environment identifier corresponding to a target subsystem under a service system; the service system comprises a plurality of subsystems with homogenization service requirements;
determining a code module corresponding to the environment identifier based on a configuration file;
extracting an object code file corresponding to the determined code module from an original code file corresponding to the service system;
installing the target code file to the target subsystem.
2. The method of claim 1, wherein the code module comprises an adapter layer code file and an integration layer code file, wherein the adapter layer code file is used for defining the object used by the target subsystem, and the integration layer code file is used for realizing the object according to the business logic of the target subsystem.
3. The method of claim 2, wherein the objects defined by the adapter layer code file are objects common to the respective subsystems.
4. The method according to claim 2 or 3, wherein the object comprises an interface, and/or a model, and/or an in-and out-going contained in an interface.
5. The method of claim 1, wherein determining, based on the configuration file, a code module corresponding to the environment identifier comprises:
and determining a dependent file package and a code module corresponding to the environment identifier based on a configuration file, wherein the dependent file package is used for constructing the code module.
6. The method of claim 1, wherein extracting an object code file corresponding to the determined code module from an original code file corresponding to the business system comprises:
extracting an adapter layer code file and a public function layer code file corresponding to the environment identifier from an original code file; the original code file comprises code files of all subsystems under the service system;
extracting an integration layer code file corresponding to the environment identifier from an original code file;
and packaging the extracted adapter layer code file, the common functional layer code file and the integration layer code file into an object code file.
7. The method of claim 1, wherein the obtaining the environment identifier corresponding to the target subsystem under the service system comprises:
and when the codes are packed, reading the environment identification corresponding to the target subsystem from the identification incoming command.
8. The method of claim 1, wherein after extracting an object code file corresponding to the determined code module from an original code file corresponding to the business system, and before installing the object code file into the target subsystem, the method further comprises:
obtaining a test case corresponding to the environment identifier;
and testing the target code file by using the test case.
9. A code deployment apparatus, the apparatus comprising:
the obtaining unit is used for obtaining an environment identifier corresponding to a target subsystem under a service system; the service system comprises a plurality of subsystems with homogenization service requirements;
a determining unit, configured to determine, based on a configuration file, a code module corresponding to the environment identifier;
the extracting unit is used for extracting an object code file corresponding to the determined code module from an original code file corresponding to the service system;
and the installation unit is used for installing the target code file to the target subsystem.
10. The apparatus of claim 9, wherein the code module comprises an adapter layer code file and an integration layer code file, the adapter layer code file is used for defining an object used by the target subsystem, and the integration layer code file is used for implementing the object according to the business logic of the target subsystem.
11. The apparatus of claim 10, wherein the objects defined by the adapter layer code file are objects common to the respective subsystems.
12. The apparatus according to claim 10 or 11, wherein the object comprises an interface, and/or a model, and/or an in-and out-going contained in an interface.
13. The apparatus according to claim 9, wherein the determining unit is specifically configured to:
and determining a dependent file package and a code module corresponding to the environment identifier based on a configuration file, wherein the dependent file package is used for constructing the code module.
14. The apparatus of claim 9, wherein the extraction unit comprises:
the first extraction subunit is used for extracting an adapter layer code file and a public function layer code file corresponding to the environment identifier from an original code file; the original code file comprises code files of all subsystems under the service system;
a second extraction subunit, configured to extract an integration layer code file corresponding to the environment identifier from an original code file;
and the packaging unit is used for packaging the extracted adapter layer code file, the common function layer code file and the integration layer code file into a target code file.
15. The apparatus according to claim 9, wherein the obtaining unit is specifically configured to:
and when the codes are packed, reading the environment identification corresponding to the target subsystem from the identification incoming command.
16. The apparatus of claim 9, further comprising:
and the test unit is used for obtaining a test case corresponding to the environment identifier and testing the target code file by using the test case.
CN201710193565.XA 2017-03-28 2017-03-28 Code deployment method and device Active CN106990960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710193565.XA CN106990960B (en) 2017-03-28 2017-03-28 Code deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710193565.XA CN106990960B (en) 2017-03-28 2017-03-28 Code deployment method and device

Publications (2)

Publication Number Publication Date
CN106990960A CN106990960A (en) 2017-07-28
CN106990960B true CN106990960B (en) 2020-10-30

Family

ID=59412048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710193565.XA Active CN106990960B (en) 2017-03-28 2017-03-28 Code deployment method and device

Country Status (1)

Country Link
CN (1) CN106990960B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582353A (en) * 2017-09-26 2019-04-05 北京国双科技有限公司 The method and device of embedding data acquisition code
CN108628632B (en) * 2018-03-20 2021-09-10 车音智能科技有限公司 Packing method and device
CN110968333B (en) * 2018-09-30 2023-10-20 北京国双科技有限公司 Configuration information replacement method and device, machine-readable storage medium and processor
CN110569063B (en) * 2019-08-30 2023-05-02 五八有限公司 Sub-application APP generation method and generation device
CN111221593A (en) * 2019-12-31 2020-06-02 五八有限公司 Dynamic loading method and device
CN112015426B (en) * 2020-08-18 2023-12-26 上海高德威智能交通系统有限公司 Code management method, device and equipment
CN112698839B (en) * 2020-12-30 2024-04-12 深圳前海微众银行股份有限公司 Data center node deployment method, device and system and computer storage medium
CN112835572B (en) * 2021-01-29 2024-03-29 浪潮通用软件有限公司 Method and equipment for self-defining reference flow by means of project management tool

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000276343A (en) * 1999-03-24 2000-10-06 Mitsubishi Electric Corp Program modification device
US6804813B1 (en) * 2000-11-03 2004-10-12 Hewlett-Packard Development Company, L.P. System and method for remote and local diagnosis using automatically identified symbol libraries to create record based requests with tag lists of data to be collected from an operating system
US8645938B2 (en) * 2006-11-17 2014-02-04 International Business Machines Corporation System and method for replacing code

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100489774C (en) * 2007-09-13 2009-05-20 上海交通大学 Structured code automatic configuration method and device
CN105183760B (en) * 2015-07-24 2020-04-10 北京奇虎科技有限公司 Webpage component loading method and device
CN105867903A (en) * 2015-12-29 2016-08-17 乐视致新电子科技(天津)有限公司 Method and device or splitting code library
CN106201480A (en) * 2016-06-30 2016-12-07 中国航空无线电电子研究所 A kind of cockpit display Control System Software architecture management platform
CN106406913B (en) * 2016-10-28 2020-01-03 武汉斗鱼网络科技有限公司 Method and system for extracting codes from project

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000276343A (en) * 1999-03-24 2000-10-06 Mitsubishi Electric Corp Program modification device
US6804813B1 (en) * 2000-11-03 2004-10-12 Hewlett-Packard Development Company, L.P. System and method for remote and local diagnosis using automatically identified symbol libraries to create record based requests with tag lists of data to be collected from an operating system
US8645938B2 (en) * 2006-11-17 2014-02-04 International Business Machines Corporation System and method for replacing code

Also Published As

Publication number Publication date
CN106990960A (en) 2017-07-28

Similar Documents

Publication Publication Date Title
CN106990960B (en) Code deployment method and device
CN108958796B (en) Service request processing method and device and service request processing system
CN106796508B (en) Fast deployment on cloud platforms
US10592677B2 (en) Systems and methods for patching vulnerabilities
CA3096768A1 (en) System and method for automated microservice source code generation and deployment
CN108964968B (en) Service access management method and system in container cloud environment
US10447814B2 (en) Joint servicing of software packages
CN107506221B (en) Application program upgrading method, device and equipment
CN110096685B (en) Equipment identifier generation method and device
CN111897623B (en) Cluster management method, device, equipment and storage medium
CN110032358B (en) Application program generation method, device, equipment and system
CN110717536A (en) Method and device for generating training sample
CN113778445A (en) Cross-platform component generation method and device, electronic equipment and storage medium
CN111865905B (en) Ukey-based communication method, device and storage medium
CN109992501B (en) Availability check of small program, available small program list generating method and device
CN114091099A (en) Authority hierarchical control method, equipment and storage medium for business system
CN107133036B (en) Module management method and device
CN110968333B (en) Configuration information replacement method and device, machine-readable storage medium and processor
CN111131474A (en) Method, device and medium for managing user protocol based on block chain
CN106778270B (en) Malicious application detection method and system
CN115776515A (en) Software service providing method, device and equipment
CN112434347B (en) Rental business processing method, device, equipment and system
CN115048083A (en) Visualization method and device for assembly, storage medium and electronic equipment
CN115511595A (en) Service execution method and device based on block chain
CN106548331B (en) Method and device for determining release sequence

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
TA01 Transfer of patent application right

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant