CN109871229A - Management method, device, storage medium and the terminal device of code text - Google Patents

Management method, device, storage medium and the terminal device of code text Download PDF

Info

Publication number
CN109871229A
CN109871229A CN201910039494.7A CN201910039494A CN109871229A CN 109871229 A CN109871229 A CN 109871229A CN 201910039494 A CN201910039494 A CN 201910039494A CN 109871229 A CN109871229 A CN 109871229A
Authority
CN
China
Prior art keywords
module
code text
title
configuration file
parent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910039494.7A
Other languages
Chinese (zh)
Inventor
林泽全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910039494.7A priority Critical patent/CN109871229A/en
Publication of CN109871229A publication Critical patent/CN109871229A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention is suitable for field of computer technology, provide management method, device, storage medium and the terminal device of a kind of code text, it include: to obtain code text to be managed, and module parsing is carried out to the code text, the module information of the code text is obtained, the module information includes the dependence of the module title and the corresponding intermodule of the module title in the code text;The module Configuration file of the code text is generated according to the module information;It determines the title of the parent module in the module Configuration file, and the corresponding parent module of the title is introduced into the code text, the parent module is to be located at the module of top layer in the dependence.By the above method, efficiently solve the problems, such as that the intermodule dependence of web page code is chaotic, and then improve the reliability and operational efficiency of webpage.

Description

