CN106990960A - Code dispositions method and device - Google Patents

Code dispositions method and device Download PDF

Info

Publication number
CN106990960A
CN106990960A CN201710193565.XA CN201710193565A CN106990960A CN 106990960 A CN106990960 A CN 106990960A CN 201710193565 A CN201710193565 A CN 201710193565A CN 106990960 A CN106990960 A CN 106990960A
Authority
CN
China
Prior art keywords
code
file
layer identification
code file
target sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710193565.XA
Other languages
Chinese (zh)
Other versions
CN106990960B (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
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding 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

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 present application provides a kind of code dispositions method and device, and wherein methods described includes:Obtain the corresponding environmental labelses of target sub system under operation system;Based on configuration file, it is determined that code module corresponding with the environmental labelses;From the corresponding source code file of the operation system, object code file corresponding with the code module determined is extracted;The object code file is installed to the target sub system.The embodiment of the present application is by developing a set of source code file, you can realize the purpose for disposing code respectively in multiple subsystems, reduces code development cost.And subsequently only need to safeguard a set of code, without safeguarding a set of code respectively for each subsystem, the maintenance efficiency of code is lifted to a certain extent.

Description

Code dispositions method and device
Technical field
The application is related to technical field of software development, more particularly to a kind of code dispositions method and device.
Background technology
At present, operation system can have homogeneous business according to the development of practical business and demand comprising one or more The subsystem of demand.In correlation technique, for the business of homogeneity, each subsystem under respectively operation system is generally required Deployment is a set of to realize code accordingly, due to each subsystem development for needing to be directed under same operation system and deployment many set generations Code, causes the rising of code development cost, and be unfavorable for the follow-up maintenance of code.
The content of the invention
In view of this, the application provides a kind of code dispositions method and device.
To achieve the above object, the application offer technical scheme is as follows:
According to the first aspect of the application, it is proposed that a kind of code dispositions method, including:
Obtain the corresponding environmental labelses of target sub system under operation system;
Based on configuration file, it is determined that code module corresponding with the environmental labelses;
From the corresponding source code file of the operation system, target corresponding with the code module determined is extracted Code file;
The object code file is installed to the target sub system.
According to the second aspect of the application, it is proposed that a kind of code disposes device, including:
Obtaining unit, for obtaining the corresponding environmental labelses of target sub system under operation system;
Determining unit, for based on configuration file, it is determined that code module corresponding with the environmental labelses;
Extracting unit, for from the corresponding source code file of the operation system, extracting the code with determining The corresponding object code file of module;
Installation unit, for the object code file to be installed into the target sub system.
From above technical scheme, in the case where operation system includes one or more subsystems, in deployment code During, the embodiment of the present application is by obtaining the environmental labelses of the target sub system of code to be disposed, and based on configuration file, Determine the corresponding code module of the environmental labelses;Then, from the corresponding source code file of the operation system, extract with The corresponding object code file of the code module determined;Finally, the object code file is installed to target In system.It can be seen that, the embodiment of the present application is directed to same operation system, develops a set of source code corresponding with the operation system File, when disposing code, the mesh disposed according to required for environmental labelses extract each subsystem from above-mentioned source code file Code file is marked, to complete deployment.The embodiment of the present application is by developing a set of source code file, you can realize in multiple subsystems System disposes the purpose of code respectively, reduces code development cost.And subsequently only need to safeguard a set of code, without for Each subsystem safeguards a set of code respectively, and the maintenance efficiency of code is lifted to a certain extent.
Brief description of the drawings
Fig. 1 is a kind of flow chart for code dispositions method that the exemplary embodiment of the application one is provided;
Fig. 2 is a kind of structural representation for code skeleton that the exemplary embodiment of the application one is provided;
Fig. 3 is a kind of scene graph for code dispositions method that the exemplary embodiment of the application one is provided;
Fig. 4 is the structural representation for a kind of electronic equipment that the exemplary embodiment of the application one is provided;
Fig. 5 is the block diagram that a kind of code that the exemplary embodiment of the application one is provided disposes device.
Embodiment
Generally, the various functions realized according to needed for operation system are realized code and disposed, it is necessary to develop corresponding function Onto the operation system.For example, for a kind of internet financial platform, its function (or business) of needing to realize may include:Meeting Member, account, assets etc. are, it is necessary to which exploitation corresponding function realizes code respectively.Currently, sent out with the business of all kinds of operation systems Exhibition, can produce one or more subservice systems (hereinafter referred to as " subsystem ") that there is homogeneous business demand, so-called " same Matter " refers to that these subservice systems have some general character in some business or possess approximate implementation process.For example, for A kind of internet financial platform, such as business development, business can be distributed in multiple domains (such as:Main website, the world, net business etc.), Wherein each " domain " corresponds to a subsystem.In the related art, for the business of a certain homogeneity in operation system, one As need each subsystem under respectively operation system dispose it is a set of realize code accordingly, for example:If internet finance is flat The service distribution of platform is in multiple domains such as main website, the world, net business, then for " member " this business, it is necessary to respectively in main website, state Border, the multiple domains deployment of net business etc. a set of " member " business for being used to realize each domain realize code.It can be seen that, with subsystem number The increase of amount, developer needs each subsystem development being directed under same operation system and many set codes of deployment, and this is in certain journey The rising of code development cost is caused on degree, also, the later stage needs to safeguard many set codes, causes the time-consuming consumption of code maintenance process Power.To solve the above problems, proposing the following scheme of the embodiment of the present application.
Fig. 1 is a kind of flow chart for code dispositions method that the exemplary embodiment of the application one is provided, shown in ginseng Fig. 1, this In embodiment, the code dispositions method can apply in the electronic equipment for being deployed to code on subsystems that (this sets It is standby that corresponding code deployment tool can be installed) on, the code dispositions method comprises the steps 101~104, wherein:
In a step 101, the corresponding environmental labelses of target sub system under operation system are obtained.
Wherein, an environmental labelses are defined respectively for each subsystem under operation system in advance, the environmental labelses exist It is unique in the operation system, and for identifying each subsystem.For example, for a certain internet financial platform, if bag Enclosed tool system a, b, the then environmental labelses that can define subsystem a are " XXX ", and the environmental labelses for defining subsystem b are " YYY ". In the embodiment of the present application, above-mentioned " target sub system " is the subsystem for needing to dispose code.
, it is necessary to develop one according to default code skeleton for operation system before code is deployed into target sub system Source code file is covered, wherein, the source code file is disposed needed for can including the subsystems under the operation system Code file.The code skeleton used on source code file, will be introduced in greater detail below.
In the embodiment of the application one, the step 101 can be realized especially by following processes:
When code is packed, the corresponding environmental labelses of target sub system are read from mark incoming command.
For example, developer can by software configuration management (Software Configuration Management, SCM) instrument is (such as:Maven packing order) is initiated, such as:mvn package.Wherein, can be incoming by identifying in packing Order, the corresponding environmental labelses app of subsystem of incoming required deployment, identifying incoming command is, for example,:Mvn-Dapp=xxx. Certainly, in feasible other embodiment, the environmental labelses can also be carried in code packing order.
In a step 102, based on configuration file, it is determined that code module corresponding with the environmental labelses.
In the embodiment of the present application, for subsystems under operation system, the main body of otherness of code Now:
1st, the file bag that each subsystem is relied on is (such as:Jar bags etc.) have differences.For example:Different sub-systems are not dependent on With the jar bags of version.
2nd, the interface of required realization and realize that the model employed in interface procedure has differences.For example:Different sub-systems " member's interface " member ID for returning it is inconsistent, the member ID that " net business subsystem " is returned is:IpRoleId, " international subsystem System " return member ID be:userId.
Although there is above-mentioned difference in subsystems, due to there is the business demand of homogeneity, respectively in code realization The overall business realizing flow of individual subsystem is similar or basically identical.
In view of the overall business realizing flow of subsystems is basically identical, in the embodiment of the present application, developer develops It is a set of can by the public code skeleton of multiple subsystems, developer can be write according to this code skeleton source code text Part.As shown in Fig. 2 the code skeleton is according to realizing that function can be divided into multiple functional layers, each functional layer can also include One or more assemblies (component), wherein, each component can represent a code module.For example, functional layer can Including:Test layers, core layers, service layers etc..Wherein, there may be certain dependence (arrow in figure between each component Head represents the relation for relying on and being relied on).In the embodiment of the present application, the code skeleton can be java code skeletons etc..
In the embodiment of the application one, the code skeleton may include adapter layers 10 and one or more integration Layer, each subsystem correspond to one integration layer, with by the code file in the integration layers come reality The existing business of corresponding subsystem.In the exemplary embodiment, it is assumed that subsystem a, b are included under certain operation system, then subsystem a Integration layers 21 are may correspond to, subsystem b may correspond to integration layers 22., can be by generation herein for ease of description Remaining functional layer in code framework in addition to adapter layers and integration layers is defined as " public functional layers ", in addition, will The code file for being present in integration layers is defined as " integration layer identification codes file ", will be present in adapter layers Code file be defined as " adapter layer identification codes file ", the code file that will be present in public functional layers is defined as " public work( Ergosphere code file ".
In the embodiment of the present application, the adapter layer identification codes file is used to define the object that the target sub system is used, The integration layer identification codes file is used to realize the object according to the service logic of the target sub system.It is described right As including:What is included in interface interface, and/or model, and/or interface interface enters ginseng and goes out ginseng.Wherein, it is described Model refer into ginseng and go out ginseng used in object, for example:Interface is:" custview ", its it is corresponding enter ginseng be: " VcAuthoritySceneRequest.java ", going out ginseng is:" VcAuthorityRuleCheckResult.java ", then should Model may include used in interface:" VcAuthorityRuleCheckView.java ", " AuthorityRuleCheckClient.java ", etc..
For example:
In adapter layer identification codes file (such as pom.xml files), it can be subsystem a defining interface interface1, be Subsystem b defining interface interface2, wherein:The code format of defining interface is, for example,:
[modifier] interface interfaces name [extends father's interface list of file names]
[public] [static] [final] constant;
[public] [abstract] method;
}
After adapter layers define above-mentioned interface, code text can be passed through in the corresponding integration layers 21 of subsystem a Part realizes above-mentioned interface interface1;It can be realized in the corresponding integration layers 22 of subsystem b by code file State interface interface2.For example, realizing that interface can use keyword implements in class, its basic format is as follows:
[modifier] class<Class name>[extends parents name] [implements interface lists] {
}
In the embodiment of the present application, the object of the adapter layer identification codes document definition can be general for subsystems Object (such as interface interface, and/or model, and/or parameter).So as to which general object is supplied into the generation Other each functional layers in code framework are called.For example, the member ID that " the member's interface " of different sub-systems is returned is inconsistent, The member ID that " net business subsystem " is returned is:IpRoleId, the member ID that " international subsystem " is returned are:customerId. Adapter layers, the unified member ID of definable is userId.
At adapter layers, if different sub-systems define the universal model that general-purpose interface and general-purpose interface are used, each Individual subsystem is corresponding integration layers, can realize logic using subsystem is exclusive and realizes above-mentioned general-purpose interface Function.So, other code modules in code skeleton only need to perceive or call userId, and this is to a certain extent Can be with simplified code.
In the embodiment of the present application, the dependence of different sub-systems can be defined beforehand through configuration file (such as pom.xml) File bag and code module, the dependent file bag is to build the code module.Code content in the configuration file For example,:
Assuming that subsystem a environmental labelses are " ifcvoucherfront ", system b environmental labelses are " fcvoucherfront ", then, the configuration file content based on above example can be seen that:
When environmental labelses app is:When " ifcvoucherfront ", can by "<dependency>" and "</ dependency>" between code content determine catalogue, title, version number of dependent file bag that subsystem a is needed to use etc. Information, can by "<modules>" and "</modules>" between code content determine subsystem a need utilize above-mentioned dependence The code module that file bag is built, such as:app/common/service/adaptor/pom-ap.xml、app/common/ service/integration/ap.When environmental labelses app is:When " fcvoucherfront ", can by "<dependency >" and "</dependency>" between code content determine the catalogue of the dependent file bag that subsystem b is needed to use, title, The information such as version number, can by "<modules>" and "</modules>" between code content determine subsystem b need utilization The code module that above-mentioned dependent file bag is built, such as:app/common/service/adaptor/pom-bk.xml、app/ common/service/integration/bk。
In step 103, from the corresponding source code file of the operation system, the code mould with determining is extracted The corresponding object code file of block.
In the embodiment of the application one, the step 103 can be specifically included:
Step 1031:From source code file, extract corresponding with environmental labelses adapter layer identification codes file and Public functional layers code file.
Above-mentioned example is held, when environmental labelses app is:, it is necessary to the adapter layer generations extracted when " ifcvoucherfront " Code file be:Adaptor/pom-ap.xml (can subsystem a is used defined in pom-ap.xml each object);Work as environment Identifying app is:, it is necessary to which the adapter layer identification code files extracted are when " fcvoucherfront ":adaptor/pom-bk.xml (can subsystem b is used defined in pom-bk.xml each object).
Step 1032:From source code file, integration layer identification codes text corresponding with the environmental labelses is extracted Part.
Above-mentioned example is held, when environmental labelses app is:, it is necessary to the adapter layer generations extracted when " ifcvoucherfront " Code file be:It is present in the code file under adapter layers 21;When environmental labelses app is:When " fcvoucherfront ", need The adapter layer identification code files to be extracted are:It is present in the code file under adapter layers 22.
Step 1033:By the adapter layer identification codes file of extraction, public functional layers code file and integration layers Code file is packaged into object code file.
At step 104, the object code file is installed to the target sub system.
In the embodiment of the present application, for different subsystems, when disposing code, according to the difference of business realizing, Some code modules matched with own service are correspondingly extracted from source code file and carry out code deployment.From described In the corresponding source code file of operation system, extract after object code text corresponding with the code module determined, by institute State object code file to be installed to before the target sub system, methods described can also include:
Test case corresponding with the environmental labelses is obtained, and using the test case to the object code file Tested.
Can be respectively that each subsystem writes test case in view of the otherness of each subsystem, and by test case It is marked by environmental labelses, so that in test process, it is only necessary to which input environment mark just can get corresponding automatically Test case and complete test, testing efficiency is higher, test case is searched without artificial, while being easy to management of test cases.
Fig. 3 is a kind of scene graph for code dispositions method that the exemplary embodiment of the application one is provided, as shown in figure 3, opening Originator is write out source code file and uploaded by the business difference of above-mentioned general code skeleton and combination subsystems Into code library.When needing code being deployed to subsystems under operation system, incoming in packing deployment can be needed The environmental labelses app of the subsystem of code so that code deployment facility is extracted and environmental labelses app from above-mentioned code library The object code file matched, and be deployed on the subscriber device (server) specified.
In the embodiment of the present application, include one or more subsystems (such as in operation system:Subsystem a, b) in the case of, Dispose code during, the embodiment of the present application by obtain code to be disposed target sub system environmental labelses (such as: Ifcvoucherfront), and based on configuration file pom.xml, the corresponding code module of the environmental labelses is determined;Then, from In the corresponding source code file of the operation system, object code file corresponding with the code module of determination is extracted; Finally, the object code file is installed in the target sub system.It can be seen that, the embodiment of the present application is directed to same business System, develops corresponding with the operation system a set of source code file, in deployment code, according to environmental labelses from above-mentioned original Beginning code file extracts the object code file of deployment required for each subsystem, to complete deployment.The embodiment of the present application is used The general code skeleton a set of source code file of exploitation (as shown in Figure 2), you can realization disposes generation respectively in multiple subsystems The purpose of code, reduces code development cost.Simultaneously in follow-up maintenance code, it is only necessary to safeguard a set of source code file, and Without safeguarding a set of code file respectively for each subsystem, the follow-up maintenance efficiency of code is greatly promoted.In addition, working as industry When business system constantly derives new subsystem, it is only necessary in above-mentioned code skeleton, increase corresponding integration layers of generation Code file, you can realize the code deployment of newly-increased subsystem, enhance the expanded compatibility of operation system.
Fig. 4 is the structural representation for a kind of electronic equipment that the exemplary embodiment of the application one is provided.The electronic equipment can With code deployment facility (equipment for being such as provided with code management tools), Fig. 4 is refer to, in hardware view, the electronic equipment bag Processor, internal bus, network interface, internal memory and nonvolatile memory are included, is also possible that certainly needed for other business The hardware wanted.Processor reads corresponding computer program into internal memory and then run from nonvolatile memory, in logic Formed in aspect and dispose device for code.Certainly, in addition to software realization mode, the application is not precluded from other realization sides Mode of formula, such as logical device or software and hardware combining etc., that is to say, that the executive agent of following handling process is not limited Due to each logic unit or hardware or logical device.
Fig. 5 is refer to, in the embodiment of the application one, a kind of code disposes device, including:
Obtaining unit 201, for obtaining the corresponding environmental labelses of target sub system under operation system;
Determining unit 202, for based on configuration file, it is determined that code module corresponding with the environmental labelses;
Extracting unit 203, for from the corresponding source code file of the operation system, extracting the generation with determining The corresponding object code file of code module;
Installation unit 204, for the object code file to be installed into the target sub system.
In the embodiment of the application one, the code module includes adapter layer identification codes file and integration layer identification codes File, the adapter layer identification codes file is used to define the object that the target sub system is used, described integration layers Code file is used to realize the object according to the service logic of the target sub system.
In the embodiment of the application one, the object of the adapter layer identification codes document definition is general pair of subsystems As.
In the embodiment of the application one, the object is joined and gone out including entering for being included in interface, and/or model, and/or interface Ginseng.
In the embodiment of the application one, the determining unit 202 specifically for:
Based on configuration file, it is determined that dependent file bag corresponding with the environmental labelses and code module, the dependence text Part bag is to build the code module.
In the embodiment of the application one, the extracting unit 203 can be specifically included:
First extracts subelement, for from source code file, extracting adapter layers corresponding with the environmental labelses Code file and public functional layers code file;The source code file includes the subsystems under the operation system Code file;
Second extracts subelement, for from source code file, extracting corresponding with the environmental labelses Integration layer identification code files;
Packaged unit, for by the adapter layer identification codes file of extraction, public functional layers code file and Integration layer identification code files are packaged into object code file.
In the embodiment of the application one, the obtaining unit 201 can be specifically for:
When code is packed, the corresponding environmental labelses of target sub system are read from mark incoming command.
In the embodiment of the application one, described device can also include:
Test cell, for obtaining test case corresponding with the environmental labelses, and using the test case to institute Object code file is stated to be tested.
It should be noted that, said apparatus embodiment and above method embodiment, can be each other on the premise of not disagreing Supplement.
System, device, module or unit that above-described embodiment is illustrated, can specifically be realized by computer chip or entity, Or realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet PC, wearable device or these equipment The combination of any several equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented The function of each unit can be realized in same or multiple softwares and/or hardware during application.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can be used in one or more computers for wherein including computer usable program code The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of key elements are not only including those key elements, but also wrap Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described Also there is other identical element in process, method, commodity or the equipment of element.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can be described in the general context of computer executable instructions, such as program Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these DCEs, by Remote processing devices connected by communication network perform task.In a distributed computing environment, program module can be with Positioned at including in the local and remote computer-readable storage medium including storage device.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for system Apply for example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
Embodiments herein is the foregoing is only, the application is not limited to.For those skilled in the art For, the application can have various modifications and variations.It is all any modifications made within spirit herein and principle, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (16)

1. a kind of code dispositions method, it is characterised in that methods described includes:
Obtain the corresponding environmental labelses of target sub system under operation system;
Based on configuration file, it is determined that code module corresponding with the environmental labelses;
From the corresponding source code file of the operation system, object code corresponding with the code module determined is extracted File;
The object code file is installed to the target sub system.
2. according to the method described in claim 1, it is characterised in that the code module include adapter layer identification codes file and Integration layer identification code files, the adapter layer identification codes file is used to define the object that the target sub system is used, The integration layer identification codes file is used to realize the object according to the service logic of the target sub system.
3. method according to claim 2, it is characterised in that the object of the adapter layer identification codes document definition is each The general object of individual subsystem.
4. according to the method in claim 2 or 3, it is characterised in that the object include interface, and/or model, and/or Ginseng is joined and gone out in entering for being included in interface.
5. according to the method described in claim 1, it is characterised in that described to be based on configuration file, it is determined that with the environmental labelses Corresponding code module, including:
Based on configuration file, it is determined that dependent file bag corresponding with the environmental labelses and code module, the dependent file bag To build the code module.
6. according to the method described in claim 1, it is characterised in that described from the corresponding source code file of the operation system In, object code file corresponding with the code module determined is extracted, including:
From source code file, adapter layer identification codes file corresponding with the environmental labelses and public functional layers generation are extracted Code file;The source code file includes the code file of the subsystems under the operation system;
From source code file, integration layer identification code files corresponding with the environmental labelses are extracted;
The adapter layer identification codes file of extraction, public functional layers code file and integration layer identification code files are packaged into Object code file.
7. according to the method described in claim 1, it is characterised in that the target sub system obtained under operation system is corresponding Environmental labelses, including:
When code is packed, the corresponding environmental labelses of target sub system are read from mark incoming command.
8. according to the method described in claim 1, it is characterised in that from the corresponding source code file of the operation system, Extract after object code text corresponding with the code module determined, the object code file is installed to target Before system, in addition to:
Obtain test case corresponding with the environmental labelses;
The object code file is tested using the test case.
9. a kind of code disposes device, it is characterised in that described device includes:
Obtaining unit, for obtaining the corresponding environmental labelses of target sub system under operation system;
Determining unit, for based on configuration file, it is determined that code module corresponding with the environmental labelses;
Extracting unit, for from the corresponding source code file of the operation system, extracting the code module with determining Corresponding object code file;
Installation unit, for the object code file to be installed into the target sub system.
10. device according to claim 9, it is characterised in that the code module include adapter layer identification codes file and Integration layer identification code files, the adapter layer identification codes file is used to define the object that the target sub system is used, The integration layer identification codes file is used to realize the object according to the service logic of the target sub system.
11. device according to claim 10, it is characterised in that the object of the adapter layer identification codes document definition is The general object of subsystems.
12. the device according to claim 10 or 11, it is characterised in that the object include interface, and/or model and/ Or included in interface enter ginseng and go out ginseng.
13. device according to claim 9, it is characterised in that the determining unit specifically for:
Based on configuration file, it is determined that dependent file bag corresponding with the environmental labelses and code module, the dependent file bag To build the code module.
14. device according to claim 9, it is characterised in that the extracting unit includes:
First extracts subelement, for from source code file, extracting adapter layer identification codes corresponding with the environmental labelses File and public functional layers code file;The source code file includes the code of the subsystems under the operation system File;
Second extracts subelement, for from source code file, extracting integration layers corresponding with the environmental labelses Code file;
Packaged unit, for by the adapter layer identification codes file of extraction, public functional layers code file and integration layers Code file is packaged into object code file.
15. device according to claim 9, it is characterised in that the obtaining unit specifically for:
When code is packed, the corresponding environmental labelses of target sub system are read from mark incoming command.
16. device according to claim 9, it is characterised in that described device also includes:
Test cell, for obtaining test case corresponding with the environmental labelses, and using the test case to the mesh Mark code file is tested.
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 true CN106990960A (en) 2017-07-28
CN106990960B 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)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628632A (en) * 2018-03-20 2018-10-09 车音智能科技有限公司 A kind of packaging method and device
CN109582353A (en) * 2017-09-26 2019-04-05 北京国双科技有限公司 The method and device of embedding data acquisition code
CN110569063A (en) * 2019-08-30 2019-12-13 五八有限公司 sub-application APP generation method and generation device
CN110968333A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Configuration information replacement method and device, machine-readable storage medium and processor
CN111221593A (en) * 2019-12-31 2020-06-02 五八有限公司 Dynamic loading method and device
CN112015426A (en) * 2020-08-18 2020-12-01 上海高德威智能交通系统有限公司 Code management method, device and equipment
CN112698839A (en) * 2020-12-30 2021-04-23 深圳前海微众银行股份有限公司 Data center node deployment method, device and system and computer storage medium
CN112835572A (en) * 2021-01-29 2021-05-25 山东浪潮通软信息科技有限公司 Method and equipment for customizing reference flow depending on project management tool
CN115857956A (en) * 2022-11-24 2023-03-28 北京中知智慧科技有限公司 Multi-site deployment processing method and system

