CN106843820A - Code process method and apparatus - Google Patents

Code process method and apparatus Download PDF

Info

Publication number
CN106843820A
CN106843820A CN201510883743.2A CN201510883743A CN106843820A CN 106843820 A CN106843820 A CN 106843820A CN 201510883743 A CN201510883743 A CN 201510883743A CN 106843820 A CN106843820 A CN 106843820A
Authority
CN
China
Prior art keywords
module
current business
order
block code
code
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
CN201510883743.2A
Other languages
Chinese (zh)
Other versions
CN106843820B (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 CN201510883743.2A priority Critical patent/CN106843820B/en
Publication of CN106843820A publication Critical patent/CN106843820A/en
Application granted granted Critical
Publication of CN106843820B publication Critical patent/CN106843820B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms

Landscapes

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

Abstract

The embodiment of the present application discloses a kind of method and device of code process.The code process method includes:Obtain block code corresponding with the module that current business is included;Extract the Dependency Specification included in the block code;The order of each module in current business is determined according to the Dependency Specification, and according to the order merging block code of the module, obtains code file corresponding with the current business.Using the embodiment of the present application, can solve in the prior art, the length for merging the source code file for obtaining can be increased because the code for introducing relies on framework, the problem for causing the source code file for finally giving not enough to be simplified.

Description

Code process method and apparatus
Technical field
The application is related to field of software development, more particularly to a kind of code process method and apparatus.
Background technology
During software development, by by the existing multiple modules of source code for being used to realize certain function It is combined to obtain the source code file related to certain business, it has also become means relatively common at present.
In the prior art, during realizing that multiple modules of source code merge, to solve each source code mould The Dependence Problem of block, can generally introduce code and rely on framework, so that finally merging the source code for obtaining Each module in file relies on framework to solve the problems, such as module dependence by above-mentioned code.
In the prior art, the length for merging the source code file for obtaining can be increased because the code for introducing relies on framework Degree, causes the source code file for finally giving not enough to be simplified.
The content of the invention
The purpose of the embodiment of the present application is to provide a kind of method and device of code process, is used to solve existing skill Can increase the length for merging the source code file for obtaining because the code for introducing relies on framework in art, cause final The problem that the source code file for obtaining not enough is simplified.
In order to solve the above technical problems, the method and apparatus of the code process of the embodiment of the present application offer are so Realize:
A kind of method of code process, including:
Obtain block code corresponding with the module that current business is included;
Extract the Dependency Specification included in the block code;
The order of each module in current business is determined according to the Dependency Specification, and according to the secondary of the module Sequence merges the block code, obtains code file corresponding with the current business.
A kind of device of code process, including:
Acquiring unit, for obtaining block code corresponding with the module that current business is included;
Extraction unit, for extracting the Dependency Specification included in the block code;
Determining unit, the order for determining each module in current business according to the Dependency Specification, and according to Order according to the module merges the block code, obtains code file corresponding with the current business.
The technical scheme provided from above the embodiment of the present application, the code process that the embodiment of the present application is provided Method and device, by after the corresponding block code of the module for getting with current business is included, carrying The Dependency Specification included in the block code is taken, and is determined according to the Dependency Specification each in current business The order of module, finally merges the block code according to the order, obtains and the current industry It is engaged in corresponding code file.In above procedure, it is to avoid each to solve by introducing specific code dependence framework The Dependence Problem of module, so that finally merge the code file for obtaining more simplifying.
Brief description of the drawings
In order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art, below will be to implementing Example or the accompanying drawing to be used needed for description of the prior art are briefly described, it should be apparent that, describe below In accompanying drawing be only some embodiments described in the application, for those of ordinary skill in the art, Without having to pay creative labor, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the code process method of offer in the embodiment of the application one;
Fig. 2 is the method flow of the order that each module is determined according to Dependency Specification in the embodiment of the application one Figure;
Fig. 3 is the method flow of the order that each module is determined according to Dependency Specification in the embodiment of the application one Figure;
Fig. 4 is the module diagram of the code processing apparatus of offer in the embodiment of the application one.
Specific embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, below in conjunction with this Accompanying drawing in application embodiment, is clearly and completely described to the technical scheme in the embodiment of the present application, Obviously, described embodiment is only some embodiments of the present application, rather than whole embodiments.Base Embodiment in the application, those of ordinary skill in the art are obtained under the premise of creative work is not made The every other embodiment for obtaining, should all belong to the scope of the application protection.
Fig. 1 is the flow chart of the code process method in the embodiment of the application one.In the present embodiment, the generation Code processing method comprises the following steps:
S110:Obtain block code corresponding with the module that current business is included.
Current business is the business of the current desired realization of software developer, and the current business can be comprising multiple The module planned in advance, and there may be dependence between modules.Wherein, needing to realize certain Before individual business, the module that can be included by the specified current business of software developer.For example, it is right In current business X, the module that it is included can be { a, b, c, d, e }, then can be according to these modules point Corresponding block code is not got.
It is described before obtaining block code corresponding with the module that current business is included in the embodiment of the present application Method also includes:
According to the dependence between module, add corresponding with dependence in the block code of each module Dependency Specification;The block code of each module is mapped and stored with the module id of the module.
As it was previously stated, there may be dependence between modules, these dependences can be by each Corresponding Dependency Specification is added in the block code of module to realize.Such as:
/*global extend*/
// rely on extend
function ajax(settings){
}
In the block code of above-mentioned example, then can be by Dependency Specification "/* global extend*/" To realize that the module " ajax " depends on module " extend ".
Add corresponding dependence in the block code of the module that there is dependence respectively according to the method described above Information, and assign each module of the division with different module id ID (such as above-mentioned " ajax ", " extend "), then the block code of each module is corresponded with the module id of the module.Most at last this Block code after a little addition Dependency Specifications is mapped with the module id ID of modules respectively, and is deposited In storing up source code database.
As described above, in the present embodiment, step S110 is specifically included:
Receive the module id corresponding with the module that current business is included of user input.
According to the corresponding block code of the module id is inquired with current business is included module.
The user can be software developer, and system receives need of the software developer according to current business Seek the module id corresponding with each module that current business is included of input.Then, system is according to receiving The modules mark above-mentioned source code database of inquiry, the module corresponding with modules for being prestored Code.Such as:The module id of input includes:" ajax ", " extend ", then system queries and module id The block code of " ajax ", " extend " maps mutually.
S120:Extract the Dependency Specification included in the block code.
Specifically, the embodiment of the present application can be by the corresponding regular expression for extracting Dependency Specification of editor (Regular Expression, RE) carrys out scan module code to obtain the Dependency Specification.
For example, it is above-mentioned by scanning if the module that current business X is included is { a, b, c, d, e } The corresponding block code of module, the Dependency Specification included in the block code that can obtain module a is:“/* Global a*/", the Dependency Specification included in the block code of module b is:"/* global c*/", module d Block code in the Dependency Specification that includes be:"/* global b*/", includes in the block code of module e Dependency Specification is:“/*global c*/”;Then, the corresponding dependence of above-mentioned Dependency Specification is as follows:
A depends on b, b to depend on c, d to depend on b, e to depend on c.
S130:The order of each module in current business is determined according to the Dependency Specification list, and according to institute State order to merge the block code, obtain code file corresponding with the current business.
In the embodiment of the application one, after above-mentioned steps S120 and before step S130, methods described Also include:
S140:Dependency Specification list corresponding with current business is determined according to the Dependency Specification for extracting.Wherein, The Dependency Specification list is the dependence obtained according to extraction, by each module of current business according to certain Order is ranked up.
Continue to continue to use above-mentioned example, if the module that current business X is included is { a, b, c, d, e }, and lead to Crossing the Dependency Specification extracted in each block code can obtain following dependences:A depends on b, b to depend on C, d depend on b, e to depend on c.Then, the sequence of modules that can be obtained in Dependency Specification list is:[a, B, c], [d, b], [e, c], then, merged by by above-mentioned sequence of modules, obtain Dependency Specification Sequence of modules in list is:[a, b, c, d, b, e, c].
Fig. 2 is each module determined according to the Dependency Specification in current business in the embodiment of the application one The flow chart of the method for the step of order.Based on above-mentioned steps, step S130 is specifically included:
S1301:Judge to whether there is unnecessary module id in the Dependency Specification list.
Above-mentioned example is continued to use, the sequence of modules in the Dependency Specification list for obtaining is:[a, b, c, d, b, e, C], it is seen then that there is unnecessary module id in the Dependency Specification list:B, c, that is to say, that a mould Block identification can only occur once in Dependency Specification list.
S1302:If so, the unnecessary module id is deleted.
In the above example, by unnecessary module id:B, c make delete processing, the dependence after being deleted Sequence of modules in information list is:[a, d, b, e, c].
S1303:By the module id in the Dependency Specification list for deleting the unnecessary module id Order carries out inverted order arrangement, and the order of the module id after inverted order is arranged is defined as each mould in current business The order of block.
In the above example, in the code file for being generated due to final merging, the block code needs being relied on Position forward in code file is placed in, therefore, the present embodiment can be to the Dependency Specification list after above-mentioned deletion In sequence of modules:[a, d, b, e, c] makees inverted order arrangement, and module id after inverted order is arranged is suitable Sequence:[c, e, b, d, a] is defined as the order of each module in current business.
The block code that the secondary ordered pair inquiry of each module that may finally be in above-mentioned current business is obtained is entered Row merges, and obtains code file corresponding with current business.
For example, if the block code of module a is:
/*global b*/
// rely on b
function a(settings){
}
If the block code of module b is:
/*global c*/
// rely on c
function b(settings){
}
If the block code of module c is:
function c(settings){
}
If the block code of module d is:
/*global b*/
// rely on b
function d(settings){
}
If the block code of module e is:
/*global c*/
// rely on c
function e(settings){
}
Then according to the order of the above-mentioned each module being defined as in current business, above-mentioned each block code is closed And after, obtaining final code file is:
function c(settings){
}
/*global c*/
// rely on c
function e(settings){
}
/*global c*/
// rely on c
function b(settings){
}
/*global b*/
// rely on b
function d(settings){
}
/*global b*/
// rely on b
function a(settings){
}
It is worth addressing, the order of each module in above-mentioned current business is not unique, and part is not deposited Order between the module of relation of interdependence can be overturned, such as:In [c, e, b, d, a], a and The order of e can be exchanged mutually.Additionally, in actual applications, it is understood that there may be certain module and other modules And in the absence of any dependence (also not including Dependency Specification in the block code of the module), then final During merging code file, can there is no the block code of dependence to be inserted in this and finally merge To code file in optional position.
In another embodiment of the application, on the premise of no above-mentioned steps S140, in above-mentioned steps S130 The order that each module in current business is determined according to the Dependency Specification the step of, as shown in figure 3, tool Body includes:
S1304:According to the Dependency Specification, first module id and Depending module of depended module are determined The second module id.
Continue to continue to use above-mentioned example, if the module that current business X is included is { a, b, c, d, e }, and lead to Crossing the Dependency Specification extracted in each block code can obtain following dependences:A depends on b, b to depend on C, d depend on b, e to depend on c.Wherein, depended module includes:B, c, Depending module include:a、 b、d、e。
S1305:Judge to whether there is first module id or second module in default race-card Mark.
In the present embodiment, system pre-sets a race-card, with the presence dependence that will be determined successively Module id is inserted into the race-card.
S1306:If there is first module id and do not exist second module id, will be described Second module id is placed in after first module id.
S1307:If there is second module id and do not exist first module id, will be described Before first module id is placed in second module id.
By above-mentioned steps S1306 and step S1307, the insertion sequence of the module id in above-mentioned race-card It is as follows:
Originally, race-card is sky, and the depended module in " a depends on b " is b, and Depending module is a, Then it is inserted into race-card in the posterior order of preceding, Depending module according to depended module, obtains race-card:
[b、a];
Subsequently, for " b depends on c ", depended module is c, and Depending module is b, by judging, It can be found that there is b (meeting the situation of step S1307) in above-mentioned race-card, then module c is planted Before module b, race-card is obtained:
[c、b、a];
For " d depends on b ", depended module is b, and Depending module is d, by judging, Ke Yifa There is b (meeting the situation of step S1306) in existing above-mentioned race-card, then module d has been inserted in module After b, race-card is obtained:
[c、b、d、a];
For " e depends on c ", depended module is c, and Depending module is e, by judging, it can be found that There is c (meeting the situation of step S1306) in above-mentioned race-card, then module e has been inserted in module c Afterwards, race-card is obtained:
[c、e、b、d、a]。
So far, the order that the module id in final race-card can be determined as procedure described above is current industry The order of corresponding each module of being engaged in.Then, institute is merged according to the order of the module id included in the race-card Block code is stated, code file corresponding with the current business is obtained.
In the embodiment of the present application, more simplified in order that obtaining and finally merging the code file for obtaining, also included:
It is determined that the annotation information that includes and being deleted in the block code after merging.The annotation information includes But it is not limited to:Annotation etc. for describing dependence, for example:" // rely on extend ".
Corresponding with above method flow, embodiments herein additionally provides a kind of device of code process. The device can be realized by software, it is also possible to be realized by way of hardware or software and hardware combining.With soft It is by the central processing unit (Central of server as the device on logical meaning as a example by part is realized Process Unit, CPU) corresponding computer program instructions are read run in internal memory what is formed.
The module diagram of the device of the code process that Fig. 4 is provided for the embodiment of the application one.Wherein, the dress The function of putting each unit is similar with the function of each step in the above method, therefore the device is referred to above-mentioned side The particular content of method embodiment.The device includes:
Acquiring unit 401, for obtaining block code corresponding with the module that current business is included;
Extraction unit 402, for extracting the Dependency Specification included in the block code;
Determining unit 403, the order for determining each module in current business according to the Dependency Specification, And the order according to the module merges the block code, code text corresponding with the current business is obtained Part.
Such as the shown device of Fig. 4, in the embodiment of the present application, the device also includes:
Memory cell, for according to the dependence between module, in the block code of each module addition with The corresponding Dependency Specification of dependence;The block code of each module is mapped with the module id of the module And store;
Then, the acquiring unit 401 specifically for:
Receive the module id corresponding with the module that current business is included of user input;
According to the corresponding block code of the module id is inquired with current business is included module.
Such as the shown device of Fig. 4, in the embodiment of the present application, the device also includes:
List generation unit, for determining Dependency Specification corresponding with current business according to the Dependency Specification for extracting List;
Then, the determining unit 403 is specifically included:
First judging unit, for judging to whether there is unnecessary module id in the Dependency Specification list;
Unit is deleted, if there is unnecessary module id in the Dependency Specification list, will be described unnecessary Module id is deleted;
Order determining unit, for by the Dependency Specification list for deleting the unnecessary module id The order of module id carries out inverted order arrangement, and the order of the module id after inverted order is arranged is defined as current industry The order of each module in business.
Such as the shown device of Fig. 4, in the embodiment of the present application, the determining unit 403 is specifically included:
Determining unit is relied on, for according to the Dependency Specification, determining the first module id of depended module With the second module id of Depending module;
Second judging unit, for judging to whether there is first module id or institute in default race-card State the second module id;
Sequencing unit, does not exist second module for there is first module id in race-card During mark, second module id is placed in after first module id;There is institute in race-card When stating the second module id and not existing first module id, first module id is placed in described Before second module id;Order according to the module id included in the race-card merges the module generation Code, obtains code file corresponding with the current business.
Such as the shown device of Fig. 4, in the embodiment of the present application, the device also includes:
Annotation deletes unit, and the annotation information included in the block code after merging for determination is simultaneously deleted Remove.
The technical scheme provided from above the embodiment of the present application, the embodiment of the present application by get with After the corresponding block code of module that current business is included, the dependence letter included in the block code is extracted Breath, and the order of each module in current business is determined according to the Dependency Specification, finally according to the order The block code is merged, code file corresponding with the current business is obtained.In above procedure, The Dependence Problem for introducing specific code dependence framework to solve each module is avoided passing through, so that final close And the code file for obtaining more is simplified.
System, device, module or unit that above-described embodiment is illustrated, specifically can be by computer chip or reality Body is realized, or is realized by the product with certain function.
For convenience of description, it is divided into various units with function during description apparatus above to describe respectively.Certainly, The function of each unit can be realized in same or multiple softwares and/or hardware when the application is implemented.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or meter Calculation machine program product.Therefore, the present invention can be using complete hardware embodiment, complete software embodiment or knot Close the form of the embodiment in terms of software and hardware.And, the present invention can be used and wherein wrapped at one or more Containing computer usable program code computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) on implement computer program product form.
The present invention is produced with reference to method according to embodiments of the present invention, equipment (system) and computer program The flow chart and/or block diagram of product is described.It should be understood that can by computer program instructions realize flow chart and / or block diagram in each flow and/or the flow in square frame and flow chart and/or block diagram and/ Or the combination of square frame.These computer program instructions to all-purpose computer, special-purpose computer, insertion can be provided The processor of formula processor or other programmable data processing devices is producing a machine so that by calculating The instruction of the computing device of machine or other programmable data processing devices is produced for realizing in flow chart one The device of the function of being specified in individual flow or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or the treatment of other programmable datas to set In the standby computer-readable memory for working in a specific way so that storage is in the computer-readable memory Instruction produce include the manufacture of command device, the command device realization in one flow of flow chart or multiple The function of being specified in one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices, made Obtain and series of operation steps is performed on computer or other programmable devices to produce computer implemented place Reason, so as to the instruction performed on computer or other programmable devices is provided for realizing in flow chart one The step of function of being specified in flow or multiple one square frame of flow and/or block diagram or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/defeated Outgoing interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory And/or the form, such as read-only storage (ROM) or flash memory (flash RAM) such as Nonvolatile memory (RAM). Internal memory is the example of computer-readable medium.
Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be by appointing What method or technique realizes information Store.Information can be computer-readable instruction, data structure, program Module 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), dynamic random access memory (DRAM), its The random access memory (RAM) of his type, read-only storage (ROM), electrically erasable are 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, tape magnetic Disk storage or other magnetic storage apparatus or any other non-transmission medium, can be used for storage can be calculated The information that equipment is accessed.Defined according to herein, computer-readable medium does not include temporary computer-readable matchmaker Body (transitory media), such as data-signal and carrier wave of modulation.
Also, it should be noted that term " including ", "comprising" or its any other variant be intended to non-row His property is included, so that process, method, commodity or equipment including a series of key elements not only include Those key elements, but also other key elements including being not expressly set out, or also include for this process, Method, commodity or the intrinsic key element of equipment.In the absence of more restrictions, by sentence " including One ... " key element that limits, it is not excluded that in the process including the key element, method, commodity or set Also there is other identical element in standby.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer journey Sequence product.Therefore, the application can using complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.And, the application can be used and wherein include calculating at one or more Machine usable program code computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, Optical memory etc.) on implement computer program product form.
The application can be described in the general context of computer executable instructions, example Such as program module.Usually, program module includes performing particular task or realizes particular abstract data type Routine, program, object, component, data structure etc..This can also in a distributed computing environment be put into practice Application, in these DCEs, by the remote processing devices connected by communication network come Execution task.In a distributed computing environment, program module may be located at including local including storage device In remote computer storage medium.
Each embodiment in this specification is described by the way of progressive, identical phase between each embodiment As part mutually referring to, what each embodiment was stressed be it is different from other embodiment it Place.For especially for system embodiment, because it is substantially similar to embodiment of the method, so description Fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
Embodiments herein is the foregoing is only, the application is not limited to.For this area skill For art personnel, the application can have various modifications and variations.All institutes within spirit herein and principle Any modification, equivalent substitution and improvements of work etc., within the scope of should be included in claims hereof.