Management method, device, storage medium and the terminal device of code text
Technical field
The present invention relates to field of computer technology more particularly to a kind of management methods of code text, device, storage medium And terminal device.
Background technique
With the development of internet technology, front end html5 has been realized in modularization, i.e., by each function package Cheng Mo Block is directly quoted when needing.Inevitably, there are relation of interdependence between each functional module, such as the reality of the function of A module Now need to call the interface of B module, i.e. A module relies on B module.
With gradually increasing for function, module gradually increases, and the dependence of each intermodule becomes chaotic complicated, usually Will appear repetition quote same module the case where, be easy to cause code confusion, so cause the reliability of webpage, operational efficiency compared with Low problem.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of management method of code text, device, storage medium and terminals Equipment, the intermodule dependence to solve web page code in the prior art is chaotic and leads to the reliability of webpage, operational efficiency Lower problem.
The embodiment of the present invention in a first aspect, provide the management method of code text, may include:
Code text to be managed is obtained, and module parsing is carried out to the code text, obtains the code text Module information, the module information include module title and the corresponding module of the module title in the code text Between dependence;
The module Configuration file of the code text is generated according to the module information;
It determines the title of the parent module in the module Configuration file, and the corresponding parent module of the title is introduced into The code text, the parent module are to be located at the module of top layer in the dependence.
The second aspect of the embodiment of the present invention provides a kind of managing device of code text, may include:
Module resolution unit carries out module parsing for obtaining code text to be managed, and to the code text, obtains To the module information of the code text, the module information includes module title and the mould in the code text The dependence of the corresponding intermodule of block title;
File generating unit, for generating the module Configuration file of the code text according to the module information;
Modular unit is introduced, for determining the title of the parent module in the module Configuration file, and by the title pair The parent module answered is introduced into the code text, and the parent module is to be located at the module of top layer in the dependence.
The third aspect of the embodiment of the present invention, provides a kind of computer readable storage medium, described computer-readable to deposit Storage media is stored with computer program, and the computer program realizes following steps when being executed by processor:
Code text to be managed is obtained, and module parsing is carried out to the code text, obtains the code text Module information, the module information include module title and the corresponding module of the module title in the code text Between dependence;
The module Configuration file of the code text is generated according to the module information;
It determines the title of the parent module in the module Configuration file, and the corresponding parent module of the title is introduced into The code text, the parent module are to be located at the module of top layer in the dependence.
The third aspect of the embodiment of the present invention, provides a kind of terminal device, including memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor executes the computer program Realize following steps:
Code text to be managed is obtained, and module parsing is carried out to the code text, obtains the code text Module information, the module information include module title and the corresponding module of the module title in the code text Between dependence;
The module Configuration file of the code text is generated according to the module information;
It determines the title of the parent module in the module Configuration file, and the corresponding parent module of the title is introduced into The code text, the parent module are to be located at the module of top layer in the dependence.
Existing beneficial effect is the embodiment of the present invention compared with prior art:
The embodiment of the present invention parses in code text by carrying out module parsing to code text to be managed and includes The dependence of the corresponding intermodule of all module informations, the i.e. title of the title of module and each module, effectively to code Text has carried out decoupling;The module Configuration file of code text, i.e. module Configuration file are generated according to all module informations In describe dependence in code text between the title of modules and each module, can sort out in code text Dependence between each module efficiently solves the problems, such as dependence confusion;Then the father in determining module configuration file The title of grade module determines the module for being located at top layer in the dependence of each module of code text, and parent module is drawn Enter into code text, since parent module is located at the top layer in each module dependencies, other modules are finally both needed to rely on father Grade module, is introduced directly into code text for parent module, avoids and is repeatedly introduced module and arbitrarily introducing module bring Code confusion effectively increases the reliability and operational efficiency of web page program.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation process schematic diagram of the management method of code text provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram of the managing device of code text provided in an embodiment of the present invention;
Fig. 3 is the schematic diagram of terminal device provided in an embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " instruction is described special Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step, Operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Fig. 1 is the implementation process schematic diagram of the management method of code text provided in an embodiment of the present invention, as shown, institute The method of stating may comprise steps of:
Step S101 obtains code text to be managed, and carries out module parsing to the code text, obtains the generation The module information of code text, the module information includes module title and the module title pair in the code text The dependence for the intermodule answered.
In practical applications, it may only include preset syntax format in code text, such as quote the code statement of module, The module (code that is packaged, can be realized certain function) that can be introduced outside code text by the sentence, i.e. mould Block may be outside code text.
In one embodiment, described that module parsing is carried out to the code text, obtain the module of the code text Information, comprising:
Syntax parsing is carried out to the code text, is obtained according to the result of syntax parsing all in the code text Complete sentence.
Function parsing is carried out to the complete sentence, is divided into the code text according to the result that the function parses At least one functional program section, and the functional program section is numbered.
Each functional program section is parsed respectively, obtains at least one module information of the functional program section, institute The dependence that module information includes the module title and the corresponding intermodule of the module title in the functional program section is stated to close System.
In practical applications, it first identifies the complete sentence of each in code text, then determines the function of sentence again Can, sentence is divided according to function, multiple functional program sections is obtained, finally functional program section is parsed, parse The dependence for the corresponding intermodule of module title and module title being related in functional program section, i.e. module information.
Because different functional program sections may be related to different modules and different dependences in code text, By the above method, code text can be accurately divided into different functional program sections, and then be single with functional program section Position parses module information, and the dependence obtained in this way just becomes apparent from, is more acurrate.
In one embodiment, described that each functional program section is parsed respectively, obtain the functional program section At least one module information, comprising:
Each complete sentence in the functional program section is identified respectively, judge in the complete sentence whether Include preset syntax format.
If including preset syntax format in the complete sentence, the module title in the syntax format is extracted, and The corresponding module of the module title is denoted as the first module.
It determines the title of module belonging to the complete sentence, and the corresponding module of the title of the module is denoted as the second mould Block.
The dependence between first module and second module is determined according to the syntax format, and will be described The title of first module, the title of second module and the dependence are labeled as the corresponding module letter of the complete sentence Breath.
In practical applications, in code text, when A module relies on B module, it will usually with fixed syntax format table Show dependence, so, as long as identifying this syntax format (i.e. preset syntax format) fixed, i.e., deposited in declarative statement In dependence, and dependence can be sorted out according to the syntax format.It should be noted that a complete sentence In, may include or not comprising dependence, it is also possible to include one or more dependence.
Illustratively, A module relies on B module, then includes import B in a certain complete sentence in A module This syntax format of module;The module title i.e. B in the syntax format is extracted, and B module is denoted as the first module;Determination is worked as Module belonging to preceding complete sentence, i.e. A module, and A module is denoted as the second module.Because being the grammer for including in A module Format refers to B module in A module, so can be determined that A module relies on B module according to syntax format.Finally by A (module title), B (module title) and dependence (A module relies on B module) are packaged into the corresponding mould of current complete sentence Block message.
Step S102 generates the module Configuration file of the code text according to the module information.
In one embodiment, the module Configuration file that the code text is generated according to the module information, packet It includes:
The module information that each functional program section includes is counted respectively, and whole according to the dependence in the module information Manage out the dependence in each functional program section between all modules.
According to the dependence between modules all in the functional program section, generate the functional program section first is matched Set file, and the number by the number of the functional program section as first configuration file.
According to number order, each first configuration file is combined into the second configuration file, and second configuration is literary Module Configuration file of the part as the code text.
Illustratively, have two module information a and b in first functional program section, the dependence in a be module 1 according to Relying module 2, the dependence in b is 2 Depending module 3 of module, then the first configuration file of first functional program section generated, It include 1 Depending module 2 of module, 2 Depending module 3 of module in first the first configuration file;And by first functional program section Number is 1 number as first configuration file, i.e. first configuration file.Assuming that 10 functional program sections are shared, then And so on, 10 the first configuration files can be generated, according to number order, this 10 first configuration files are combined into module Configuration file.
That is, comprising the dependence in first functional program section in first the first configuration file, second It include the dependence in second functional program section in first configuration file, and so on.
Step S103, determines the title of the parent module in the module Configuration file, and by the corresponding parent of the title Module is introduced into the code text, and the parent module is to be located at the module of top layer in the dependence.
In practical applications, code text can be regarded as to an entirety, only one corresponding parent module, because of father Grade module is the module of top in the dependence of each module, if so introduce parent module, rely on its module from So also it is cited, it in this way can be to avoid being repeatedly introduced identical module.
Illustratively, modules A, B, C are related in code text, dependence is that A relies on B, and B relies on C, and A is relied on C, then C is the parent module of code text, and modules A and B are both needed to rely on C in code text, only need to introduce a C i.e. in this way Can, it avoids and is repeatedly introduced module C.
Certainly, there may be multiple functional program sections in a code text, and the function of each functional program section is different, into And possible different, intermodule the dependences of module being related to may be also different.So can be as unit of functional program section Module introducing is carried out, the specific method is as follows.
In one embodiment, the title of the parent module in the determination module Configuration file, and by the title Corresponding parent module is introduced into the code text, comprising:
It obtains positioned at the title of the module of top layer in the dependence that first configuration file includes, and by the module Name is referred to as the title of the parent module of first configuration file.
In the module Configuration file has been determined after the title of the parent module of each first configuration file, according to institute The corresponding parent module of the title of the parent module is sequentially introduced into the generation by the sequence for stating the number of the first configuration file Code text.
In practical applications, module introducing is carried out as unit of functional program section, in a code text it is possible that Multiple parent modules (because each functional program section corresponds to a parent module), then the parent mould that may be duplicated Block, that is, it is the case where duplicating reference, in one embodiment, described according to first configuration in order to avoid being repeatedly introduced The parent module is sequentially introduced into the code text by the sequence of the number of file, comprising:
Judge current parent module whether has been had been incorporated into the code text.
If having had been incorporated into current parent module in the code text, stop introducing current parent module, and According to the sequence of the number of first configuration file, next parent module is introduced.
If being not introduced into current parent module in the code text, the parent module is introduced, and by the parent module Labeled as having been introduced into module.
Wherein, judge whether to have been incorporated into, exactly in order to avoid being repeatedly introduced.
For example, the parent module of first the first configuration file is A, the parent module of second the first configuration file is also A, then after introducing the A in first the first configuration file, by A labeled as having been introduced into module, when introducing second When the parent module of the first configuration file, judge that the parent modules A has been incorporated into (can be carried out by the label of modules A Judgement), then the A not being re-introduced into second the first configuration file.
It should be noted that as described above, may include the content of complete module in a code text, it can also not Content comprising module, title and dependence comprising module.For example, including the content of modules A, mould in code text There is preset syntax format import B module (only including the title and dependence of B) in block A, according to the grammer lattice Formula illustrates that A relies on B, and in other words, A will not be parent module certainly.So when the content in code text including some module When, the usual module will not be the parent module of code text, introduce without with the method in the present invention.
The embodiment of the present invention parses in code text by carrying out module parsing to code text to be managed and includes The dependence of the corresponding intermodule of all module informations, the i.e. title of the title of module and each module, effectively to code Text has carried out decoupling;The module Configuration file of code text, i.e. module Configuration file are generated according to all module informations In describe dependence in code text between the title of modules and each module, can sort out in code text Dependence between each module efficiently solves the problems, such as dependence confusion;Then the father in determining module configuration file The title of grade module determines the module for being located at top layer in the dependence of each module of code text, and parent module is drawn Enter into code text, since parent module is located at the top layer in each module dependencies, other modules are finally both needed to rely on father Grade module, is introduced directly into code text for parent module, avoids and is repeatedly introduced module and arbitrarily introducing module bring Code confusion effectively increases the reliability and operational efficiency of web page program.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Fig. 2 is that the schematic diagram of the managing device of code text provided in an embodiment of the present invention is only shown for ease of description Part related to the embodiment of the present invention.
The managing device of code text shown in Fig. 2 can be the software unit being built in existing terminal device, hard Part unit or the unit of soft or hard combination can also be used as independent pendant and be integrated into the terminal device, be also used as solely Vertical terminal device exists.
The managing device 2 of the code text includes:
Module resolution unit 21 carries out module parsing for obtaining code text to be managed, and to the code text, Obtain the module information of the code text, the module information includes module title in the code text and described The dependence of the corresponding intermodule of module title.
File generating unit 22, for generating the module Configuration file of the code text according to the module information.
Modular unit 23 is introduced, for determining the title of the parent module in the module Configuration file, and by the title Corresponding parent module is introduced into the code text, and the parent module is to be located at the module of top layer in the dependence.
Optionally, the module resolution unit 21 includes:
Syntax parsing module obtains institute according to the result of syntax parsing for carrying out syntax parsing to the code text State complete sentence all in code text.
Function parsing module will according to the result of function parsing for carrying out function parsing to the complete sentence The code text is divided at least one functional program section, and the functional program section is numbered.
Module information parsing module obtains the functional program section for parsing respectively to each functional program section At least one module information, the module information includes module title and the module name in the functional program section Claim the dependence of corresponding intermodule.
Optionally, the module information parsing module includes:
Identify that submodule judges institute for identifying respectively to each complete sentence in the functional program section It whether states in complete sentence comprising preset syntax format.
Extracting sub-module, if extracting the syntax format for including preset syntax format in the complete sentence In module title, and the corresponding module of the module title is denoted as the first module.
Determine submodule, for determining the title of module belonging to the complete sentence, and the title of the module is corresponding Module be denoted as the second module.
Be packaged submodule, for according to the syntax format determine between first module and second module according to The relationship of relying, and by the title of first module, the title of second module and the dependence labeled as described complete The corresponding module information of sentence.
Optionally, the file generating unit 22 includes:
Statistical module, the module information for including for counting each functional program section respectively, and according to the module information In dependence sort out the dependence in each functional program section between all modules.
Number module, for generating the function according to the dependence between modules all in the functional program section First configuration file of program segment, and the number by the number of the functional program section as first configuration file.
Each first configuration file is combined into the second configuration file for according to number order by generation module, and by institute State module Configuration file of second configuration file as the code text.
Optionally, the introducing modular unit 23 includes:
Module is obtained, for obtaining in the dependence that first configuration file includes positioned at the name of the module of top layer Claim, and the name of the module is referred to as to the title of the parent module of first configuration file.
Introduce module, the name of the parent module for the first configuration file each in the module Configuration file has been determined After referred to as, according to the sequence of the number of first configuration file, by the corresponding parent module of the title of the parent module according to It is secondary to be introduced into the code text.
Optionally, the introducing module includes:
Judging submodule, for judging whether had been incorporated into current parent module in the code text.
Stop introducing submodule, if for having had been incorporated into current parent module in the code text, stopping is drawn Enter current parent module, and the sequence of the number according to first configuration file, introduces next parent module.
Submodule is marked, if introducing the parent module for being not introduced into current parent module in the code text, And by the parent module marks be have been introduced into module.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Fig. 3 is the schematic diagram of terminal device provided in an embodiment of the present invention.As shown in figure 3, the terminal device 3 of the embodiment Include: processor 30, memory 31 and is stored in the calculating that can be run in the memory 31 and on the processor 30 Machine program 32.The processor 30 realizes that the management method of above-mentioned each code text is implemented when executing the computer program 32 Step in example, such as step S101 to S103 shown in FIG. 1.Alternatively, the processor 30 executes the computer program 32 The function of each module/unit in the above-mentioned each Installation practice of Shi Shixian, such as the function of module 21 to 23 shown in Fig. 2.
Illustratively, the computer program 32 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 31, and are executed by the processor 30, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 32 in the terminal device 3 is described.For example, the computer program 32 can be divided It is cut into module resolution unit, file generating unit, introduces modular unit, each unit concrete function is as follows:
Module resolution unit carries out module parsing for obtaining code text to be managed, and to the code text, obtains To the module information of the code text, the module information includes module title and the mould in the code text The dependence of the corresponding intermodule of block title.
File generating unit, for generating the module Configuration file of the code text according to the module information.
Modular unit is introduced, for determining the title of the parent module in the module Configuration file, and by the title pair The parent module answered is introduced into the code text, and the parent module is to be located at the module of top layer in the dependence.
Optionally, the module resolution unit includes:
Syntax parsing module obtains institute according to the result of syntax parsing for carrying out syntax parsing to the code text State complete sentence all in code text.
Function parsing module will according to the result of function parsing for carrying out function parsing to the complete sentence The code text is divided at least one functional program section, and the functional program section is numbered.
Module information parsing module obtains the functional program section for parsing respectively to each functional program section At least one module information, the module information includes module title and the module name in the functional program section Claim the dependence of corresponding intermodule.
Optionally, the module information parsing module includes:
Identify that submodule judges institute for identifying respectively to each complete sentence in the functional program section It whether states in complete sentence comprising preset syntax format.
Extracting sub-module, if extracting the syntax format for including preset syntax format in the complete sentence In module title, and the corresponding module of the module title is denoted as the first module.
Determine submodule, for determining the title of module belonging to the complete sentence, and the title of the module is corresponding Module be denoted as the second module.
Be packaged submodule, for according to the syntax format determine between first module and second module according to The relationship of relying, and by the title of first module, the title of second module and the dependence labeled as described complete The corresponding module information of sentence.
Optionally, the file generating unit includes:
Statistical module, the module information for including for counting each functional program section respectively, and according to the module information In dependence sort out the dependence in each functional program section between all modules.
Number module, for generating the function according to the dependence between modules all in the functional program section First configuration file of program segment, and the number by the number of the functional program section as first configuration file.
Each first configuration file is combined into the second configuration file for according to number order by generation module, and by institute State module Configuration file of second configuration file as the code text.
Optionally, the introducing modular unit includes:
Module is obtained, for obtaining in the dependence that first configuration file includes positioned at the name of the module of top layer Claim, and the name of the module is referred to as to the title of the parent module of first configuration file.
Introduce module, the name of the parent module for the first configuration file each in the module Configuration file has been determined After referred to as, according to the sequence of the number of first configuration file, by the corresponding parent module of the title of the parent module according to It is secondary to be introduced into the code text.
Optionally, the introducing module includes:
Judging submodule, for judging whether had been incorporated into current parent module in the code text.
Stop introducing submodule, if for having had been incorporated into current parent module in the code text, stopping is drawn Enter current parent module, and the sequence of the number according to first configuration file, introduces next parent module.
Submodule is marked, if introducing the parent module for being not introduced into current parent module in the code text, And by the parent module marks be have been introduced into module.
The terminal device 3 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The terminal device may include, but be not limited only to, processor 30, memory 31.It will be understood by those skilled in the art that Fig. 3 The only example of terminal device 3 does not constitute the restriction to terminal device 3, may include than illustrating more or fewer portions Part perhaps combines certain components or different components, such as the terminal device can also include input-output equipment, net Network access device, bus etc..
Alleged processor 30 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 31 can be the internal storage unit of the terminal device 3, such as the hard disk or interior of terminal device 3 It deposits.The memory 31 is also possible to the External memory equipment of the terminal device 3, such as be equipped on the terminal device 3 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 31 can also both include the storage inside list of the terminal device 3 Member also includes External memory equipment.The memory 31 is for storing needed for the computer program and the terminal device Other programs and data.The memory 31 can be also used for temporarily storing the data that has exported or will export.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and Telecommunication signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of management method of code text characterized by comprising
Code text to be managed is obtained, and module parsing is carried out to the code text, obtains the module of the code text Information, the module information include module title and the corresponding intermodule of the module title in the code text Dependence;
The module Configuration file of the code text is generated according to the module information;
It determines the title of the parent module in the module Configuration file, and the corresponding parent module of the title is introduced into described Code text, the parent module are to be located at the module of top layer in the dependence.
2. the management method of code text as described in claim 1, which is characterized in that described to carry out mould to the code text Block parsing, obtains the module information of the code text, comprising:
Syntax parsing is carried out to the code text, is obtained according to the result of syntax parsing all complete in the code text Sentence;
Function parsing is carried out to the complete sentence, is divided into the code text at least according to the result that the function parses One functional program section, and the functional program section is numbered;
Each functional program section is parsed respectively, obtains at least one module information of the functional program section, the mould Block message includes the dependence of the module title and the corresponding intermodule of the module title in the functional program section.
3. the management method of code text as claimed in claim 2, which is characterized in that described respectively to each functional program section It is parsed, obtains at least one module information of the functional program section, comprising:
Each complete sentence in the functional program section is identified respectively, judge in the complete sentence whether include Preset syntax format;
If including preset syntax format in the complete sentence, the module title in the syntax format is extracted, and should The corresponding module of module title is denoted as the first module;
It determines the title of module belonging to the complete sentence, and the corresponding module of the title of the module is denoted as the second module;
The dependence between first module and second module is determined according to the syntax format, and by described first The title of module, the title of second module and the dependence are labeled as the corresponding module information of the complete sentence.
4. the management method of code text as claimed in claim 2, which is characterized in that described to be generated according to the module information The module Configuration file of the code text, comprising:
The module information that each functional program section includes is counted respectively, and is sorted out according to the dependence in the module information Dependence in each functional program section between all modules;
According to the dependence between modules all in the functional program section, the first configuration text of the functional program section is generated Part, and the number by the number of the functional program section as first configuration file;
According to number order, each first configuration file is combined into the second configuration file, and second configuration file is made For the module Configuration file of the code text.
5. the management method of code text as claimed in claim 4, which is characterized in that the determination module Configuration file In parent module title, and the corresponding parent module of the title is introduced into the code text, comprising:
It obtains positioned at the title of the module of top layer in the dependence that first configuration file includes, and by the title of the module The title of parent module as first configuration file;
In the module Configuration file has been determined after the title of the parent module of each first configuration file, according to described The corresponding parent module of the title of the parent module is sequentially introduced into the code text by the sequence of the number of one configuration file This.
6. the management method of code text as claimed in claim 5, which is characterized in that described according to first configuration file Number sequence, the parent module is sequentially introduced into the code text, comprising:
Judge current parent module whether has been had been incorporated into the code text;
If having had been incorporated into current parent module in the code text, stop introducing current parent module, and according to The sequence of the number of first configuration file introduces next parent module;
If being not introduced into current parent module in the code text, the parent module is introduced, and by the parent module marks To have been introduced into module.
7. a kind of managing device of code text characterized by comprising
Module resolution unit carries out module parsing for obtaining code text to be managed, and to the code text, obtains institute The module information of code text is stated, the module information includes module title and the module name in the code text Claim the dependence of corresponding intermodule;
File generating unit, for generating the module Configuration file of the code text according to the module information;
Modular unit is introduced, for determining the title of the parent module in the module Configuration file, and the title is corresponding Parent module is introduced into the code text, and the parent module is to be located at the module of top layer in the dependence.
8. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the step of realization such as any one of claims 1 to 6 described program management method when the computer program is executed by processor Suddenly.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes following steps when executing the computer program:
Code text to be managed is obtained, and module parsing is carried out to the code text, obtains the module of the code text Information, the module information include module title and the corresponding intermodule of the module title in the code text Dependence;
The module Configuration file of the code text is generated according to the module information;
It determines the title of the parent module in the module Configuration file, and the corresponding parent module of the title is introduced into described Code text, the parent module are to be located at the module of top layer in the dependence.
10. terminal device as claimed in claim 9, which is characterized in that it is described that module parsing is carried out to the code text, it obtains To the module information of the code text, comprising:
Syntax parsing is carried out to the code text, is obtained according to the result of syntax parsing all complete in the code text Sentence;
Function parsing is carried out to the complete sentence, is divided into the code text at least according to the result that the function parses One functional program section, and the functional program section is numbered;
Each functional program section is parsed respectively, obtains at least one module information of the functional program section, the mould Block message includes the dependence of the module title and the corresponding intermodule of the module title in the functional program section.
CN201910039494.7A 2019-01-16 2019-01-16 Management method, device, storage medium and the terminal device of code text Pending CN109871229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910039494.7A CN109871229A (en) 2019-01-16 2019-01-16 Management method, device, storage medium and the terminal device of code text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910039494.7A CN109871229A (en) 2019-01-16 2019-01-16 Management method, device, storage medium and the terminal device of code text

