CN109471540A - A kind of formula typing analysis method and device based on browser - Google Patents
A kind of formula typing analysis method and device based on browser Download PDFInfo
- Publication number
- CN109471540A CN109471540A CN201811271772.3A CN201811271772A CN109471540A CN 109471540 A CN109471540 A CN 109471540A CN 201811271772 A CN201811271772 A CN 201811271772A CN 109471540 A CN109471540 A CN 109471540A
- Authority
- CN
- China
- Prior art keywords
- formula
- target
- typing
- browser
- target formula
- 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
- 238000004458 analytical method Methods 0.000 title claims abstract description 21
- 238000012795 verification Methods 0.000 claims abstract description 35
- 238000005516 engineering process Methods 0.000 claims abstract description 33
- 238000000034 method Methods 0.000 claims abstract description 23
- 238000012937 correction Methods 0.000 claims description 7
- 239000000203 mixture Substances 0.000 claims description 7
- 238000001514 detection method Methods 0.000 claims description 4
- 239000000284 extract Substances 0.000 claims description 3
- 230000006870 function Effects 0.000 description 24
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000009776 industrial production Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 239000004816 latex Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
- G06F3/0233—Character input methods
Abstract
The formula typing analysis method and device based on browser that the embodiment of the invention discloses a kind of, wherein the first choice of target Formula Input Technology frame is operated in a browser the described method includes: receiving;The second selection operation to formula typing icon in the target Formula Input Technology frame is received, formula Selection Floater is opened;The selection operation to objective function and target operator symbol in the formula Selection Floater is detected, formula typing panel is opened, and receives the third operation of the typing target formula in the formula typing panel;Formula verification is carried out to the target formula;The target formula after display verification;The shown target formula is parsed, and the target formula of display is carried out sentencing mark according to the theoretical value pre-entered.In this way, can be realized the display of data packet complicated formulas, the typing of formula under industrial background parses and sentences mark, substantially increases data acquisition efficiency and improves and sentences mark accuracy rate.
Description
Technical field
The present embodiments relate to formula manipulation technical field more particularly to a kind of formula typing parsings based on browser
Method and device.
Background technique
Space product has the characteristics that multi items, small lot, and electronic data packet system is caused to sentence mark (judgement to acquisition data
Whether data collected comply with standard) based on standard be not quite similar, sentence and apply the function of large amount of complex during mark
Relational expression if not only data acquisition efficiency is low along mark mode is manually sentenced, but also easily causes and sentences the low mistake of mark accuracy rate;
Sentence some formula for applying in mark be in industrial production exclusive, such as working hour formula, need to be customized exploitation.Although very
More formula editors all have formula display function, but do not have formula input function;Though some formula have formula typing function
Can, but demand of industrial production mainly can not be fully met towards art of mathematics, and do not have and sentence mark function.
Current main formula typing and display methods include two kinds.The first is carried out using third party software or plug-in unit
Secondary development, such as MathML, LaTeX, Mathtyp etc., but these softwares or plug-in unit can be used only in the browsing of its compatible function
On device, it can not be applied on whole browsers, universality is poor.Second is the display that formula is realized using picture splicing,
This method data reusing difficulty is bigger.Existing major browsers do not support the typing and parsing of non-textual formula, use
The form of picture shows formula, then special method is needed to carry out editor's typing to formula, increase the difficulty of function realization and
It is extremely difficult to desired effect.
As it can be seen that the formula typing analytic method that there is an urgent need to a kind of universalities at present is strong, operation is convenient and strong reusability.
Summary of the invention
The formula typing analysis method and device based on browser that the embodiment of the invention provides a kind of, to solve existing skill
Universality existing for existing formula typing analytic method present in art is poor and reuses the big problem of difficulty.
In order to solve the above-mentioned technical problem, the present invention is implemented as follows:
In a first aspect, the embodiment of the invention provides a kind of formula typing analytic method based on browser, wherein described
Method includes:
It receives and the first choice of target Formula Input Technology frame is operated in a browser;
The second selection operation to formula typing icon in the target Formula Input Technology frame is received, formula is opened and selects face
Plate;It wherein, include multiple functional symbols and operator symbol in the formula Selection Floater;
The selection operation to objective function and target operator symbol in the formula Selection Floater is detected, formula record is opened
Enter panel, and receives the third operation of the typing target formula in the formula typing panel;
Formula verification is carried out to the target formula;
The target formula after display verification;
The shown target formula is parsed, and according to the theoretical value pre-entered to the target of display
Formula carries out sentencing mark.
Optionally, before the step of reception in a browser operates the first choice of target Formula Input Technology frame,
The method also includes: table is generated with HTML, the button that onClick event has been set is added in each table, generates institute
State formula Selection Floater frame;Each button is initialized using JavaScript, functional symbol and operator symbol are added
It is added on corresponding button, generates the formula Selection Floater.
Optionally, described the step of formula verification is carried out to the target formula, comprising: determine that the target formula is corresponding
Formula character string;Judge whether the parameter for including in the formula character string or numerical value are complete and accord with according to function composition rule
Close specification;If the determination result is YES, determine that the target formula is verified by this formula.
Optionally, the step of target formula shown after verifying, comprising: with regular expression to the public affairs
Formula in formula character string is parsed, and the formula, operator symbol and input for including in the formula character string are extracted
Parameter or numerical value;The formula, the parameter of operator symbol and input or numerical value are spliced on webpage according to preset rules
The HTML code of display;The HTML code is initialised in the target Formula Input Technology frame by JavaScript.
Optionally, described that the shown target formula is parsed, and according to the theoretical value pre-entered to aobvious
The target formula shown carries out sentencing target step, comprising: determines measured value according to the target formula;By the measured value,
The theoretical value and the target formula pre-entered is spliced into target string;With regular expression by the target string
Multiple infrastructure elements are split as according to identifier;The multiple infrastructure elements split out are combined into operation according to algorithm
Formula;Judge whether the measured value is qualified according to the operational formula, to complete to sentence mark.
Second aspect, the embodiment of the invention also provides a kind of formula typing resolver based on browser, wherein institute
Stating device includes: the first receiving module, is operated in a browser to the first choice of target Formula Input Technology frame for receiving;Second
Receiving module opens formula choosing for receiving the second selection operation to formula typing icon in the target Formula Input Technology frame
Select panel;It wherein, include multiple functional symbols and operator symbol in the formula Selection Floater;Detection module, for detecting
To the selection operation of objective function and target operator symbol in the formula Selection Floater, formula typing panel is opened, and is connect
It is received in the third operation of typing target formula in the formula typing panel;Correction verification module, for being carried out to the target formula
Formula verification;Display module, for showing the target formula after verifying;Parsing module, user is to the shown mesh
Mark formula is parsed, and carries out sentencing mark to the target formula of display according to the theoretical value pre-entered.
Optionally, described device further include: frame generation module, for receiving in first receiving module in browser
In to the operation of the first choice of target Formula Input Technology frame before, generate table with HTML, add and be arranged in each table
The button of onClick event generates the formula Selection Floater frame;Formula Selection Floater generation module, for using
JavaScript initializes each button, and functional symbol and operator symbol are added on corresponding button, generates institute
State formula Selection Floater.
Optionally, the correction verification module comprises determining that unit, for determining the corresponding formula character of the target formula
String;Judging unit, for judging whether the parameter or numerical value that include in the formula character string are complete according to function composition rule
And meet specification;Check results determination unit, for if the determination result is YES, determining that the target formula passes through this formula school
It tests.
Optionally, the display module includes: resolution unit, for using regular expression in the formula character string
Formula parsed, extract the parameter or numerical value of the formula for including in the formula character string, operator symbol and input;
Concatenation unit, for being spliced into the formula, the parameter of operator symbol and input or numerical value according to preset rules in webpage
The HTML code of upper display;Display unit is initialized, it is described for being initialised to the HTML code by JavaScript
In target Formula Input Technology frame.
Optionally, the parsing module includes: the first determination unit, for determining measured value according to the target formula;
String-concatenation unit, for the measured value, the theoretical value pre-entered and the target formula to be spliced into target character
String;Split cells, for the target string to be split as multiple infrastructure elements according to identifier with regular expression;Group
Unit is closed, for the multiple infrastructure elements split out to be combined into operational formula according to algorithm;Sentence mark unit, is used for
Judge whether the measured value is qualified according to the operational formula, to complete to sentence mark.
The present invention has the following beneficial effects: compared to the prior art
In the formula typing analytic method provided in an embodiment of the present invention based on browser, formula is set in a browser and is selected
Panel is selected, user in formula Selection Floater by selecting functional symbol, operator symbol and input parameter that public affairs can be completed
The formula of the typing of formula, typing is shown and is parsed after carry out formula verification, can be realized the display of data packet complicated formulas, work
The typing of formula under industry background parses and sentences mark, substantially increases data acquisition efficiency and improves and sentences mark accuracy rate.Not only
In this way, the formula typing analytic method provided in an embodiment of the present invention based on browser, is applicable to any browser with good
Universality difference and its Yi Chongyong well.
Detailed description of the invention
Fig. 1 is the flow chart of the according to embodiments of the present invention one formula typing analytic method based on browser;
Fig. 2 is the flow chart of the according to embodiments of the present invention two formula typing analytic method based on browser;
Fig. 3 is the structural block diagram of the according to embodiments of the present invention three formula typing resolver based on browser;
Fig. 4 is the structural block diagram of the formula typing resolver based on browser of the embodiment of the present invention four.
Specific embodiment
With reference to the attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete
Ground description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on the present invention
In embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
Referring to Fig.1, the flow chart of the formula typing analytic method provided in an embodiment of the present invention based on browser is shown.
The formula typing analytic method based on browser of the embodiment of the present invention the following steps are included:
Step 101: receiving and the first choice of target Formula Input Technology frame is operated in a browser.
First choice operation can for user to the single-click operation, double click operation of target Formula Input Technology frame in browser or
Long press operation etc..
Step 102: receiving the second selection operation to formula typing icon in the target Formula Input Technology frame, open formula
Selection Floater.
It wherein, include multiple functional symbols and operator symbol in formula Selection Floater.
The target Formula Input Technology frame for needing typing formula is chosen, formula typing icon in target Formula Input Technology frame is clicked
It triggers browser and opens formula Selection Floater.
Step 103: detecting the selection operation to objective function and target operator symbol in the formula Selection Floater, open
Formula typing panel is opened, and receives the third operation of the typing target formula in the formula typing panel.
In formula Selection Floater, the function or operator of typing required for clicking, opening the input of formula typing panel is needed
Function parameter or the numerical value of typing are wanted to complete the typing of target formula.Such as pre-input formula X >=n, need to input the number of n
Value, XnNeed to input parameter X and numerical value n.Then determination is clicked.If desired compound formula is inputted, typing required for gradually selecting
Function can be realized.The function not having in formula comprising general editing machine, these functions and closely related, the example of design and manufacture
Such as working hour formula Xn.
Step 104: formula verification is carried out to the target formula.
During specific implementation, specification school can be carried out to target formula format and input content with regular expression
It tests.
Step 105: the target formula after display verification.
User can target formula of the preview to after verifying in browser page.
Step 106: the shown target formula being parsed, and according to the theoretical value pre-entered to display
The target formula carries out sentencing mark.
After the completion of target formula typing, when measured value input frame is not sky, Formula Parsing executes automatically with mark function is sentenced.
When being parsed to target formula, target formula and measured value are combined into character string, parsed with regular expression
For operation part.Sentence mark rule according to formula to judge to acquire whether data i.e. measured value complies with standard, to complete to sentence mark.
Formula is arranged in a browser and selects for formula typing analytic method provided in an embodiment of the present invention based on browser
Panel, user in formula Selection Floater by selecting functional symbol, operator symbol and input parameter that formula can be completed
Typing, the formula of typing is shown and is parsed after carry out formula verification, can be realized the display of data packet complicated formulas, industry
The typing of formula under background parses and sentences mark, substantially increases data acquisition efficiency and improves and sentences mark accuracy rate.Not only such as
This, the formula typing analytic method provided in an embodiment of the present invention based on browser, being applicable to any browser has well
Universality difference and its Yi Chongyong.
Embodiment two
Referring to Fig. 2, the flow chart of the formula typing analytic method provided in an embodiment of the present invention based on browser is shown.
The formula typing analytic method based on browser of the embodiment of the present invention the following steps are included:
Step 201: generating formula Selection Floater.
A method of optionally generating formula Selection Floater are as follows: use HTML (Hypertext Markup
Language, hypertext markup language) table is generated, the button that onClick event has been set is added in each table, it is raw
At the formula Selection Floater frame;Each button is initialized using JavaScript method, by functional symbol and operation
Symbol symbol is added on corresponding button, generates the formula Selection Floater.It can be in Web page by addition such as onclick event
Event is used on face, onClick attribute is by the mouse clicking trigger on element.JavaScript is both a kind of literal translation formula script language
Speech and a kind of regime type, weak type, the language based on prototype, built-in support type.Its interpreter is referred to as
JavaScript engine is a part of browser, is widely used in the scripting language of client.
In the embodiment of the present invention, browser end realizes showing interface, formula typing and public affairs using HTML and JavaScript
Formula typesetting, without third party software.
Step 202: receiving and the first choice of target Formula Input Technology frame is operated in a browser.
When user's pre-input target formula, selection target Formula Input Technology in a browser is operated by first choice first
Frame.
Step 203: receiving the second selection operation to formula typing icon in the target Formula Input Technology frame, open formula
Selection Floater.
It wherein, include multiple functional symbols and operator symbol in the formula Selection Floater.
In the embodiment of the present invention, formula character used in formula Selection Floater is generated using primary Unicode,
Page loading velocity is fast, and supports all major browsers.Formula character is divided into operator symbol and functional symbol two by type
Major class.In operator symbol=,<,>,≤X≤etc. symbols directly indicated with ASCII character symbol.
Step 204: detecting the selection operation to objective function and target operator symbol in the formula Selection Floater, open
Formula typing panel is opened, and receives the third operation of the typing target formula in the formula typing panel.
After selection needs to input in formula Selection Floater functional symbol or operator symbol, formula typing face can be generated
Plate.Include selected functional symbol or operator symbol and parameter to be entered or numerical value in formula typing panel.Meanwhile it is public
The typing of complex combination formula is supported in formula typing, can be realized by repeatedly opening formula typing panel typing formula.
Step 205: formula verification is carried out to the target formula.
Specific formula character string can be generated after target formula typing, and formula character string is carried out according to function composition rule
Verification, verification content mainly include target formula parameter or numerical value typing it is whether complete;The parameter or numerical value of target formula are recorded
Enter whether to meet and whether has input nonumeric symbol in specification, such as numerical value input frame;Functional symbol or operator symbol combination
Whether specification is met, for example whether existing simultaneously "=" and " ≠ ".
It is a kind of optionally as follows to the mode of target formula progress formula verification:
Firstly, determining the corresponding formula character string of target formula;
Secondly, judging whether the parameter for including in the formula character string or numerical value are complete and accord with according to function composition rule
Close specification;
Finally, if the determination result is YES, determining that the target formula is verified by this formula.
After determining that target formula is verified by this formula, step 206 and subsequent step can be performed.
Correspondingly, if judging result is no, it is determined that target formula does not pass through this formula and verifies, exportable prompt information
To prompt user target formula to be modified or re-entered target formula.
Step 206: the target formula after display verification.
A kind of mode optionally showing the target formula after verification is as follows:
Firstly, parsing with regular expression to the formula in the formula character string, the formula word is extracted
The parameter or numerical value of the formula, operator symbol and the input that include in symbol string;
It is shown on webpage secondly, being spliced into according to preset rules formula, the parameter of operator symbol and input or numerical value
The HTML code shown;
Finally, HTML code is initialised in target Formula Input Technology frame by JavaScript.
Step 207: the shown target formula being parsed, and according to the theoretical value pre-entered to display
The target formula carries out sentencing mark.
It is completed when data acquire, when measured value input frame is not sky, target Formula Parsing executes automatically with mark function is sentenced.Tool
During body is realized, target formula can be parsed in the following way and sentence mark:
Firstly, determining measured value according to target formula;
Secondly, measured value, the theoretical value pre-entered and target formula are spliced into target string;
Then, target string is split as multiple infrastructure elements according to identifier with regular expression;Such as@separates
Function AND operator,<sub>separate the infrastructure elements such as subscript and the parameter in function;
Again, the multiple infrastructure elements split out are combined into operational formula according to algorithm;
Finally, judging whether measured value is qualified according to operational formula, to complete to sentence mark.
Formula is arranged in a browser and selects for formula typing analytic method provided in an embodiment of the present invention based on browser
Panel, user in formula Selection Floater by selecting functional symbol, operator symbol and input parameter that formula can be completed
Typing, the formula of typing is shown and is parsed after carry out formula verification, can be realized the display of data packet complicated formulas, industry
The typing of formula under background parses and sentences mark, substantially increases data acquisition efficiency and improves and sentences mark accuracy rate.Not only such as
This, the formula typing analytic method provided in an embodiment of the present invention based on browser, being applicable to any browser has well
Universality difference and its Yi Chongyong.
Embodiment three
Referring to Fig. 3, the structural frames of the formula typing resolver provided in an embodiment of the present invention based on browser are shown
Figure.Formula typing resolver based on browser is able to achieve the formula typing parsing side based on browser in previous embodiment
The details of method, and reach identical effect.
The formula typing resolver based on browser of the embodiment of the present invention includes: the first receiving module 301, for connecing
It receives and the first choice of target Formula Input Technology frame is operated in a browser;Second receiving module 302, for receiving to the target
Second selection operation of formula typing icon in Formula Input Technology frame opens formula Selection Floater;Wherein, the formula Selection Floater
In include multiple functional symbols and operator symbol;Detection module 303, for detecting to target letter in the formula Selection Floater
Several and target operator symbol selection operation opens formula typing panel, and receives the typing in the formula typing panel
The third of target formula operates;Correction verification module 304, for carrying out formula verification to the target formula;Display module 305 is used
The target formula after display verification;Parsing module 306, user parse the shown target formula, and
The target formula of display is carried out sentencing mark according to the theoretical value pre-entered.
Formula is arranged in a browser and selects for formula typing resolver provided in an embodiment of the present invention based on browser
Panel, user in formula Selection Floater by selecting functional symbol, operator symbol and input parameter that formula can be completed
Typing, the formula of typing is shown and is parsed after carry out formula verification, can be realized the display of data packet complicated formulas, industry
The typing of formula under background parses and sentences mark, substantially increases data acquisition efficiency and improves and sentences mark accuracy rate.Not only such as
This, the formula typing resolver provided in an embodiment of the present invention based on browser, being applicable to any browser has well
Universality difference and its Yi Chongyong.
Example IV
Referring to Fig. 4, the structural frames of the formula typing resolver provided in an embodiment of the present invention based on browser are shown
Figure.
Formula typing resolver provided in an embodiment of the present invention based on browser is to device described in embodiment three
Advanced optimize, the formula typing resolver based on browser after optimization includes: the first receiving module 401, for connecing
It receives and the first choice of target Formula Input Technology frame is operated in a browser;Second receiving module 402, for receiving to the target
Second selection operation of formula typing icon in Formula Input Technology frame opens formula Selection Floater;Wherein, the formula Selection Floater
In include multiple functional symbols and operator symbol;Detection module 403, for detecting to target letter in the formula Selection Floater
Several and target operator symbol selection operation opens formula typing panel, and receives the typing in the formula typing panel
The third of target formula operates;Correction verification module 404, for carrying out formula verification to the target formula;Display module 405 is used
The target formula after display verification;Parsing module 406, user parse the shown target formula, and
The target formula of display is carried out sentencing mark according to the theoretical value pre-entered.
Preferably, described device further include: frame generation module 407, for being received in first receiving module 401
Before being operated in browser to the first choice of target Formula Input Technology frame, table is generated with HTML, is added in each table
The button of onClick event is set, the formula Selection Floater frame is generated;Formula Selection Floater generation module 408, for making
Each button is initialized with JavaScript method, functional symbol and operator symbol are added on corresponding button,
Generate the formula Selection Floater.
Preferably, the correction verification module 404 comprises determining that unit 4041, for determining the corresponding public affairs of the target formula
Formula character string;Judging unit 4042, for judging the parameter for including in the formula character string or number according to function composition rule
Whether value is complete and meets specification;Check results determination unit 4043, for if the determination result is YES, determining the target formula
It is verified by this formula.
Preferably, the display module 405 includes: resolution unit 4051, for using regular expression to the formula
Formula in character string is parsed, and the formula for including in the formula character string, operator symbol and the ginseng of input are extracted
Several or numerical value;Concatenation unit 4052, for by the formula, the parameter of operator symbol and input or numerical value according to preset rules
It is spliced into the HTML code shown on webpage;Display unit 4053 is initialized, for passing through JavaScript for the HTML
Code is initialised in the target Formula Input Technology frame.
Preferably, the parsing module 406 includes: the first determination unit 4061, for determining according to the target formula
Measured value;String-concatenation unit 4062, for splicing the measured value, the theoretical value pre-entered and the target formula
For target string;Split cells 4063, for being split as the target string according to identifier with regular expression
Multiple infrastructure elements;Assembled unit 4064, for the multiple infrastructure elements split out to be combined into fortune according to algorithm
Calculate formula;Mark unit 4065 is sentenced, for judging whether the measured value is qualified according to the operational formula, to complete to sentence mark.
The method that formula typing resolver provided in an embodiment of the present invention based on browser can be realized Fig. 1 to Fig. 2
Each process achieved by the equipment of the formula typing analytic method based on browser is executed in embodiment, to avoid repeating,
Which is not described herein again.
Formula is arranged in a browser and selects for formula typing resolver provided in an embodiment of the present invention based on browser
Panel, user in formula Selection Floater by selecting functional symbol, operator symbol and input parameter that formula can be completed
Typing, the formula of typing is shown and is parsed after carry out formula verification, can be realized the display of data packet complicated formulas, industry
The typing of formula under background parses and sentences mark, substantially increases data acquisition efficiency and improves and sentences mark accuracy rate.Not only such as
This, the formula typing resolver provided in an embodiment of the present invention based on browser, being applicable to any browser has well
Universality difference and its Yi Chongyong.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service
Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much
Form belongs within protection of the invention.
Claims (10)
1. a kind of formula typing analytic method based on browser, which is characterized in that the described method includes:
It receives and the first choice of target Formula Input Technology frame is operated in a browser;
The second selection operation to formula typing icon in the target Formula Input Technology frame is received, formula Selection Floater is opened;Its
In, it include multiple functional symbols and operator symbol in the formula Selection Floater;
The selection operation to objective function and target operator symbol in the formula Selection Floater is detected, formula typing face is opened
Plate, and receive the third operation of the typing target formula in the formula typing panel;
Formula verification is carried out to the target formula;
The target formula after display verification;
The shown target formula is parsed, and according to the theoretical value pre-entered to the target formula of display
It carries out sentencing mark.
2. the method according to claim 1, wherein in the reception in a browser to target Formula Input Technology frame
First choice operation the step of before, the method also includes:
Table is generated with HTML, adds the button that onClick event has been set in each table, generates formula selection face
Plate framework;
Each button is initialized using JavaScript, functional symbol and operator symbol are added to corresponding button
On, generate the formula Selection Floater.
3. the method according to claim 1, wherein the step for carrying out formula verification to the target formula
Suddenly, comprising:
Determine the corresponding formula character string of the target formula;
Judge whether the parameter for including in the formula character string or numerical value are complete and meet specification according to function composition rule;
If the determination result is YES, determine that the target formula is verified by this formula.
4. according to the method described in claim 3, it is characterized in that, it is described display verification after the target formula the step of,
Include:
The formula in the formula character string is parsed with regular expression, extracts in the formula character string and includes
Formula, operator symbol and input parameter or numerical value;
The formula, the parameter of operator symbol and input or numerical value is spliced into according to preset rules and is shown on webpage
HTML code;
The HTML code is initialised in the target Formula Input Technology frame by JavaScript.
5. the method according to claim 1, wherein described parse the shown target formula,
And the target formula of display is carried out sentencing target step according to the theoretical value pre-entered, comprising:
Measured value is determined according to the target formula;
The measured value, the theoretical value pre-entered and the target formula are spliced into target string;
The target string is split as multiple infrastructure elements according to identifier with regular expression;
The multiple infrastructure elements split out are combined into operational formula according to algorithm;
Judge whether the measured value is qualified according to the operational formula, to complete to sentence mark.
6. a kind of formula typing resolver based on browser, which is characterized in that described device includes:
First receiving module in a browser operates the first choice of target Formula Input Technology frame for receiving;
Second receiving module is beaten for receiving the second selection operation to formula typing icon in the target Formula Input Technology frame
Open formula Selection Floater;It wherein, include multiple functional symbols and operator symbol in the formula Selection Floater;
Detection module, for detecting the selection operation to objective function and target operator symbol in the formula Selection Floater,
Formula typing panel is opened, and receives the third operation of the typing target formula in the formula typing panel;
Correction verification module, for carrying out formula verification to the target formula;
Display module, for showing the target formula after verifying;
Parsing module, user parse the shown target formula, and according to the theoretical value pre-entered to display
The target formula carry out sentencing mark.
7. device according to claim 6, which is characterized in that described device further include:
Frame generation module, for receiving the first choosing to target Formula Input Technology frame in a browser in first receiving module
Before selecting operation, table is generated with HTML, the button that onClick event has been set is added in each table, generates the public affairs
Formula Selection Floater frame;
Formula Selection Floater generation module, for being initialized each button using JavaScript, by functional symbol and fortune
Operator symbol is added on corresponding button, generates the formula Selection Floater.
8. device according to claim 6, which is characterized in that the correction verification module includes:
Determination unit, for determining the corresponding formula character string of the target formula;
Judging unit, for judging whether the parameter or numerical value that include in the formula character string are complete according to function composition rule
And meet specification;
Check results determination unit, for if the determination result is YES, determining that the target formula is verified by this formula.
9. according to the method described in claim 8, it is characterized in that, the display module includes:
Resolution unit extracts the public affairs for parsing with regular expression to the formula in the formula character string
The parameter or numerical value of the formula, operator symbol and the input that include in formula character string;
Concatenation unit, for the formula, the parameter of operator symbol and input or numerical value to be spliced into according to preset rules
The HTML code shown on webpage;
Display unit is initialized, for the HTML code to be initialised to the target Formula Input Technology frame by JavaScript
In.
10. device according to claim 6, which is characterized in that the parsing module includes:
First determination unit, for determining measured value according to the target formula;
String-concatenation unit, for the measured value, the theoretical value pre-entered and the target formula to be spliced into target
Character string;
Split cells, for the target string to be split as multiple infrastructure elements according to identifier with regular expression;
Assembled unit, for the multiple infrastructure elements split out to be combined into operational formula according to algorithm;
Mark unit is sentenced, for judging whether the measured value is qualified according to the operational formula, to complete to sentence mark.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811271772.3A CN109471540A (en) | 2018-10-29 | 2018-10-29 | A kind of formula typing analysis method and device based on browser |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811271772.3A CN109471540A (en) | 2018-10-29 | 2018-10-29 | A kind of formula typing analysis method and device based on browser |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109471540A true CN109471540A (en) | 2019-03-15 |
Family
ID=65666818
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811271772.3A Pending CN109471540A (en) | 2018-10-29 | 2018-10-29 | A kind of formula typing analysis method and device based on browser |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109471540A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110007918A (en) * | 2019-04-03 | 2019-07-12 | 上海乂学教育科技有限公司 | The manufacturing method of personalized formula editors in adaptive educational system |
CN111078026A (en) * | 2019-11-15 | 2020-04-28 | 北京乐我无限科技有限责任公司 | Input prompting method and device, electronic equipment and readable storage medium |
CN111930776A (en) * | 2020-09-10 | 2020-11-13 | 北京维数统计事务所有限公司 | Form processing method and device, electronic equipment and readable storage medium |
CN113159630A (en) * | 2021-05-13 | 2021-07-23 | 北京三维天地科技股份有限公司 | Method for maintaining calculation formula in laboratory information management system |
CN115935698A (en) * | 2022-12-30 | 2023-04-07 | 南京维拓科技股份有限公司 | Calculation method for design parameters in industrial design process |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104408544A (en) * | 2014-10-28 | 2015-03-11 | 用友优普信息技术有限公司 | Formula resolving apparatus and method |
KR20180016897A (en) * | 2016-08-08 | 2018-02-20 | 원용수 | Mathematical Notation Editing Method |
CN107832270A (en) * | 2017-10-17 | 2018-03-23 | 金炜 | Equation editing method and formula editors based on LaTeX |
-
2018
- 2018-10-29 CN CN201811271772.3A patent/CN109471540A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104408544A (en) * | 2014-10-28 | 2015-03-11 | 用友优普信息技术有限公司 | Formula resolving apparatus and method |
KR20180016897A (en) * | 2016-08-08 | 2018-02-20 | 원용수 | Mathematical Notation Editing Method |
CN107832270A (en) * | 2017-10-17 | 2018-03-23 | 金炜 | Equation editing method and formula editors based on LaTeX |
Non-Patent Citations (1)
Title |
---|
沈联民: "在线数学公式编辑器的设计与实现", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110007918A (en) * | 2019-04-03 | 2019-07-12 | 上海乂学教育科技有限公司 | The manufacturing method of personalized formula editors in adaptive educational system |
CN111078026A (en) * | 2019-11-15 | 2020-04-28 | 北京乐我无限科技有限责任公司 | Input prompting method and device, electronic equipment and readable storage medium |
CN111078026B (en) * | 2019-11-15 | 2023-10-03 | 北京乐我无限科技有限责任公司 | Input prompting method, device, electronic equipment and readable storage medium |
CN111930776A (en) * | 2020-09-10 | 2020-11-13 | 北京维数统计事务所有限公司 | Form processing method and device, electronic equipment and readable storage medium |
CN111930776B (en) * | 2020-09-10 | 2021-01-05 | 北京维数统计事务所有限公司 | Form processing method and device, electronic equipment and readable storage medium |
CN113159630A (en) * | 2021-05-13 | 2021-07-23 | 北京三维天地科技股份有限公司 | Method for maintaining calculation formula in laboratory information management system |
CN115935698A (en) * | 2022-12-30 | 2023-04-07 | 南京维拓科技股份有限公司 | Calculation method for design parameters in industrial design process |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109471540A (en) | A kind of formula typing analysis method and device based on browser | |
US10719898B2 (en) | Systems and methods for analyzing documents | |
US20040027377A1 (en) | User interface design and validation including dynamic data | |
CN104317589B (en) | A kind of code automatic generation method and device for being used to load dynamic link library | |
US20020184265A1 (en) | Question and answer generator | |
US9471405B1 (en) | Methods and systems for access to legacy programs using non-legacy interfaces | |
US20120102390A1 (en) | Method and apparatus for generating widget | |
CN108090104A (en) | For obtaining the method and apparatus of webpage information | |
EP2810282A1 (en) | Method of embedding configuration data in a non-configuration document | |
CN104199647A (en) | Visualization system and implementation method based on IBM host | |
CN107943798A (en) | Check input text language and the system and method for automatic synchronization translation | |
US20070271085A1 (en) | Emulation of an interactive electronic form | |
CN103399766A (en) | Method and device for updating input method system | |
CN109992750B (en) | Table object screening method and device, electronic equipment and storage medium | |
CN113886232A (en) | Interface test data and test script generation method, terminal device and storage medium | |
CN111090434B (en) | Page display method and device for custom column | |
US20110145293A1 (en) | Methods, Systems, and Products for Creating Sharable Objects | |
CN105573980A (en) | Information segment generation method and device | |
CN105573972B (en) | The generation method and device of report check formula | |
CN101894021A (en) | Method and system for realizing interface of embedded system | |
CN104679737A (en) | Text message translational processing method on basis of mobile terminal and mobile terminal | |
CN109857735B (en) | Data construction method and system for rule description through excel | |
CN102567066B (en) | Business system development method, business system | |
CN109471637A (en) | The examination script debugging method of circuit diagram | |
CN109992759A (en) | Table objects edit methods, device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190315 |