Claims (10)

1. a kind of code process method, it is characterised in that including:
Obtain block code corresponding with the module that current business is included;
Extract the Dependency Specification included in the block code;
The order of each module in current business is determined according to the Dependency Specification, and according to the secondary of the module Sequence merges the block code, obtains code file corresponding with the current business.
2. the method for claim 1, it is characterised in that obtain the module included with current business Before corresponding block code, methods described also includes:
According to the dependence between module, add corresponding with dependence in the block code of each module Dependency Specification;
The block code of each module is mapped and stored with the module id of the module;
Then, block code corresponding with the module that current business is included is obtained, is specifically included:
Receive the module id corresponding with the module that current business is included of user input;
According to the corresponding block code of the module id is inquired with current business is included module.
3. the method for claim 1, it is characterised in that extract what is included in the block code It is described before the order of each module in current business is determined according to the Dependency Specification after Dependency Specification Method also includes:
Dependency Specification list corresponding with current business is determined according to the Dependency Specification for extracting;
Then, the order of each module in current business is determined according to the Dependency Specification list, is specifically included:
Judge to whether there is unnecessary module id in the Dependency Specification list;
If so, the unnecessary module id is deleted;
The order of the module id in the Dependency Specification list for deleting the unnecessary module id is entered Row inverted order is arranged, and the order of the module id after inverted order is arranged is defined as the secondary of each module in current business Sequence.
4. the method for claim 1, it is characterised in that determined according to the Dependency Specification current The order of each module in business, specifically includes:
According to the Dependency Specification, the first module id of depended module and the second mould of Depending module are determined Block identification;
Judge to whether there is first module id or second module id in default race-card;
If there is first module id and do not exist second module id, by second module Mark is placed in after first module id;
If there is second module id and do not exist first module id, by first module Before mark is placed in second module id;
Then, merge the block code according to the order of the module, obtain corresponding with the current business Code file, specifically includes:
Order according to the module id included in the race-card merges the block code, obtain with it is described The corresponding code file of current business.
5. the method for claim 1, it is characterised in that the order according to the module merges institute State after block code, before obtaining code file corresponding with the current business, methods described includes:
It is determined that the annotation information that includes and being deleted in the block code after merging.
6. a kind of code processing apparatus, it is characterised in that including:
Acquiring unit, for obtaining block code corresponding with the module that current business is included;
Extraction unit, for extracting the Dependency Specification included in the block code;
Determining unit, the order for determining each module in current business according to the Dependency Specification, and according to Order according to the module merges the block code, obtains code file corresponding with the current business.
7. device as claimed in claim 6, it is characterised in that described device also includes:
Memory cell, for according to the dependence between module, in the block code of each module addition with The corresponding Dependency Specification of dependence;The block code of each module is mapped with the module id of the module And store;
Then, the acquiring unit specifically for:
Receive the module id corresponding with the module that current business is included of user input;
According to the corresponding block code of the module id is inquired with current business is included module.
8. device as claimed in claim 6, it is characterised in that described device also includes:
List generation unit, for determining Dependency Specification corresponding with current business according to the Dependency Specification for extracting List;
Then, the determining unit is specifically included:
First judging unit, for judging to whether there is unnecessary module id in the Dependency Specification list;
Unit is deleted, if there is unnecessary module id in the Dependency Specification list, will be described unnecessary Module id is deleted;
Order determining unit, for by the Dependency Specification list for deleting the unnecessary module id The order of module id carries out inverted order arrangement, and the order of the module id after inverted order is arranged is defined as current industry The order of each module in business.
9. device as claimed in claim 6, it is characterised in that the determining unit is specifically included:
Determining unit is relied on, for according to the Dependency Specification, determining the first module id of depended module With the second module id of Depending module;
Second judging unit, for judging to whether there is first module id or institute in default race-card State the second module id;
Sequencing unit, does not exist second module for there is first module id in race-card During mark, second module id is placed in after first module id;There is institute in race-card When stating the second module id and not existing first module id, first module id is placed in described Before second module id;Order according to the module id included in the race-card merges the module generation Code, obtains code file corresponding with the current business.
10. device as claimed in claim 6, it is characterised in that described device includes:
Annotation deletes unit, and the annotation information included in the block code after merging for determination is simultaneously deleted Remove.
CN201510883743.2A 2015-12-04 2015-12-04 Code processing method and device Active CN106843820B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510883743.2A CN106843820B (en) 2015-12-04 2015-12-04 Code processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510883743.2A CN106843820B (en) 2015-12-04 2015-12-04 Code processing method and device

