Summary of the invention
For the technological deficiency of above-mentioned existence, embodiments provide a kind of approaches to IM and device of ERP system, solve the problem of ERP system script file location difficulty in prior art, improve the efficiency of management.
First aspect present invention provides a kind of approaches to IM of ERP system, can comprise:
Control documents in traversal control system, resolves each control documents, obtains the execution sequence of the script file under each control documents;
According to above-mentioned execution sequence, the script file under each control documents is resolved, generate corresponding structural description information and associated with information;
The structural description information of script file and correspondence and associated with information combination are obtained resolving information, above-mentioned resolving information is saved in database.
Can find out, in embodiments of the present invention by the parsing to control documents, first obtain the execution sequence of the script file under each control documents, respectively the script file under control documents is resolved generating structured descriptor and associated with information according to this execution sequence, then structural description information is preserved in a database with associated with information together with its original script file, structural description information and associated with information facilitate user to orient script file accurately and quickly, to improve the efficiency of management.
In some embodiments of the invention, above-mentioned according to above-mentioned execution sequence, script file under each control documents is resolved, the structural description information and the associated with information that generate correspondence comprise: according to above-mentioned execution sequence, each script sentence is read from the script file of each control documents, the script sentence read is resolved, obtain corresponding structural description information and associated with information, said structure descriptor comprises script file and describes and Script Action description, above-mentioned associated with information comprises affiliated script file, affiliated control documents, execution sequence.Afterwards, the structural description information of script sentence and correspondence and associated with information combination are obtained resolving information, above-mentioned resolving information is saved in database.In embodiments of the present invention, script file under control documents is made up of according to certain execution sequence many script sentence, resolved by each script sentence read successively in script file, obtain structural description information corresponding to each script sentence and associated with information.Structural description information is described by another kind of language script sentence, the position of associated with information description script statement, thus can orient script sentence accurately and quickly further, improves inquiry velocity, thus improve the efficiency of management.
In some embodiments of the invention, the above-mentioned script sentence to reading is carried out parsing and is comprised: according to the script sentence read, and obtains corresponding morphology configuration file, generates corresponding analysis program according to above-mentioned morphology configuration file; The script sentence of above-mentioned analysis program to above-mentioned reading is utilized to resolve.Can find out, for each class script sentence, define the morphology configuration file of its correspondence, automatically generate an analysis program, then utilize analysis program to resolve script sentence.
Alternatively, structural description information embodies in a tabular form, respectively structural description information separated record according to different attribute in the table, as being divided into many records preserving according to field, type, index in form.
In some embodiments of the invention, the resolving information of all script files is being preserved in a database, user can angle presents even script sentence in the following manner: receive user by web page input inquiry condition, above-mentioned querying condition is the resolving information that user's requesting query meets above-mentioned querying condition; Meet the resolving information of above-mentioned querying condition at data base querying, the resolving information inquired is shown to user.Owing to resolving according to the script sentence of the execution sequence of script file to script file in the embodiment of the present invention, and preserve together with associated with information and former script sentence when preserving, therefore, user can carry out matching inquiry by querying condition neatly, navigates to script sentence.
In some embodiments of the invention, to all script files under all control documents correspondences, spanned file descriptor, personal information and module information, preserve together, facilitates the responsible official of the corresponding script file of user's quick position.
Second aspect present invention provides a kind of apparatus for management of information of ERP system, can comprise:
Acquisition module, for traveling through the control documents in control system, resolving each control documents, obtaining the execution sequence of the script file under each control documents;
Parsing module, for according to above-mentioned execution sequence, resolves the script file under each control documents, generates corresponding structural description information and associated with information;
Preserve module, for the structural description information of script file and correspondence and associated with information combination are obtained resolving information, above-mentioned resolving information is saved in database.
In some embodiments of the invention, above-mentioned parsing module specifically for, according to above-mentioned execution sequence, each script sentence is read from the script file of each control documents, the script sentence read is resolved, obtain corresponding structural description information and associated with information, said structure descriptor comprises script file and describes and Script Action description, and above-mentioned associated with information comprises affiliated script file, affiliated control documents, execution sequence; Above-mentioned preservation module specifically for, the structural description information of script sentence and correspondence and associated with information combination are obtained resolving information, above-mentioned resolving information are saved in database.
In some embodiments of the invention, above-mentioned parsing module is further used for, and according to the script sentence read, obtains corresponding morphology configuration file, generates corresponding analysis program according to above-mentioned morphology configuration file; The script sentence of above-mentioned analysis program to above-mentioned reading is utilized to resolve.
In some embodiments of the invention, said apparatus also comprises: enquiry module, and for receiving user by web page input inquiry condition, above-mentioned querying condition is the resolving information that user's requesting query meets above-mentioned querying condition; Meet the resolving information of above-mentioned querying condition at data base querying, the resolving information inquired is shown to user.
In some embodiments of the invention, above-mentioned parsing module also for, according to the script file of all control documents, spanned file descriptor, personal information and module information; Above-mentioned preservation module also for, by above-mentioned file description information, personal information and module information preserve in a database.
Embodiment
Below in conjunction with the accompanying drawing of the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiments providing a kind of approaches to IM of ERP system, for carrying out file polling accurately and quickly, improving the efficiency of management.The embodiment of the present invention additionally provides device corresponding to a kind of 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 performance history or in final-period management process, when orientation problem script or query script, can carry out quick position to corresponding scripts on basis of the present invention.
The script file that developer writes in ERP is all submitted in Svn and manages, as shown in Figure 1, and the graph of a relation of the script file that Fig. 1 provides for the embodiment of the present invention and control documents.In FIG, the root node of tree construction is overhead control file, is control documents under overhead control file, and the next node of control documents can be control documents or script file, and the leaf node of tree construction is script file.Script file is made up of some script sentence.Wherein, script file is sql script file, and script sentence is sql script sentence.
Below by the basis of ERP system, with specific embodiment, the present invention is described in detail.Refer to Fig. 2, the schematic flow sheet of the approaches to IM of the ERP system that Fig. 2 provides for the embodiment of the present invention; As shown in Figure 2, a kind of approaches to IM of ERP system can comprise:
201, from svn control system, read the sql script file under all control documents and control documents, travel through all control documents to resolve each control documents, obtain the execution sequence of sql script file;
Need to illustrate, regularly sql script file processed in the embodiment of the present invention, can setting cycle be 1 day, 1 week etc., specifically set according to actual needs.
Owing to being preserve with tree construction in svn control system file, therefore, first read overhead control file from the root node of Fig. 1, then remove to read the next stage node (control documents 1, control documents 2,---, control documents n) of overhead control file, down read according to tree successively.
202, according to this execution sequence, travel through each sql script file successively, the sql script sentence in sql script file is resolved, obtain corresponding structural description information and associated with information;
203, by the structural description information of sql script sentence and correspondence and associated with information, combination obtains resolving information, is preserved in a database by resolving information.
Be appreciated that, successively each sql script file is scanned according to the execution sequence (execution sequence of the script file namely under control documents) of control documents, if this sql script file is not amendment within the cycle, if be not this time resolve (resolving information namely having preserved this sql script file in database) sql script file first time, so need not resolve sql script file again.
Need to illustrate, due to when resolving sql script file, also need the associated with information obtaining sql script file, the acquisition of this associated with information needs the result of resolving with reference to control documents.
In some embodiments of the invention, said structure descriptor comprises script file and describes and Script Action description.Script file describes and Script Action description is specially a kind of form, and structure drives line item into by dissimilar, different attribute decile in the table.Such as, record is separated with field, type and remarks respectively.
Table 1 is script file description (t_db_scriptFile), be the attribute information of sql script file under field, comprise the identification identifier (fid) of sql script file, the title (fname) of sql script file, the path (fpath) of sql script file, the execution sequence (forder) of sql script file, the separator (fsplit) of sql script file, the database dialect type (fdbtype) of sql script file.Type refer to byte Type belonging to different attribute (as fid be integer type (int), fpath is variable length string type etc.), remarks are contents that some need to illustrate.
In Table 1 using fid as major key (primarykey), can be retrieved by this major key when retrieving.
Table 2 describes (t_db_scriptAction) for Script Action, is the attribute of sql script sentence, comprises the identification identifier (fid) of sql script sentence, Script Action (faction) etc. under field.
Type is the byte Type to these attributes, and remarks are some description equally, as execution sequence (forder) illustrates the execution sequence of the sql script file of this attribute belonging to this sql script sentence after remarks.
Equally, in table 2, the major key (primarykey) using the identification identifier of sql script sentence (fid) as this table, can using this major key as retrieving information.
Refer to Fig. 3, another schematic flow sheet of the approaches to IM of the ERP system that Fig. 3 provides for the embodiment of the present invention; In figure 3, above-mentioned steps 202 and 203 specifically comprises:
A1, the N number of sql script file of reading, resolve this sql script file;
Wherein, N for being more than or equal to 1, and is less than or equal to the positive integer of the sum of script file in Svn.
A2, the n-th article of sql script sentence read in N number of sql script file;
Wherein, n for being more than or equal to 1, and is less than or equal to the number of sql script sentence in N number of sql script file.Need explanation, according to actual conditions, the number of the sql script sentence of each sql script file may be completely different, also can be identical, the number of the sql script sentence of part sql script file can certainly be had identical, and the number of the sql script sentence of other sql script file is different.
A3, n-th sql script sentence to be resolved, obtain corresponding structural description information and associated with information;
Wherein, when resolving sql script sentence, adopt the morphology analytic technique that javacc provides, the morphology configuration file that definition sql script sentence is corresponding, generate the analysis program that this sql script sentence is corresponding, then parsing is carried out to this sql script sentence and obtain structural description information.
A4, by n-th sql script, corresponding structural description information and associated with information composition resolving information, be saved in database;
A5, judge that whether n-th article of sql script sentence be the last item sql script sentence of N number of sql script file;
If so, steps A 6 is turned to.If not, steps A 2 is turned to go to read next sql script sentence of this sql script file.
A6, judge whether N number of sql script file is last sql script file.
If so, then complete resolving, if not, turn to steps A 1.
In embodiments of the present invention, by regular, sql script file in Svn is scanned, the sql script file be modified is resolved again, obtain resolving information, then resolving information is preserved in a database (can be directly replace the original resolving information preserving sql script file corresponding in a database in practical operation).
In some embodiments of the invention, the relevant information that can also obtain resolving information is preserved, as file is described information, personal information and module information etc., user can quick position to the responsible official of corresponding script file.
Refer to Fig. 4, another schematic flow sheet of the approaches to IM of the ERP system that Fig. 4 provides for the embodiment of the present invention; The resolving information of sql script sentence to be kept on the basis of database based on Fig. 2 or Fig. 3 and to realize by the method shown in Fig. 4, specifically can comprise:
401, receive user by web page input inquiry condition, described querying condition is the resolving information that user's requesting query meets described querying condition;
In embodiments of the present invention, resolving information is preserved in a database, and is preserve with form.Can arrange web inquiry service in embodiments of the present invention, user can by this web inquiry service of browser access, inquiry sql script sentence.Multiple inquiry mode can be supported, fuzzy query, accurately inquiry etc. in the embodiment of the present invention.
402, meet the resolving information of described querying condition at data base querying, the resolving information inquired is shown to user.
The resolving information inquired in the enterprising line ordering display of web, can will sort according to querying condition.
Need to illustrate, because resolving information comprises sql script sentence, corresponding structural description information and associated with information, by query parse information, namely finally navigate in sql script sentence.
Refer to Fig. 5, the structural representation of the apparatus for management of information of the ERP system that Fig. 5 provides for the embodiment of the present invention; As shown in Figure 5, a kind of apparatus for management of information of ERP system can comprise:
Acquisition module 510, for traveling through the control documents in control system, resolving each control documents, obtaining the execution sequence of the script file under each control documents;
Parsing module 520, for according to above-mentioned execution sequence, resolves the script file under each control documents, generates corresponding structural description information and associated with information;
Preserve module 530, for the structural description information of script file and correspondence and associated with information combination are obtained resolving information, above-mentioned resolving information is saved in database.
In some embodiments of the invention, above-mentioned parsing module 520 specifically for, according to above-mentioned execution sequence, each script sentence is read from the script file of each control documents, the script sentence read is resolved, obtain corresponding structural description information and associated with information, said structure descriptor comprises script file and describes and Script Action description, and above-mentioned associated with information comprises affiliated script file, affiliated control documents, execution sequence.
Above-mentioned preservation module 530 specifically for, the structural description information of script sentence and correspondence and associated with information combination are obtained resolving information, above-mentioned resolving information are saved in database.
In some embodiments of the invention, above-mentioned parsing module 520 is further used for, and according to the script sentence read, obtains corresponding morphology configuration file, generates corresponding analysis program according to above-mentioned morphology configuration file; The script sentence of above-mentioned analysis program to above-mentioned reading is utilized to resolve.
In some embodiments of the invention, the apparatus for management of information of above-mentioned ERP system also comprises: enquiry module 540, and for receiving user by web page input inquiry condition, above-mentioned querying condition is the resolving information that user's requesting query meets above-mentioned querying condition; Meet the resolving information of above-mentioned querying condition at data base querying, the resolving information inquired is shown to user.
In some embodiments of the invention, above-mentioned parsing module 520 also for, according to the script file of all control documents, spanned file descriptor, personal information and module information;
Above-mentioned preservation module 530 also for, by above-mentioned file description information, personal information and module information preserve in a database.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of said units, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The above-mentioned unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If above-mentioned integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of each embodiment said method of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CD etc. various can be program code stored medium.
Above the approaches to IM of a kind of ERP system provided by the present invention and device are described in detail, for one of ordinary skill in the art, according to the thought of the embodiment of the present invention, all will change in specific embodiments and applications, to sum up above-mentioned, this description should not be construed as limitation of the present invention.