CN105550353A - Regular expression based form input method and system - Google Patents

Regular expression based form input method and system Download PDF

Info

Publication number
CN105550353A
CN105550353A CN201511003899.3A CN201511003899A CN105550353A CN 105550353 A CN105550353 A CN 105550353A CN 201511003899 A CN201511003899 A CN 201511003899A CN 105550353 A CN105550353 A CN 105550353A
Authority
CN
China
Prior art keywords
field information
regular expression
data
list
input
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
CN201511003899.3A
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.)
Goertek Inc
Original Assignee
Goertek Inc
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 Goertek Inc filed Critical Goertek Inc
Priority to CN201511003899.3A priority Critical patent/CN105550353A/en
Publication of CN105550353A publication Critical patent/CN105550353A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification

Abstract

The invention provides a regular expression based form input method and system. The method comprises the steps of a form configuration stage and a form input stage. The form configuration stage comprises the steps of obtaining column information of a to-be-input form; for a data format of each piece of the column information, configuring a corresponding regular expression; and loading each piece of the column information subjected to the regular expression configuration into the form. The form input stage comprises the steps of inputting data into the form after loading each piece of the column information subjected to the regular expression configuration to the form; performing regular expression matching on the input data; and storing the successfully matched data in the column information corresponding to the regular expression. By utilizing the form input method and system, the data can be automatically input, so that unnecessary troubles are reduced and the working efficiency is high.

Description