Publications (1)

Publication Number Publication Date
CN109871229A true CN109871229A (en) 2019-06-11

Family

ID=66917707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910039494.7A Pending CN109871229A (en) 2019-01-16 2019-01-16 Management method, device, storage medium and the terminal device of code text

Country Status (1)

Country Link
CN (1) CN109871229A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362538A (en) * 2019-07-19 2019-10-22 中国工商银行股份有限公司 Relationship determines method and apparatus, electronic equipment and computer readable storage medium
CN110795089A (en) * 2019-10-29 2020-02-14 中国建设银行股份有限公司 Code generation method, device, equipment and storage medium
CN112486481A (en) * 2020-12-03 2021-03-12 北京展心展力信息科技有限公司 Multi-module layered architecture implementation method, device, electronic equipment and medium
CN112486497A (en) * 2020-11-26 2021-03-12 北京自如信息科技有限公司 Compiling configuration file generation method and device, electronic equipment and storage medium
CN112559137A (en) * 2020-12-26 2021-03-26 北京国腾联信科技有限公司 H5 container configuration method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080276231A1 (en) * 2007-05-03 2008-11-06 Yunwu Huang Method and apparatus for dependency injection by static code generation
US9383976B1 (en) * 2015-01-15 2016-07-05 Xerox Corporation Methods and systems for crowdsourcing software development project
CN107391153A (en) * 2017-07-31 2017-11-24 深圳乐信软件技术有限公司 A kind of code generating method and device based on Spring Yu MyBatis framework integrations
CN107729031A (en) * 2017-08-25 2018-02-23 上海壹账通金融科技有限公司 Code administration method, apparatus, computer equipment and computer-readable recording medium
CN109086362A (en) * 2018-07-19 2018-12-25 北京首汽智行科技有限公司 The management method of multimode project

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080276231A1 (en) * 2007-05-03 2008-11-06 Yunwu Huang Method and apparatus for dependency injection by static code generation
US9383976B1 (en) * 2015-01-15 2016-07-05 Xerox Corporation Methods and systems for crowdsourcing software development project
CN107391153A (en) * 2017-07-31 2017-11-24 深圳乐信软件技术有限公司 A kind of code generating method and device based on Spring Yu MyBatis framework integrations
CN107729031A (en) * 2017-08-25 2018-02-23 上海壹账通金融科技有限公司 Code administration method, apparatus, computer equipment and computer-readable recording medium
CN109086362A (en) * 2018-07-19 2018-12-25 北京首汽智行科技有限公司 The management method of multimode project

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高波: "航空行业测试管理软件的设计与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, no. 02, 15 February 2013 (2013-02-15), pages 138 - 758 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362538A (en) * 2019-07-19 2019-10-22 中国工商银行股份有限公司 Relationship determines method and apparatus, electronic equipment and computer readable storage medium
CN110362538B (en) * 2019-07-19 2022-02-25 中国工商银行股份有限公司 Relationship determination method and apparatus, electronic device, and computer-readable storage medium
CN110795089A (en) * 2019-10-29 2020-02-14 中国建设银行股份有限公司 Code generation method, device, equipment and storage medium
CN112486497A (en) * 2020-11-26 2021-03-12 北京自如信息科技有限公司 Compiling configuration file generation method and device, electronic equipment and storage medium
CN112486481A (en) * 2020-12-03 2021-03-12 北京展心展力信息科技有限公司 Multi-module layered architecture implementation method, device, electronic equipment and medium
CN112486481B (en) * 2020-12-03 2024-03-19 北京展心展力信息科技有限公司 Multi-module layered architecture implementation method and device, electronic equipment and medium
CN112559137A (en) * 2020-12-26 2021-03-26 北京国腾联信科技有限公司 H5 container configuration method and device

Similar Documents

Publication Publication Date Title
CN109871229A (en) Management method, device, storage medium and the terminal device of code text
CN108268253B (en) Interface code generation method and terminal equipment
US9582606B2 (en) Validation of schema and schema conformance verification
CN109379326B (en) XML message rule checking method, equipment and storage medium
CN107704265A (en) A kind of configurable rule generating method of service-oriented stream
CN107644323A (en) A kind of intelligent checks system of service-oriented stream
CN108984712A (en) Counting method, equipment and readable storage medium storing program for executing are made based on business scenario
Kanj et al. Seeing the trees and their branches in the network is hard
CN110532152A (en) A kind of monitoring alarm processing method and system based on Kapacitor computing engines
CN110688828A (en) File processing method and device, file processing system and computer equipment
CN111782900B (en) Abnormal service detection method and device, electronic equipment and storage medium
CN105279614A (en) Business auditing system based on process and method thereof
CN109146095A (en) The treating method and apparatus of multiservice system problem
CN110262783A (en) A kind of interface creation method, device and terminal device
CN109388417A (en) A kind of update method of communication protocol, system and terminal device
Hu et al. Complex event processing in RFID middleware: A three layer perspective
CN109359938A (en) A kind of optimization method of flow chart of data processing, device and terminal device
CN108304591A (en) A kind of method for customizing of label, system and terminal device
CN111245633B (en) Configuration file of micro-grid main equipment and operation method thereof
CN108256005A (en) Internet product monitoring method and terminal device
CN111951040A (en) Information sending method and device, electronic equipment and storage medium
CN110806973A (en) Automatic generation method and device of interface message
CN109408035A (en) A kind of process configuration method, storage medium and the server of operation system
Ehlers Symmetric and efficient synthesis
CN107632896A (en) A kind of data processing method, data processing equipment and communication 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