Citations (8)

* 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
CN101122854A (en) * 2007-09-13 2008-02-13 上海交通大学 Structured code automatic configuration method and device
US8645938B2 (en) * 2006-11-17 2014-02-04 International Business Machines Corporation System and method for replacing code
CN105183760A (en) * 2015-07-24 2015-12-23 北京奇虎科技有限公司 Webpage component loading method and apparatus
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
CN106406913A (en) * 2016-10-28 2017-02-15 武汉斗鱼网络科技有限公司 Method and system for extracting codes from project

Patent Citations (8)

* 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
CN101122854A (en) * 2007-09-13 2008-02-13 上海交通大学 Structured code automatic configuration method and device
CN105183760A (en) * 2015-07-24 2015-12-23 北京奇虎科技有限公司 Webpage component loading method and apparatus
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
CN106406913A (en) * 2016-10-28 2017-02-15 武汉斗鱼网络科技有限公司 Method and system for extracting codes from project

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曹新彩: "软件复用和基于可重用组件技术的软件开发(CBSD)", 《电脑知识与技术(学术交流)》 *

Cited By (13)

* 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
CN108628632A (en) * 2018-03-20 2018-10-09 车音智能科技有限公司 A kind of packaging method and device
CN110968333B (en) * 2018-09-30 2023-10-20 北京国双科技有限公司 Configuration information replacement method and device, machine-readable storage medium and processor
CN110968333A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Configuration information replacement method and device, machine-readable storage medium and processor
CN110569063A (en) * 2019-08-30 2019-12-13 五八有限公司 sub-application APP generation method and generation device
CN111221593A (en) * 2019-12-31 2020-06-02 五八有限公司 Dynamic loading method and device
CN112015426A (en) * 2020-08-18 2020-12-01 上海高德威智能交通系统有限公司 Code management method, device and equipment
CN112015426B (en) * 2020-08-18 2023-12-26 上海高德威智能交通系统有限公司 Code management method, device and equipment
CN112698839A (en) * 2020-12-30 2021-04-23 深圳前海微众银行股份有限公司 Data center node deployment method, device and system and computer storage medium
CN112698839B (en) * 2020-12-30 2024-04-12 深圳前海微众银行股份有限公司 Data center node deployment method, device and system and computer storage medium
CN112835572A (en) * 2021-01-29 2021-05-25 山东浪潮通软信息科技有限公司 Method and equipment for customizing reference flow depending on project management tool
CN112835572B (en) * 2021-01-29 2024-03-29 浪潮通用软件有限公司 Method and equipment for self-defining reference flow by means of project management tool
CN115857956A (en) * 2022-11-24 2023-03-28 北京中知智慧科技有限公司 Multi-site deployment processing method and system