Based on list input method and the system of regular expression
Technical field
The present invention relates to list input technology field, more specifically, relate to a kind of list input method based on regular expression and system.
Background technology
In the process of establishing of the system such as equipment control, the management of product, need to collect the master data of equipment/product, existing method is the newly-built list of type for each equipment/product, in list, definition needs the field of typing, then typing people clicks each typing frame, and the field information that typing is corresponding in corresponding typing frame carries out data acquisition.This kind of method, can only manual typing field information, not only trouble also inefficiency.
Summary of the invention
In view of uploading problem, the object of this invention is to provide a kind of list input method based on regular expression and system, to solve the problem uploaded and point out in background technology.
The invention provides a kind of list input method based on regular expression, comprise list configuration phase and list typing stage; Wherein,
List configuration phase, comprising:
Obtain the field information of list to be logged;
Data layout for each field information configures corresponding regular expression;
Each field information completing regular expression configuration is loaded in list;
In the list typing stage, comprising:
After each field information completing regular expression configuration is loaded into list, to list input data;
The coupling of regular expression is carried out according to the data of the field information loaded in list to input list;
The data that the match is successful are saved in the field information corresponding with this regular expression.
The present invention also provides a kind of list input system based on regular expression, comprising:
Field information acquisition unit, for obtaining the field information of list to be logged;
Field information configuration unit, the data layout for each field information obtained for field information acquisition unit configures corresponding regular expression;
Field information loading unit, for being loaded in list by each field information completing regular expression configuration;
Data input cell, for inputting data to list;
Data matching unit, for carrying out the coupling of regular expression according to the data of the field information loaded in list to input list;
Data saving unit, is saved in the field information corresponding with this regular expression for the data that the match is successful by data matching unit.
List input method based on regular expression provided by the invention and system, by to the corresponding regular expression of each field information configuration in list, when the data of recording device/product, carry out the coupling of regular expression, thus the data of typing are saved in respective field information, the data inputting of finishing equipment/product, can draw thus, by the coupling of regular expression, the automatic input of data can be realized, reduce unnecessary trouble, and work efficiency is high.
In order to realize uploading and relevant object, will describe in detail and the feature particularly pointed out in the claims after one or more aspect of the present invention comprises.Explanation below and accompanying drawing describe some illustrative aspects of the present invention in detail.But what these aspects indicated is only some modes that can use in the various modes of principle of the present invention.In addition, the present invention is intended to comprise all these aspects and their equivalent.
Accompanying drawing explanation
By reference to the content below in conjunction with the description of the drawings and claims, and understand more comprehensively along with to of the present invention, other object of the present invention and result will be understood and easy to understand more.In the accompanying drawings:
Fig. 1 is the schematic flow sheet of the list input method based on regular expression according to the embodiment of the present invention;
Fig. 2 is the logical organization schematic diagram of the list input system based on regular expression according to the embodiment of the present invention.
Label identical in all of the figs indicates similar or corresponding feature or function.
Embodiment
In the following description, for purposes of illustration, in order to provide the complete understanding to one or more embodiment, many details have been set forth.But, clearly, also these embodiments can be realized when there is no these details.In other example, one or more embodiment for convenience of description, known structure and equipment illustrate in block form an.
Integral Thought of the present invention is: the rule first formulating the regular expression corresponding with field information in list, when setting up list, the rule of formulation is loaded in each field information corresponding in list, when to list logging data, the data of typing are mated with each regular expression, when the some regular expressions of the data fit of typing regular, the data of typing are saved in the field information corresponding with this regular expression.
Fig. 1 shows the flow process of the list input method based on regular expression according to the embodiment of the present invention.
As shown in Figure 1, the list input method based on regular expression that the embodiment of the present invention provides, comprises list configuration phase and list typing stage; Wherein, list configuration phase is the construction phase of list, when constructing list, needs to configure the field information of list and the regular expression corresponding with field information; The list typing stage is by the stage of data inputting list, and this stage needs the coupling of the data of typing being carried out to regular expression, then, is saved in corresponding field information.Below by the process of detailed description two phase process data.
At list configuration phase, comprising:
Step S101: the field information obtaining list to be logged.
Obtain the actual process for gathering field information of process of the field information of list to be logged, field information is the Back ground Information of equipment, specifically comprises device name, unit type, device coding etc. information.
The field information gathered stores in a database.Set up a form in a database, then the field information of collection is stored in each lattice of form.
Step S102: the data layout for each field information configures corresponding regular expression.
The rule of regular expression pre-establishes, be the general character (i.e. the data layout of field information) of the product/equipment according to every type and formulate, such as: the rule of the regular expression of device coding can be formulated as pure digi-tal, and the rule of the regular expression of device name can formulate pure Chinese character.And for example:
Some positions of the character string of A, regular expression are fixed character;
Some positions of the character string of B, regular expression are set form character;
Some positions of the character string of C, regular expression are variable format character;
Some positions of the character string of D, regular expression are variable length character;
Some positions of the character string of E, regular expression are variable-length set form character;
Some positions of the character string of F, regular expression are variable-length variable format character;
The character string of G, regular expression is one in predefined several character.
Carry out in a database the process of field information configuration regular expression, the ID of field information and regular expression, to each field information ID respectively, do and map, with this, each field information is carried out to the configuration of regular expression by database.
Database plays two effects in the present invention, and one is store the field information collected, and another is the configuration field information collected being carried out to regular expression.
In addition, the present invention can also carry out the configuration of regular expression for the field information of part, such as: typing people and the field information revising people corresponding need not configure regular expression.
In a concrete example, field information is carried out to the configuration of regular expression, as shown in the table:
Step S103: each field information completing regular expression configuration is loaded in list.
When setting up list, the field information completing regular expression configuration being loaded in list, now, in list, only having the regular expression of the field information of loading and each field information configuration.
In the list typing stage, comprising:
Step S104: after each field information completing regular expression configuration is loaded into list, to list input data.
Before list input data, need image data.In the present invention can image data in several ways, such as, by the mode image data of scanning device scanning bar code or Quick Response Code, also can image data by another way.
The data gathered must be entered in the field information of list by typing frame, and typing frame is automatic spring after having loaded the field information of list.
Particularly, scanning device can be sent in typing frame by collecting data successively, and list receives the data needing typing from typing frame.
Step S105: the coupling of carrying out regular expression according to the data of the field information loaded in list to input list.
Carry out the coupling of regular expression in data before, need to judge whether there is termination character in typing frame; If there is no, represent that list logging data does not terminate, the data of typing are carried out to the coupling of regular expression, the data of typing are saved in corresponding field information; If existed, represent that list logging data terminates, now verify the form whether correct (such as: whether be required information, whether be default value etc.) not configuring the field information of regular expression in list; If checking is correct, submission form; If verify incorrect, then report an error.
Judge that whether there is termination character in typing frame can be realized by regular expression, the regular expression that all lists all have a corresponding list typing to terminate, when there is the character meeting the regular expression terminating list typing in the data inputted, this character is termination character.
When input in typing frame meets the character of the regular expression that list typing terminates, eject whether submission form is pointed out, selection is, checks whether each field meets call format, if submission form, if not prompting mistake
Carrying out in the process of the coupling of regular expression to the data of typing, the data of typing are mated with each regular expression, judge whether data meet the rule of some or several regular expression, if the rule of the some regular expressions of data fit, these data are saved in the field information corresponding to this regular expression; If the rule of the several regular expression of data fit, then from these regular expressions, select the preservation position of data, these data are saved in the field information corresponding to selected regular expression; If data do not meet the rule of any one regular expression, prompting reports an error.
In typing frame, the data of each typing are all preserved by above-mentioned matching process, until typing frame typing termination character, complete the data inputting of list.
Step S106: the data that the match is successful are saved in the field information corresponding with this regular expression.
After the field information all data being saved in list, form is correct to judge not configure the field information of regular expression, if form is correct, can improve list; If form is incorrect, prompting reports an error.
The present invention is applicable to series of products/equipment, the rule of regular expression is formulated according to the general character of series of products/equipment, then the rule of regular expression is loaded in list, by the coupling of regular expression by the data inputting that scans in the corresponding field information of list.
Foregoing describes the list input method based on regular expression provided by the invention in detail.Corresponding with method for uploading, the present invention also provides a kind of list input system based on regular expression.
Fig. 2 shows the logical organization of the list input system based on regular expression according to the embodiment of the present invention.
As shown in Figure 2, the list input system 200 based on regular expression that the embodiment of the present invention provides, comprises field information acquisition unit 210, field information configuration unit 220, field information loading unit 230, data input cell 240, data matching unit 250, data saving unit 260.
Wherein, field information acquisition unit 210 is for obtaining the field information of list to be logged;
Field information configuration unit 220 configures corresponding regular expression for the data layout of each field information obtained for field information acquisition unit 210.
Field information loading unit 230 is for being loaded into each field information completing regular expression configuration in list.
Data input cell 240 is for inputting data to list.
Data matching unit 250 is for carrying out the coupling of regular expression according to the data of the field information loaded in list to input list.
Data saving unit 260 is for being saved in data matching unit 250 data that the match is successful in the field information corresponding with this regular expression.
In addition, list input system 200 based on regular expression also comprises termination character judging unit 270, be connected between data input cell 240 and data matching unit 250, for judging whether the data inputted to list by data input cell 240 contain termination character; If so, the data input of list is terminated; If not, the data input of list is continued by data input cell 240.
In addition, data matching unit 250 comprises rule match module 251, and the rule of the regular expression that the data for data input cell 240 being inputted according to the field information loaded in list are corresponding with each field information of list is mated.。
In addition, data saving unit 260 comprises:
Field information module 261, for match in rule match module 251 data only meet the regular expression of some field information regular time, data are saved in this field information;
Field information choice module 262, during for matching the regular expression of data fit multiple field information regular in rule match module 251, from legal multiple field information, selecting one as preserving position, data being saved in selected field information.
Moreover field information configuration unit 220 also configures corresponding regular expression for the data layout of selected field information; And field information loading unit 230 is loaded into through the field information of configuration regular expression and the field information that do not configure regular expression in list.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with the protection domain of claim.

