CN102750329A - Self-adaptive data acquisition method and system - Google Patents
Self-adaptive data acquisition method and system Download PDFInfo
- Publication number
- CN102750329A CN102750329A CN2012101742283A CN201210174228A CN102750329A CN 102750329 A CN102750329 A CN 102750329A CN 2012101742283 A CN2012101742283 A CN 2012101742283A CN 201210174228 A CN201210174228 A CN 201210174228A CN 102750329 A CN102750329 A CN 102750329A
- Authority
- CN
- China
- Prior art keywords
- attribute
- field
- incident
- document object
- html document
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a self-adaptive data acquisition method and a system. The self-adaptive data acquisition method includes: S100, reading attributes, events and scripts of fields, wherein attributes, events and scripts of the fields are uniformly defined in a database table in advance; S200, generating hyper text markup language (HTML) document object models corresponding to the fields according to the read attributes and events; S300, assembling HTML document object models corresponding to fields to generate interfaces; and S400, loading the scripts on the generated interfaces and storing the scripts. According to the technical scheme, the interfaces and the logic are separated completely, the interfaces are configured by field attributes, and the logic is customized through custom events and scripts. When the field attribute is modified, interfaces are regenerated directly without modification of codes; and when an algorithm is changed, the scripts are needed to be modified only without modification of other portions in the interfaces, and development efficiency is high. A good support for promoting business development is provided during business change or expansion.
Description
Technical field
The present invention relates to gathering and editing of data, relate in particular to a kind of self-adapting data method and system of gathering and editing.
Background technology
In existing data collecting and editing system, table of every increase all will be realized the corresponding interface of gathering and editing, and mainly has following problem: interface and logic (incident, script) are bound, in case there is change at the interface, all need revise code, and cost of development is high; Professional change or expansion too depend on exploitation.Therefore, the existing data method of gathering and editing revises that frequency is high, the task life cycle is long, development efficiency is low, the development that restriction is professional.
Summary of the invention
The technical matters that the present invention will solve is; To the gather and edit defective that the modification frequency is high, the task life cycle is long, development efficiency is low of method of the above-mentioned data of prior art, a kind of interface and algorithm are configurable, the task life cycle is short, development efficiency the is high self-adapting data method of gathering and editing is provided.
The technical solution adopted for the present invention to solve the technical problems is: construct a kind of self-adapting data method of gathering and editing, comprising:
S100. read attribute, incident and the script of field, wherein, the attribute of each field, incident and script are unified Definition in database table in advance;
S200. generate the corresponding html document object model of this field according to the attribute that is read, incident;
S300. assemble the corresponding html document object model of each field to generate the interface;
S400. on the interface that is generated, load said script, and it is preserved.
In self-adapting data of the present invention is gathered and edited method, said attribute comprise data type attribute, major key attribute, length attribute, control property, initial value, whether display properties, ordering attribute, whether monopolize attribute;
Said step S200 comprises:
S210. generate the pairing html document object model of this field according to the control property that is read;
S220. with the type attribute of this field, major key attribute, length attribute, initial value, whether display properties, ordering attribute, whether monopolize attribute and be loaded in the said html document object model;
S230. said incident is loaded in the said html document object model.
In self-adapting data of the present invention was gathered and edited method, said step S300 was: the html document object model of each field is coupled together according to ordering attribute, to generate the interface.
In self-adapting data of the present invention was gathered and edited method, in said step S220 and said step S230, the mode through object linking and embedding loaded.
In self-adapting data of the present invention was gathered and edited method, said interface zone had incident and script to define, interface layout is revised, the instant preview function.
The present invention also constructs a kind of self-adapting data collecting and editing system, comprising:
Read module is used to read attribute, incident and the script of field, and wherein, the attribute of each field, incident and script are unified Definition in database table in advance;
The interface generation module is used for generating the corresponding html document object model of this field according to the attribute that is read, incident;
Knockdown block is used to assemble the corresponding html document object model of each field to generate the interface;
The script load-on module is used on the interface that is generated, loading said script, and it is preserved.
In self-adapting data of the present invention is gathered and edited method, said attribute comprise data type attribute, major key attribute, length attribute, control property, initial value, whether display properties, ordering attribute, whether monopolize attribute;
Said interface generation module comprises:
The model generation unit is used for generating the pairing html document object model of this field according to the control property that is read;
The attribute loading unit, be used for the type attribute of this field, major key attribute, length attribute, initial value, whether display properties, ordering attribute, whether monopolize attribute and be loaded into said html document object model;
The incident loading unit is used for said incident is loaded into said html document object model.
In self-adapting data of the present invention is gathered and edited method, the mode of said attribute loading unit through object linking and embedding with the type attribute of this field, major key attribute, length attribute, initial value, whether display properties, ordering attribute, whether monopolize attribute and be loaded in the said html document object model;
Said incident loading unit is loaded into said incident in the said html document object model through the mode of object linking and embedding.
In self-adapting data of the present invention was gathered and edited method, said interface zone had incident and script to define, interface layout is revised, the instant preview function.
The technical scheme of embodiment of the present invention, separate with logic fully at the interface, and configuration is responsible for by field attribute in the interface, and logic realizes customization through customized event and script.When field attribute is revised, directly regenerate the interface, need not to revise any code; When changing algorithm, only need to revise script and get final product, need not to revise other parts in the interface, development efficiency is high.When service needed change or expansion, can need not to wait for the construction cycle of length through disposing corresponding field attribute, incident, the next response fast of script, developing promoting business also provides good support.
Description of drawings
To combine accompanying drawing and embodiment that the present invention is described further below, in the accompanying drawing:
Fig. 1 is the gather and edit process flow diagram of method embodiment one of self-adapting data of the present invention;
Fig. 2 is the process flow diagram of step S200 preferred embodiment among Fig. 1;
Fig. 3 is to use the self-adapting data of the present invention interface that method generated of gathering and editing;
Fig. 4 is the building-block of logic of self-adapting data collecting and editing system embodiment one of the present invention;
Fig. 5 is the building-block of logic of Fig. 4 median surface generation module preferred embodiment.
Embodiment
As shown in Figure 1, in self-adapting data of the present invention was gathered and edited the process flow diagram of method embodiment one, this self-adapting data method of gathering and editing comprised that step S100 to step S300 step, specifies each step below:
S100. read attribute, incident and the script of field, wherein, the attribute of each field, incident and script are unified Definition in database table in advance;
S200. generate the corresponding html document object model of this field according to the attribute that is read, incident;
S300. assemble the corresponding html document object model of each field to generate the interface, this step for example is: the html document object model of each field is coupled together according to ordering attribute;
S400. on the interface that is generated, load said script, and it is preserved, can accomplish like this and calculate and query function.
Specifying attribute definition, event definition and the script definition of field among the step S100 below, at first is attribute definition, on the basis of the list structure that defines; Define following content: the 1) control property of this field demonstration; For example, support the input among the HTML, textarea; Select, Button etc.; 2) this field initial value SQL statement, and specified database attribute, SQL statement is supported a field or two fields, wherein two fields are in order to adapt to the select control; 3) display properties comprises the position, whether monopolizes delegation, and control length will be according to the field length dynamic calculation, ordering, non-field attribute and whether showing.For example, the attribute information of 10 fields in as shown in table 1 " investor classify share-holding statistical form ".Next is an event definition, and each field is supported a plurality of incidents, and the standard Event that incident all adopts HTML to support is adjustable in order to following method: 1) general purpose function, defined some method in common according to business demand in the system, and can support 50% application; 2) SQL, some service logic that need customize can realize through self-defined.In addition, also support SQL statement in the incident, after Event triggered, carry out SQL statement, and DATASET is shown in the corresponding controls on the interface according to the field title by service end.For example, the event information of the several fields in as shown in table 2 " investor classify share-holding statistical form ".In table 2, GeneralQuery and updateindex are general purpose functions, and Get_F007N_0603 is a SQL.Be the script definition at last, script defines the SQL in the i.e. definition incident.For example, in previous example, according to the self-defined Get_F007N_0603 function of following mode:
window.onLoad?=?sysdate(ob_enddate_0603);
function?Get_F007N_0603()
{
f007n_0603.value?=?10000*f006n_0603.value;
}
Table 1
Chinese name | English name | Data type | Major key | Length | Control | Whether show | Initial value SQL | Ordering | Whether monopolize |
Record ID | OB_OBJECT_ID | NUMBER(20) | False | 20 | ? | ? | ? | 1 | 0 |
Cut-off date | OB_ENDDATE_0603 | DATE | True | 0 | Date | Be | ? | 2 | 0 |
The trade classification coding | F001V_0603 | VARchar2(12) | True | 12 | Text | Be | ? | 3 | 0 |
Industry | F002V_0603 | VARchar2(60) | False | 60 | Text | Be | ? | 4 | 0 |
The sector circulation number of share of stock (hundred million strands) | F003N_0603 | NUMBER(16,8) | False | 16 | Text | Be | ? | 5 | 0 |
The investor of exchange type coding | F004V_0603 | VARchar2(11) | True | 11 | Select | Not | Select ob_sortname_0010 as code,ob_sortname_0010 as name from ctb_public_0010? where f001v_0010='129' | 6 | 0 |
Investor's type | F005V_0603 | VARchar2(30) | False | 30 | Select | Be | Select ob_sortname_0010 as name,ob_sortname_0010 as code from ctb_public_0010? where f001v_0010='129' | 7 | 0 |
Share-holding number percent | F006N_0603 | NUMBER(5,2) | False | 5 | Text | Be | ? | 8 | 0 |
Amount | F007N_0603 | NUMBER(10) | False | 10 | Text | Be | ? | 9 | 0 |
Remarks | ob_memo_0603 | varchar2(255) | False | 255 | Textarea | Be | ? | 10 | 1 |
Table 2
The field title | SQL | Function | The incident title | Event id |
f001v_0603 | select? ob_sortcode_0013 as f001v_0603,ob_memo_0013 as f002v_0603 from ctb_public_0013 where? (lower(ob_sortcode_0013) like '%:value%' or lower(ob_memo_0013) like '%:value%') and f002v_0013='008001' | GeneralQuery(this,'f001v_0603_onkeyup') | onkeyup | f001v_0603_onkeyup |
f005v_0603 | ? | updateindex(f005v_0603,f004v_0603) | onchange | f005v_0603_onchange |
f006n_0603 | ? | Get_F007N_0603() | onblur | f006n_0603_onblur |
f004v_0603 | ? | updateindex(f004v_0603,f005v_0603) | onchange | f004v_0603_onchange |
In a preferred embodiment, in conjunction with Fig. 2, below the process flow diagram of description of step S200, step S200 specifically may further comprise the steps:
S210. generate the pairing html document object model of this field (HTML DOM) according to the control property that is read; For example; In " investor classify share-holding statistical form " shown in the table 1; The control property of field " investor's type " is " SELECT ", and the pairing html document object model of this field is the drop-down menu of being selected by the user, and is as shown in Figure 3; The control property of field " by the date " is " Date ", and the pairing html document object model of this field is for to import the date by the user, and is as shown in Figure 3.
S220. with the type attribute of this field, major key attribute, length attribute, initial value, whether display properties, ordering attribute, whether monopolize attribute and be loaded in the said html document object model; For example, the mode through object linking and embedding (OLE) loads;
S230. the mode of said incident through object linking and embedding (OLE) is loaded in the said html document object model.
Fig. 4 is the building-block of logic of self-adapting data collecting and editing system embodiment one of the present invention, and this self-adapting data collecting and editing system comprises read module 100, interface generation module 200, Knockdown block 300 and the script load-on module 400 that connects successively.Wherein, read module 100 is used to read attribute, incident and the script of field, and wherein, the attribute of each field, incident and script are unified Definition in database table in advance; Interface generation module 200 is used for generating the corresponding html document object model of this field according to the attribute that is read, incident; Knockdown block 300 is used to assemble the corresponding html document object model of each field to generate the interface; Script load-on module 400 is used on the interface that is generated, loading said script, and it is preserved.
In another embodiment of self-adapting data collecting and editing system of the present invention, defined attribute comprise data type attribute, major key attribute, length attribute, control property, initial value, whether display properties, ordering attribute, whether monopolize attribute.In this embodiment, as shown in Figure 5, interface generation module 200 can specifically comprise model generation unit 210, attribute loading unit 220 and the incident loading unit 230 that links to each other successively.Wherein, model generation unit 210 is used for generating the pairing html document object model of this field according to the control property that is read; Attribute loading unit 220 be used for the type attribute of this field, major key attribute, length attribute, initial value, whether display properties, ordering attribute, whether monopolize attribute and be loaded into said html document object model; Incident loading unit 230 is used for said incident is loaded into said html document object model.Should be noted that; The self-adapting data collecting and editing system of this embodiment comprises read module, Knockdown block and script load-on module equally; Its function logic is identical with script load-on module 400 with read module 100, Knockdown block 300 among the embodiment one shown in Figure 4, repeats no more at this.
Preferably, the mode that the attribute loading unit 220 in the foregoing description can be through object linking and embedding with the type attribute of this field, major key attribute, length attribute, initial value, whether display properties, ordering attribute, whether monopolize attribute and be loaded in the said html document object model; Incident loading unit 230 can be loaded into said incident in the said html document object model through the mode of object linking and embedding.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within the claim scope of the present invention.
Claims (9)
1. self-adapting data method of gathering and editing is characterized in that, comprising:
S100. read attribute, incident and the script of field, wherein, the attribute of each field, incident and script are unified Definition in database table in advance;
S200. generate the corresponding html document object model of this field according to the attribute that is read, incident;
S300. assemble the corresponding html document object model of each field to generate the interface;
S400. on the interface that is generated, load said script, and it is preserved.
2. the self-adapting data according to claim 1 method of gathering and editing is characterized in that,
Said attribute comprise data type attribute, major key attribute, length attribute, control property, initial value, whether display properties, ordering attribute, whether monopolize attribute;
Said step S200 comprises:
S210. generate the pairing html document object model of this field according to the control property that is read;
S220. with the type attribute of this field, major key attribute, length attribute, initial value, whether display properties, ordering attribute, whether monopolize attribute and be loaded in the said html document object model;
S230. said incident is loaded in the said html document object model.
3. the self-adapting data according to claim 1 method of gathering and editing is characterized in that said step S300 is: the html document object model of each field is coupled together according to ordering attribute, to generate the interface.
4. the self-adapting data according to claim 2 method of gathering and editing is characterized in that, in said step S220 and said step S230, the mode through object linking and embedding loads.
5. the self-adapting data according to claim 3 method of gathering and editing is characterized in that, said interface zone has that incident and script definition, interface layout are revised, the instant preview function.
6. a self-adapting data collecting and editing system is characterized in that, comprising:
Read module is used to read attribute, incident and the script of field, and wherein, the attribute of each field, incident and script are unified Definition in database table in advance;
The interface generation module is used for generating the corresponding html document object model of this field according to the attribute that is read, incident;
Knockdown block is used to assemble the corresponding html document object model of each field to generate the interface;
The script load-on module is used on the interface that is generated, loading said script, and it is preserved.
7. self-adapting data collecting and editing system according to claim 6 is characterized in that,
Said attribute comprise data type attribute, major key attribute, length attribute, control property, initial value, whether display properties, ordering attribute, whether monopolize attribute;
Said interface generation module comprises:
The model generation unit is used for generating the pairing html document object model of this field according to the control property that is read;
The attribute loading unit, be used for the type attribute of this field, major key attribute, length attribute, initial value, whether display properties, ordering attribute, whether monopolize attribute and be loaded into said html document object model;
The incident loading unit is used for said incident is loaded into said html document object model.
8. the self-adapting data according to claim 7 method of gathering and editing; It is characterized in that, the mode of said attribute loading unit through object linking and embedding with the type attribute of this field, major key attribute, length attribute, initial value, whether display properties, ordering attribute, whether monopolize attribute and be loaded in the said html document object model;
Said incident loading unit is loaded into said incident in the said html document object model through the mode of object linking and embedding.
9. the self-adapting data according to claim 7 method of gathering and editing is characterized in that, said interface zone has that incident and script definition, interface layout are revised, the instant preview function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012101742283A CN102750329A (en) | 2012-05-30 | 2012-05-30 | Self-adaptive data acquisition method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012101742283A CN102750329A (en) | 2012-05-30 | 2012-05-30 | Self-adaptive data acquisition method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102750329A true CN102750329A (en) | 2012-10-24 |
Family
ID=47030514
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2012101742283A Pending CN102750329A (en) | 2012-05-30 | 2012-05-30 | Self-adaptive data acquisition method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102750329A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016201814A1 (en) * | 2015-06-17 | 2016-12-22 | 中兴通讯股份有限公司 | Field displaying method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101650745A (en) * | 2009-09-10 | 2010-02-17 | 中兴通讯股份有限公司 | Method and device for rapidly generating WEB page based on data definition |
CN101661508A (en) * | 2009-09-29 | 2010-03-03 | 金蝶软件(中国)有限公司 | Method for generating memu for multi-technology platform and device thereof |
CN101694618A (en) * | 2009-09-01 | 2010-04-14 | 卡斯柯信号有限公司 | Automatic mapping method of model layer and view layer data suitable for AJAX frame |
-
2012
- 2012-05-30 CN CN2012101742283A patent/CN102750329A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101694618A (en) * | 2009-09-01 | 2010-04-14 | 卡斯柯信号有限公司 | Automatic mapping method of model layer and view layer data suitable for AJAX frame |
CN101650745A (en) * | 2009-09-10 | 2010-02-17 | 中兴通讯股份有限公司 | Method and device for rapidly generating WEB page based on data definition |
CN101661508A (en) * | 2009-09-29 | 2010-03-03 | 金蝶软件(中国)有限公司 | Method for generating memu for multi-technology platform and device thereof |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016201814A1 (en) * | 2015-06-17 | 2016-12-22 | 中兴通讯股份有限公司 | Field displaying method and device |
CN106257445A (en) * | 2015-06-17 | 2016-12-28 | 中兴通讯股份有限公司 | The display packing of field and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106528129B (en) | A kind of Web application interface generation system and method | |
CN100430939C (en) | Method and system for client-side manipulation of tables | |
US11436126B2 (en) | Customizable enterprise automation test framework | |
CN108121542B (en) | MyBatis-based SQL statement configuration method and system | |
CN104133772A (en) | Automatic test data generation method | |
JP4384247B2 (en) | Lightweight application program interface (API) for extensible markup language (XML) | |
CN107678943B (en) | Page automatic testing method of abstract page object | |
CN103984755A (en) | Multidimensional model based oil and gas resource data key system implementation method and system | |
CN107622055B (en) | Method for rapidly realizing data service release | |
CN102982075A (en) | Heterogeneous data source access supporting system and method thereof | |
CN111367975B (en) | Multi-protocol data conversion processing method and device | |
CN104699681A (en) | Data processing method based on metadata base | |
CN106407170A (en) | Rapid generation method and system for data report | |
CN110333856A (en) | Serviceization can layout online template generating system and method | |
CN106843844A (en) | A kind of exhibiting device of self-defined view | |
US11775529B2 (en) | Recursive functionality in relational database systems | |
CN102789491A (en) | Configurable data subscribing and publishing system and method thereof | |
CN104615431A (en) | Method and device for achieving Web application | |
US7650276B2 (en) | System and method for dynamic data binding in distributed applications | |
CN103176778A (en) | Method and device for webpage development | |
CN116468010A (en) | Report generation method, device, terminal and storage medium | |
CN103020318A (en) | Method for maintenance of database tables in database | |
CN102455903A (en) | Method for generating user application interface | |
CN112162751A (en) | Automatic generation method and system of interface document | |
CN109284469B (en) | Webpage development framework |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20121024 |