Also Published As

Publication number Publication date
CN106990960B (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN106990960A (en) Code dispositions method and device
CN110673839B (en) Distributed tool configuration construction generation method and system
CN110908707B (en) Resource packaging method, device, server and storage medium
CN111309734B (en) Method and system for automatically generating table data
CN107133036B (en) Module management method and device
CN111159040A (en) Test data generation method, device, equipment and storage medium
CN105824647A (en) Form page generating method and device
CN106033390A (en) Mail style testing method and apparatus
CN112561690A (en) Method, system, equipment and storage medium for testing credit card staging service interface
US20230315779A1 (en) Image Tracing System and Method
CN112149391B (en) Information processing method, information processing apparatus, terminal device, and storage medium
CN114385155A (en) vue project visualization tool generation method, device, equipment and storage medium
US20170199729A1 (en) Application developing method and system
CN113987044A (en) Asset data import processing method and device and electronic equipment
Hayat et al. Extension of interaction flow modeling language for geographical information systems
EP3192225A1 (en) Information object system
CN113052675B (en) Data display method and device
CN115390912B (en) Resource discovery method, device, computer equipment and storage medium
US20030163604A1 (en) Method and apparatus for design and manufacturing application feature interoperability
CN117931264A (en) Cloud service-based software development data management method and system
CN116225521A (en) Record delivery method, apparatus, device, medium, and program product
TWI549010B (en) Ifc information processing method
CN116739805A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN117407469A (en) Cluster deployment method and device, computer equipment and storage medium
CN112486494A (en) File generation method and device, electronic equipment and computer readable storage 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
TA01 Transfer of patent application right
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.

GR01 Patent grant
GR01 Patent grant