Claims (10)

1., based on a list input method for regular expression, comprise list configuration phase and list typing stage; Wherein,
Described list configuration phase, comprising:
Obtain the field information of list to be logged;
Data layout for each field information configures corresponding regular expression;
Each field information completing regular expression configuration is loaded in described list;
In the described list typing stage, comprising:
After each field information completing regular expression configuration is loaded into described list, to described list input data;
The coupling of regular expression is carried out according to the data of the field information loaded in described list to the described list of input;
The data that the match is successful are saved in the field information corresponding with this regular expression.
2. as claimed in claim 1 based on the list input method of regular expression, wherein, before carrying out the coupling of regular expression according to the data of the field information loaded in described list to the described list of input, also comprise:
Judge that whether the data inputted to described list are containing termination character; If so, the data input of described list is terminated; If not, the data input of described list is continued.
3. as claimed in claim 1 based on the list input method of regular expression, wherein, carrying out in the process of the coupling of regular expression according to the data of the field information loaded in described list to the described list of input,
The rule of regular expression corresponding with each field information in the field information loaded in described list for the data of input is mated; If the data of input only meet the rule of the regular expression of some field information, the data of input are saved in this field information; If the rule of the regular expression of the multiple field information of data fit of input, then from legal multiple field information, select one as preserving position, the data of input are saved in selected field information.
4. as claimed in claim 1 based on the list input method of regular expression, wherein, after the field information obtaining list to be logged, also comprise:
Data layout for selected field information configures corresponding regular expression;
Field information process being configured regular expression and the field information not configuring regular expression are loaded in described list.
5. as claimed in claim 1 based on the list input method of regular expression, wherein,
The rule of described regular expression comprises:
Character string is predefined character;
Character string is the character of set form;
Character string is the character of variable format;
Character string is the character of variable-length;
Character string is the character of variable-length, set form;
Character string is the character of variable-length, variable format;
Character string is one in predefined several character.
6., based on a list input system for regular expression, comprising:
Field information acquisition unit, for obtaining the field information of list to be logged;
Field information configuration unit, the data layout for each field information obtained for described field information acquisition unit configures corresponding regular expression;
Field information loading unit, for being loaded in described list by each field information completing regular expression configuration;
Data input cell, for inputting data to described list;
Data matching unit, for carrying out the coupling of regular expression according to the data of the field information loaded in described list to the described list of input;
Data saving unit, for being saved in the described data matching unit data that the match is successful in the field information corresponding with this regular expression.
7., as claimed in claim 6 based on the list input system of regular expression, also comprise:
Termination character judging unit, is connected between described data input cell and described data matching unit, for judging whether the data inputted to described list by described data input cell contain termination character; If so, the data input of described list is terminated; If not, the data input of described list is continued by described data input cell.
8. as claimed in claim 6 based on the list input system of regular expression, wherein,
Described data matching unit comprises rule match module, and the rule of the regular expression that the data for described data input cell being inputted according to the field information loaded in described list are corresponding with each field information of described list is mated.
9. as claimed in claim 8 based on the list input system of regular expression, wherein,
Described data saving unit comprises:
Field information module, for match in described rule match module described data only meet the regular expression of some field information regular time, described data are saved in this field information;
Field information choice module, during for matching the regular expression of described data fit multiple field information regular in described rule match module, from legal multiple field information, select one as preserving position, described data are saved in selected field information.
10. as claimed in claim 6 based on the list input system of regular expression, wherein,
Described field information configuration unit also configures corresponding regular expression for the data layout of selected field information; And,
Described field information loading unit is loaded into through the field information of configuration regular expression and the field information that do not configure regular expression in described list.
CN201511003899.3A 2015-12-28 2015-12-28 Regular expression based form input method and system Pending CN105550353A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511003899.3A CN105550353A (en) 2015-12-28 2015-12-28 Regular expression based form input method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511003899.3A CN105550353A (en) 2015-12-28 2015-12-28 Regular expression based form input method and system