Publications (2)

Publication Number Publication Date
CN106843820A true CN106843820A (en) 2017-06-13
CN106843820B CN106843820B (en) 2020-08-04

Family

ID=59148985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510883743.2A Active CN106843820B (en) 2015-12-04 2015-12-04 Code processing method and device

Country Status (1)

Country Link
CN (1) CN106843820B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388403A (en) * 2018-09-26 2019-02-26 广州视源电子科技股份有限公司 Rely on method for implanting, device, equipment and storage medium
CN109582347A (en) * 2018-10-15 2019-04-05 平安科技(深圳)有限公司 A kind of method and device obtaining front-end code
CN110442399A (en) * 2019-08-09 2019-11-12 广州小鹏汽车科技有限公司 The React Native business of application executes method, apparatus, storage medium and terminal device
CN110554867A (en) * 2018-05-30 2019-12-10 阿里巴巴集团控股有限公司 Application processing method and device
CN112114871A (en) * 2020-09-28 2020-12-22 北京奇艺世纪科技有限公司 Code sharing method, device, server, terminal and medium
CN112486470A (en) * 2020-12-15 2021-03-12 恩亿科(北京)数据科技有限公司 Method and system for automatically adjusting file window sequence based on file dependency relationship
WO2023273164A1 (en) * 2021-06-30 2023-01-05 中兴通讯股份有限公司 Code integrated verification method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120151463A1 (en) * 2010-12-09 2012-06-14 Oracle International Corporation Method and system for utilizing parallelism across loops
CN103699377A (en) * 2013-12-04 2014-04-02 国家电网公司 Reconstruction combination method for program codes
US8949809B2 (en) * 2012-03-01 2015-02-03 International Business Machines Corporation Automatic pipeline parallelization of sequential code
CN104991773A (en) * 2015-06-30 2015-10-21 小米科技有限责任公司 Program generation method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120151463A1 (en) * 2010-12-09 2012-06-14 Oracle International Corporation Method and system for utilizing parallelism across loops
US8949809B2 (en) * 2012-03-01 2015-02-03 International Business Machines Corporation Automatic pipeline parallelization of sequential code
CN103699377A (en) * 2013-12-04 2014-04-02 国家电网公司 Reconstruction combination method for program codes
CN104991773A (en) * 2015-06-30 2015-10-21 小米科技有限责任公司 Program generation method and apparatus

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110554867A (en) * 2018-05-30 2019-12-10 阿里巴巴集团控股有限公司 Application processing method and device
CN110554867B (en) * 2018-05-30 2023-03-28 阿里巴巴集团控股有限公司 Application processing method and device
CN109388403A (en) * 2018-09-26 2019-02-26 广州视源电子科技股份有限公司 Rely on method for implanting, device, equipment and storage medium
CN109388403B (en) * 2018-09-26 2022-04-05 广州视源电子科技股份有限公司 Dependency injection method, device, equipment and storage medium
CN109582347A (en) * 2018-10-15 2019-04-05 平安科技(深圳)有限公司 A kind of method and device obtaining front-end code
CN109582347B (en) * 2018-10-15 2024-04-02 平安科技(深圳)有限公司 Method and device for acquiring front-end codes
CN110442399A (en) * 2019-08-09 2019-11-12 广州小鹏汽车科技有限公司 The React Native business of application executes method, apparatus, storage medium and terminal device
CN112114871A (en) * 2020-09-28 2020-12-22 北京奇艺世纪科技有限公司 Code sharing method, device, server, terminal and medium
CN112114871B (en) * 2020-09-28 2023-09-05 北京奇艺世纪科技有限公司 Code sharing method, device, server, terminal and medium
CN112486470A (en) * 2020-12-15 2021-03-12 恩亿科(北京)数据科技有限公司 Method and system for automatically adjusting file window sequence based on file dependency relationship
WO2023273164A1 (en) * 2021-06-30 2023-01-05 中兴通讯股份有限公司 Code integrated verification method and device

