CN109582349A - Setting method and device, the measurement method and device of measure equation - Google Patents
Setting method and device, the measurement method and device of measure equation Download PDFInfo
- Publication number
- CN109582349A CN109582349A CN201811481712.4A CN201811481712A CN109582349A CN 109582349 A CN109582349 A CN 109582349A CN 201811481712 A CN201811481712 A CN 201811481712A CN 109582349 A CN109582349 A CN 109582349A
- Authority
- CN
- China
- Prior art keywords
- measurement
- configuration file
- measure equation
- formula
- item
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
Abstract
This application provides a kind of setting methods of measure equation, this method can obtain the measure equation of user's input, measure equation is made of measurement element, determine the configuration sentence that target configuration file to be generated includes, measurement element according to measure equation generates these configuration sentences, and configuration sentence is for forming target configuration file.It can be seen that, user can define measure equation according to the measurement demand of itself, measuring device receives the customized measure equation of user, and it saves it in configuration file, the called function that can realize measure equation of configuration file, make measuring device can satisfy the measurement demand of user's Suresh Kumar in this way, improves the widespread popularity of measuring device.In addition, present invention also provides measurement methods, the setting device and relevant device of measure equation.
Description
Technical field
This application involves the technical fields custom-configured, a kind of setting method more particularly, to measure equation and
Device, measurement method and device.
Background technique
In practical applications, it is often necessary to realize the measurement to target object using measuring device.However, because of not same district
The different or different ethnic groups of the set quota in domain are different with regard to the demand of its own measurement item, although which results in measuring devices to same
The measurement of one target object, but its measurement output is as a result, variant because of different regions or different Man's Demands differences.
For these different demands, existing equipment manufacturer generallys use the mode of version customization to solve;In order to solve
When leaving the factory, the measurement result index item for including in measurement item is able to satisfy the different user demands of different regions to equipment, adopts
There are two types of methods with more universal: 1) for user there may be to the interested result index item of measurement item it is diverse this
One specific demand replaces corresponding configuration file using different configuration files, to realize usually according to different users
Same measurement item shows different result index subjets.2) it is directed to same result index item, different user wishes to use difference
This specific demand of calculation method matched usually by a variety of measure equations built-in in system is arranged by user's selection
The mode set is realized.
For current mainstream by the way of configuration file replacement, although being well positioned to meet the special need of different user
It asks, but needs different configuration files to be customized, as target area is more and more and the demand of user is more next for different user
It is more, it is difficult to safeguard so as to cause version;Though and in such a way that different formula built-in in system is arranged is for user's selection
Different users can so be avoided the occurrence of using different configuration file problems, but it is only applicable to all users and refers to result
The classification demand of mark item is the skimble-scamble scene of calculation formula unified, that only index item relies on, when different user wishes to measure
When the measurement result index item that item includes is inconsistent, this kind of method just can not be solved.
Summary of the invention
In view of this, the application proposes a kind of setting method of measure equation, can according to the specific demand of user oneself,
The calculation formula for the result index item and each result index item that the certain measurement items of customized include solves the above-mentioned prior art and works as
Present in defect.
In order to achieve the object, technical solution provided by the present application is as follows:
In a first aspect, this application provides a kind of setting methods of measure equation, comprising:
Obtain the measure equation of user's input;Wherein measure equation is made of measurement element, and measurement element includes measurement knot
Fruit, measurement index item and the calculation to the measurement index item;Determine the mesh that target configuration file to be generated includes
Standard configuration sets sentence;Wherein how the target configuration sentence handles the survey for indicating that the target configuration file is performed
The measurement element that amount formula includes;According to the measurement element of the measure equation, the target configuration sentence, the target are generated
Configuration sentence is for forming target configuration file.
In one implementation, the target configuration file includes any one or more in following three: formula
List configuration file, formula details configuration file, index item detailed configuration file;Wherein: the listing formulas configuration text
The target of part configures sentence, described in indicating that the target configuration file is performed and how to show and be made of measurement element
Measure equation;The target of the formula details configuration file configures sentence, for indicating that the target configuration file is held
How the measurement result item of the measure equation is calculated when row;The target of the index item detailed configuration file configures sentence, uses
The measurement index item for how calculating the measure equation is performed in the expression target configuration file.
In one implementation, in the measurement element according to the measure equation, the target configuration language is generated
Before sentence, further includes: carry out legitimacy verifies to the measure equation;Wherein, described that legitimacy is carried out to the measure equation
Verification includes: to construct the corresponding syntax tree of the measure equation according to syntax tree building rule;Based on the syntax tree to described
Measure equation carries out legitimacy verifies.
In one implementation, the legitimacy verifies include any one of following three or multinomial: grammer is legal
Property verification, logical correctness verification, arithmetic unit legitimacy verifies.
It is in one implementation, described to construct the corresponding syntax tree of the measure equation according to syntax tree building rule,
It include: that morphological analysis is carried out to the measure equation, to extract the lexical element that the measure equation includes;The wherein morphology
Element is used to indicate the lexical structure of the measure equation;Determine the syntactic type of institute's syntax elements;It is constructed according to syntax tree
Corresponding relationship in rule about syntactic type and node type determines the corresponding node type of institute's syntax elements;According to institute
The node type of syntax elements constructs the syntax tree of the measure equation using institute's syntax elements.
In one implementation, the measure equation for obtaining user's input, comprising: set interface is provided, it is described to set
Set the input control in interface comprising measurement result item, measurement index item and calculation;User is obtained to control by the input
Measurement result item, measurement index item and the calculation to the measurement index item of part input.
Second aspect, this application provides a kind of measurement methods, comprising: obtains the target measurement formula of user's input;Solution
The measurement element that the target measurement formula includes is analysed, and determines formula details configuration text corresponding with the measurement element
Part and index item detailed configuration file;Wherein the measurement element includes measurement result item, measurement index item and to the survey
The calculation of figureofmerit item;Determine object to be measured;It executes the formula details configuration file and the index item is detailed
Thin configuration file, to obtain the object to be measured about the value of the measurement index item and the value of the measurement result item;It is defeated
The value of the measurement result item out.
In one implementation, the target measurement formula for obtaining user's input, comprising: execute listing formulas configuration
File, to provide the measure equation that the listing formulas configuration file includes;Selection operation based on user obtains user's selection
Target measurement formula.
In one implementation, the execution formula details configuration file and the index item detailed configuration
File, to obtain the object to be measured about the value of the measurement index item and the value of the measurement result item, comprising: execute
The index item detailed configuration file, to generate the measuring tool for obtaining the measurement index item and use the measurement work
Tool obtains value of the object to be measured about the measurement index item;The formula details configuration file is executed, with root
The value that the measurement result item is obtained to the calculation formula of the measurement index item is executed according to the value of the measurement index item.
The third aspect, this application provides a kind of setting devices of measure equation, comprising:
Measure equation obtains module, for obtaining the measure equation of user's input;Wherein measure equation is by measurement element group
At measurement element includes measurement result item, measurement index item and the calculation to the measurement index item;Sentence is configured to determine
Module, for determining that the target that target configuration file to be generated includes configures sentence;Wherein the target configuration sentence is used for
It indicates that the target configuration file is performed and how to handle the measurement element that the measure equation includes;Configuration file generates mould
Block generates the target configuration sentence for the measurement element according to the measure equation, and the target configuration sentence is used for group
At target configuration file.
Fourth aspect, this application provides a kind of measuring devices, comprising:
Measure equation obtains module, for obtaining the target measurement formula of user's input;Configuration file determining module, is used for
The measurement element that the target measurement formula includes is parsed, and determines formula details configuration corresponding with the measurement element
File and index item detailed configuration file;Wherein the measurement element includes measurement result item, measurement index item and to described
The calculation of measurement index item;Measurement object determining module, for determining object to be measured;Configuration file execution module is used
In executing the formula details configuration file and the index item detailed configuration file, closed with obtaining the object to be measured
In the value of the measurement index item and the value of the measurement result item;Measurement result output module, for exporting the measurement knot
The value of fruit.
5th aspect, this application provides a kind of measuring devices, comprising:
Input equipment, for obtaining the measure equation of user's input;Wherein measure equation is made of measurement element, and measurement is wanted
Element includes measurement result item, measurement index item and the calculation to the measurement index item;Processor, it is to be generated for determining
Target configuration file include target configuration sentence;Wherein the target configuration sentence is for indicating the target configuration file
It is performed and how to handle the measurement element that the measure equation includes;And the measurement element according to the measure equation, it is raw
Sentence is configured at the target, the target configuration sentence is for forming target configuration file.
6th aspect, this application provides a kind of measuring devices, comprising:
Input equipment, for obtaining the target measurement formula of user's input;Processor, it is public for parsing the target measurement
The measurement element that formula includes, and determine that formula details configuration file corresponding with the measurement element and index item are detailed
Configuration file;Wherein the measurement element includes measurement result item, measurement index item and the calculating side to the measurement index item
Formula;Determine object to be measured;And the formula details configuration file and the index item detailed configuration file are executed, with
The object to be measured is obtained about the value of the measurement index item and the value of the measurement result item;
Output equipment, for exporting the value of the measurement result item.
7th aspect, this application provides a kind of measuring systems, including custom formula setup module and survey calculation mould
Block, the custom formula setup module provide input interface for the user of measuring device, so that user is connect by the input
Mouth inputs customized measure equation to the measuring system;Measurement process of the measuring and calculating module to the measuring system
It is controlled, to use measure equation to obtain final measurement result.
Eighth aspect, this application provides a kind of readable storage medium storing program for executing, are stored thereon with computer program, the computer
Method described in any of the above embodiments is realized when program is executed by processor.
From the above technical scheme, it can be seen that this method can obtain this application provides a kind of setting method of measure equation
The measure equation of user's input, measure equation are made of measurement element, determine the configuration that target configuration file to be generated includes
Sentence, the measurement element according to measure equation generate these configuration sentences, and configuration sentence is for forming target configuration file.It can
Seeing, user can define measure equation according to the measurement demand of itself, and measuring device receives the customized measure equation of user, and
It saves it in configuration file, the called function that can realize measure equation of configuration file, so that measuring device
The measurement demand that can satisfy user's Suresh Kumar improves the widespread popularity of measuring device.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a structural schematic diagram of measuring system;
Fig. 2A and Fig. 2 B is the concrete structure schematic diagram of measuring system;
Fig. 3 is a flow chart of the setting method of measure equation;
Fig. 4 is the flow chart that legitimacy verifies are carried out to measure equation;
Fig. 5 is a syntax tree schematic diagram of building;
Fig. 6 is a flow chart of measurement method;
Fig. 7 is a structural schematic diagram of the setting device of measure equation;
Fig. 8 is another structural schematic diagram of the setting device of measure equation;
Fig. 9 is a structural schematic diagram of measuring device.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
Measuring device is a kind of equipment that can calculate a certain index of target object.It is measured to realize, in measuring device
It is equipped with measure equation, different measure equations may be used to calculate different measurement indexes.In different application scenarios, user
May it should be understood that the measurement index of target object is different, the different or different ethnic groups of the set quota of different zones with regard to its from
The demand of body measurement item is different, and user may be it should be understood that the measurement index of target object be different, in order to make it easy to understand, the application
It is illustrated by taking the measuring device of medical domain as an example.
Ultrasonic diagnostic equipment is often used in area of medical diagnostics, medical detection image can be generated in ultrasonic diagnostic equipment, and
It can be measured according to index item of the medical detection image to diagnosis position, measurement result can be used as the diagnosis of disease
Analyze auxiliary data.For example, in Obstetrical application, medical staff has ratio this measurement for calculating that fetus head circumference and humerus grow to refer to
Target demand;For example, at diagnosis of abdominal bladder position, medical staff has the volume that bladder is calculated by the length of bladder
The demand of this measurement index.However, it is long with humerus for calculating head circumference that there is no built-in in ultrasonic diagnostic equipment default setting
Ratio this measurement index measure equation, then its measurement demand for not being able to satisfy medical staff.
To solve the above-mentioned problems, existing technological means is that measure equations more as far as possible is arranged in measuring device, with
It is selected for user.However, it is desirable to explanation, the difference of measurement demand may be not limited only to measurement index not
Together, for same measurement index, different measurement demands may the demand to the calculating process of measurement index be also different.Example
Such as, it is assumed that the measure equation of this measurement index of above-mentioned head circumference and the ratio of humerus length is built-in in ultrasonic device, but measurement refers to
Target calculation is possible to not be that medical staff thinks calculation to be used.
The application provides a kind of measuring system, is illustrated by taking the measuring system of medical domain as an example, as shown in Figure 1, should
System can be divided into custom formula setting and measure two big modules of calculating with custom formula.
The major function of custom formula setup module is, provides an interface for the user of measuring device, user according to
Actual measurement demand determines required measure equation, and measure equation is arranged in measuring device by the interface.
The major function of measuring and calculating module is, using measure equation set by measuring device, to carry out actual measurement calculating.
Specifically, a kind of structure of custom formula setup module is as shown in Figure 2 A, specifically includes: UI Interface Control, public affairs
Formula data management, Formula Parsing engine, configuration file parsing four function sub-modules of management.
UI Interface Control function sub-modules mainly include two aspect functions: showing data relevant to formula, and obtain
Data are arranged in the formula of user's input.Specifically, which can manage submodule from formula data and obtain and formula
Relevant data such as the corresponding composed structure of formula, and show these data, for user by way of measure equation list
Check the measure equation being set inside measuring device;In addition, the function sub-modules can also be obtained to measure equation more
More new data is sent to formula data management submodule by new data, such as newly-increased, modification, the related data for deleting measure equation,
Specific update is carried out by formula management submodule to operate.
Formula data management function submodule is mainly responsible for management formula data information, realizes data and interface display control
System display separation.
Analytics engine function sub-modules are mainly responsible for and update data information progress to the customized measure equation of user's input
Morphology, data processing work grammer detection and parsed complete that the legitimacy of customized measure equation is detected and verified.
Configuration file parsing management function sub-modules, mainly include both sides function: the measurement in loading configuration file
Formula, and customized measure equation write-in configuration file is saved.Specifically, on the one hand which is responsible for adding
The measure equation list information and measurement item formula configuration details in configuration file are carried, provides number for formula management module
According to service;On the other hand it is responsible for protecting the legal customized measure equation information write-in configuration file of analytics engine parsing verification
It deposits, provides service for measuring system.
As it can be seen that user can input according to actual measurement demand by custom formula setup module into measuring device
Customized measure equation, project and the measurement result index item relied on measured by customized measure equation be all by with
Family is customized, so that measuring device can satisfy the measurement demand of different user.
In addition, as shown in Figure 2 B, measuring and calculating module specifically includes: measurement menu management, measurement control management, measurement work
Four function sub-modules of management are drawn in tool management, display.
Measurement menu management function submodule is mainly used for showing measure the item, is supplied to the entrance that user measures operation;
Wherein measure the item includes the customized measure equation of user and the preset measure equation of measuring device;
Measurement control management function submodule, mainly controls measurement process and measuring state;
Measuring tool management function submodule, be substantially carried out the creation of measuring tool, the control of measuring tool state and
The calculating of measurement result;
Management function submodule is drawn in display, is mainly responsible for the display process of control measuring tool, measurement result.
As it can be seen that measuring and calculating module is applied in measurement process, mainly measurement process is controlled, is specifically being surveyed
Control measuring tool obtains measurement result during amount.It should be noted that realization process about survey calculation is herein not
It repeats, sees detailed description below.
It should be noted that custom formula setup module can specifically use the setting method of following any measure equation
To realize the customized of measure equation;Measuring and calculating module specifically can realize meter using following any measurement method
It calculates.
Firstly, being illustrated to the specific implementation process of custom formula setting.Specifically, this application provides a kind of surveys
The setting method of formula is measured, this method can be applied in measuring device, it should be noted that measuring device can be a survey
Amount system.See Fig. 3, it illustrates the detailed processes of the setting method of measure equation, include the following steps S301~S303.
S301: the measure equation of user's input is obtained;Wherein measure equation is made of measurement element, and measurement element includes surveying
Measure result items, measurement index item and the calculation to measurement index item.
Wherein, the structure of measure equation mainly includes three parts, respectively measurement result item, measurement index item and to measurement
The calculation of index item.The three parts may be collectively referred to as measurement element.Wherein, it is calculated obtained by measurement result item, that is, measure equation
As a result title;Measurement index item, that is, measurement result obtains relied on parameter factor;Calculation generally includes operator
Number and/or operation function etc., indicate the calculating process to measurement index item.
By taking C=A+B as an example, what C was indicated is measurement result item, and A and B are respectively measurement index item, and+expression is to measurement
The calculation of index item A and B.Certainly, this is only one and simply illustrates, and measurement index item and calculation may be used also
To be more complicated form.
If can not just be obtained according to calculation it is understood that measurement index item cannot be calculated in measuring device
Measurement result item.Therefore, measurement index item is that measuring device can directly measure to obtain or can be based on other measurement indexes
The measurement index item that item is calculated.
User can input customized measure equation to measuring device, and input mode can be various forms, including but
It is not limited to input by character, sound, image etc..
A kind of specific input mode is to provide set interface, includes measurement result item, measurement index item in set interface
And the input control of calculation;Obtain measurement result item, the measurement index item and to survey that user is inputted by input control
The calculation of figureofmerit item.
Specifically, in order to facilitate user's input, measuring device provides set interface, includes input control in set interface
Part.Input control can be there are many form, for example, input control includes Text Entry, so that user can be by external defeated
Enter equipment input measurement element.
Alternatively, input control may include selection control, as input control includes: measurement index item option control and
Calculation option control, is provided with multiple alternative measurement index items in measurement index item option control, and user can be with
It selects therein any one or more, the operation of measurement index item is selected to be equivalent to the operation of input measurement index item.Similarly,
The input operation of calculation is also possible to the operation that user selects calculation in calculation option control.
Still it is illustrated by taking ultrasonic diagnostic equipment as an example.
Assuming that user wants to know about the case where this measurement result item of ratio of head circumference (HC) and humerus long (FL), but ultrasound
There is no configurations to obtain the corresponding measurement method of measurement result item in equipment.Therefore, the measurement knot can be obtained in order to realize
Fruit, user can be a kind of its customized measure equation, and in order to facilitate the customized measure equation of user, ultrasonic device can be aobvious
Show screen display set interface, includes equation editing frame and Formula Input Technology panel in set interface.
It include the option for each measurement index item that ultrasonic device can measure in Formula Input Technology panel,
In, it include the head circumference HC and long FL of humerus.It should be noted that the measurement index item for including in panel is that measuring device can be straight
It connects measurement to obtain or can be based on the measurement index item that other measurement index items are calculated, panel is by these measurement index items
It is supplied to user, allows the user to remove to calculate new measurement index item, new measurement index item using these measurement index items
I.e. above-mentioned measurement result item.In addition, further include having various calculations in Formula Input Technology panel, as basic operation formula+,-,
× ,/etc. and basic mathematical function sin, cos etc..
For example, user input measurement result items Ratio_HC_FL in equation editing frame at this time, and in Formula Input Technology panel
The middle selection head circumference HC and long FL of humerus and oeprator/and *.The measure equation finally entered can be with are as follows: Ratio_HC_FL=
[HC.HC'mm']/[FL.FL'mm']*100;Wherein, that HC.HC is indicated is measurement index item head circumference (i.e. perimeter) HC, FL.FL
That indicate is the long FL of measurement index item humerus.Head circumference HC being set to one in ultrasonic device, there is measurement on a large scale to refer to
Item is marked, may include multiple specific measurement index items under the measurement index item, for example, in addition to head circumference can also include head circumference
Major diameter OFD, the pregnant age GA etc. gone out by circumference calculating, what the HC.HC of user's input was indicated be head circumference lower on a large scale this have
The measurement index item of body.The meaning of FL.FL known to similarly.
The measurement index item provided in Formula Input Technology panel can wrap containing unit, in formula as measured above, single quotation marks
Interior mm indicates millimeter, is the unit of the measurement index item in same square brackets.After user selects measurement index item, unit can be with
Automatic addition.Alternatively, unit can be what user oneself was manually entered by external input device.
, can also be by it should be noted that when if user wants to modify the measurement element in some existing measure equation
It is realized according to aforesaid way.Custom formula edit mode is realized by visual edit graphical interfaces, is realized humanized
The mode of operation of simple, intuitive.
S302: the target configuration sentence that target configuration file to be generated includes is determined;Wherein target configuration sentence is used for
Indicate that target configuration file is performed how to handle the measurement element that measure equation includes.
Wherein, it after obtaining the customized measure equation of user, needs to generate configuration file according to measure equation, need in other words
Measure equation is saved in configuration file.Match it is understood that computer equipment needs to rely in actual operation
File is set, includes the relevant information of operation in configuration file, in the application scenarios of the application, the configuration file of measuring device
Middle record has how measuring device specifically executes measure equation, is just able to achieve the survey calculation purpose of measure equation.
It should be noted that configuration file is made of configuration sentence.The configuration that the configuration file of different function type includes
Statement type is different.Therefore, it is first determined measuring device needs to generate which or which configuration file, for the ease of retouching
It states, configuration file to be generated is known as target configuration file, then, it is determined that the configuration file needs of this kind of function type include
Which has configure sentence, and for ease of description, the configuration sentence that target configuration file includes is known as target configuration sentence.
When what target configuration sentence indicated is that target configuration file is measured equipment execution, how measuring device is specifically handled
The measurement element that measure equation includes.Process content may include but be not limited to: how measuring device be enable to be calculated
Measurement index item obtains measurement result item how is calculated after measurement index item, obtained measurement index item and measurement knot
How fruit item shows etc..
In order to make it easy to understand, this application provides the target configuration files of following three kinds of different function types.Specifically, exist
In practical application, measuring device can configure following three target configuration file: listing formulas configuration text according to measure equation
Part, formula details configuration file, index item detailed configuration file.
Listing formulas configuration file, for indicating how measuring device shows the measure equation being made of measurement element.
Concrete application scene is that in actual measurement, measuring device can show measure equation list, for selection by the user
It uses.What measure equation list included is all measure equations that measuring device can be realized, therefore the customized measurement of user
Formula also may be embodied in the measure equation list.The displaying process of measure equation list need to rely on listing formulas configuration
File, therefore the customized measure equation of user needs to add in configuration file.Specific adding procedure is needed in formula
The configuration sentence on how to show the customized measure equation is added in list configuration file.
Formula details configuration file, for indicating how measuring device calculates the measurement result item of measure equation.It needs
It is noted that the measurement index item title that measuring device built-in system defines may be with the customized measurement index key name of user
Claim corresponding conversion relationships that are different, therefore may include the two in the configuration file.In addition, configuration file can also include how
Show measurement result item.
Concrete application scene is, after user selects some measure equation in measure equation list, measuring device executes should
The corresponding formula details configuration file of measure equation, to obtain measurement result item.Also, according to the display side of configuration file
Formula shows measurement result item.
Index item detailed configuration file, the measurement index item for being included for indicating how to obtain measure equation.Namely
It says, which is to prepare each basic data, the measurement that basic data, that is, measure equation includes for the calculating of measure equation
Index item.Since measurement index item can be the measurement result item that other measurement index items are calculated, measurement index item
It is also assumed that being a kind of measurement result item, therefore the function of the configuration file and above-mentioned formula details configuration file is passed
Formula be it is roughly the same, it is also seen that this point from citing below.
It should be noted that the above-mentioned function of target configuration file is realized, it is based on the mesh for including in target configuration file
The function that standard configuration sets sentence is realized, therefore the function of configuration file is it is also assumed that be the function of configuring sentence.
Which measurement function measuring device needs to realize, then the corresponding configuration file of these functions can be generated.Determine to
After the configuration file of generation, it can also determine that the configuration file needs the configuration sentence for including, and can determine
Measure the rule of element composition configuration sentence.
S303: it according to the measurement element of measure equation, generates target and configures sentence, target configuration sentence is for forming target
Configuration file.
Wherein, the measurement according to the rule of measurement element composition configuration sentence, according to the step S301 measure equation obtained
Element generates target and configures sentence.Target configuration sentence can form target configuration file.
Configuration file can be various forms, such as (EXtensible Markup Language, can by text formatting, XML
Extending mark language).In the configuration file of XML format, configuration file includes node label, and the sentence that node label includes is i.e.
Configure sentence.
Three target configuration files of XML format are illustrated below.
Assuming that three target configuration files be based on above-mentioned measure equation Ratio_HC_FL=[HC.HC'mm']/
[FL.FL'mm'] * 100 and obtain.Measurement result item in the measure equation is Ratio_HC_FL, and measurement index item includes
HC.HC, FL.FL, calculation include being divided by and multiplied by 100.
The title of listing formulas configuration file are as follows: EquataionList.xml, the structure for configuring sentence are as follows:
Wherein, what<Applications>label node indicated is department, different<Applications>label nodes
What is indicated is the customized measure equation being arranged under different department.Titile that<Application>label node includes and
Name attribute respectively indicates the display name of the department and the unique identification of measuring device internal system.
<Equation>label node be specific target configure sentence, indicate be configured under same department it is each
The relevant information of a measure equation.The Type attribute that<Equation>label node includes indicates that the type of measure equation is factory
Preset or user is customized (user indicates that user is customized);File attribute indicates the detailed configuration file of the measure equation
Title, Depends attribute indicate the measurement index item that the measure equation relies on, it should be noted that measurement index item here
It is corresponding result items mark title inside the measuring system generated according to the measurement index item in measure equation;Equation mark
Label value indicates the name identification that the measure equation is shown in listing formulas.
KW_HC is the keyword for identifying some measure the item title in measuring system internal processes code, due to
In measuring system, the measurement index item and measurement result item (alternatively referred to as result index item) for including are especially more, therefore in order to
These measurement index items and measurement result item are identified in code, are carried out respectively to these measurement index items and measurement result item
Mark name, name follow the rule of " KW_+ project name ", can be convenient program in this way to multilingual support.Such as Chinese ring
Under border, only KW_HC need to be translated as head circumference in translation configuration file, it, only need to be in translation configuration file under english-speaking environment
KW_HC is translated as HC.
It should be noted that only listed in above-mentioned formula list configuration file under OB department, obstetrics Ratio_HC_FL this
The custom formula of one measurement result item, if you need to configure under customized measure equation or department, OB obstetrics under other departments other
Measure equation need to only follow configuration above rule and increase<Applicatio>and<Equation>label node.
Formula details profile name are as follows: KW_Ratio_HC_FL.xml, the profile name and above-mentioned public affairs
File attribute value in formula list configuration file is identical, indicates that formula details represented by the configuration file are above-mentioned formula
Measure equation corresponding with the file in list configuration file.The structure of the configuration sentence of formula details configuration file is such as
Under:
It wherein, include Text attribute and Display attribute in<Formula>label node.
Text attribute indicates how the value for the measurement index item head circumference HC and the long FL of humerus that measure equation is relied on passes through letter
Number is got, and how measurement result item is calculated using the value got.It should be noted that the sentence is according to user
What the measure equation of input obtained after converting according to transformation rule.It specifically, include HC.HC in the measure equation of input,
CallExternDataEx (KW_HC, KW_Arg1) be using CallExternDataEx this function from measuring device system
Obtain HC.HC, the incoming parameter KW_HC of this function is corresponding be point number before HC, KW_Arg1 is corresponding be point number after
HC.KW_HC indicates the already existing measure the item of measuring device system, and KW_Arg1 is one in this measure the item of KW_HC
Which result index item a specific result index item, specifically represent, and needs according to the corresponding configuration file of HC measurement item
Assignment in KW_HC.xml defines to determine.The meaning of CallExternDataEx (KW_FL, KW_Arg1) known to similarly.
Display attribute indicates how measure equation shows.
<ResultFormats>label node indicates the measurement result item title of customized measure equation, result unit etc.
Information.Wherein measurement result item title KW_OBRatio_HC_FL is corresponding with the title of measure equation in Text attribute above
's.
Index item detailed configuration file may include two, respectively KW_HC.xml and KW_FL.xml;With KW_
The structure of configuration sentence is illustrated for HC.xml.
In the structure of above-mentioned configuration file, the value KW_ELLIPSE of<Command>label node indicates measurement index item HC
The measuring tool of dependence is ellipse, and the Ellipse tool can be easy to calculate ellipse by acquiring its central point, major and minor axis endpoint
The perimeter KW_Arg1 and long KW_Arg2 of transverse.Wherein oval perimeters KW_Arg1 is by the KW_ in measuring device system
ELLIPSE_LCIR is got, and the long KW_Arg2 of transverse is got by the KW_ELLIPSE_MAX in measuring device system.It is logical
The definition of KW_Arg1=" KW_ELLIPSE_LCIR " this assignment is crossed it is found that < ResultFormat title=" HC " name="
The value of KW_Arg1 in KW_Arg1 " unit=" KW_MM "/> this node label is obtained from KW_ELLIPSE_LCIR, tool
Body is that the HC in the head circumference perimeter i.e. result index item obtained by image measurement technology is obtained.
It should be noted that measurement index item can be calculated by other measurement index items.<Formula>label node
Attribute Text i.e. illustrate how other measurement index items obtain from measuring device system.
<ResultFormat>label node number illustrates the number for the result index item that HC measurement index item includes
Number.Wherein:
Title attribute value illustrates the display Name of measurement index item.
Name attribute value illustrates its parameter relied on.
The value of parameter can be shifted by the formula in oval basic data and Formula label node in a kind of situation
It obtains, such as the KW_Arg3 that OFD (HC) is relied on is exactly directly to be calculated by formula KW_Arg3=2*KW_Arg2.
Parameter value needs to rely on some end value of other measurement items, such as measurement index item GA result in another case
Item relies on measurement item KW_GA, and end value is calculated by the calculation formula in Formula label node, and the calculating is public
Formula are as follows:
KW_GA=CallExternDataEx (KW_AC, KW_Arg1)/KW_Arg1.The wherein function in the calculation formula
CallExternDataEx (KW_AC, KW_Arg1) indicates the KW_Arg1 end value that AC measurement item is obtained from measuring device system,
This requires measuring device systems to save the basic data of some measuring tool.Preservation process needs pass through
What SetExternDataEx (KW_HC, KW_Arg1) was realized, it indicates to join the KW_ELLIPSE_LCIR perimeter of HC measurement item
Number KW_Arg1 is saved in memory, facilitates other measurement index item should by CallExternDataEx function call when calculating
Parameter value.
From the above technical scheme, it can be seen that this method can obtain this application provides a kind of setting method of measure equation
The measure equation of user's input, measure equation are made of measurement element, determine the configuration that target configuration file to be generated includes
Sentence, the measurement element according to measure equation generate these configuration sentences, and configuration sentence is for forming target configuration file.It can
Seeing, user can define measure equation according to the measurement demand of itself, and measuring device receives the customized measure equation of user, and
It saves it in configuration file, the called function that can realize measure equation of configuration file, so that measuring device
The measurement demand that can satisfy user's Suresh Kumar improves the widespread popularity of measuring device.
In practical applications, there may be wrong or other do not meet measuring device requirement for the measure equation of user's input
The problem of, therefore the measurement element in step S303 according to measure equation, it can also include pair before generating target configuration sentence
Measure equation carries out the step of legitimacy verifies.
Specifically, as shown in figure 4, to measure equation carry out legitimacy verifies the step of may include steps of S401~
S402。
S401: according to syntax tree building rule, the corresponding syntax tree of building measure equation.
Wherein, the corresponding syntax tree of measure equation is each measurement element that measure equation is indicated in the form of tree node.
Since tree has traversal rule, the measure equation can be restored according to traversal of tree rule.Construct the purpose of syntax tree
It is, in order to use syntax tree to verify the legitimacy of measure equation.
Specifically, building process may comprise steps of A1-A4.
A1: morphological analysis is carried out to measure equation, to extract the lexical element that measure equation includes;Wherein lexical element is used
In the lexical structure for indicating measure equation.
Wherein, firstly, analyzing using morphology resolver measure equation, lexical element is obtained.
For example, writing flex morphology resolution file according to the syntax rule of open source morphology resolver flex, then passing through
Morphology resolution file is generated morphology resolver code by flex tool, is provided with interface function, interface function in the code file
The measure equation that user inputs can be divided into independent lexical token token one by one.
Lexical token token is broadly divided into six major class, specifically includes floating number, oeprator, basic mathematical function, name
Title, measurement item unit and space newline.
It is that forms, the lexical token token such as bottom index are denoted as by [0-9]+" " [0- that floating number, which includes integer, decimal, e,
9] * ([Ee] [-+]? [0-9]+)? | " "? [0-9]+([Ee] [-+]? [0-9]+) number of regular expression matching out.Operator
Number include+,-, * ,/, ^ ,=,;, () etc. symbols, token be denoted as symbol itself.Basic mathematical function class include "
SIN ", " COS ", " TAN ", " SUM ", " MIN ", the common mathematicals function such as " MAX ", lexical token token are denoted as function itself.Name
Claim the variable name mainly relied on including measure equation, function name etc., lexical token token is denoted as by [a-zA-Z] [a-zA-Z0-
9_] * regular expression matching character string.Measurement item unit mainly includes " cm ", " m ", " mm ", " cm/s ", " m/s ", " mm/
s","cm2" all common units are waited, lexical token token is denoted as unit itself.Although space, line feed and branch end mark
It can be identified as special lexical token token, but the practical token is skipped and do not handled, is equivalent to no token.
By taking this measure equation of above-mentioned Ratio_HC_FL=[HC.HC'mm']/[FL.FL'mm'] * 100 as an example, Flex word
The measure equation is finally divided into 13 lexical token token by method resolver, be respectively as follows: Ratio_HC_FL ,=, [,
HC.HC、mm、]、/、[、FL.FL、mm、]、*、100。
A2: the syntactic type of lexical element is determined.
Specifically, syntax analyzer can be used to analyze lexical element, determines syntactic type.
For example, writing Bison syntax parsing file, and utilize according to the syntax rule of open source grammar parser Bison
Syntax parsing file generated syntax parsing code, the code file are provided with interface function by Bison tool, and interface function can be known
The lexical token token that other Flex resolver generates, and the customized grammer of user is matched, thereby executing corresponding operation.
For customized measure equation, Bison grammar parser is mainly matched: operation expression, full stop expression formula,
A few class syntactic types such as function call, parameter list, assignment statement.
Wherein between operation expression+,-, * ,/, ^, as a result still be expression formula, be grammatically recursive;Variable, number
Value belongs to termination expression, is end symbol, grammer not recurrence;Function call is shaped like function name, (, parameter list) form
C language style function call;Parameter list sentence is divided with comma, is used for function call sentence;Shaped like title ,=, expression
Formula is assignment statement.
Syntactic type corresponding to lexical element can be determined according to the method described above, by taking above-mentioned 13 lexical tokens as an example,
The corresponding syntactic type of 13 lexical tokens is as follows:
Ratio_HC_FL be formula name ,=be assignment statement, [HC.HC mm] be as a whole parameter ,/be operation
Symbol, [FL.FL mm] are that parameter, * are operator, 100 are parameter as a whole.
A3: according to the corresponding relationship in syntax tree building rule about syntactic type and node type, syntactic element is determined
Corresponding node type.
Wherein, it is previously provided with the corresponding relationship of syntactic element and syntactic type.Such as the following table 1, it illustrates corresponding relationships
An example.
Table 1
| Syntactic type | Node type |
| Integer, floating number in parameter list | Constant node: " K " |
| Measurement index item in parameter list | Title reference node: " N " |
| + ,-, * ,/, ^ operator | Corresponding operator node: "+- */^ " |
| " expression formula, expression formula " format list | Parameter list node: " L " |
| '=' assignment statement | Evaluation node: "=" |
| " SIN (expression formula) " built-in function calls | Function call node: " F " |
| " DEF (expression formula) " custom function is called | Function call node: " C " |
| Bracket, branch, line feed, space etc. | Nothing |
According to above-mentioned corresponding relationship, syntactic type can be converted to node type, what node type indicated is to be built
Syntax tree interior joint type.Node type is different, then position of the node in syntax tree is also not quite similar.
A4: according to the node type of lexical element, the syntax tree of lexical element building measure equation is used.
Wherein, according to the corresponding node type of lexical element, the measurement element in measure equation is configured to syntax tree
Node.By taking this measure equation of above-mentioned Ratio_HC_FL=[HC.HC'mm']/[FL.FL'mm'] * 100 as an example, construct
Syntax tree is as shown in Figure 5.
It should be noted that the building of syntax tree has at least two effects, first is that legitimacy verifies are carried out, second is that specifically
Execute measure equation.The detailed description of second effect may refer to the explanation about measurement process, not repeat herein.
S402: legitimacy verifies are carried out to measure equation based on syntax tree.
Wherein, since node type each in syntax tree is all derived from same base class, it can be easy to each node structure
The syntax tree built out carries out the operation such as traversal and recurrence, and realizes that the legitimacy of expression formula detects by these operations.
Specifically, legitimacy verifies include any one of following three or multinomial: grammatical soundness verification, logically true
Property verification, arithmetic unit legitimacy verifies.Syntax tree recursive traversal parsing from top to bottom since root node to building, is completed
Above three verification.
It is verified about grammatical soundness.
Wherein, the grammar parser that the detection of grammatical representation formula legitimacy can be generated by open source Bison tool is realized.If
The grammer of customized measure equation is unsatisfactory for its rule and requires, will error and throw exception prompt letter when constructing syntax tree
Breath.
It is verified about logical correctness.
Wherein, measure equation is associated with specific business, it is possible that syntactically correct but formula logic is unsatisfactory for business
In the case where demand, such as measure equation name re-defines, measure equation includes measurement index item measuring device system not
Definition, the custom function parameter in measure equation are illegal etc..Therefore, logical correctness is introduced when parsing syntax tree
Testing mechanism.
The mode of the validation verification for the measurement index item for including to measure equation name and measure equation are as follows: read measurement and set
Standby already existing measure equation and already existing measurement index item, by measure equation to be verified and already existing survey
Amount formula is compared, and the measurement index item that measure equation includes is compared with already existing measurement index item.Specifically
Implementation is as follows.
Traversal parsing listing formulas configuration file and all measurement index item information configuration files, measure equation name is delayed
There are in measurement item title array, all measurement index items are stored in result items title array.After traversing syntax tree, respectively
The measurement index item that the measure equation name and measure equation include is looked into measurement item name array and result items title array
It operates again.
If finding in measurement item title array duplicate with measure equation name, which is determined as not conforming to
Method;If not finding the measurement index item that measure equation includes in result items title array, illustrate the survey in measure equation
Figureofmerit item is undefined, and measure equation is equally determined as illegal.
For the legitimate verification mode of custom function parameter are as follows: by the tree node function node position of syntax tree
Increase a Parameter nodes, then passes through whether the sum of parameter of left and right subtree for verifying the Parameter nodes joins with increased node
Numerical value is equal, verifies to realize to function call number of parameters correctness.
About arithmetic unit legitimacy verifies.
Due to that would generally include multiple and different measurement index items in measure equation, each measurement index item may be different
Unit, these measurement index items carry out basic operation operation after, it is likely that there is meaningless unit, it is therefore desirable to unit
Legitimacy is verified.Specifically include following content.
Increase basic unit array in grammer tree node, basic unit array includes 5 elements, respectively corresponds 5 kinds of bases
Our unit (ratio and constant are without unit).Element value is the unit order in basic unit array.Basic unit type and basic
Element value comparison table in unit array is as shown in table 2.
Table 2
Derivative unit is derived by basic unit, and according to the derivation relationship between derivative flat type and basic unit
Define derivative unit array.Derivative flat type and the derivative unit array table of comparisons are as shown in table 3.
Table 3
| Derivative flat type | Derivation relationship | Array element value |
| Frequency | 1/s | {0,0,-1,0,0} |
| Speed | m/s | {1,0,-1,0,0} |
| Acceleration | m/s2 | {1,0,-2,0,0} |
| Angular speed | rad/s | {0,0,-1,1,0} |
| Angular acceleration | rad/s2 | {0,0,-2,1,0} |
| Area | m2 | {2,0,0,0,0} |
| Volume | m3 | {3,0,0,0,0} |
| Flow | m3/s | {3,0,-1,0,0} |
| Pressure | kg/m2 | {-2,1,0,0,0} |
| Pressure/time | kg/m2/s | {-2,1,-1,0,0} |
Operation rule and operation constraint are set, and are arranged between operation rule, operation constraint and the variation of unit array
Corresponding relationship, the corresponding relationship is as shown in table 4.
Table 4
Using above three table, the unit of measurement index item in measure equation is verified, whether verify legal.
It is illustrated by taking Ratio_HC_FL=[HC.HC'mm']/[FL.FL'mm'] * 100 as an example.
It is made up of [HC.HC'mm'], [FL.FL'mm'], 100 3 references operation on the right side of the formula assignment statement,
Wherein the unit of [HC.HC'mm'] and [FL.FL'mm'] two name nodes is fundamental length unit ' mm ', its corresponding unit
Array is { 1,0,0,0,0 }, when according to measurement item operation listed in table being x/y, without constraint condition, Unit array
Variation is that x and y array corresponding element subtracts each other, then Unit array will become after [HC.HC'mm']/[FL.FL'mm'] operation
For { 0,0,0,0,0 }, behind multiplied by 100, x* constant in corresponding table, this operation does not also constrain unit array,
It can continue to operation, it is still { 0,0,0,0,0 } that final array is constant, indicates that result does not have unit.
It is illustrated by taking Ration_BPD_AC=([BPD.BPD'mm']+[AC.GP'g']) * 2 as an example again.
On the right side of the formula assignment statement, the unit of [BPD.BPD'mm'] and [AC.GP'g'] two name nodes is respectively
Fundamental length unit " mm " and basis weight unit g, its corresponding units group are respectively { 1,0,0,0,0 } and { 0,1,0,0,0 },
Due to two kinds carry out be "+" method operation, by rule constraint relation table it is found that the constraint condition of x+y be x and y Unit number
Group corresponding position element needs equal, and the front two of practical two kinds of unit arrays is not identical, accordingly, it can be determined that its there are units
Validation error will lead to legitimacy verifies failure.
Complete above-mentioned verification and verification it is legal after, can generate measuring device system according to measure equation can identify
Sentence is configured, configuration file is generated.Wherein measure equation generates the contrast relationship of the configuration file of measuring device system identification such as
Shown in table 5.
Table 5
| Formula Input Technology types of variables | Transition form |
| Reference user defines measurement result item | CallUserData sentence is inserted into configuration file |
| Cited system carries measurement index item | CallExternDataEx sentence is inserted into configuration file |
| Measurement index item unit is set | ResultFormat label and Uint attribute are inserted into configuration file |
| The measurement item of bracket format | Remove bracket and unit description when in write-in configuration file |
The application generates the overall process of configuration file in order to facilitate understanding, is with input measurement formula Ratio_HC_FL
Example is illustrated.
It should be noted that KW_HC and KW_FL are the measurement index item of the system intialization in measuring device, Ratio_
HC_FL is the formula name of the customized measurement result item HC/FL of user.
Firstly, user utilizes formula panel read statement Ratio_HC_FL=[HC.HC' in customized edit box
mm']/[FL.FL'mm']*100.Then, the measure equation that user inputs is converted to KW_Ratio_HC_FL=by measuring device
[KW_HC, " mm "]/[KW_FL, " mm "] * 100.Furthermore pass through morphology parsing, syntax parsing, syntax tree building and syntax tree
After the processes such as parsing verification, above three configuration file is generated.
It is described above and how the customized measure equation of user is set, after set-up is complete, user can be used certainly
The measure equation of definition carries out actual measurement to some measurement object.Illustrate the specific mistake measured using measure equation below
Journey.It should be noted that measurement process below is not limited to can also be measurement using the customized measure equation of user
The measure equation of device systems internal preset.
See Fig. 6, it illustrates a processes of measurement method, specifically comprise the following steps S601~S605.
S601: the target measurement formula of user's input is obtained.
Wherein, the application scenarios of this method are measurement scene, rather than scene set, therefore the target measurement that user is inputted
The purpose of formula is to carry out actual measurement using the target measurement formula, rather than the target measurement formula is arranged to measurement and is set
It is standby internal.
A kind of concrete mode that user inputs target measurement formula can be, and user selects certain according to the listing formulas of offer
A measure equation target measurement formula as input.Specifically, listing formulas configuration file is executed, is matched with providing listing formulas
Set the measure equation that file includes;Selection operation based on user obtains the target measurement formula of user's selection.
It is preceding to have addressed, it include all measure equations being arranged inside measuring device in listing formulas configuration file, and public
Formula detailed configuration file is provided with these measure equations and shows according to which kind of display format.Execute listing formulas configuration file and
Measure equation can be shown to user according to the display mode configured by formula detailed configuration file.
S602: the measurement element that parsing target measurement formula includes, and determine that formula corresponding with measurement element is believed in detail
Breath configuration file and index item correspond to the detailed configuration file of measurement item;Wherein measurement element includes measurement result item, measurement
Index item and calculation to measurement index item.
Wherein, target measurement formula may include element identification, can be parsed out target measurement formula according to element identification
The measurement element for including.
According to the mark of measure equation, match corresponding with measure equation can be determined in formula details configuration file
Sentence is set, and determines the detailed configuration text of index item corresponding with the measurement index item of target measurement formula according to configuration sentence
Part.
S603: object to be measured is determined.
Wherein, under different application fields and different application scenarios, object specific manifestation form to be measured is also not to the utmost
It is identical, and determine that the mode of object to be measured is also not quite similar.
It is illustrated by taking the measurement scene of ultrasonic device as an example.Assuming that medical staff wants measurement fetus head circumference and humerus is long
Ratio, then medical staff needs to select head and humerus in the fetus image using mouse detected by ultrasonic device
Select label, the selected object, that is, object to be detected marked of user.
S604: executing formula details configuration file and index item corresponds to the detailed configuration file of measurement item, to obtain
Object to be measured is about the value of measurement index item and the value of measurement result item.
Wherein, record calculates the calculating for obtaining measurement result item using measurement index item in formula details configuration file
Mode, record has the calculating side for calculating using other measurement index items and obtaining measurement index item in index item detailed configuration file
Formula.The value of measurement index item is first calculated using second configuration file, reuses first configuration file and survey is calculated
Measure the value of result items.
It should be noted that executing second configuration file, that is, index item detailed configuration file, need using measuring tool,
Measuring tool can calculate measurement index item by the mouse selected marker behavior of user.
Specifically, index of performance item detailed configuration file obtains from configuration file and creates the measurement of measurement index item
Tool simultaneously obtains value of the object to be measured about measurement index item using measuring tool;And execute formula details configuration text
Part, to execute the value for obtaining measurement result item to the calculation formula of measurement index item according to the value of measurement index item.
More specifically, the corresponding measurement work of measuring tool information creating by being configured in index item detailed configuration file
Have (such as straight line, ellipse, trace), and matches according to survey calculation formula, result index item title, unit etc. in the configuration file
Confidence breath initializes the attributes such as formula, the result of measuring tool.
When user's mobile mouse on detecting image, mouse event information can be measured tool and capture.Measuring tool
By the changing coordinates information and starting point coordinate information and image resolution ratio of record mouse, the survey of user's selected marker is calculated
The corresponding infrastructure data of amount tool (distance of such as straight line tool, the perimeter of the Ellipse tool, area), later according to basis
The value of measurement index item is calculated in result data.
S605: the value of output measurement result item.
Wherein, the output configuration information for including according to formula details configuration file exports the measurement knot being calculated
The value of fruit.
From the above technical scheme, measurement method provided by the present application can be applied on measuring device, be based on user
Measure equation selected to use is treated test object and is measured, and exports measurement result value.It should be noted that user selects
Selecting the measure equation used can be the formula set in device systems, be also possible to the formula of the customized setting of user.
Installation practice provided by the present application is illustrated below, it should be noted that saying in relation to Installation practice
It is bright to may refer to above method embodiment, it does not repeat.
See Fig. 7, it illustrates a structural representations of the setting device of measure equation.As shown in fig. 7, the device can have
Body includes: that measure equation obtains module 701, configuration sentence determining module 702, configuration file generation module 703.
Measure equation obtains module 701, for obtaining the measure equation of user's input;Wherein measure equation is by measurement element
Composition, measurement element includes measurement result item, measurement index item and the calculation to measurement index item;
Sentence determining module 702 is configured, for determining that the target that target configuration file to be generated includes configures sentence;Its
How middle target configuration sentence handles the measurement element that measure equation includes for indicating that target configuration file is performed
Configuration file generation module 703 generates target and configures sentence, target for the measurement element according to measure equation
Configuration sentence is for forming target configuration file.
In one example, target configuration file includes any one or more in following three: listing formulas configuration
File, formula details configuration file, index item detailed configuration file;Wherein: the target configuration of listing formulas configuration file
Sentence, for indicating that target configuration file is performed the measure equation for how showing and being made of measurement element;Formula is believed in detail
The target for ceasing configuration file configures sentence, how to calculate the measurement knot of measure equation for indicating that target configuration file is performed
Fruit;The target of index item detailed configuration file configures sentence, how to calculate survey for indicating that target configuration file is performed
Measure the measurement index item of formula.
In one example, as shown in figure 8, the device further include: legitimacy verifies module 704.
Legitimacy verifies module 704, for the measurement element in foundation measure equation, before generating target configuration sentence,
Legitimacy verifies are carried out to measure equation;Wherein, carrying out legitimacy verifies to measure equation includes: according to syntax tree building rule
Then, the corresponding syntax tree of building measure equation;And legitimacy verifies are carried out to measure equation based on syntax tree.
In one example, legitimacy verifies include any one of following three or multinomial: grammatical soundness verification is patrolled
Collect correctness verification, arithmetic unit legitimacy verifies.
In one example, legitimacy verifies module 704 constructs rule, the corresponding language of building measure equation according to syntax tree
Method tree, specifically includes: legitimacy verifies module 704, for carrying out morphological analysis to measure equation, includes to extract measure equation
Lexical element;Wherein lexical element is used to indicate the lexical structure of measure equation;Determine the syntactic type of syntactic element;According to
Corresponding relationship in syntax tree building rule about syntactic type and node type, determines the corresponding node type of syntactic element;
And the node type according to syntactic element, use the syntax tree of syntactic element building measure equation.
In one example, measure equation obtains the measure equation that module 701 obtains user's input, comprising: measure equation
It obtains module 701 to be specifically used for providing set interface, includes measurement result item, measurement index item and calculation in set interface
Input control;And obtain measurement result item, measurement index item and to measurement index that user is inputted by input control
The calculation of item.
See Fig. 9, it illustrates a kind of structural representations of measuring device, and specifically include: measure equation obtains module 901, matches
Set file determining module 902, measurement object determining module 903, configuration file execution module 904, measurement result output module
905。
Measure equation obtains module 901, for obtaining the target measurement formula of user's input;
Configuration file determining module 902, the measurement element for including for parsing target measurement formula, and determination is wanted with measurement
The corresponding formula details configuration file of element and index item detailed configuration file;Wherein measurement element includes measurement result
Item, measurement index item and the calculation to measurement index item;
Measurement object determining module 903, for determining object to be measured;
Configuration file execution module 904, for executing formula details configuration file and index item detailed configuration file,
To obtain object to be measured about the value of measurement index item and the value of measurement result item;
Measurement result output module 905, for exporting the value of measurement result item.
In one example, measure equation obtains the target measurement formula that module 901 obtains user's input, comprising: measurement
Formula obtains module 901 and is specifically used for executing listing formulas configuration file, to provide the measurement that listing formulas configuration file includes
Formula;And the selection operation based on user, obtain the target measurement formula of user's selection.
In one example, configuration file execution module 904 executes formula details configuration file and index item is detailed
Configuration file, to obtain object to be measured about the value of measurement index item and the value of measurement result item, comprising: configuration file executes
Module 904 is specifically used for index of performance item detailed configuration file, to generate for obtaining the measuring tool of measurement index item and making
Value of the object to be measured about measurement index item is obtained with measuring tool;And formula details configuration file is executed, with root
The value that measurement result item is obtained to the calculation formula of measurement index item is executed according to the value of measurement index item.
Present invention also provides a kind of measuring devices, and the customized measure equation setting for inputting user is measuring
In configuration file inside equipment.The measuring device specifically includes: input equipment and processor.
Input equipment, for obtaining the measure equation of user's input;Wherein measure equation is made of measurement element, and measurement is wanted
Element includes measurement result item, measurement index item and the calculation to measurement index item;
Processor, for determining that the target that target configuration file to be generated includes configures sentence;Wherein target configures language
How sentence handles the measurement element that measure equation includes for indicating that target configuration file is performed;And according to measure equation
Measurement element, generate target and configure sentence, target configuration sentence is for forming target configuration file.
It should be noted that the specific implementation of input equipment and processor can according to the method described above in embodiment correspondence
Step is realized.
Present invention also provides a kind of measuring devices, for executing the selected measure equation of user, to measurement object into
Row measurement.The measuring device specifically includes: input equipment, processor and output equipment.
Input equipment, for obtaining the target measurement formula of user's input;
Processor, the measurement element for including for parsing target measurement formula, and determine formula corresponding with measurement element
Details configuration file and index item detailed configuration file;Wherein measurement element includes measurement result item, measurement index item
And the calculation to measurement index item;Determine object to be measured;And execute formula details configuration file and index item
Detailed configuration file, to obtain object to be measured about the value of measurement index item and the value of measurement result item;
Output equipment, for exporting the value of measurement result item.
It should be noted that the specific implementation of input equipment, processor and output equipment can be implemented according to the method described above
Correspondence step in example is realized.
The application also provides a kind of measuring device, and the function of above-mentioned two measuring device may be implemented.The measuring device packet
Include measure equation custom block and measurement module.Wherein measure equation custom block for realizing above-mentioned is used to that measurement is arranged
The function of the measuring device of formula, measurement module is for realizing the above-mentioned function for realizing the measuring device of measurement function.
A kind of concrete implementation mode of measure equation custom block is, by UI Interface Control, formula data management, public affairs
Formula analytics engine, configuration file parsing manage four function sub-modules compositions.Wherein:
UI Interface Control submodule, for showing the corresponding formula composed structure of measure equation list information, each formula, together
When be also responsible for control user newly-increased, modification, delete the relevant interaction logic of formula.
Formula data manages submodule, for managing formula data information, realizes data and interface display control display point
From.
Formula Parsing engine submodule, the formula info for inputting to user carries out morphology, grammer detection and parsing, complete
At the detection of custom formula legitimacy and verification of user's input.
Configuration file parsing management submodule, for loading formula list information and measurement item formula configuration letter in detail
Breath, provides data service for formula management module;And analytics engine parsing is verified to legal formula info write-in configuration text
Part saves, and provides service for measuring system.
A kind of concrete implementation mode of measurement module is, by measurement menu management, measurement control management, measuring tool pipe
Reason, measurement display, which are drawn, manages four function sub-modules compositions.
Measurement menu manages submodule, for showing measure the item, provides user and initiates measurement operation entry;
Measurement control management submodule, for the control of measurement process and measuring state,
Measuring tool manages submodule, based on the creation of measuring tool, the control of tool state and measurement result
It calculates;
Measurement display rendering submodule, the drafting for controlling measuring tool, measurement result refreshes and display.
Present invention also provides a kind of readable storage medium storing program for executing, are stored thereon with computer program, and computer program is processed
Device realizes the setting method of above-mentioned measure equation when executing.
Present invention also provides a kind of readable storage medium storing program for executing, are stored thereon with computer program, and computer program is processed
Device realizes above-mentioned measurement method when executing.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight
Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one
Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation
There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain
Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including above-mentioned element.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (18)
1. a kind of setting method of measure equation characterized by comprising
Obtain the measure equation of user's input;Wherein measure equation is made of measurement element, measurement element include measurement result item,
Measurement index item and calculation to the measurement index item;
Determine the target configuration sentence that target configuration file to be generated includes;Wherein the target configuration sentence is for indicating institute
It states target configuration file and is performed how to handle the measurement element that the measure equation includes;
According to the measurement element of the measure equation, the target configuration sentence is generated, the target configuration sentence is for forming
Target configuration file.
2. the setting method of measure equation according to claim 1, which is characterized in that the target configuration file include with
It is any one or more in lower three: listing formulas configuration file, formula details configuration file, index item detailed configuration
File;Wherein:
The target of the listing formulas configuration file configures sentence, how to show for indicating that the target configuration file is performed
Show the measure equation being made of measurement element;
The target of the formula details configuration file configures sentence, for indicate the target configuration file be performed as
What calculates the measurement result item of the measure equation;
The target of the index item detailed configuration file configures sentence, for indicate the target configuration file be performed how
Calculate the measurement index item of the measure equation.
3. the setting method of measure equation according to claim 1, which is characterized in that described according to the measure equation
Measurement element, before generating target configuration sentence, further includes:
Legitimacy verifies are carried out to the measure equation;
Wherein, described to include: to measure equation progress legitimacy verifies
According to syntax tree building rule, the corresponding syntax tree of the measure equation is constructed;
Legitimacy verifies are carried out to the measure equation based on the syntax tree.
4. the setting method of measure equation according to claim 3, which is characterized in that the legitimacy verifies include following
Any one of three or multinomial: grammatical soundness verification, logical correctness verification, arithmetic unit legitimacy verifies.
5. the setting method of measure equation according to claim 3, which is characterized in that described according to syntax tree building rule
Then, the corresponding syntax tree of the measure equation is constructed, comprising:
Morphological analysis is carried out to the measure equation, to extract the lexical element that the measure equation includes;The wherein morphology
Element is used to indicate the lexical structure of the measure equation;
Determine the syntactic type of institute's syntax elements;
According to the corresponding relationship in syntax tree building rule about syntactic type and node type, determine that institute's syntax elements are corresponding
Node type;
According to the node type of institute's syntax elements, the syntax tree of the measure equation is constructed using institute's syntax elements.
6. the setting method of measure equation according to claim 1, which is characterized in that the measurement for obtaining user's input
Formula, comprising:
Set interface is provided, includes the input control of measurement result item, measurement index item and calculation in the set interface;
Obtain measurement result item, the measurement index item and to the measurement index item that user is inputted by the input control
Calculation.
7. a kind of measurement method characterized by comprising
Obtain the target measurement formula of user's input;
The measurement element that the target measurement formula includes is parsed, and determines formula details corresponding with the measurement element
Configuration file and index item detailed configuration file;Wherein the measurement element includes measurement result item, measurement index item and right
The calculation of the measurement index item;
Determine object to be measured;
The formula details configuration file and the index item detailed configuration file are executed, to obtain the object to be measured
About the value of the measurement index item and the value of the measurement result item;
Export the value of the measurement result item.
8. measurement method according to claim 7, which is characterized in that the target measurement formula for obtaining user's input,
Include:
Listing formulas configuration file is executed, to provide the measure equation that the listing formulas configuration file includes;
Selection operation based on user obtains the target measurement formula of user's selection.
9. measurement method according to claim 7, which is characterized in that described to execute the formula details configuration file
And the index item detailed configuration file, to obtain value and the measurement of the object to be measured about the measurement index item
The value of result items, comprising:
The index item detailed configuration file is executed, to generate the measuring tool for obtaining the measurement index item and use institute
It states measuring tool and obtains value of the object to be measured about the measurement index item;
The formula details configuration file is executed, to execute according to the value of the measurement index item to the measurement index item
Calculation formula obtain the value of the measurement result item.
10. a kind of setting device of measure equation characterized by comprising
Measure equation obtains module, for obtaining the measure equation of user's input;Wherein measure equation is made of measurement element, is surveyed
Measuring element includes measurement result item, measurement index item and the calculation to the measurement index item;
Sentence determining module is configured, for determining that the target that target configuration file to be generated includes configures sentence;It is wherein described
How target configuration sentence handles the measurement that the measure equation includes and wants for indicating that the target configuration file is performed
Element;
Configuration file generation module generates the target configuration sentence for the measurement element according to the measure equation, described
Target configuration sentence is for forming target configuration file.
11. a kind of measuring device characterized by comprising
Measure equation obtains module, for obtaining the target measurement formula of user's input;
Configuration file determining module, the measurement element for including for parsing the target measurement formula, and the determining and measurement
The corresponding formula details configuration file of element and index item detailed configuration file;Wherein the measurement element includes measurement
Result items, measurement index item and the calculation to the measurement index item;
Measurement object determining module, for determining object to be measured;
Configuration file execution module, for executing the formula details configuration file and index item detailed configuration text
Part, to obtain the object to be measured about the value of the measurement index item and the value of the measurement result item;
Measurement result output module, for exporting the value of the measurement result item.
12. a kind of measuring device characterized by comprising
Input equipment, for obtaining the measure equation of user's input;Wherein measure equation is made of measurement element, measures element packet
Include measurement result item, measurement index item and the calculation to the measurement index item;
Processor, for determining that the target that target configuration file to be generated includes configures sentence;Wherein the target configures language
How sentence handles the measurement element that the measure equation includes for indicating that the target configuration file is performed;And foundation
The measurement element of the measure equation generates the target configuration sentence, and the target configuration sentence is for forming target configuration
File.
13. a kind of measuring device characterized by comprising
Input equipment, for obtaining the target measurement formula of user's input;
Processor, the measurement element for including for parsing the target measurement formula, and determination is corresponding with the measurement element
Formula details configuration file and index item detailed configuration file;Wherein the measurement element includes measurement result item, surveys
Figureofmerit item and calculation to the measurement index item;Determine object to be measured;And execute the formula details
Configuration file and the index item detailed configuration file, with obtain the object to be measured about the value of the measurement index item and
The value of the measurement result item;
Output equipment, for exporting the value of the measurement result item.
14. a kind of measuring system, it is characterised in that: described to make by oneself including custom formula setup module and measuring and calculating module
Adopted formula setup module provides input interface for the user of measuring device, so that user is by the input interface to the measurement
System inputs customized measure equation;The measuring and calculating module controls the measurement process of the measuring system, with
Final measurement result is obtained using measure equation.
15. measuring system according to claim 14, which is characterized in that the custom formula setup module includes:
UI Interface Control function sub-modules show data relevant to formula, and obtain the formula setting number of user's input
According to;
Formula data management function submodule is responsible for managing formula data information, realizes that data and interface display control are shown
Separation;
Analytics engine function sub-modules are responsible for the customized measure equation inputted to user and carry out legitimacy detection and verification;
Configuration file parsing management function sub-modules, the measure equation being responsible in loading configuration file, and by customized survey
Amount formula write-in configuration file is saved.
16. 4 or 15 measuring system according to claim 1, which is characterized in that the measuring and calculating module includes:
Measurement menu management function submodule, is used to show measure the item, is supplied to the entrance that user measures operation;
Measurement control management function submodule, controls measurement process and measuring state;
Measuring tool management function submodule measures the creation of tool, the control of measuring tool state and measurement knot
The calculating of fruit;
Management function submodule is drawn in display, is responsible for controlling the display process of measuring tool, measurement result.
17. a kind of measuring system comprising custom formula setup module and measuring and calculating module, it is characterised in that: it is described from
Defined formula setup module uses the setting method of the measure equation such as any one of claims 1 to 6;The survey calculation mould
Block uses the measurement method such as any one of claim 7 to 9.
18. a kind of readable storage medium storing program for executing, is stored thereon with computer program, which is characterized in that the computer program is processed
Device realizes method as described in any one of claim 1 to 9 when executing.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811481712.4A CN109582349A (en) | 2018-12-05 | 2018-12-05 | Setting method and device, the measurement method and device of measure equation |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811481712.4A CN109582349A (en) | 2018-12-05 | 2018-12-05 | Setting method and device, the measurement method and device of measure equation |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN109582349A true CN109582349A (en) | 2019-04-05 |
Family
ID=65926081
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811481712.4A Pending CN109582349A (en) | 2018-12-05 | 2018-12-05 | Setting method and device, the measurement method and device of measure equation |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109582349A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111580916A (en) * | 2020-05-11 | 2020-08-25 | 浙江同花顺智能科技有限公司 | Data processing method, device, equipment and storage medium based on client |
| CN111797619A (en) * | 2020-07-15 | 2020-10-20 | 浙江赢康医疗科技有限公司 | Device and method for automatically calculating observation items according to formula |
| CN114138248A (en) * | 2021-11-23 | 2022-03-04 | 深圳市拖拽科技有限公司 | A computing tool editing method, device and computer storage medium |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09325997A (en) * | 1996-06-05 | 1997-12-16 | Meidensha Corp | Editing system for calculation expression |
| CN1553377A (en) * | 2003-05-26 | 2004-12-08 | 珠海金山软件股份有限公司 | System and method for scientific formula visual edit |
| CN103810152A (en) * | 2013-11-11 | 2014-05-21 | 远光软件股份有限公司 | Visualized formula editor |
| CN104317477A (en) * | 2014-09-26 | 2015-01-28 | 广州金山移动科技有限公司 | Formula self-defining method and method employing self-defined formula |
| CN104408023A (en) * | 2014-11-05 | 2015-03-11 | 中国农业银行股份有限公司 | Index calculation method and index calculator |
| CN105718434A (en) * | 2014-12-23 | 2016-06-29 | 远光软件股份有限公司 | Natural language formula editing method and system |
| CN106528518A (en) * | 2016-11-28 | 2017-03-22 | 陕西理工学院 | WEB-based mathematical formula editing system and method |
-
2018
- 2018-12-05 CN CN201811481712.4A patent/CN109582349A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09325997A (en) * | 1996-06-05 | 1997-12-16 | Meidensha Corp | Editing system for calculation expression |
| CN1553377A (en) * | 2003-05-26 | 2004-12-08 | 珠海金山软件股份有限公司 | System and method for scientific formula visual edit |
| CN103810152A (en) * | 2013-11-11 | 2014-05-21 | 远光软件股份有限公司 | Visualized formula editor |
| CN104317477A (en) * | 2014-09-26 | 2015-01-28 | 广州金山移动科技有限公司 | Formula self-defining method and method employing self-defined formula |
| CN104408023A (en) * | 2014-11-05 | 2015-03-11 | 中国农业银行股份有限公司 | Index calculation method and index calculator |
| CN105718434A (en) * | 2014-12-23 | 2016-06-29 | 远光软件股份有限公司 | Natural language formula editing method and system |
| CN106528518A (en) * | 2016-11-28 | 2017-03-22 | 陕西理工学院 | WEB-based mathematical formula editing system and method |
Non-Patent Citations (1)
| Title |
|---|
| 李喜强: "《基础医学实验与指导 上》", 31 December 2007, 西北工业大学出版社 * |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111580916A (en) * | 2020-05-11 | 2020-08-25 | 浙江同花顺智能科技有限公司 | Data processing method, device, equipment and storage medium based on client |
| CN111797619A (en) * | 2020-07-15 | 2020-10-20 | 浙江赢康医疗科技有限公司 | Device and method for automatically calculating observation items according to formula |
| WO2022011837A1 (en) * | 2020-07-15 | 2022-01-20 | 浙江赢康医疗科技有限公司 | Device and method for automatically calculating observation items according to formulas |
| CN111797619B (en) * | 2020-07-15 | 2024-04-09 | 联赢佳士比医疗科技(浙江)股份有限公司 | Device and method for automatically calculating observation items according to formulas |
| CN114138248A (en) * | 2021-11-23 | 2022-03-04 | 深圳市拖拽科技有限公司 | A computing tool editing method, device and computer storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Lin et al. | DSMDiff: a differentiation tool for domain-specific models | |
| US8086955B2 (en) | Methods and apparatus for modifying process control data | |
| CN109637602B (en) | Medical data storage and query method, device, storage medium and electronic device | |
| CN109582349A (en) | Setting method and device, the measurement method and device of measure equation | |
| US20160306736A1 (en) | Translation verification testing | |
| CN101872313A (en) | Method for developing functional reconfigurable intelligent controllable virtual instrument | |
| CN107679051B (en) | Transaction system error-detecting method and device | |
| JPH06266813A (en) | Data collecting device and method for collecting and inputting data and requirement from plurality of user for constructing process-model and data-model | |
| US20060136864A1 (en) | Apparatus and method for product-line architecture description and verification | |
| CN116842042A (en) | Universal method, device, electronic equipment and storage medium for dissimilating database | |
| CN112966118A (en) | Operation and maintenance knowledge map construction method | |
| CN101714083A (en) | Method and device for generating application menu and application system | |
| KR20150092880A (en) | Method and Apparatus for Re-Configuring Design Decisions after Developing Graphic User Interface | |
| CN106445824B (en) | A kind of interface synthesis management system of based role | |
| CN114416531A (en) | A test data generation method, device, equipment and medium | |
| CN110287429A (en) | Data analysis method, device, equipment and storage medium | |
| CN109408502A (en) | A kind of data standard processing method, device and its storage medium | |
| CN104102468B (en) | A kind of Network Analyzer formula editors and its datagraphic display methods and device | |
| CN110286882B (en) | Foreground system design and verification method based on model detection | |
| CN103810292A (en) | Method and device for configuring graphical interface | |
| CN109086985A (en) | Professional test information management system towards spacecraft | |
| CN119887112A (en) | On-line examination system and method for engineering drawing | |
| Zhu et al. | Research on a BIM Model Quality Compliance Checking Method Based on a Knowledge Graph | |
| CN104579743B (en) | A kind of method and system of telecommunication apparatus remote maintenance | |
| US20190087415A1 (en) | Automatic translation of string collections |
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: 20190405 |