Publications (1)

Publication Number Publication Date
CN105550353A true CN105550353A (en) 2016-05-04

Family

ID=55829542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511003899.3A Pending CN105550353A (en) 2015-12-28 2015-12-28 Regular expression based form input method and system

Country Status (1)

Country Link
CN (1) CN105550353A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295529A (en) * 2016-08-01 2017-01-04 北京易道博识科技有限公司 A kind of Table recognition method and system of mobile terminal
CN109471960A (en) * 2018-11-13 2019-03-15 深圳市景旺电子股份有限公司 The method and device of intelligent recognition PCB data tool layer name
CN109800410A (en) * 2017-11-17 2019-05-24 百度在线网络技术(北京)有限公司 A kind of list generation method and system based on online chatting record
CN111222352A (en) * 2018-11-26 2020-06-02 北京京东尚科信息技术有限公司 Form input method and device, equipment and storage medium thereof
CN113296670A (en) * 2021-07-26 2021-08-24 富通云腾科技有限公司 Regularization expression method of editable parameters

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090282074A1 (en) * 2008-05-07 2009-11-12 Anand Balaji Ramakrishnan Document Creator
CN102413162A (en) * 2011-07-29 2012-04-11 互动在线(北京)科技有限公司 Website front-end verification method and device
CN103514159A (en) * 2012-06-14 2014-01-15 阿里巴巴集团控股有限公司 Method, system and device for processing form template
CN103970662A (en) * 2014-05-22 2014-08-06 于秀山 Method and system for obtaining boundary value input through GUI software

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090282074A1 (en) * 2008-05-07 2009-11-12 Anand Balaji Ramakrishnan Document Creator
CN102413162A (en) * 2011-07-29 2012-04-11 互动在线(北京)科技有限公司 Website front-end verification method and device
CN103514159A (en) * 2012-06-14 2014-01-15 阿里巴巴集团控股有限公司 Method, system and device for processing form template
CN103970662A (en) * 2014-05-22 2014-08-06 于秀山 Method and system for obtaining boundary value input through GUI software

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张欣毅: "《jQuery Mobile移动网站开发》", 31 July 2015 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295529A (en) * 2016-08-01 2017-01-04 北京易道博识科技有限公司 A kind of Table recognition method and system of mobile terminal
CN109800410A (en) * 2017-11-17 2019-05-24 百度在线网络技术(北京)有限公司 A kind of list generation method and system based on online chatting record
CN109471960A (en) * 2018-11-13 2019-03-15 深圳市景旺电子股份有限公司 The method and device of intelligent recognition PCB data tool layer name
CN111222352A (en) * 2018-11-26 2020-06-02 北京京东尚科信息技术有限公司 Form input method and device, equipment and storage medium thereof
CN113296670A (en) * 2021-07-26 2021-08-24 富通云腾科技有限公司 Regularization expression method of editable parameters

