CN104572577A - Mathematical formula processing method and device - Google Patents

Mathematical formula processing method and device Download PDF

Info

Publication number
CN104572577A
CN104572577A CN201410790497.1A CN201410790497A CN104572577A CN 104572577 A CN104572577 A CN 104572577A CN 201410790497 A CN201410790497 A CN 201410790497A CN 104572577 A CN104572577 A CN 104572577A
Authority
CN
China
Prior art keywords
drawing object
operand
user
formula content
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.)
Granted
Application number
CN201410790497.1A
Other languages
Chinese (zh)
Other versions
CN104572577B (en
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.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201410790497.1A priority Critical patent/CN104572577B/en
Publication of CN104572577A publication Critical patent/CN104572577A/en
Priority to PCT/CN2015/083534 priority patent/WO2016095502A1/en
Priority to JP2017526093A priority patent/JP6866551B2/en
Priority to KR1020177013186A priority patent/KR101950126B1/en
Application granted granted Critical
Publication of CN104572577B publication Critical patent/CN104572577B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Algebra (AREA)
  • Computational Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Document Processing Apparatus (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a mathematical formula processing method and device. The method comprises the following steps that a main body object corresponding to a formula content is obtained, wherein the main body object includes pattern objects and a layered relationship between the pattern objects, the layered relationship between the pattern objects shows the corresponding operation sequence of the formula content, and each pattern object comprises an operation type attribute and an operation number attribute; according to the layered relationship between the pattern objects, the operation type attributes of the pattern objects and the operation number attributes of the pattern objects, the corresponding mathematical expression corresponding to the pattern objects is obtained; according to the layered relationship between the pattern objects, the mathematical expression corresponding to the pattern objects is drawn into a page to obtain a mathematical formula corresponding to the formula content. The method and the device have the advantages that the problem that the mathematical formula is influenced by the page CSS (cascading style sheets) style can be solved, and the display stability of the mathematical formula is improved.

Description

Mathematical formulae disposal route and device
[technical field]
The present invention relates to Internet technical field, particularly relate to a kind of mathematical formulae disposal route and device.
[background technology]
Along with the development of Internet technology, show that the demand of mathematical formulae is more and more urgent on a web browser.Mainly edit on a web browser in the following ways and present mathematical formulae in the industry at present:
User's " formulation method " according to the rules inputs formula content, browser uses HTML (Hypertext Markup Language) (HyperText Mark-up Language, and Cascading Style Sheet (CascadingStyle Sheets HTML), CSS) content that user inputs is played up mathematical formulae for user's preview, after submission, server in statu quo preserves the content of user's input to user.When user needs to read this mathematical formulae, the content of preserving before is returned to browser by server, and the content that browser utilizes HTML and CSS to be returned by server plays up mathematical formulae.
The above-mentioned scheme presenting mathematical formulae based on HTML, when presenting mathematical formulae, be very easy to be affected by the CSS pattern in host's page, display effect is unstable.
[summary of the invention]
Many aspects of the present invention provide a kind of mathematical formulae disposal route and device, in order to overcome the problem that mathematical formulae affects by page CSS pattern, improve the exhibit stabilization of mathematical formulae.
An aspect of of the present present invention, provides a kind of mathematical formulae disposal route, comprising:
Obtain the agent object that formula content is corresponding, described agent object comprises the hierarchical relationship between Drawing Object and described image object, hierarchical relationship between described Drawing Object represents the order of operation that described formula content is corresponding, and described Drawing Object comprises arithmetic type attribute and operand attribute;
According to the arithmetic type attribute of the hierarchical relationship between described Drawing Object, described Drawing Object and the operand attribute of described Drawing Object, obtain the mathematic(al) representation that described Drawing Object is corresponding;
According to the hierarchical relationship between described Drawing Object, mathematic(al) representation corresponding for described Drawing Object is plotted in the page, to obtain mathematical formulae corresponding to described formula content.
Another aspect of the present invention, provides a kind of mathematical formulae treating apparatus, comprising:
Acquisition module, for obtaining agent object corresponding to formula content, described agent object comprises the hierarchical relationship between Drawing Object and described image object, hierarchical relationship between described Drawing Object represents the order of operation that described formula content is corresponding, and described Drawing Object comprises arithmetic type attribute and operand attribute;
Processing module, for according to the arithmetic type attribute of the hierarchical relationship between described Drawing Object, described Drawing Object and the operand attribute of described Drawing Object, obtains the mathematic(al) representation that described Drawing Object is corresponding;
Drafting module, for according to the hierarchical relationship between described Drawing Object, is plotted in the page by mathematic(al) representation corresponding for described Drawing Object, to obtain mathematical formulae corresponding to described formula content.
In the present invention, carry out representation formula content by agent object, especially by the order of operation that the hierarchical relationship representation formula content between the Drawing Object that agent object comprises is corresponding, and Drawing Object comprises arithmetic type attribute and operand attribute; According to the arithmetic type attribute of the hierarchical relationship between Drawing Object, Drawing Object and the operand attribute of Drawing Object, obtain the mathematic(al) representation that Drawing Object is corresponding, further according to the hierarchical relationship between Drawing Object, mathematic(al) representation corresponding for Drawing Object is plotted in the page, to obtain mathematical formulae corresponding to formula content.The present invention is based on agent object to achieve and in the page, generate mathematical formulae by drawing technique, be different from the html tag that prior art uses, this mathematical formulae that the present invention is generated can be totally independent of the page, and become an independently entirety, therefore be not easy the interfere with or compromise being subject to CSS pattern in the page, display effect is more stable.
[accompanying drawing explanation]
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The schematic flow sheet of the mathematical formulae disposal route that Fig. 1 provides for one embodiment of the invention;
The schematic diagram how correctly publicity content resolution being become based expressions in order to explanation that Fig. 2 provides for one embodiment of the invention;
The schematic diagram of the editing interface that Fig. 3 provides for one embodiment of the invention;
The process schematic of the generation formula syntax tree that Fig. 4-Fig. 9 provides for one embodiment of the invention;
The user that Figure 10-Figure 12 provides for one embodiment of the invention operates the process schematic changing formula content by constituency;
The structural representation of the mathematical formulae treating apparatus that Figure 13 provides for one embodiment of the invention.
[embodiment]
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The schematic flow sheet of the mathematical formulae disposal route that Fig. 1 provides for one embodiment of the invention.As shown in Figure 1, the method comprises:
101, agent object corresponding to formula content is obtained, this agent object comprises the hierarchical relationship between Drawing Object and image object, the order of operation that hierarchical relationship representation formula content between Drawing Object is corresponding, Drawing Object comprises arithmetic type attribute and operand attribute.
102, according to the arithmetic type attribute of the hierarchical relationship between above-mentioned Drawing Object, Drawing Object and the operand attribute of Drawing Object, the mathematic(al) representation that Drawing Object is corresponding is obtained.
103, according to the hierarchical relationship between Drawing Object, mathematic(al) representation corresponding for Drawing Object is plotted in the page, to obtain mathematical formulae corresponding to formula content.
The present embodiment provides a kind of mathematical formulae disposal route, and the method can be performed by mathematical formulae treating apparatus.Mathematical formulae treating apparatus can be mathematical formulae processing engine or tool storage room, such as, can be applied in browser environment, for realizing the mathematical formulae process based on web; Or data formula treating apparatus also can as independently formula editors realization.
Concrete, when mathematical formulae shown by needs on the page, obtain the agent object that formula content is corresponding.Formula content generates the content needed for mathematical formulae, generally comprises the information such as the operand in mathematical formulae, operational symbol and order of operation.In general, formula content can be inputted by user, but is not limited thereto.
What deserves to be explained is, the present embodiment does not limit the representation of formula content.Such as, user can support with browser " formulation method " inputs formula content.
In the present embodiment, agent object corresponding to formula content is actually the object (object) that has hierarchical structure, specifically comprise: the hierarchical relationship between Drawing Object and Drawing Object, Drawing Object comprises arithmetic type attribute and operand attribute; Between Drawing Object, there is hierarchical relationship, hierarchical relationship between Drawing Object embodies the hierarchical structure of this agent object, the order of operation that hierarchical relationship representation formula content between Drawing Object is corresponding, the order of operation namely in formula content between each operand.
The arithmetic type attribute of Drawing Object can be designated as " name " attribute, the main arithmetic type represented in mathematical formulae, such as "+", "-", "×" etc.The operand attribute of Drawing Object can be designated as " operand " attribute, this attribute can be represented by an array, such as this array can be recorded in order Drawing Object hierarchically comprised " operand " list, wherein each operand can be one " simple object ", also can be one " composite object ".If operand is one " composite object ", then this operand can continue to decompose, to form the spirte object under this Drawing Object.
As a whole, whole formula content is broken down into simpler semantic different based expressions, and converts an agent object with hierarchical structure to and be stored.
Optionally, the agent object with hierarchical structure can be a formula syntax tree, and this formula syntax tree is actually one for identifying the syntax tree of mathematical formulae.
Obtain in the embodiment of agent object a kind of, agent object corresponding to formula content can generate and store in designated memory space in advance, when mathematical formulae shown by needs on the page, mathematical formulae treating apparatus directly can obtain agent object from designated memory space.
Obtain in the embodiment of agent object at another kind, formula content can obtain in advance and be stored into designated memory space, when mathematical formulae shown by needs on the page, mathematical formulae treating apparatus can obtain formula content from designated memory space, generates agent object by carrying out process to formula content.Such as, mathematical formulae treating apparatus can obtain formula content; According to the decomposition rule preset, by the based expressions that formula content resolution becomes can not decompose again; According to the operand that type and the based expressions of the hierarchical relationship between based expressions, based expressions comprise, generate agent object.Wherein, each based expressions is mapped to a Drawing Object in agent object, and the type of based expressions and included operand are mapped to arithmetic type attribute and the operand attribute of Drawing Object respectively; Hierarchical relationship between based expressions is mapped to the hierarchical relationship between Drawing Object.
In the above-described embodiment, the all the elements occurred in mathematical formulae are all regarded as operand (comprising numeral and sign of operation), again by carrying out pre-service to operand, obtain nondecomposable based expressions, such as: textual expression, root expression formula, integral expression etc., can the object of these based expressions multiplexing to arrive when presenting mathematical formulae, like this can by obtaining various mathematical formulae to the combination of these based expressions and the adjustment of relative position.
Wherein, said reference expression formula carries out relative positioning by according to its display effect in mathematical formulae to the element that inside comprises.Such as: textual expression can do linear array to the symbol of its inside; Root expression formula then can generate the radical sign of suitable size according to its content, and arranges its content; Integral expression then can adjust its bound comprised, and is in relatively correct position to make bound.
Fig. 2 is in order to illustrate how correctly publicity content resolution to be become based expressions.As shown in Figure 2, downward arrow represents formula content ( x + a ) 2 = Σ k = 0 n n k x k a n - k Decompose, to obtain the process of based expressions, arrow is upwards then the process obtaining mathematical formulae by combining the based expressions decomposing out, and these two processes are reciprocal.
In order to help to understand above-mentioned decomposition and anabolic process, below with the formula: ( x + a ) 2 = Σ k = 0 n n k x k a n - k A subdivision (x+a) 2be described:
First, as 3. shown in label in Fig. 2 formula (x+a) 2, it is mathematically a square of formula, and " subscript expression formula " (SuperscriptExpression) in the present embodiment, can be used to represent.
Then, according to the requirement of subscript expression formula in the present embodiment to formula (x+a) 2decompose, finally draw the label subexpression that to be subexpression mod sum label be 1. 2., now, if decomposing the subexpression obtained is not a textual expression (TextExpression), then again according to the requirement of subexpression to label be 1. or label be that subexpression is 2. decomposed, until finally all expression formulas are all decomposed into textual expression.In this example, be that expression formula 3. is once decomposed and just can be obtained two textual expression to label, namely label is two subexpressions 1. and 2., and arrive this, decomposable process terminates.What deserves to be explained is, in Fig. 2, label is that expression formula 3. corresponds to agent object, and the label Drawing Object that to be two subexpressions 1. and 2. correspond respectively in agent object.
Finally, " reduction " process is performed according to the textual expression set finally obtained.The process of " reduction " is actually the process of " decomposition " being carried out to backward recurrence, whole process upwards merges from the textual expression of least significant end, merge each time and all can obtain one new " compound expression ", such as: root expression formula, subscript expression formula etc.Whole process lasts recurrence is carried out, until a final only remaining unique expression formula, then this expression formula is exactly final desired mathematical formulae.
Obtain in the embodiment of agent object at another, formula content does not obtain in advance, but is inputted by user when mathematical formulae shown by needs on the page.Based on this, when mathematical formulae shown by needs on the page, mathematical formulae treating apparatus can provide an editing interface to user on the page, obtains the sign of operation in the formula content that user inputted by editing interface or operand successively, to generate agent object corresponding to formula content.
Such as, above-mentioned editing interface can comprise visible editing area and hiding editing area.Wherein, visible editing area is mainly used in sending input instruction for user and showing formula content according to the mode that user expects to user, hides editing area for activating input capture event and inputting formula content for user.Optionally, hiding editing area is hiding.Further, this editing interface can also comprise: input tool region.A kind of implementation of this editing interface as shown in Figure 3, in Fig. 3, label is that 1. region is hiding editing area, this region is hiding in actual environment, and here explicitly shows is to describe the follow-up process obtaining the operand of user's input intuitively.In Fig. 3, label is region is 2. visible editing area, and user can choose the formula of input in this region by mouse.In Fig. 3, label is region is 3. input tool region, this region preset in advance some symbols and formula, to facilitate user directly to choose input, reduces the complexity that user inputs special character and common-used formula.In Fig. 3, label is region is 4. simulation cursor, in order to point out the position at user's current input cursor place.
Based on above-mentioned editing interface, mathematical formulae treating apparatus obtains sign of operation in the formula content that user inputted by editing interface or operand successively, comprises with the implementation process generating agent object corresponding to formula content:
According to the edit instruction that user sends at visible editing area, at the simulation cursor of the current input position of visible editing area display instruction, simulated light rotating savings is followed the input of user and moves, and the system cursor be associated with simulation cursor is navigated to hiding editing area, to activate input capture event; Such as, user can click label is visible editing area 2. thus sends edit instruction.
User directly can be inputted by keyboard, also can click the 3. predetermined character in input tool region or formula inputs.When user performs above arbitrary operation, will trigger label is the input capture event 1. hiding editing area.So, by catch successively user label be 1. hide editing area input formula content in sign of operation or operand, and the operand added in initial empty object according to the current location of system cursor and the sign of operation captured or operand in Drawing Object and/or Drawing Object, to obtain agent object.
Agent object corresponding to above-mentioned formula content inputs in the process of formula content user to generate.
Input formula content a+b ÷ c-b/a with user below, and be formula syntax tree with agent object be example, the process generating formula syntax tree is described.
When user inputs first time, now content is empty, and user is by input through keyboard first character: " a ", now obtains formula syntax tree as shown in Figure 4.
User continues through input through keyboard character: "+", now obtains formula syntax tree as shown in Figure 5.
User continues through input through keyboard character: " b ", now obtains formula syntax tree as shown in Figure 6.
Next, user needs to input " ÷ " symbol, owing to keyboard not providing the key of direct input " ÷ " symbol, symbol input " ÷ " that the instrument input area that then user can be comprised by editing interface is preset, user is after the corresponding symbol of click, " ÷ " symbol is imported in hiding editing area, now obtains formula syntax tree as Fig. 7.Newly-increased in Fig. 7 " div " is the representation of " ÷ " symbol in the present embodiment formula syntax tree inside.
User continues through input through keyboard character " c " and "-", now obtains formula syntax tree as Fig. 8.
User continues input, now should input fraction: b/a, because fraction does not directly input by keyboard, then user need use the preset formula that in editing interface, instrument input area provides to input, when user clicks corresponding button and after inputting data, the final syntax tree formed is as Fig. 9.So far, whole formula syntax tree is obtained.
What deserves to be explained is, the process above by editing interface input formula content can regard the process of editor's formula content as.In actual applications, user, when editing formula content, can carry out constituency operation to certain part of formula content, to reach the object of editing partial content in formula content.
Concrete, mathematical formulae treating apparatus can identify the constituency operation of user, and constituency operation refers to that user chooses the operation of the part operation number in formula content; According to the part operation number in the formula content that user chooses, mark in agent object; Obtain user and operate in constituency the operand re-entered in the region chosen, with the operand that the operand replacement agent object re-entered is labeled.
For a simple formula a+b ÷ c, will illustrate that user is operated by constituency, by formula: a+b ÷ c changes to new formula: the process of a+b-c below.
As shown in Figure 10, user is that left mouse button is pressed in position 1. at label, and continues not put, and now mathematical formulae treating apparatus will capture this event, get mouse pointer position information now, and record this information from the incidental information of event.
User is rolling mouse when pinning left mouse button, track such as the label in Figure 10 of its movement is part shown in gray scale frame 2., now, mathematical formulae treating apparatus will capture this " mouse moves " event, from the incidental information of event, obtain the position of mouse pointer this moment, and calculate constituency according to mouse pointer position this moment and the mouse pointer position information that records before.After calculating constituency, will in " formula syntax tree " middle insertion constituency, relevant position " zone bit " to mark this constituency information.
User continues rolling mouse, will continue to trigger " mouse moves " event, and the process of previous step is repeated with more new selection.
User in Fig. 10 label is position release left button 3., now mathematical formulae treating apparatus will receive the event notice of " mousebutton is upspring ", with more new selection, and stop obtaining positional information, constituency will remain unchanged, until when user repeats the process of above steps, the renewal to constituency just can be restarted.Now, the syntax tree of formula inside represents as shown in figure 11, and wherein two solid lines represent starting point and the terminal in constituency.What deserves to be explained is, solid line is only a kind of example of mark mode, is not limited to this.
Now user's character by a keyboard entry: "-", first formula syntax tree will remove the content in Figure 11 between two solid lines, and then inserts new content, and the syntax tree after renewal as shown in figure 12.
Position in Figure 12 between two solid lines is the position at original place, constituency in Figure 11, after user inputs new data, original constituency is " closed ", and the content that home constituency comprises is deleted, and new content had been inserted into before new closed constituency, i.e. "-".
Illustrate at this, user, except editor's formula, can also carry out the operation upgrading cursor position.Renewal due to cursor position is actually the special case that constituency upgrades, its essence to be a constituency length be zero a constituency operation, its description can change the description of constituency operation with reference to user above, repeats no more.
What deserves to be explained is, in Fig. 4-Fig. 9 and Figure 11-Figure 12, often group " name " and " operand " combine formation Drawing Object, and the hierarchical relationship between all Drawing Objects and Drawing Object forms agent object.For Fig. 9, the agent object of Composition of contents one shown in whole Fig. 9; Agent object shown in Fig. 9 comprises two Drawing Objects, and the arithmetic type attribute of a Drawing Object is " combination ", and operand attribute is [" a ", "+", " b ", " div ", " c ", "-"]; The arithmetic type attribute of another Drawing Object is " fraction ", and operand attribute is [" b ", " a "].
From above-mentioned, present embodiment is supplied to user in a very intuitive way and uses, and greatly improves editor and the reading experience of formula, reduces the threshold that user uses.In addition, in the present embodiment, do not need and server communication, user, under the poor environment of network, also can carry out equation editing very soon and see edit effect.Also have, this embodiment does not have extra demand to user, user does not need the formulation method-TeX that must understand specialty as prior art, the edit mode of What You See Is What You Get due to what adopt, user can see the effect played up immediately after input, do not need to send to server the request of playing up, drastically increase the flow process of user's editing process, reduce the threshold that user participates in editor.
Based on the respective embodiments described above, after obtaining agent object corresponding to formula content, the operand attribute of the hierarchical relationship between the Drawing Object that can comprise according to this agent object, the arithmetic type attribute of Drawing Object and Drawing Object, obtains the mathematic(al) representation that Drawing Object is corresponding.
Such as, according to the order from lower to upper of the hierarchical relationship between Drawing Object, Drawing Object can be determined one by one; Graphic plotting is carried out, to obtain mathematic(al) representation corresponding to Drawing Object according to the arithmetic type attribute of Drawing Object and operand attribute.
Afterwards, mathematic(al) representation corresponding for Drawing Object can, according to the hierarchical relationship between Drawing Object, be plotted in the page by mathematical formulae treating apparatus, to obtain mathematical formulae corresponding to formula content.
Such as, a formula syntax tree for agent object, then mathematical formulae treating apparatus can copy a formula syntax tree, and be referred to as mapping tree, Drawing Object in mapping tree is directly replaced with mathematic(al) representation corresponding to Drawing Object, and then obtaining a mapping tree be made up of mathematic(al) representation, this mapping tree is a drawable tree; Afterwards, in accordance with the order from top to bottom, this mapping tree is plotted in the page, thus the mathematical formulae that acquisition one is complete.
What deserves to be explained is, the rendering technique that the present embodiment adopts can be SVG drawing technique, but is not limited thereto.
From above-mentioned, the present embodiment carrys out representation formula content by agent object, and especially by the order of operation that the hierarchical relationship representation formula content between the Drawing Object that agent object comprises is corresponding, and Drawing Object comprises arithmetic type attribute and operand attribute; According to the arithmetic type attribute of the hierarchical relationship between Drawing Object, Drawing Object and the operand attribute of Drawing Object, obtain the mathematic(al) representation that Drawing Object is corresponding, further according to the hierarchical relationship between Drawing Object, mathematic(al) representation corresponding for Drawing Object is plotted in the page, to obtain mathematical formulae corresponding to formula content.The present embodiment achieves based on agent object and in the page, generates mathematical formulae by drawing technique, be different from the html tag that prior art uses, this makes generated mathematical formulae to be totally independent of the page, and become an independently entirety, therefore be not easy the interfere with or compromise being subject to CSS pattern in the page, display effect is more stable.
Technical solution of the present invention can support IE9 and the major browsers such as above IE browser, chrome, firefox, safari, opera, and user can edit and read mathematical formulae under the browser of the overwhelming majority.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
The structural representation of the mathematical formulae treating apparatus that Figure 13 provides for the application one embodiment.As shown in figure 13, this device comprises: acquisition module 1301, processing module 1302 and drafting module 1303.
Acquisition module 1301, for obtaining agent object corresponding to formula content, agent object comprises the hierarchical relationship between Drawing Object and image object, the order of operation that the hierarchical relationship representation formula content between Drawing Object is corresponding, and Drawing Object comprises arithmetic type attribute and operand attribute.
Processing module 1302, is connected with acquisition module 1301, for according to the arithmetic type attribute of the hierarchical relationship between Drawing Object, Drawing Object and the operand attribute of Drawing Object, obtains the mathematic(al) representation that Drawing Object is corresponding.
Drafting module 1303, is connected with processing module 1302, and for according to the hierarchical relationship between Drawing Object, the mathematic(al) representation that Drawing Object processing module 1302 obtained is corresponding is plotted in the page, to obtain mathematical formulae corresponding to formula content.
In an Alternate embodiments, acquisition module 1301 specifically can be used for:
Obtain formula content;
According to the decomposition rule preset, by the based expressions that formula content resolution becomes can not decompose again;
According to the operand that type and the based expressions of the hierarchical relationship between based expressions, based expressions comprise, generate agent object.
In another Alternate embodiments, acquisition module 1301 specifically can be used for:
An editing interface is provided to user in the page;
Obtain the sign of operation in the formula content that user inputted by editing interface or operand successively, to generate agent object.
Further alternative, above-mentioned editing interface comprises: visible editing area and hiding editing area.
Based on this, acquisition module 1301 specifically can be used for:
Editing interface is provided to user in the page;
According to the edit instruction that user sends at visible editing area, at the simulation cursor of the current input position of visible editing area display instruction, simulated light rotating savings is followed the input of user and moves, and the system cursor be associated with simulation cursor is navigated to hiding editing area, to activate input capture event;
Catch the sign of operation in the formula content that user inputs at hiding editing area or operand successively, and the operand added in initial empty object according to the current location of system cursor and the sign of operation captured or operand in Drawing Object and/or Drawing Object, to obtain agent object.
Further, the mathematical formulae treating apparatus that the present embodiment provides can also comprise: identification module, mark module and update module.
Identification module, for identifying the constituency operation of user, constituency operation refers to that user chooses the operation of the part operation number in formula content;
Mark module, for the part operation number in the formula content chosen according to user, marks in agent object;
Update module, operating in constituency the operand re-entered in the region chosen for obtaining user, replacing the operand that agent object is labeled with the operand re-entered.
In an Alternate embodiments, processing module 1302 specifically can be used for:
According to the order from lower to upper of the hierarchical relationship between Drawing Object, determine Drawing Object one by one;
Graphic plotting is carried out, to obtain mathematic(al) representation corresponding to Drawing Object according to the arithmetic type attribute of Drawing Object and operand attribute.
Optionally, the agent object that above-mentioned formula content is corresponding is formula syntax tree corresponding to formula content.
The mathematical formulae treating apparatus that the present embodiment provides, representation formula content is carried out by agent object, especially by the order of operation that the hierarchical relationship representation formula content between the Drawing Object that agent object comprises is corresponding, and Drawing Object comprises arithmetic type attribute and operand attribute; According to the arithmetic type attribute of the hierarchical relationship between Drawing Object, Drawing Object and the operand attribute of Drawing Object, obtain the mathematic(al) representation that Drawing Object is corresponding, further according to the hierarchical relationship between Drawing Object, mathematic(al) representation corresponding for Drawing Object is plotted in the page, to obtain mathematical formulae corresponding to formula content.The mathematical formulae treating apparatus that the present embodiment provides achieves based on agent object and in the page, generates mathematical formulae by drawing technique, be different from the html tag that prior art uses, this makes generated mathematical formulae to be totally independent of the page, and become an independently entirety, therefore be not easy the interfere with or compromise being subject to CSS pattern in the page, display effect is more stable.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiment provided by the present invention, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add SFU software functional unit realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (14)

1. a mathematical formulae disposal route, is characterized in that, comprising:
Obtain the agent object that formula content is corresponding, described agent object comprises the hierarchical relationship between Drawing Object and described Drawing Object, hierarchical relationship between described Drawing Object represents the order of operation that described formula content is corresponding, and described Drawing Object comprises arithmetic type attribute and operand attribute;
According to the arithmetic type attribute of the hierarchical relationship between described Drawing Object, described Drawing Object and the operand attribute of described Drawing Object, obtain the mathematic(al) representation that described Drawing Object is corresponding;
According to the hierarchical relationship between described Drawing Object, mathematic(al) representation corresponding for described Drawing Object is plotted in the page, to obtain mathematical formulae corresponding to described formula content.
2. method according to claim 1, is characterized in that, the agent object that described acquisition formula content is corresponding, comprising:
Obtain described formula content;
According to the decomposition rule preset, by the based expressions that described formula content resolution becomes can not decompose again;
According to the operand that type and the described based expressions of the hierarchical relationship between described based expressions, described based expressions comprise, generate described agent object.
3. method according to claim 1, is characterized in that, the agent object that described acquisition described formula content is corresponding, comprising:
An editing interface is provided to user in the described page;
Obtain the sign of operation in the described formula content that described user inputted by described editing interface or operand successively, to generate described agent object.
4. method according to claim 3, is characterized in that, described editing interface comprises: visible editing area and hiding editing area;
Describedly obtain sign of operation in the described formula content that described user inputted by described editing interface or operand successively, to generate described agent object, comprising:
According to the edit instruction that described user sends at described visible editing area, at the simulation cursor of the current input position of described visible editing area display instruction, described simulated light rotating savings is followed the input of user and moves, and the system cursor be associated with described simulation cursor is navigated to described hiding editing area, to activate input capture event;
Catch the sign of operation of described user in the described formula content of described hiding editing area input or operand successively, and the operand added in initial empty object according to the current location of described system cursor and the described sign of operation that captures or operand in Drawing Object and/or Drawing Object, to obtain described agent object.
5. method according to claim 4, is characterized in that, after the described agent object of acquisition, also comprises:
Identify the constituency operation of described user, the operation of described constituency refers to that user chooses the operation of the part operation number in described formula content;
According to the part operation number in the described formula content that described user chooses, mark in described agent object;
Obtain described user and operate in described constituency the operand re-entered in the region chosen, with described in the operand that re-enters replace the operand that described agent object is labeled.
6. the method according to any one of claim 1-5, it is characterized in that, described according to the arithmetic type attribute of the hierarchical relationship between described Drawing Object, described Drawing Object and the operand attribute of described Drawing Object, obtain the mathematic(al) representation that described Drawing Object is corresponding, comprising:
According to the order from lower to upper of the hierarchical relationship between described Drawing Object, determine described Drawing Object one by one;
Graphic plotting is carried out, to obtain mathematic(al) representation corresponding to described Drawing Object according to the arithmetic type attribute of described Drawing Object and operand attribute.
7. the method according to any one of claim 1-5, is characterized in that, agent object corresponding to described formula content is formula syntax tree corresponding to described formula content.
8. a mathematical formulae treating apparatus, is characterized in that, comprising:
Acquisition module, for obtaining agent object corresponding to formula content, described agent object comprises the hierarchical relationship between Drawing Object and described image object, hierarchical relationship between described Drawing Object represents the order of operation that described formula content is corresponding, and described Drawing Object comprises arithmetic type attribute and operand attribute;
Processing module, for according to the arithmetic type attribute of the hierarchical relationship between described Drawing Object, described Drawing Object and the operand attribute of described Drawing Object, obtains the mathematic(al) representation that described Drawing Object is corresponding;
Drafting module, for according to the hierarchical relationship between described Drawing Object, is plotted in the page by mathematic(al) representation corresponding for described Drawing Object, to obtain mathematical formulae corresponding to described formula content.
9. device according to claim 8, is characterized in that, described acquisition module specifically for:
Obtain described formula content;
According to the decomposition rule preset, by the based expressions that described formula content resolution becomes can not decompose again;
According to the operand that type and the described based expressions of the hierarchical relationship between described based expressions, described based expressions comprise, generate described agent object.
10. device according to claim 8, is characterized in that, described acquisition module specifically for:
An editing interface is provided to user in the described page;
Obtain the sign of operation in the described formula content that described user inputted by described editing interface or operand successively, to generate described agent object.
11. devices according to claim 10, is characterized in that, described editing interface comprises: visible editing area and hiding editing area;
Described acquisition module specifically for:
Described editing interface is provided to described user in the described page;
According to the edit instruction that described user sends at described visible editing area, at the simulation cursor of the current input position of described visible editing area display instruction, described simulated light rotating savings is followed the input of user and moves, and the system cursor be associated with described simulation cursor is navigated to described hiding editing area, to activate input capture event;
Catch the sign of operation of described user in the described formula content of described hiding editing area input or operand successively, and the operand added in initial empty object according to the current location of described system cursor and the described sign of operation that captures or operand in Drawing Object and/or Drawing Object, to obtain described agent object.
12. devices according to claim 11, is characterized in that, also comprise:
Identification module, for identifying the constituency operation of described user, the operation of described constituency refers to that user chooses the operation of the part operation number in described formula content;
Mark module, for the part operation number in the described formula content chosen according to described user, marks in described agent object;
Update module, operates in described constituency the operand re-entered in the region chosen for obtaining described user, with described in the operand that re-enters replace the operand that described agent object is labeled.
13. devices according to Claim 8 described in-12 any one, is characterized in that, described processing module specifically for:
According to the order from lower to upper of the hierarchical relationship between described Drawing Object, determine described Drawing Object one by one;
Graphic plotting is carried out, to obtain mathematic(al) representation corresponding to described Drawing Object according to the arithmetic type attribute of described Drawing Object and operand attribute.
14. devices according to Claim 8 described in-12 any one, is characterized in that, agent object corresponding to described formula content is formula syntax tree corresponding to described formula content.
CN201410790497.1A 2014-12-17 2014-12-17 Mathematical formulae processing method and processing device Active CN104572577B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201410790497.1A CN104572577B (en) 2014-12-17 2014-12-17 Mathematical formulae processing method and processing device
PCT/CN2015/083534 WO2016095502A1 (en) 2014-12-17 2015-07-08 Mathematical formula processing method, device, apparatus and computer storage medium
JP2017526093A JP6866551B2 (en) 2014-12-17 2015-07-08 Computer algebra methods, devices, devices and programs
KR1020177013186A KR101950126B1 (en) 2014-12-17 2015-07-08 Mathematical formula processing method, device, apparatus and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410790497.1A CN104572577B (en) 2014-12-17 2014-12-17 Mathematical formulae processing method and processing device

Publications (2)

Publication Number Publication Date
CN104572577A true CN104572577A (en) 2015-04-29
CN104572577B CN104572577B (en) 2018-09-04

Family

ID=53088684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410790497.1A Active CN104572577B (en) 2014-12-17 2014-12-17 Mathematical formulae processing method and processing device

Country Status (4)

Country Link
JP (1) JP6866551B2 (en)
KR (1) KR101950126B1 (en)
CN (1) CN104572577B (en)
WO (1) WO2016095502A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016095502A1 (en) * 2014-12-17 2016-06-23 百度在线网络技术(北京)有限公司 Mathematical formula processing method, device, apparatus and computer storage medium
CN106802749A (en) * 2015-11-25 2017-06-06 阿里巴巴集团控股有限公司 Numerical value input method and device
CN107832271A (en) * 2017-10-31 2018-03-23 广州视睿电子科技有限公司 Functional image method for drafting, device, equipment and computer-readable storage medium
WO2019019534A1 (en) * 2017-07-27 2019-01-31 广州视源电子科技股份有限公司 Formula display method and apparatus, terminal, and computer-readable storage medium
CN109992121A (en) * 2017-12-29 2019-07-09 北京搜狗科技发展有限公司 A kind of input method, device and the device for input

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309302B (en) * 2020-02-06 2023-04-18 杭州电子科技大学 Method for converting Verilog code based on LaTeX four-principle operation and trigonometric function mixed operation formula
CN112269476B (en) * 2020-10-28 2024-05-31 维沃移动通信有限公司 Formula display method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090019015A1 (en) * 2006-03-15 2009-01-15 Yoshinori Hijikata Mathematical expression structured language object search system and search method
CN101436309A (en) * 2008-12-15 2009-05-20 北大方正集团有限公司 Method and apparatus for modifying formula operator
CN102663138A (en) * 2012-05-03 2012-09-12 北京大学 Method and device for inputting formula query terms
CN102693303A (en) * 2012-05-18 2012-09-26 上海极值信息技术有限公司 Method and device for searching formulation data
CN103176954A (en) * 2013-03-27 2013-06-26 重庆市科学技术研究院 Mathematical formula display method and mathematical formula display system based on hypertext markup language (HTML) 5 canvas

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01108673A (en) * 1987-10-21 1989-04-25 Hitachi Ltd Mathematical formula input and edit system
JP2000148738A (en) * 1998-11-16 2000-05-30 Suuken Shuppan Kk Device and method for mathematical expression input and display, and recording medium where mathematical input and display program is recorded
US20040114258A1 (en) * 2002-12-17 2004-06-17 Harris Richard Alexander Device and method for combining dynamic mathematical expressions and other multimedia objects within a document
KR100963976B1 (en) * 2007-12-24 2010-06-15 엔에이치엔(주) Method, apparatus, system and computer-readable recording medium for arithmetical operation based on image information
BR112014017832B1 (en) * 2012-01-23 2021-07-06 Microsoft Technology Licensing, Llc formula detection method for identifying a mathematical formula, system for detecting a formula that appears in a fixed-format document and computer-readable media
CN103425634B (en) * 2012-05-17 2016-04-06 北大方正集团有限公司 A kind of generation method of streaming document and device
CN103425773A (en) * 2013-08-02 2013-12-04 深圳市菁优网络科技有限公司 Method for rapidly displaying mathematical formula in web page by utilizing native Html (Hypertext Markup Language)
CN104572577B (en) * 2014-12-17 2018-09-04 百度在线网络技术(北京)有限公司 Mathematical formulae processing method and processing device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090019015A1 (en) * 2006-03-15 2009-01-15 Yoshinori Hijikata Mathematical expression structured language object search system and search method
CN101436309A (en) * 2008-12-15 2009-05-20 北大方正集团有限公司 Method and apparatus for modifying formula operator
CN102663138A (en) * 2012-05-03 2012-09-12 北京大学 Method and device for inputting formula query terms
CN102693303A (en) * 2012-05-18 2012-09-26 上海极值信息技术有限公司 Method and device for searching formulation data
CN103176954A (en) * 2013-03-27 2013-06-26 重庆市科学技术研究院 Mathematical formula display method and mathematical formula display system based on hypertext markup language (HTML) 5 canvas

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016095502A1 (en) * 2014-12-17 2016-06-23 百度在线网络技术(北京)有限公司 Mathematical formula processing method, device, apparatus and computer storage medium
CN106802749A (en) * 2015-11-25 2017-06-06 阿里巴巴集团控股有限公司 Numerical value input method and device
WO2019019534A1 (en) * 2017-07-27 2019-01-31 广州视源电子科技股份有限公司 Formula display method and apparatus, terminal, and computer-readable storage medium
CN107832271A (en) * 2017-10-31 2018-03-23 广州视睿电子科技有限公司 Functional image method for drafting, device, equipment and computer-readable storage medium
CN109992121A (en) * 2017-12-29 2019-07-09 北京搜狗科技发展有限公司 A kind of input method, device and the device for input

Also Published As

Publication number Publication date
KR20170071553A (en) 2017-06-23
CN104572577B (en) 2018-09-04
JP6866551B2 (en) 2021-04-28
WO2016095502A1 (en) 2016-06-23
KR101950126B1 (en) 2019-02-19
JP2018501551A (en) 2018-01-18

Similar Documents

Publication Publication Date Title
CN104572577A (en) Mathematical formula processing method and device
CN107844299B (en) Method for implementing Web application development tool
CN101263490B (en) For providing the method and system of direct style sheet editing
CN102112985B (en) To the process of the page
US20130185622A1 (en) Methods and systems for handling annotations and using calculation of addresses in tree-based structures
CN107798084A (en) The visual edit generation system and device of a kind of web front-end page
CN103970750B (en) A kind of method and apparatus generating html web page
US20080040588A1 (en) Data Processing Device and Data Processing Method
US20070061715A1 (en) Methods and systems for providing an editable visual formatting model
US20190147022A1 (en) Method, program, recording medium, and device for assisting in creating homepage
CN104657451A (en) Processing method and processing device for page
CN115309298B (en) Text structuring method and device based on rich text editor, medium and equipment
US20070208995A1 (en) Document Processing Device and Document Processing Method
CN110543298A (en) webpage style generation method and device and webpage generation method and device
WO2005098660A1 (en) Document processing device and document processing method
CN111708529B (en) Method for generating form through dragging based on angular
US20080195950A1 (en) Document Processing Device and Document Processing Method
CN105468766A (en) Webpage creation method and system thereof
US20080282143A1 (en) Document Processing Device and Document Processing Method
JP7230439B2 (en) Information processing device and program
KR101649822B1 (en) Apparatus and method for building web-page
JPWO2006051974A1 (en) Document processing apparatus and document processing method
CN108228179A (en) The international processing method of the page, device, computer and storage medium
US20100138735A1 (en) Document processing device
JP2007183849A (en) Document processor

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant