Summary of the invention
For above-mentioned technological deficiency, the embodiment of the invention provides a kind of approaches to IM of ERP system andDevice solves the problems, such as ERP system script file location difficulty in the prior art, improves the efficiency of management.
First aspect present invention provides a kind of approaches to IM of ERP system, it may include:
The control file in control system is traversed, each control file is parsed, obtains each control fileUnder script file execute sequence;
Sequence is executed according to above-mentioned, the script file under file is controlled to each and is parsed, corresponding structure is generatedChange description information and associated with information;
Script file and corresponding structural description information and associated with information is combined to obtain parsing information, it will be upperParsing information preservation is stated into database.
As can be seen that first being obtained under each control file by the parsing to control file in embodiments of the present inventionScript file executes sequence, and the script file parsing controlled under file is generated structuring respectively according to this execution sequence and is retouchedInformation and associated with information are stated, then by structural description information and associated with information together with its original script file oneIt rises and saves in the database, structural description information and associated with information facilitate user accurately and quickly to orient script textPart, to improve the efficiency of management.
In some embodiment of the invention, above-mentioned to execute sequence according to above-mentioned, the script text under file is controlled eachPart is parsed, and generates corresponding structural description information and associated with information includes: to execute sequence according to above-mentioned, from eachEach script sentence is read in the script file of a control file, the script sentence of reading is parsed, is obtained correspondingStructural description information and associated with information, above structure description information include that script file description and Script Action are retouchedIt states, above-mentioned associated with information includes affiliated script file, affiliated control file, executes sequence.Later, by script sentenceAnd corresponding structural description information and associated with information combine to obtain parsing information, by above-mentioned parsing information preservation to numberAccording in library.In embodiments of the present invention, the script file under file is controlled by a plurality of script sentence according to certain execution sequence groupAt being parsed by being successively read each of script file script sentence, obtain the corresponding knot of each script sentenceStructure description information and associated with information.Structural description information is that script sentence is described by another language,It is improved so as to further accurately and quickly orient script sentence the position of associated with information description script sentenceInquiry velocity, to improve the efficiency of management.
In some embodiments of the invention, it includes: the script language according to reading that the above-mentioned script sentence to reading, which carries out parsing,Sentence, obtains corresponding morphology configuration file, generates corresponding analysis program according to above-mentioned morphology configuration file;Utilize above-mentioned parsingProgram parses the script sentence of above-mentioned reading.As can be seen that defining its corresponding morphology for every a kind of script sentenceConfiguration file is automatically generated an analysis program, is then parsed using analysis program to script sentence.
Optionally, structural description information is to embody in a tabular form, in the table respectively presses structural description informationIt is recorded separately according to different attribute, it is saved as being divided into a plurality of record according to field, type, index in table.
In some embodiment of the invention, by the parsing information preservation of all script files in the database, Yong HukeTo position script file even script sentence in the following manner: it receives user and passes through web page input inquiry condition, it is above-mentioned to look intoInquiry condition is that user requests to inquire the parsing information for meeting above-mentioned querying condition;Meet above-mentioned querying condition in data base queryingInformation is parsed, the parsing information inquired is shown to user.Due to suitable according to the execution of script file in the embodiment of the present inventionThe script sentence of ordered pair script file is parsed, and is carried out when stored together with associated with information and former script sentenceIt saves, therefore, user neatly can carry out matching inquiry by querying condition, navigate to script sentence.
In some embodiment of the invention, all script files under corresponding to all control files, generate file descriptionInformation, personal information and module information, save together, and user is facilitated quickly to position the responsible person of corresponding script file.
Second aspect of the present invention provides a kind of apparatus for management of information of ERP system, it may include:
Module is obtained, for traversing the control file in control system, each control file is parsed, is obtained everyScript file under one control file executes sequence;
Parsing module controls the script file under file to each and parses for executing sequence according to above-mentioned, rawAt corresponding structural description information and associated with information;
Preserving module, for combining to obtain script file and corresponding structural description information and associated with informationInformation is parsed, by above-mentioned parsing information preservation into database.
In some embodiment of the invention, above-mentioned parsing module is specifically used for, and executes sequence according to above-mentioned, from each controlEach script sentence is read in the script file of file processed, and the script sentence of reading is parsed, corresponding structure is obtainedChange description information and associated with information, above structure description information includes that script file description and Script Action describe, onAssociated with information is stated to include affiliated script file, affiliated control file, execute sequence;Above-mentioned preserving module is specifically usedIn script sentence and corresponding structural description information and associated with information combining to obtain parsing information, by above-mentioned solutionInformation preservation is analysed into database.
In some embodiment of the invention, above-mentioned parsing module is further used for, according to the script sentence of reading, acquisition pairThe morphology configuration file answered generates corresponding analysis program according to above-mentioned morphology configuration file;Using above-mentioned analysis program to upperThe script sentence for stating reading is parsed.
In some embodiment of the invention, above-mentioned apparatus further include: enquiry module passes through web page for receiving userInput inquiry condition, above-mentioned querying condition are that user requests to inquire the parsing information for meeting above-mentioned querying condition;It is looked into databaseThe parsing information for meeting above-mentioned querying condition is ask, the parsing information inquired is shown to user.
In some embodiment of the invention, above-mentioned parsing module is also used to, raw according to the script file of all control filesAt file description information, personal information and module information;Above-mentioned preserving module is also used to, by above-mentioned file description information, personnelInformation and module information save in the database.
Specific embodiment
Below in conjunction with the attached drawing of the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, completeGround description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on thisEmbodiment in invention, every other reality obtained by those of ordinary skill in the art without making creative effortsExample is applied, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of approaches to IM of ERP system, for accurately and quickly carrying out fileInquiry improves the efficiency of management.The embodiment of the invention also provides a kind of corresponding devices of the approaches to IM of ERP system.
The embodiment of the present invention is applied to ERP system, specifically can be applied to test phase in ERP development process orDuring final-period management, when orientation problem script or query script, can quickly it be navigated on the basis of the present inventionCorresponding scripts.
The script file that developer writes in ERP, which is all submitted in Svn, to be managed, as shown in FIG. 1, FIG. 1 isThe relational graph of script file provided in an embodiment of the present invention and control file.In Fig. 1, the root node of tree construction is master control textPart, is control file under master control file, and the next node for controlling file can be control file or script file, tree constructionLeaf node be script file.Script file is made of several script sentences.Wherein, script file is sql script file,Script sentence is sql script sentence.
It will be described in detail below with specific embodiment to the present invention on the basis of ERP system.Referring to Fig. 2, figure2 be the flow diagram of the approaches to IM of ERP system provided in an embodiment of the present invention;As shown in Fig. 2, a kind of ERP systemApproaches to IM can include:
201, from reading all control files in svn control system and controlling the sql script file under file, institute is traversedThere is control file to parse to each control file, obtain sql script file executes sequence;
It is to be appreciated that periodically handling sql script file in the embodiment of the present invention, the period can be set as 1 day, 1It is set with specific reference to actual needs in a week etc..
Since file is saved with tree construction in svn control system, first master control is read from the root node of Fig. 1File processed, then go read master control file next stage node (control file 1, control file 2, ---, control file n), according toIt is secondary to be read down according to tree.
202, sequence is executed according to this, successively traverses each sql script file, to the sql script in sql script fileSentence is parsed, and corresponding structural description information and associated with information are obtained;
203, by sql script sentence and corresponding structural description information and associated with information, combination is parsedInformation, in the database by parsing information preservation.
It is appreciated that executing sequence according to control file (namely control the script file under file executes sequence)Successively each sql script file is scanned, if the sql script file is not modified within the period, if not being this time theOnce sql script file is parsed and (namely preserved the parsing information of the sql script file in database), thatDo not have to again parse sql script file.
It is to be appreciated that due to when being parsed to sql script file, it is also necessary to obtain the association text of sql script filePart information, the acquisition of the associated with information need to refer to the result of control document analysis.
It in some embodiment of the invention, include that script file description and Script Action are retouched in above structure description informationIt writes.It is specially a kind of table that script file description and Script Action, which are described, and structure is by different type, different attribute etc. in the tableSeparately recorded.For example, recorded separately with field, type and remarks respectively.
Table 1 is that script file describes (t_db_scriptFile), is the attribute information of sql script file under field, includingThe identification identifier (fid) of sql script file, the title (fname) of sql script file, sql script file path(fpath), separator (fsplit), the sql script file for executing sequence (forder), sql script file of sql script fileDatabase dialect type (fdbtype).Type refer to byte Type belonging to different attribute (such as fid be integer type (int),Fpath is variable length string type etc.), remarks are some contents for needing to illustrate.
Using fid as major key (primary key) in table 1, can be retrieved by the major key in retrieval.
Table 2 is that Script Action describes (t_db_scriptAction), is the attribute of sql script sentence under field, includingThe identification identifier (fid) of sql script sentence, Script Action (faction) etc..
Type is the byte Type to these attributes, and remarks are equally some descriptions, such as execution sequence (forder)Illustrate that the attribute executes sequence for sql script file belonging to the sql script sentence after remarks.
Equally, in table 2, using the identification identifier (fid) of sql script sentence as the major key (primary of the tableIt key), can be using the major key as retrieval information.
Referring to Fig. 3, Fig. 3 is another process signal of the approaches to IM of ERP system provided in an embodiment of the present inventionFigure;In Fig. 3, above-mentioned steps 202 and 203 are specifically included:
A1, n-th sql script file is read, parses the sql script file;
Wherein, N be more than or equal to 1, and be less than or equal to Svn in script file sum positive integer.
Nth sql script sentence in A2, reading n-th sql script file;
Wherein, n be more than or equal to 1, and be less than or equal to n-th sql script file in sql script sentence item number.It is to be appreciated that according to the actual situation, the item number of the sql script sentence of each sql script file may be entirely different, can also be withIt is identical, naturally it is also possible to have the item number of the sql script sentence of part sql script file identical, the sql of other sql script filesThe item number of script sentence is different.
A3, nth sql script sentence is parsed, obtains corresponding structural description information and associated with information;
Wherein, when parsing to sql script sentence, the morphology analytic technique provided using javacc defines sql footThe corresponding morphology configuration file of this sentence generates the corresponding analysis program of sql script sentence, then to the sql script sentenceIt is parsed to obtain structural description information.
A4, nth sql script, corresponding structural description information and associated with information are formed to parsing information, savedInto database;
A5, judge nth sql script sentence whether be n-th sql script file the last item sql script sentence;
If so, turning to step A6.It goes to read next sql script language of the sql script file if it is not, turning to step A2Sentence.
A6, judge whether n-th sql script file is the last one sql script file.
If so, resolving is completed, if it is not, turning to step A1.
In embodiments of the present invention, by being periodically scanned to the sql script file in Svn, to the sql modifiedScript file parses again, obtains parsing information, and then parse information preservation (can be straight in actual operation in the databaseIt takes over and changes the original parsing information for saving corresponding sql script file in the database).
In some embodiment of the invention, the relevant information that can also obtain parsing information is saved, and such as retouches fileWrite information, personal information and module information etc., user can quickly navigate to the responsible person of corresponding script file.
Referring to Fig. 4, Fig. 4 is another process signal of the approaches to IM of ERP system provided in an embodiment of the present inventionFigure;Method shown in Fig. 4 realized the parsing information preservation of sql script sentence based on Fig. 2 or Fig. 3 on the basis of database,Specifically can include:
401, user is received by web page input inquiry condition, and the querying condition requests inquiry to meet institute for userState the parsing information of querying condition;
In embodiments of the present invention, it parses information preservation in the database, and is saved with table.It can be at thisWeb-query service is set in inventive embodiments, and user can access the web-query service by browser, inquire sql script languageSentence.A variety of inquiry modes, fuzzy query, accurate inquiry etc. can be supported in the embodiment of the present invention.
402, the parsing information inquired is shown to use by the parsing information for meeting the querying condition in data base queryingFamily.
The parsing information inquired will carry out sequencing display on web, can be ranked up according to querying condition.
It is to be appreciated that due to including sql script sentence, corresponding structural description information and associated in parsing informationInformation parses information by inquiry, that is, finally navigates in sql script sentence.
Referring to Fig. 5, Fig. 5 is the structural schematic diagram of the apparatus for management of information of ERP system provided in an embodiment of the present invention;Such asShown in Fig. 5, a kind of apparatus for management of information of ERP system can include:
Module 510 is obtained, for traversing the control file in control system, each control file is parsed, is obtainedThe script file under file, which is controlled, to each executes sequence;
Parsing module 520 controls the script file under file to each and solves for executing sequence according to above-mentionedAnalysis, generates corresponding structural description information and associated with information;
Preserving module 530, for combining script file and corresponding structural description information and associated with informationParsing information is obtained, by above-mentioned parsing information preservation into database.
In some embodiment of the invention, above-mentioned parsing module 520 is specifically used for, and executes sequence according to above-mentioned, from eachEach script sentence is read in the script file of a control file, the script sentence of reading is parsed, is obtained correspondingStructural description information and associated with information, above structure description information include that script file description and Script Action are retouchedIt states, above-mentioned associated with information includes affiliated script file, affiliated control file, executes sequence.
Above-mentioned preserving module 530 is specifically used for, by script sentence and corresponding structural description information and associated withInformation combines to obtain parsing information, by above-mentioned parsing information preservation into database.
In some embodiment of the invention, above-mentioned parsing module 520 is further used for, and according to the script sentence of reading, obtainsCorresponding morphology configuration file is taken, corresponding analysis program is generated according to above-mentioned morphology configuration file;Utilize above-mentioned analysis programThe script sentence of above-mentioned reading is parsed.
In some embodiment of the invention, the apparatus for management of information of above-mentioned ERP system further include: enquiry module 540 is used forUser is received by web page input inquiry condition, above-mentioned querying condition is that user requests inquiry to meet above-mentioned querying conditionParse information;Meet the parsing information of above-mentioned querying condition in data base querying, the parsing information inquired is shown to user.
In some embodiment of the invention, above-mentioned parsing module 520 is also used to, according to the script text of all control filesPart generates file description information, personal information and module information;
Above-mentioned preserving module 530 is also used to, and above-mentioned file description information, personal information and module information are stored in dataIn library.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodimentPoint, reference can be made to the related descriptions of other embodiments.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be withIt realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, said unitsIt divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or componentsIt can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown orThe mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unitIt closes or communicates to connect, can be electrical property, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member may or may not be physically separated, aobvious as unitThe component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multipleIn 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 unitIt is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated listMember both can take the form of hardware realization, can also realize in the form of software functional units.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and sells or use as independent productWhen, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantiallyThe all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other wordsIt embodies, which is stored in a storage medium, including some instructions are used so that a computerEquipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment above method of the present inventionPortion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journeyThe medium of sequence code.
The approaches to IM and device of a kind of ERP system provided by the present invention are described in detail above, it is rightIn those of ordinary skill in the art, thought according to an embodiment of the present invention can in specific embodiments and applicationsThere is change place, to sum up above-mentioned, the contents of this specification are not to be construed as limiting the invention.