CN109460543A - A kind of input method of logical expression, device, electronic equipment and readable medium - Google Patents
A kind of input method of logical expression, device, electronic equipment and readable medium Download PDFInfo
- Publication number
- CN109460543A CN109460543A CN201811214268.XA CN201811214268A CN109460543A CN 109460543 A CN109460543 A CN 109460543A CN 201811214268 A CN201811214268 A CN 201811214268A CN 109460543 A CN109460543 A CN 109460543A
- Authority
- CN
- China
- Prior art keywords
- node
- logical
- drawing area
- base
- nodes
- 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
- 230000014509 gene expression Effects 0.000 title claims abstract description 95
- 238000000034 method Methods 0.000 title claims abstract description 57
- 230000008859 change Effects 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 8
- 238000012508 change request Methods 0.000 claims description 6
- 230000001360 synchronised effect Effects 0.000 claims description 6
- 230000000694 effects Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 19
- 230000006870 function Effects 0.000 description 11
- 230000008569 process Effects 0.000 description 11
- 230000008901 benefit Effects 0.000 description 10
- 238000012545 processing Methods 0.000 description 9
- 230000000007 visual effect Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000005291 magnetic effect Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000739 chaotic effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 210000003205 muscle Anatomy 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the present disclosure discloses input method, device, electronic equipment and the readable medium of a kind of logical expression.This method comprises: providing at least two operational element rectangle frames for extending transversely and being arranged in the vertical direction in element drawing area, it is provided with base node on the first side of each operational element rectangle frame, and at least two operation rules of offer are selective at the base node;If detecting the operation node in two base nodes target logic expression formula to be logged each other, the connecting line of described two base nodes is then drawn in relationship drawing area, and the operation rule in target logic expression formula is set by the operation rule selected at base node any in described two base nodes, wherein the relationship drawing area is located at outside the first side of the element drawing area.By using technical solution provided by the disclosure, the input method that logical expression may be implemented is simple, and input mode is flexible, should be readily appreciated that and intuitive technical effect.
Description
Technical field
The embodiment of the present disclosure is related to logical operation technical field more particularly to a kind of input method of logical expression, dress
It sets, electronic equipment and readable medium.
Background technique
Currently, needing user or developer to input some logical expressions in finance together other field, to realize
Some logical operation functions.The input of existing logical expression has following two: first, completely manual input is such defeated
Enter that mode is flexible, may be implemented the input of any expression formula, however so completely manual input the problem of be to user or
The mathematics grounding in basic skills of developer is more demanding, and otherwise it is easy to appear the situations for calculating mistake.Second, it is specified that logical type
Input, for example be union inside first layer, it is intersection between the second layer, such user or developer's input are simple, still
It can not support the input of all logical types, and freedom degree is too low.
Therefore, how for user and developer to provide a kind of freedom degree high, and to the mathematics grounding in basic skills on basis
The input method of logical expression of less demanding has become industry technical problem urgently to be resolved.
Summary of the invention
The embodiment of the present disclosure provides input method, device, electronic equipment and the readable medium of a kind of logical expression, can be with
Realize that the input method of logical expression is simple, input mode is flexible, should be readily appreciated that and intuitive technical effect.
In a first aspect, the embodiment of the present disclosure provides a kind of input method of logical expression, this method comprises:
At least two operational element rectangle frames for extending transversely and being arranged in the vertical direction are provided in element drawing area, each
It is provided with base node on the first side of the operational element rectangle frame, and at least two fortune are provided at the base node
It is selective to calculate rule;
If detecting the operation node in two base nodes target logic expression formula to be logged each other, drawn in relationship
The connecting line of described two base nodes is drawn in region processed, and will be selected at base node any in described two base nodes
Operation rule be set as the operation rule in target logic expression formula, drawn wherein the relationship drawing area is located at the element
Outside first side in region processed.
Further, target is set by the operation rule selected at base node any in described two base nodes to patrol
After collecting the operation rule in expression formula, the method also includes:
The operation rule marking frame of connecting line, the first side of the operation rule marking frame are shown on the connecting line
On be provided with intermediate node, and at the intermediate node provide at least two operation rules it is selective;
If the intermediate node and other nodes operation node each other are detected, in relationship drawing area described in drafting
The connecting line of intermediate node and other nodes, and mesh is set by the operation rule selected at the intermediate node or other nodes
Mark the operation rule in logical expression.
Further, after the operation rule marking frame that connecting line is shown on the connecting line, the method also includes:
If detect in operation rule marking frame operation rule change request, show current operation rule marking frame for
All operation rules of selection;
Operation rule after operation rule after determining change, after the change is shown in current operation rule marking frame
Then.
Further, the connecting line includes:
The first end of first line segment and second line segment, first line segment and second line segment connects with operation node each other respectively
It connects, and extends in a first direction;
Third line segment is all connected with the second end of first line segment and second line segment, and extends in a second direction, wherein
The first direction is vertical with the second direction;
Correspondingly, the operation rule marking frame shown on the connecting line is arranged on the third line segment.
Further, the method also includes:
The relationship drawing area is divided at least two logical operation levels, the logical operation level is along first party
To gradually rising;
If the number of the intermediate node of logical operation level is greater than first threshold, according to the centre of the logical operation level
Longitudinal height of node selects fixed intermediate node;
To in the logical operation level other intermediate nodes and grade be higher than the logical operation level other levels
Intermediate node carry out grade promoted operation, until the number of the intermediate node of each logical operation level is equal to or less than first
Until threshold value.
Further, in the logical operation level other intermediate nodes and grade be higher than the logical operation level
Other levels intermediate node carry out grade promoted operation, comprising:
By longitudinal height of other intermediate nodes in the logical operation level, other middle nodes are determined respectively from big to small
The level of point promotes amplitude and promotes amplitude according to level and promoted, and the total level for obtaining every other intermediate node is promoted
Amplitude;
Amplitude is promoted according to total level to the intermediate node of other levels to be promoted.
Further, the drawing area is shown in a browser, and the drawing area is shown in a browser, and institute
The refresh cycle for stating drawing area is synchronous with the refresh cycle of the browser.
Second aspect, the embodiment of the present disclosure additionally provide a kind of input device of logical expression, which includes:
Base node setup module, for extending transversely and being arranged in the vertical direction in element drawing area offer at least two
Operational element rectangle frame, be provided with base node on the first side of each operational element rectangle frame, and in the base
It is selective that at least two operation rules are provided at plinth node;
First logical expression establishes module, if for detecting two base nodes target logic table to be logged each other
Up to the operation node in formula, then the connecting line of described two base nodes is drawn in relationship drawing area, and will be described two
The operation rule selected at any base node in base node is set as the operation rule in target logic expression formula, wherein institute
Relationship drawing area is stated to be located at outside the first side of the element drawing area.
Further, described device further include:
Intermediate node setup module, for showing the operation rule marking frame of connecting line, the fortune on the connecting line
It calculates and is provided with intermediate node on the first side of regular marking frame, and at least two operation rules are provided at the intermediate node
It is selective;
Second logical expression establishes module, if for detecting the intermediate node and other nodes operation section each other
Point, then draw the connecting line of the intermediate node Yu other nodes in relationship drawing area, and by the intermediate node or its
The operation rule selected at his node is set as the operation rule in target logic expression formula.
Further, described device further includes operation rule change module, is specifically used for:
If detect in operation rule marking frame operation rule change request, show current operation rule marking frame for
All operation rules of selection;
Operation rule after operation rule after determining change, after the change is shown in current operation rule marking frame
Then.
Further, the connecting line includes:
The first end of first line segment and second line segment, first line segment and second line segment connects with operation node each other respectively
It connects, and extends in a first direction;
Third line segment is all connected with the second end of first line segment and second line segment, and extends in a second direction, wherein
The first direction is vertical with the second direction;
Correspondingly, the operation rule marking frame shown on the connecting line is arranged on the third line segment.
Further, described device further includes that connecting line lays module, comprising:
Logical operation level division unit, for the relationship drawing area to be divided at least two logical operation layers
Grade, the logical operation level gradually rise along first direction;
Node number detection unit, if the number of the intermediate node for logical operation level is greater than first threshold, root
Fixed intermediate node is selected according to longitudinal height of the intermediate node of the logical operation level;
Logical operation level adjustment unit, for other intermediate nodes and grade height in the logical operation level
Grade is carried out in the intermediate node of other levels of the logical operation level and promotes operation, until the centre of each logical operation level
Until the number of node is equal to or is less than first threshold.
Further, the logical operation level adjustment unit is specifically used for:
By longitudinal height of other intermediate nodes in the logical operation level, other middle nodes are determined respectively from big to small
The level of point promotes amplitude and promotes amplitude according to level and promoted, and the total level for obtaining every other intermediate node is promoted
Amplitude;
Amplitude is promoted according to total level to the intermediate node of other levels to be promoted.
Further, the drawing area is shown in a browser, and the drawing area is shown in a browser, and institute
The refresh cycle for stating drawing area is synchronous with the refresh cycle of the browser.
The third aspect, the embodiment of the present disclosure provide a kind of electronic equipment, including memory, processor and are stored in storage
It can realize on device and when the computer program of processor operation, the processor execute the computer program as the disclosure is real
Apply the input method of logical expression described in example.
Fourth aspect, the embodiment of the present disclosure provide a kind of computer-readable medium, are stored thereon with computer program, should
The input method of the logical expression as described in the embodiment of the present disclosure is realized when program is executed by processor.
Technical solution provided by the embodiment of the present disclosure is extended transversely by providing at least two in element drawing area
And the operational element rectangle frame being arranged in the vertical direction, base section is provided on the first side of each operational element rectangle frame
Point, and at least two operation rules of offer are selective at the base node;If detecting two base nodes each other wait record
The operation node in target logic expression formula entered, then draw the connection of described two base nodes in relationship drawing area
Line, and set the operation rule selected at base node any in described two base nodes in target logic expression formula
Operation rule, wherein the relationship drawing area is located at outside the first side of the element drawing area.By using disclosure institute
The technical solution of offer, the input method that logical expression may be implemented is simple, and input mode is flexible, should be readily appreciated that and intuitively
Technical effect.
Detailed description of the invention
Fig. 1 is the flow chart of the input method for the logical expression that the embodiment of the present disclosure one provides;
Fig. 2 is the Input Process schematic diagram for the logical expression that the disclosure provides;
Fig. 3 is the Input Process schematic diagram for the logical expression that the disclosure provides;
Fig. 4 is the Input Process schematic diagram for the logical expression that the disclosure provides;
Fig. 5 is the Input Process schematic diagram for the logical expression that the disclosure provides;
Fig. 6 is the Input Process schematic diagram for the logical expression that the disclosure provides;
Fig. 7 is the structural schematic diagram of the input device for the logical expression that the embodiment of the present disclosure two provides;
Fig. 8 is the structural schematic diagram for the electronic equipment that the embodiment of the present disclosure three provides.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the disclosure, rather than the restriction to the disclosure.It also should be noted that in order to just
Part relevant to the disclosure is illustrated only in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail
The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these
Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation
The processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.The processing can be with
Corresponding to method, function, regulation, subroutine, subprogram etc..
In following each embodiments, optional feature and example are provided simultaneously in each embodiment, that records in embodiment is each
A feature can be combined, and form multiple optinal plans, and the embodiment of each number should not be considered merely as to a technical solution.
Embodiment one
Fig. 1 is the flow chart of the input method for the logical expression that the embodiment of the present disclosure one provides, and the present embodiment is applicable
The case where logical expression typing, the input device of this method logical expression provided by the embodiment of the present disclosure are held
Row, which can be realized by the mode of software and/or hardware, and can be integrated in the terminal of logical expression typing, client
In end and server.
As shown in Figure 1, the input method of the logical expression includes:
S110, at least two operational element rectangles for extending transversely and being arranged in the vertical direction are provided in element drawing area
Frame is provided with base node on the first side of each operational element rectangle frame, and is provided at the base node
Few two operation rules are selective.
Wherein, element drawing area is used to draw the element for carrying out logical operation.In element drawing area, it can increase
With deletion element, or corresponding title and attribute is arranged in each element.In the present embodiment, it is mentioned in element drawing area
The operational element rectangle frame for extending transversely and being arranged in the vertical direction at least two, the wherein lateral length of rectangle and longitudinally height
It can be arranged by user is unified, can also be determined according to the data volume of its content loaded.Illustratively, such as two elements point
Not Biao Shi buying car crowd and married crowd, the data volume of married crowd is bigger than the data volume of buying car crowd, buys then can allow
The height of the rectangle frame of vehicle crowd is less than the rectangle frame height of married crowd, can be proportional, is also possible to some range
It is interior out-of-proportion, only indicate the size of data volume in two operational elements with height size, such as the height of rectangle frame can be with
Setting changes between 200-500 pixel.In the present embodiment, the length of each rectangle frame can be fixed, is arranged in this way
Aesthetics after being conducive to logical expression typing, what such logical relation can be apparent is seen by user.
In one embodiment, it is provided with base node on the first side of each operational element rectangle frame, wherein
First side can be right edge, the benefit being arranged in this way be can the right side of each operational element rectangle frame carry out logic
The drafting of relationship is more in line with the input habit and observation habit of user.Wherein, base node can be relative to intermediate node
For, such as A ∩ B, then being determined as base node with the node on the right side of operational element rectangle frame corresponding to A and B.(A∩
B) ∪ C does union with the result of A ∩ B, then the node of A ∩ B result is determined as middle node then the node of C is basic node
Point.In one embodiment, it is possible to understand that, if all operational element rectangle frames are set as a column, all bases
Plinth node is all in the position of the right edge of all rectangle frames, and all intermediate nodes are all separately positioned with rectangle frame.
It is selective that at least two operation rules are provided at the base node.Wherein, intersection and union be can be such as,
It can also be other operation rules.The benefit that the present embodiment is arranged in this way is the typing need to meet the logical expression of user
It asks.Avoid the occurrence of the case where logical expression typing can not be carried out in visual editor.
If S120, detecting operation node in two base nodes target logic expression formula to be logged each other,
Draw the connecting line of described two base nodes in relationship drawing area, and by base node any in described two base nodes
The operation rule for locating selection is set as operation rule in target logic expression formula, wherein the relationship drawing area be located at it is described
Outside first side of element drawing area.
Wherein it is possible to which it is to be logged each other to obtain two base nodes in such a way that front end gets the operation information of user
Target logic expression formula in operation node, typing can also be carried out by way of automatic identification.Illustratively, Ke Yigen
According to the logical expression that user has been keyed in by other forms, such as Y=A ∩ B, then can according to automatic identification function come
Automatically determining A and B is the operation node in target logic expression formula to be logged each other, in this case, target logic table
It can be up to formula and to be known in advance by visual editor in the form of picture, text etc..In addition to this it is possible to be user according to
The target logic expression formula that the demand of oneself is inputted, e.g., in one case, user may use this logical table of A ∩ B
Up to formula, then can according to indicate A operational element rectangle frame and indicate B operational element rectangle frame between, by basis
Operation rule provided in node is the relationship of intersection to select the two.Here it is a kind of target logic expression formulas by user
Come the mode determined.
The connecting line of described two base nodes is drawn in relationship drawing area, and will be appointed in described two base nodes
The operation rule selected at one base node is set as the operation rule in target logic expression formula, wherein the relationship draws area
Domain is located at outside the first side of the element drawing area.
Wherein, relationship drawing area can be in the side of element drawing area, for example first side is right edge, then
Relationship drawing area can be on the right side of element drawing area.Connecting line can be broken line.It can be connected by a base node
To another base node.It in the present embodiment, can be before determining two operational element rectangle frames connections, from therein one
The logical operation relationship of selection between the two at a base node.For example " intersection ", at this moment, Ke Yizuo can be selected at A
Rectangle frame for the other end of logical operation relationship can be highlighted, such as be shown as " this crowd of intersection ", be existed in this way
When user clicks another crowd, so that it may it is determined as user and wants that is inputted is the intersection between A and the crowd, it can be in the fortune of the two
Connecting line is formed between operator node.
The benefit that the embodiment of the present disclosure is arranged in this way is, can be based on visual editor, for user provide simplicity and
Flexible logical expression input mode, is not necessarily to user's mathematics grounding in basic skills with higher, and operation will not be any way limited,
It can come to carry out typing to logical expression according to the demand of user.In addition to this, can be also used for will be known for the present embodiment
Logical expression carries out automatic identification and typing, simple and efficient, meets the high-speeding data input demand of present user.
Fig. 2 is the Input Process schematic diagram for the logical expression that the disclosure provides.As shown in Fig. 2, change planes crowd and automobile
Brand interest crowd is provided with base node on the right side of rectangle frame for two operational elements, can for the ease of user's differentiation
To be provided with operation status display frame on the inside of the rectangle frame of each base node position, for showing the fortune of current operation element
Calculation state such as can be " operation " and " non-operation ".
Fig. 3 is the Input Process schematic diagram for the logical expression that the disclosure provides.As shown in figure 3, at base node, it can
It to select logical operation relationship, such as intersection, union, excludes and is excluded, the present embodiment is only with this four kinds of logical operation relationships
As example.When needing to carry out a certain operation between the crowd of changing planes and automobile brand interest crowd such as user, then may be used
To select operation relation between the two at the base node of the crowd of changing planes or automobile brand interest crowd.
Fig. 4 is the Input Process schematic diagram for the logical expression that the disclosure provides.As shown in figure 4, one of them is patrolled
After volume operation rectangle frame has selected a kind of operation relation, the operation can be carried out between current operation element at other
Obvious label, such as display " this crowd of intersection " printed words are shown on the rectangle frame of relationship, and can select this in user
Determination is to carry out logical operation with the operation relation between the two after rectangle frame.
Fig. 5 is the Input Process schematic diagram for the logical expression that the disclosure provides.As shown in figure 5, can have determined
Two form connecting line between the base node of operational element each other.And after connecting the two, the operation state of the two is changed
For " operation ".
In the present embodiment, it is preferred that the connecting line includes: the first line segment and second line segment, first line segment and
The first end of second line segment is connect with operation node each other respectively, and is extended in a first direction;Third line segment, with the First Line
The second end of section and second line segment is all connected with, and is extended in a second direction, wherein the first direction and the second direction are hung down
Directly;Correspondingly, the operation rule marking frame shown on the connecting line is arranged on the third line segment.
Wherein, the benefit for operation rule marking frame being arranged is user can be made more intuitive after construction logic expression formula
Two operational elements of determination between operation relation.First line segment is parallel with second line segment, and vertical with third line segment, in this way
The benefit of setting is can be in the case where complex there are logical expression, can be more intuitive and clear in viewing angle
It is clear.
Technical solution provided by the embodiment of the present disclosure is extended transversely by providing at least two in element drawing area
And the operational element rectangle frame being arranged in the vertical direction, base section is provided on the first side of each operational element rectangle frame
Point, and at least two operation rules of offer are selective at the base node;If detecting two base nodes each other wait record
The operation node in target logic expression formula entered, then draw the connection of described two base nodes in relationship drawing area
Line, and set the operation rule selected at base node any in described two base nodes in target logic expression formula
Operation rule, wherein the relationship drawing area is located at outside the first side of the element drawing area.By using disclosure institute
The technical solution of offer, the input method that logical expression may be implemented is simple, and input mode is flexible, should be readily appreciated that and intuitively
Technical effect.
Based on the above technical solution, it is preferred that will be selected at base node any in described two base nodes
Operation rule be set as after the operation rule in target logic expression formula, the method also includes: on the connecting line
The operation rule marking frame for showing connecting line, is provided with intermediate node on the first side of the operation rule marking frame, and
It is selective that at least two operation rules are provided at the intermediate node;If detecting, the intermediate node is transported each other with other nodes
Operator node, then draw the connecting line of the intermediate node Yu other nodes in relationship drawing area, and by the intermediate node
Or the operation rule selected at other nodes is set as the operation rule in target logic expression formula.
Wherein, intermediate node is for base node, it can be understood as intermediate node is with other operation results
Logical operation is usually carried out as operand.Intermediate node can equally provide a variety of operation rules and select for user, solution
User determined after inputting A ∩ B or A ∪ B, the problem of carrying out other operations in this result, can also equally pass through letter
Single selection determines, without its result by defining other characters, then carries out between other characters and other operational elements
Logical operation, method are easy and quick.
Fig. 6 is the Input Process schematic diagram for the logical expression that the disclosure provides.As shown in fig. 6, can be in the crowd of changing planes
On the basis of the operation result of the intersection of automobile brand interest crowd, selected and third operational element at node therebetween
Between operation relation, the union such as between financial industry.
In the technical scheme, it can also preferentially select the base node of financial industry as starting point, Selecting operation relationship
Later, the two operational element each other is determined by clicking the operation result of the crowd that changes planes and automobile brand interest crowd, and two
Broken line is formed between person.And likewise, in third line segment operation rule marking frame shown above and can be formed in new
Intermediate node.
In the technical scheme, it is preferred that the operation rule marking frame on third line segment can be arranged with intermediate node
At 1/2 position of third line segment, it can also be arranged at 1/4 and 3/4 position, in addition to this other positions can also be set
It sets, wherein the benefit that middle position and a quarter position is arranged in is that the connecting line of entire logical expression is allowed to seem more
It is clear to add, and will not lead to seem that very chaotic situation occurs because of the randomness of position, be conducive to the logical expression of user
Input and inspection.
On the basis of above-mentioned each technical solution, it is preferred that show the operation rule mark of connecting line on the connecting line
After knowing frame, the method also includes: if detecting the operation rule change request in operation rule marking frame, show current fortune
Calculate the alternative all operation rules of regular marking frame;After operation rule after determining change, identified in current operation rule
Operation rule after showing the change in frame.
Wherein, detection calculations rule change request, can be get user at operation rule to down toward arrow
Carry out clicking operation.If user clicks, illustrate that the logical relation currently inputted needs to change, it in this case, can
The change to the logical expression inputted can be supported depending on changing editing machine, such as intersection is changed to union.This technology side
The benefit that case is arranged in this way is that logical relation change operation can be provided for user, be conducive to in logical expression it is wrong more
Change, or attempted by change, achievees the effect that the calculated result of entire logical expression is allowed to be more in line with user demand.
On the basis of above-mentioned each technical solution, it is preferred that the relationship drawing area is divided at least two logics
Operation level, the logical operation level gradually rise along first direction;If the number of the intermediate node of logical operation level is big
In first threshold, then fixed intermediate node is selected according to longitudinal height of the intermediate node of the logical operation level;To the logic
The intermediate node that other intermediate nodes and grade in operation level are higher than other levels of the logical operation level carries out etc.
Grade promotes operation, until the number of the intermediate node of each logical operation level is equal to or is less than first threshold.
Wherein, first threshold can be 1, and longitudinal direction highly can be at the top of intermediate node and drawing board or entire the top of screen
The distance between.After the operation of same level is more than 1, intermediate node it can wherein will put off backward, to guarantee to draw in relationship
The operation node number of each level in region processed is 1, when the middle node in the same level is counted more than 1, then may be used
Will be shown with the smallest intermediate node of drawing board distance from top in current operation level, and for other intermediate nodes and higher
The intermediate node of grade, does passage operation backward, and passage is according to can be each intermediate node to drawing board distance from top from small to large
Sequence carry out.The benefit being arranged in this way is can be to avoid in relationship drawing area, since there are multiple centres for same level
Node and collide, and make user that can not determine the relationship drawback between logical operation relationship and operational element.
Based on the above technical solution, it is preferred that other intermediate nodes in the logical operation level, and wait
The intermediate node that grade is higher than other levels of the logical operation level carries out grade and promotes operation, comprising: presses the logical operation layer
Longitudinal height of other intermediate nodes in grade, determine respectively from big to small the level of other intermediate nodes promoted amplitude and according to
Level promotes amplitude and is promoted, and the total level for obtaining every other intermediate node promotes amplitude;To the centre of other levels
Node promotes amplitude according to total level and is promoted.
Wherein, after elapsing backward in order to avoid the intermediate node of current operation level, lead to the intermediate node of more high-level
It is present in same level therewith, so the intermediate node of the operation to more high-level is needed to elapse backward, specifically elapses level
Number is that the duplicate intermediate node number of current level subtracts 1.The benefit being arranged in this way is can be adjusted to avoid to a level
After the phenomenon that being overlapped higher level.
On the basis of above-mentioned each technical solution, optionally, the drawing area is shown in a browser, and the drafting
Region is shown in a browser, and the refresh cycle of the drawing area is synchronous with the refresh cycle of the browser.This implementation
Example provides visual editor interface by browser for user, and the benefit being arranged in this way is can be more extensively for by user institute
It uses, wherein drawing area is synchronous with the refresh cycle of browser, can specifically pass through starting one and browser refresh cycle
The same timer, if can be to avoid inconsistent with the browser refresh cycle, code and the inconsistent situation of browser code.
Embodiment two
Fig. 7 is the structural schematic diagram of the input device for the logical expression that the embodiment of the present disclosure two provides.As shown in fig. 7,
The input device of the logical expression, comprising:
Base node setup module 710, for being extended transversely in element drawing area offer at least two and along longitudinal direction
The operational element rectangle frame of arrangement is provided with base node on the first side of each operational element rectangle frame, and in institute
It is selective to state at least two operation rules of offer at base node;
First logical expression establishes module 720, if for detecting that two base node targets to be logged each other are patrolled
The operation node in expression formula is collected, then draws the connecting line of described two base nodes in relationship drawing area, and will be described
The operation rule selected at any base node in two base nodes is set as the operation rule in target logic expression formula,
Described in relationship drawing area be located at outside the first side of the element drawing area.
Technical solution provided by the embodiment of the present disclosure is extended transversely by providing at least two in element drawing area
And the operational element rectangle frame being arranged in the vertical direction, base section is provided on the first side of each operational element rectangle frame
Point, and at least two operation rules of offer are selective at the base node;If detecting two base nodes each other wait record
The operation node in target logic expression formula entered, then draw the connection of described two base nodes in relationship drawing area
Line, and set the operation rule selected at base node any in described two base nodes in target logic expression formula
Operation rule, wherein the relationship drawing area is located at outside the first side of the element drawing area.By using disclosure institute
The technical solution of offer, the input method that logical expression may be implemented is simple, and input mode is flexible, should be readily appreciated that and intuitively
Technical effect.
On the basis of the various embodiments described above, optionally, described device further include:
Intermediate node setup module, for showing the operation rule marking frame of connecting line, the fortune on the connecting line
It calculates and is provided with intermediate node on the first side of regular marking frame, and at least two operation rules are provided at the intermediate node
It is selective;
Second logical expression establishes module, if for detecting the intermediate node and other nodes operation section each other
Point, then draw the connecting line of the intermediate node Yu other nodes in relationship drawing area, and by the intermediate node or its
The operation rule selected at his node is set as the operation rule in target logic expression formula.
On the basis of the various embodiments described above, optionally, described device further includes operation rule change module, specific to use
In:
If detect in operation rule marking frame operation rule change request, show current operation rule marking frame for
All operation rules of selection;
Operation rule after operation rule after determining change, after the change is shown in current operation rule marking frame
Then.
On the basis of the various embodiments described above, optionally, the connecting line includes:
The first end of first line segment and second line segment, first line segment and second line segment connects with operation node each other respectively
It connects, and extends in a first direction;
Third line segment is all connected with the second end of first line segment and second line segment, and extends in a second direction, wherein
The first direction is vertical with the second direction;
Correspondingly, the operation rule marking frame shown on the connecting line is arranged on the third line segment.
On the basis of the various embodiments described above, optionally, described device further includes that connecting line lays module, comprising:
Logical operation level division unit, for the relationship drawing area to be divided at least two logical operation layers
Grade, the logical operation level gradually rise along first direction;
Node number detection unit, if the number of the intermediate node for logical operation level is greater than first threshold, root
Fixed intermediate node is selected according to longitudinal height of the intermediate node of the logical operation level;
Logical operation level adjustment unit, for other intermediate nodes and grade height in the logical operation level
Grade is carried out in the intermediate node of other levels of the logical operation level and promotes operation, until the centre of each logical operation level
Until the number of node is equal to or is less than first threshold.
On the basis of the various embodiments described above, optionally, the logical operation level adjustment unit is specifically used for:
By longitudinal height of other intermediate nodes in the logical operation level, other middle nodes are determined respectively from big to small
The level of point promotes amplitude and promotes amplitude according to level and promoted, and the total level for obtaining every other intermediate node is promoted
Amplitude;
Amplitude is promoted according to total level to the intermediate node of other levels to be promoted.
On the basis of the various embodiments described above, optionally, the drawing area is shown in a browser, and the drafting area
Domain is shown in a browser, and the refresh cycle of the drawing area is synchronous with the refresh cycle of the browser.
Method provided by disclosure any embodiment can be performed in the said goods, has the corresponding functional module of execution method
And beneficial effect.
Embodiment three
Fig. 8 is the structural schematic diagram for the electronic equipment that the embodiment of the present disclosure three provides.Below with reference to Fig. 8, it illustrates suitable
In the structural schematic diagram for the electronic equipment 800 for being used to realize the embodiment of the present disclosure.Electronic equipment in the embodiment of the present disclosure can be with
Including but not limited to such as mobile phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (plate
Computer), PMP (portable media player), vehicle electronic device (such as vehicle mounted guidance electronic equipment) etc. electronics set
Standby and such as number TV, desktop computer etc. stationary electronic devices.Electronic equipment shown in Fig. 8 is only one and shows
Example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 8, electronic equipment 800 may include processing unit (such as central processing unit, graphics processor etc.)
801, random access can be loaded into according to the program being stored in read-only memory (ROM) 802 or from storage device 808
Program in memory (RAM) 803 and execute various movements appropriate and processing.In RAM 803, it is also stored with electronic equipment
Various programs and data needed for 800 operations.Processing unit 801, ROM 802 and RAM 803 pass through the phase each other of bus 804
Even.Input/output (I/O) interface 805 is also connected to bus 804.
In general, following device can connect to I/O interface 805: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph
As the input unit 806 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration
The output device 807 of dynamic device etc.;Storage device 808 including such as tape, hard disk etc.;And communication device 809.Communication device
809, which can permit electronic equipment 800, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 8 shows tool
There is the electronic equipment 800 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with
Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communication device 809, or from storage device 808
It is mounted, or is mounted from ROM802.When the computer program is executed by processing unit 801, the embodiment of the present disclosure is executed
Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter
Calculation machine readable medium either the two any combination.Computer-readable medium for example may be-but not limited to-
Electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.It is computer-readable
The more specific example of medium can include but is not limited to: have electrical connection, the portable computer magnetic of one or more conducting wires
Disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or sudden strain of a muscle
Deposit), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned appoint
The suitable combination of meaning.In the disclosure, computer-readable medium can be any tangible medium for including or store program, the journey
Sequence can be commanded execution system, device or device use or in connection.And in the disclosure, it is computer-readable
Signal media may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carrying computer-readable
Program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal, optical signal or on
Any appropriate combination stated.Computer-readable signal media can also be that any computer other than computer-readable medium can
Medium is read, which can send, propagates or transmit for by instruction execution system, device or device
Part uses or program in connection.The program code for including on computer-readable medium can use any Jie appropriate
Matter transmission, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity
When sub- equipment executes, so that the electronic equipment: extending transversely and be arranged in the vertical direction in element drawing area offer at least two
Operational element rectangle frame, be provided with base node on the first side of each operational element rectangle frame, and in the base
It is selective that at least two operation rules are provided at plinth node;If detecting two base nodes target logic table to be logged each other
Up to the operation node in formula, then the connecting line of described two base nodes is drawn in relationship drawing area, and will be described two
The operation rule selected at any base node in base node is set as the operation rule in target logic expression formula, wherein institute
Relationship drawing area is stated to be located at outside the first side of the element drawing area.
Alternatively, above-mentioned computer-readable medium carries one or more program, when said one or multiple programs
When being executed by the electronic equipment, so that the electronic equipment: providing at least two in element drawing area and extend transversely and along vertical
To the operational element rectangle frame of arrangement, it is provided with base node on the first side of each operational element rectangle frame, and
It is selective that at least two operation rules are provided at the base node;If detecting two base nodes target to be logged each other
Operation node in logical expression, then draw the connecting line of described two base nodes in relationship drawing area, and by institute
The operation rule that the operation rule selected at any base node in two base nodes is set as in target logic expression formula is stated,
Wherein the relationship drawing area is located at outside the first side of the element drawing area.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof
Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+
+, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can
Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package,
Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part.
In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN)
Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part is realized.Wherein, module, the title of unit do not constitute the limit to the module, unit itself under certain conditions
It is fixed.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (10)
1. a kind of input method of logical expression characterized by comprising
At least two operational element rectangle frames for extending transversely and being arranged in the vertical direction are provided in element drawing area, it is each described
It is provided with base node on the first side of operational element rectangle frame, and at least two operations rule are provided at the base node
It is then selective;
If detecting the operation node in two base nodes target logic expression formula to be logged each other, area is drawn in relationship
The connecting line of described two base nodes, and the fortune that will be selected at base node any in described two base nodes are drawn in domain
Calculating rule setting is the operation rule in target logic expression formula, wherein the relationship drawing area, which is located at the element, draws area
Outside first side in domain.
2. the method according to claim 1, wherein by being selected at base node any in described two base nodes
The operation rule selected is set as after the operation rule in target logic expression formula, the method also includes:
The operation rule marking frame of connecting line is shown on the connecting line, is set on the first side of the operation rule marking frame
It is equipped with intermediate node, and at least two operation rules of offer are selective at the intermediate node;
If detecting the intermediate node and other nodes operation node each other, the centre is drawn in relationship drawing area
The connecting line of node and other nodes, and set target for the operation rule selected at the intermediate node or other nodes and patrol
Collect the operation rule in expression formula.
3. according to the method described in claim 2, it is characterized in that, showing the operation rule mark of connecting line on the connecting line
After knowing frame, the method also includes:
If detecting the operation rule change request in operation rule marking frame, display current operation rule marking frame is available
All operation rules;
After operation rule after determining change, the operation rule after showing the change in current operation rule marking frame.
4. method according to claim 1 or 2, which is characterized in that the connecting line includes:
The first end of first line segment and second line segment, first line segment and second line segment is connect with operation node each other respectively,
And it extends in a first direction;
Third line segment is all connected with the second end of first line segment and second line segment, and extends in a second direction, wherein described
First direction is vertical with the second direction;
Correspondingly, the operation rule marking frame shown on the connecting line is arranged on the third line segment.
5. according to the method described in claim 4, it is characterized by further comprising:
The relationship drawing area is divided at least two logical operation levels, the logical operation level along first direction by
Edge up height;
If the number of the intermediate node of logical operation level is greater than first threshold, according to the intermediate node of the logical operation level
Longitudinal height select fixed intermediate node;
To in the logical operation level other intermediate nodes and grade be higher than the logical operation level other levels in
Intermediate node carries out grade and promotes operation, until the number of the intermediate node of each logical operation level is equal to or is less than first threshold
Until.
6. according to the method described in claim 5, it is characterized in that, to other intermediate nodes in the logical operation level, with
And grade is higher than the intermediate node progress grade promotion operation of other levels of the logical operation level, comprising:
By longitudinal height of other intermediate nodes in the logical operation level, other intermediate nodes are determined respectively from big to small
Level promotes amplitude and promotes amplitude according to level and promoted, and the total level for obtaining every other intermediate node promotes width
Degree;
Amplitude is promoted according to total level to the intermediate node of other levels to be promoted.
7. the method according to claim 1, wherein the drawing area is shown in a browser, and described draw
Region processed is shown in a browser, and the refresh cycle of the drawing area is synchronous with the refresh cycle of the browser.
8. a kind of input device of logical expression characterized by comprising
Base node setup module, for providing at least two fortune for extending transversely and being arranged in the vertical direction in element drawing area
Element rectangle frame is calculated, is provided with base node on the first side of each operational element rectangle frame, and in the base section
It is selective that at least two operation rules are provided at point;
First logical expression establishes module, if for detecting two base nodes target logic expression formula to be logged each other
In operation node, then draw the connecting line of described two base nodes in relationship drawing area, and by described two bases
The operation rule selected at any base node in node is set as the operation rule in target logic expression formula, wherein the pass
It is that drawing area is located at outside the first side of the element drawing area.
9. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that when the program is executed by processor
Realize the input method such as logical expression of any of claims 1-7.
10. a kind of electronic equipment, including memory, processor and storage are on a memory and can be in the computer of processor operation
Program, which is characterized in that the processor is realized when executing the computer program as of any of claims 1-7
The input method of logical expression.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811214268.XA CN109460543A (en) | 2018-10-18 | 2018-10-18 | A kind of input method of logical expression, device, electronic equipment and readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811214268.XA CN109460543A (en) | 2018-10-18 | 2018-10-18 | A kind of input method of logical expression, device, electronic equipment and readable medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109460543A true CN109460543A (en) | 2019-03-12 |
Family
ID=65607939
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811214268.XA Pending CN109460543A (en) | 2018-10-18 | 2018-10-18 | A kind of input method of logical expression, device, electronic equipment and readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109460543A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110532260A (en) * | 2019-07-23 | 2019-12-03 | 北京三快在线科技有限公司 | The storage of logical expression and read method, device, electronic equipment and medium |
CN112333292A (en) * | 2021-01-06 | 2021-02-05 | 苏州光格设备有限公司 | Electric power internet of things gateway edge calculation method |
CN117032665A (en) * | 2023-07-24 | 2023-11-10 | 易方达基金管理有限公司 | Visual construction method and system for investment factors |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060195798A1 (en) * | 2005-02-28 | 2006-08-31 | Chan Hoi Y | Method and apparatus for displaying and interacting with hierarchical information and time varying rule priority |
CN106933889A (en) * | 2015-12-31 | 2017-07-07 | 华为技术有限公司 | For regular collocation method, display methods and the client screened |
CN107885437A (en) * | 2017-11-29 | 2018-04-06 | 广州视源电子科技股份有限公司 | multi-element interaction method, device, equipment and storage medium |
-
2018
- 2018-10-18 CN CN201811214268.XA patent/CN109460543A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060195798A1 (en) * | 2005-02-28 | 2006-08-31 | Chan Hoi Y | Method and apparatus for displaying and interacting with hierarchical information and time varying rule priority |
CN106933889A (en) * | 2015-12-31 | 2017-07-07 | 华为技术有限公司 | For regular collocation method, display methods and the client screened |
CN107885437A (en) * | 2017-11-29 | 2018-04-06 | 广州视源电子科技股份有限公司 | multi-element interaction method, device, equipment and storage medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110532260A (en) * | 2019-07-23 | 2019-12-03 | 北京三快在线科技有限公司 | The storage of logical expression and read method, device, electronic equipment and medium |
CN110532260B (en) * | 2019-07-23 | 2021-05-25 | 北京三快在线科技有限公司 | Logic expression storage and reading method and device, electronic equipment and medium |
CN112333292A (en) * | 2021-01-06 | 2021-02-05 | 苏州光格设备有限公司 | Electric power internet of things gateway edge calculation method |
CN117032665A (en) * | 2023-07-24 | 2023-11-10 | 易方达基金管理有限公司 | Visual construction method and system for investment factors |
CN117032665B (en) * | 2023-07-24 | 2024-05-03 | 易方达基金管理有限公司 | Visual construction method and system for investment factors |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9274686B2 (en) | Navigation framework for visual analytic displays | |
CN109542578A (en) | A kind of display methods of list interface, device, equipment and storage medium | |
CN109460543A (en) | A kind of input method of logical expression, device, electronic equipment and readable medium | |
CN105518609A (en) | Method and apparatus for providing multiple applications | |
US20140380178A1 (en) | Displaying interactive charts on devices with limited resources | |
CN108965389A (en) | Method for showing information | |
CN111045653B (en) | System generation method and device, computer readable medium and electronic equipment | |
CN109857486A (en) | A kind of processing method, device, equipment and the medium of program page data | |
CN109446025A (en) | A kind of back method of operation behavior, device, electronic equipment and readable medium | |
US20240192824A1 (en) | Information displaying method and device | |
CN109491742A (en) | Page tabular rendering method and device | |
CN110309444A (en) | A kind of page display method, device, medium and server | |
CN109446199A (en) | Cell data processing method and device | |
CN109656653A (en) | Mask icon display method and device | |
CN109614193A (en) | A kind of display methods of list interface, device, equipment and storage medium | |
CN114115681A (en) | Page generation method and device, electronic equipment and medium | |
WO2024160268A1 (en) | Page rendering method and apparatus, device and storage medium | |
CN110223615B (en) | Advertisement display control method, device, medium and advertisement push server | |
CN107704104A (en) | List input item association method, system, equipment and storage medium | |
CN110489041A (en) | Method, apparatus, equipment and the medium of small routine dragging element automatic aligning | |
CN109492163A (en) | A kind of recording method, device, terminal device and storage medium that list is shown | |
CN111273842A (en) | Notification message processing method and device, electronic equipment and storage medium | |
CN113010582A (en) | Data processing method and device, computer readable medium and electronic equipment | |
CN109635821A (en) | Feature extracting method, device, equipment and the readable medium of image-region | |
CN109669589A (en) | Document edit method and device |
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: 20190312 |