Also Published As

Publication number Publication date
CN106843820B (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN106843820A (en) Code process method and apparatus
US9600275B2 (en) Smart source code review system
CN106155686B (en) Interface generation method, device and system
CN109582799B (en) Method and device for determining knowledge sample data set and electronic equipment
CN106844477B (en) To synchronous method after block catenary system, block lookup method and block chain
CN107957957A (en) The acquisition methods and device of test case
CN104794048B (en) A kind of UI automated testing methods and system
CN106201861A (en) The detection method of a kind of code quality and device
US20160267145A1 (en) System for retrieving, visualizing and editing semantic annotations
CN104423961B (en) A kind of method and system for generating test script
KR20170128297A (en) Filtering data grid diagram
CN105094924B (en) The introduction method and device of image file
US20150032708A1 (en) Database analysis apparatus and method
US20160147765A1 (en) Techniques for Using Similarity to Enhance Relevance in Search Results
CN107680003A (en) The node tree generation method and device of project supervision task
CN106933887A (en) A kind of data visualization method and device
CN112036125A (en) Document management method and device and computer equipment
US10664506B2 (en) Decision table decomposition using semantic relations
CN108959359A (en) A kind of uniform resource locator semanteme De-weight method, device, equipment and medium
CN105677651A (en) Permission tree generation method and device
KR101525984B1 (en) Apparatus and method for document managements determining file names based on rules
CN106294530B (en) The method and system of rule match
CN106802797A (en) The generation method and device of a kind of application programming interface
CN108073595A (en) It is a kind of to realize data update and the method and device of snapshot in olap database
WO2017050164A1 (en) Object presentation method and apparatus

Legal Events

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

Effective date of registration: 20200923

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

Patentee after: Innovative advanced technology Co.,Ltd.

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

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200923

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

Patentee after: Advanced innovation technology Co.,Ltd.

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

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right