Similar Documents

Publication Publication Date Title
CN105550353A (en) Regular expression based form input method and system
US9053237B2 (en) Test script generation
CN110503565B (en) Behavior risk identification method, system, equipment and readable storage medium
CN106469215B (en) Data lead-in method and system based on page end
CN105279270A (en) Patent retrieving apparatus and retrieving method therefor
CN105045817B (en) SQL Server database evidence-taking and analysis system and method based on transaction journal
CN103886023A (en) Storage and extraction method and system of Excel data tables
CN104536874A (en) Client collapse locating method and device
CN201845360U (en) Electronic operation guidance system for assembly line
CN110347709A (en) A kind of construction method and system of regulation engine
CN102521218A (en) File combining method and file combining device
CN106330429A (en) Generation method and device for S box of SM4 algorithm
CN104216970B (en) A kind of synergistic data exchange method
CN107463391A (en) Task processing method, device and equipment
CN102692908A (en) Paperless workshop quality feedback method
CN106845735A (en) A kind of general material code workout system suitable for business logistics
CN103744943A (en) Data inputting method applied to position evaluation system
CN112818937A (en) Excel file identification method and device, electronic equipment and readable storage medium
CN105429809A (en) Router configuration system and router configuration method
CN107766519A (en) A kind of method of visual configuration data structure
CN104270269A (en) Method for automatically configuring network cards
CN105138936A (en) Breeding material field layout statistical system and method
CN103324623A (en) Mobile terminal and data batch operating method
US8688624B2 (en) Seed data automation
CN105740997A (en) Method and device for controlling task flow, and database management system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 261031 Dongfang Road, Weifang high tech Industrial Development Zone, Shandong, China, No. 268

Applicant after: Goertek Inc.

Address before: 261031 Dongfang Road, Weifang high tech Industrial Development Zone, Shandong, China, No. 268

Applicant before: Goertek Inc.

COR Change of bibliographic data
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160504