Voice control system and method applied to measuring instrument

文档序号:9782 发布日期:2021-09-17 浏览:40次 中文

1. A speech control system applied to a measuring instrument is characterized in that: the system comprises a voice data processing module, a voice command analysis module, a parameter processing module and a remote control sending module;

the voice data processing module is configured to convert voice information into text information, convert the voice information into native text information by means of third-party voice service, and process the native text information, wherein the processing comprises extracting numerical characters, eliminating punctuation marks and conversion predicates, and splitting and processing the native text information into text information convenient for voice command analysis, and the text information comprises command information and numerical information;

the voice command analysis module is configured to match the input text information with the voice keyword information in the mapping table one by one, generally find a plurality of options with high matching degree, only reserve the first three options and output the parameter IDs of the three options; if no matching item can be found, returning an error and prompting the user that the input can not be identified again;

the parameter processing module is configured to extract command parameters from the text information output by the voice data processing module according to the parameter information corresponding to the parameter ID; finally outputting a complete SCPI command;

and the remote control sending module is configured to send the complete SCPI command to the target instrument, and the complete SCPI command can be sent by adopting a network SOCKET and can also be sent by calling an existing VISA library interface.

2. The voice control system applied to the measuring instrument according to claim 1, wherein: aiming at the requirement of instrument parameter resources, the instrument parameter resources are divided into five categories of integer parameters, floating point parameters, discrete parameters, character string parameters and event parameters; and defining a set of data resource logic structure for different types of instrument parameters:

the shaping parameter is used for representing an externally open shaping control interface of the measuring instrument;

the floating point parameter is used for representing a floating point type interface which is opened to the outside by the measuring instrument;

the discrete parameters are used for representing the switch type and the multi-selection type interfaces which are opened by the measuring instrument;

the character string parameter is used for representing a character string type interface which is opened by the measuring instrument;

and the event parameter is used for representing the trigger or execution type interface which is opened to the outside by the measuring instrument.

3. The voice control system applied to the measuring instrument according to claim 2, wherein: the integer parameter data structure includes 1) default values: default values for storing interface data; 2) minimum value: a minimum value for storing interface data; 3) maximum value: a maximum value for storing interface data; 4) SCPI command: for storing SCPI commands associated with this parameter; 5) voice keywords: for storing speech keywords associated with this parameter.

4. The voice control system applied to the measuring instrument according to claim 2, wherein: the floating point type parameter data structure includes 1) default values: default values for storing interface data; 2) minimum value: a minimum value for storing interface data; 3) maximum value: a maximum value for storing interface data; 4) SCPI command: for storing SCPI commands associated with this parameter; 5) voice keywords: for storing speech keywords associated with this parameter.

5. The voice control system applied to the measuring instrument according to claim 2, wherein: the discrete parameter data structure includes 1) default values: default values for storing interface data; 2) minimum value: a minimum value for storing interface data; 3) maximum value: a maximum value for storing interface data; 4) the value mapping table comprises: for the values of the discrete data, the values can be numerical values such as 0 and 1, and can also be meaningful character strings including OFF, ON, OFF, internal, external, manual and automatic, and the mapping table stores the mapping from the meaningful character strings to the actual numerical values; 5) SCPI command: for storing SCPI commands associated with this parameter; 6) voice keywords: for storing speech keywords associated with this parameter.

6. The voice control system applied to the measuring instrument according to claim 2, wherein: the event-type parameter data structure includes 1) the SCPI command: for storing SCPI commands associated with this parameter; 2) voice keywords: for storing speech keywords associated with this parameter.

7. A voice control method applied to a measuring instrument is characterized in that: the voice control system applied to the measuring instrument according to claim 1, comprising the steps of:

step 1: performing voice data processing on the voice information through a voice data module, and converting the voice information into text information;

step 2: performing voice command analysis on the text information through a voice command analysis module, and outputting a parameter ID corresponding to the voice command;

and step 3: the parameter processing module extracts and processes a parameter part in the voice command according to the parameter information and outputs a complete SCPI command;

and 4, step 4: and the remote control sending module sends the complete SCPI command to the target machine to complete the control of the target instrument.

8. The voice control method applied to the measuring instrument according to claim 7, wherein: the text information, also called a voice command, contains a command part and a parameter part.

9. The voice control method applied to the measuring instrument according to claim 8, wherein: in step 3, the method specifically comprises the following steps:

step 3.1: intercepting a command part of a head area from a voice command by utilizing a voice keyword lexicon;

step 3.2: searching out an SCPI command associated with the voice command through a mapping table of the voice command keyword and the SCPI command, and extracting a parameter part in the voice command according to an instrument parameter resource type associated with the SCPI command; the extraction of the parameter part in the voice command depends on the command part;

step 3.3: and splicing the SCPI command and the processed parameter part into a complete SCPI command.

Background

In order to realize remote control of the measuring instruments, most measuring instruments currently provide a remote control interface so that a user can remotely operate the measuring instruments through programming, and most measuring instruments provide a programming interface conforming to the SCPI command specification.

Users typically need to learn the basic knowledge of SCPI Commands by learning IEEE Standard 488.1-1987, IEEE Standard Digital Interface for Programmable instrumentation, N.Y., 1998, and IEEE Standard 488.2-1992, IEEE Standard Codes, Formats, Protocols and Command Commands for Use with ANSI/IEEE Standard 488.1-1987, N.Y., N.1998, and then consult the Programming Manual provided by the instrumentation, understand the function and parameter settings of each SCPI Command, and screen out Commands related to their own measurement tasks, and finally send control Commands to the remote instrumentation through a Command input tool provided by the terminal, or program a dedicated programmer to complete the control of the remote instrumentation.

In the prior art, the operation of the remote measuring instrument is completed through a remote control command, namely an SCPI command.

Firstly, the specification of the SCPI command is quite strict, the content of the SCPI command is obscure and difficult to understand, and a user needs to spend a certain time to master the command, such as the command for setting an EXTernal TRIGger SOURce of a measuring instrument [: SOURCE ]: STREAm: ABORt: TRIGger: EXTERNAL: SOURCETRIGger [1] | TRIGger2| … | TRIGger14| STRobe', which is defined according to the specification of the SCPI command. The SCPI command specification defines a series of contents such as command type, command syntax, command tree, command parameters and command response, which is too costly for a common user to learn.

Secondly, with the continuous enhancement of the functions of the measuring instruments, the programming interface provided by the measuring instruments, namely, the SCPI commands, is increased explosively, the programming manual provided for the user is hundreds of pages, the user needs to learn the programming manual provided by the measuring instrument manufacturer besides mastering the specifications of the SCPI commands, in addition, different measuring instruments completing the same function are possibly provided by different manufacturers, the SCPI commands of different manufacturers are not compatible in common conditions, and therefore, great inconvenience is brought to the use of the user, and the popularization and the use of the measuring instruments are not facilitated.

In order to complete the operation of the remote measuring instrument in the prior art, a user needs to master the SCPI command specification firstly, because the remote programming interfaces provided by the instrument are all based on the SCPI command specification, the learning of the SCPI command specification has high requirements on the user and has more related knowledge; secondly, a user needs to learn a programming manual provided by the measuring instrument to master the function of each command and the configuration of related parameters; finally, the user finds out relevant commands and configuration parameters meeting the needs of the user from the SCPI commands, and then sends control commands to the remote measuring instrument through a command input tool provided by the terminal, or a programmer works out a special program to complete the control of the remote measuring instrument. The existing technology requires a great deal of manpower and time for users to learn the programming manual provided by the SCPI command specification and the measuring instrument, which undoubtedly increases the use cost of the users.

Disclosure of Invention

Aiming at the technical problems in the prior art, the invention provides the voice control system and the voice control method applied to the measuring instrument, which are reasonable in design, overcome the defects of the prior art and have good effects.

In order to achieve the purpose, the invention adopts the following technical scheme:

a voice control system applied to a measuring instrument comprises a voice data processing module, a voice command analysis module, a parameter processing module and a remote control sending module;

the voice data processing module is configured to convert voice information into text information, convert the voice information into native text information by means of third-party voice service, and process the native text information, wherein the processing comprises extracting numerical characters, eliminating punctuation marks and conversion predicates, and splitting and processing the native text information into text information convenient for voice command analysis, and the text information comprises command information and numerical information;

the voice command analysis module is configured to match the input text information with the voice keyword information in the mapping table one by one, generally find a plurality of options with high matching degree, only reserve the first three options and output the parameter IDs of the three options; if no matching item can be found, returning an error and prompting the user that the input can not be identified again;

the parameter processing module is configured to extract command parameters from the text information output by the voice data processing module according to the parameter information corresponding to the parameter ID;

for integer parameters and floating point parameters, the parameter information corresponds to numerical value information in the text information, and only the numerical value information needs to be converted into corresponding integer and floating point numbers; for discrete parameters, matching the discrete value mapping table with text information one by one to find appropriate discrete character information, and then converting the discrete character information into discrete values; for the event parameters, no processing is needed, because the parameters are only used for triggering and do not carry data, and a complete SCPI command is finally output by the parameter processing module through processing the parameter data;

and the remote control sending module is configured to send the complete SCPI command to the target instrument, and the complete SCPI command can be sent by adopting a network SOCKET and can also be sent by calling an existing VISA library interface.

Preferably, aiming at the requirement of instrument parameter resources, the instrument parameter resources are divided into five categories of integer parameters, floating point parameters, discrete parameters, character string parameters and event parameters; and defining a set of data resource logic structure for different types of instrument parameters:

the shaping parameter is used for representing an externally open shaping control interface of the measuring instrument;

the floating point parameter is used for representing a floating point type interface which is opened to the outside by the measuring instrument;

the discrete parameters are used for representing the switch type and the multi-selection type interfaces which are opened by the measuring instrument;

the character string parameter is used for representing a character string type interface which is opened by the measuring instrument;

and the event parameter is used for representing the trigger or execution type interface which is opened to the outside by the measuring instrument.

Preferably, the integer parameter data structure includes 1) default values: default values for storing interface data; 2) minimum value: a minimum value for storing interface data; 3) maximum value: a maximum value for storing interface data; 4) SCPI command: for storing SCPI commands associated with this parameter; 5) voice keywords: for storing speech keywords associated with this parameter.

Preferably, the floating point type parameter data structure includes 1) default values: default values for storing interface data; 2) minimum value: a minimum value for storing interface data; 3) maximum value: a maximum value for storing interface data; 4) SCPI command: for storing SCPI commands associated with this parameter; 5) voice keywords: for storing speech keywords associated with this parameter.

Preferably, the discrete parameter data structure includes 1) default values: default values for storing interface data; 2) minimum value: a minimum value for storing interface data; 3) maximum value: a maximum value for storing interface data; 4) the value mapping table comprises: for the values of the discrete data, the values can be numerical values such as 0 and 1, and can also be meaningful character strings including OFF, ON, OFF, internal, external, manual and automatic, and the mapping table stores the mapping from the meaningful character strings to the actual numerical values; 5) SCPI command: for storing SCPI commands associated with this parameter; 6) voice keywords: for storing speech keywords associated with this parameter.

Preferably, the event-type parameter data structure includes 1) the SCPI command: for storing SCPI commands associated with this parameter; 2) voice keywords: for storing speech keywords associated with this parameter.

In addition, the invention also provides a voice control method applied to the measuring instrument, which adopts the voice control system applied to the measuring instrument, and specifically comprises the following steps:

step 1: performing voice data processing on the voice information through a voice data module, and converting the voice information into text information;

step 2: performing voice command analysis on the text information through a voice command analysis module, and outputting a parameter ID corresponding to the voice command;

and step 3: the parameter processing module extracts and processes a parameter part in the voice command according to the parameter information and outputs a complete SCPI command;

and 4, step 4: and the remote control sending module sends the complete SCPI command to the target machine to complete the control of the target instrument.

Preferably, the text information, also called voice command, contains a command part and a parameter part.

Preferably, in step 3, the method specifically comprises the following steps:

step 3.1: intercepting a command part of a head area from a voice command by utilizing a voice keyword lexicon;

step 3.2: searching out an SCPI command associated with the voice command through a mapping table of the voice command keyword and the SCPI command, and extracting a parameter part in the voice command according to an instrument parameter resource type associated with the SCPI command; the extraction of the parameter part in the voice command depends on the command part;

step 3.3: splicing the SCPI command and the processed parameter part into a complete SCPI command

Preferably, the first and second electrodes are formed of a metal,

the invention has the following beneficial technical effects:

aiming at the requirement of instrument parameter resources, the invention classifies the instrument parameter resources and defines a set of resource logic structure, thereby laying the foundation of voice conversion;

the method for converting the voice information into the SCPI command provided by the invention does not depend on any operating system platform, so that the method can be applied to various terminals and is beneficial to popularization and use of measuring instruments.

Drawings

FIG. 1 is a flow chart of the method of the present invention.

Fig. 2 is an expanded schematic view.

Detailed Description

The invention is described in further detail below with reference to the following figures and detailed description:

according to the method, through the requirement of collecting instrument parameter resources, the instrument parameter resources are abstracted into five categories, namely integer parameters, floating point parameters, discrete parameters, character string parameters and event parameters, a set of data resource logic structure is defined for different types of instrument parameters, and the association between a remote control command (SCPI command) and a voice keyword is established on the set of data resource logic structure. The invention also provides a voice control method, which uses a third party service to convert the voice data received by the terminal into text information, the text information is also called a voice command, and the text information comprises a command part and a parameter part, the extraction of the parameter part depends on the command part, so that firstly, the command part of the head area is intercepted from the voice command by using a voice keyword thesaurus, then, the SCPI command and the instrument parameter resource type which are related to the command are searched through a mapping table of a remote control command (SCPI command) and the voice keyword, the parameter part is extracted and converted according to the instrument parameter resource type which is related to the command, then, the SCPI command and the processed parameters are spliced into a complete SCPI command, and finally, the complete SCPI command is sent to a target instrument through a network to complete the voice control of the measuring instrument. The technical scheme of the invention comprises instrument parameter resource logic structure definition and a voice control method of a remote measuring instrument.

Aiming at the requirement of instrument parameter resources, the invention divides the instrument parameter resources into integer parameters, floating point parameters, discrete parameters, character string parameters and event parameters. The integral parameter is used for representing an integral control interface which is opened by the measuring instrument to the outside, the floating point parameter is used for representing a floating point interface which is opened by the measuring instrument to the outside, the discrete parameter is used for representing a switch type interface which is opened by the measuring instrument to the outside and a multi-selection type interface, the character string data type is used for representing a character string type interface which is opened by the measuring instrument to the outside, and the event parameter is used for representing a trigger or execution type interface which is opened by the measuring instrument to the outside. The integer parameter data structure includes 1) default values: default values for storing interface data; 2) minimum value: a minimum value for storing interface data; 3) maximum value: a maximum value for storing interface data; 4) SCPI command: for storing SCPI commands associated with this parameter; 5) voice keywords: for storing speech keywords associated with this parameter. The floating point type parameter data structure includes 1) default values: default values for storing interface data; 2) minimum value: a minimum value for storing interface data; 3) maximum value: a maximum value for storing interface data; 4) SCPI command: for storing SCPI commands associated with this parameter; 5) voice keywords: for storing speech keywords associated with this parameter. The discrete parameter data structure includes 1) default values: default values for storing interface data; 2) minimum value: a minimum value for storing interface data; 3) maximum value: a maximum value for storing interface data; 4) the value mapping table comprises: the value of the discrete data can be a numerical value such as 0 and 1, or a meaningful character string such as OFF, ON, OFF, internal, external, manual, automatic and the like, and the meaningful character string is just the mapping from the meaningful character string to the actual numerical value stored in the value mapping table; 5) SCPI command: for storing SCPI commands associated with this parameter; 6) voice keywords: for storing speech keywords associated with this parameter. The event-type parameter data structure includes 1) the SCPI command: for storing SCPI commands associated with this parameter; 2) voice keywords: for storing speech keywords associated with this parameter.

The default, minimum and maximum values stored in the instrument parameters are used for analyzing the parameter part later, and are mainly used for converting literal words into specific numerical values. The value mapping table in the discrete parameter is also used for analyzing the parameter part, for example, in the voice command of setting the radio frequency output to be on, the parameter part is on, and the parameter part can be used after being converted into a specific numerical value of 1. The voice keywords and the SCPI commands in the instrument parameters are used to build a mapping table from the voice keywords to the SCPI commands.

In summary, the logic structure defined for different types of instrument parameters in the present invention includes necessary information for analyzing the voice command, which is the basis of the technical solution of the present invention.

The voice control method of the remote measuring instrument provided by the invention comprises four parts of voice data processing, voice command analysis, parameter processing and remote control sending. The general scheme design of the method is shown in figure 1: the voice information is converted into text information after being processed by voice data, the text information can output a parameter ID corresponding to the voice command after being analyzed by the voice command, the parameter processing module extracts and processes a parameter part in the voice command according to the parameter information, outputs a complete SCPI command, and sends the complete SCPI command to the target machine through remote control, so that the control of a target instrument is completed.

The module converts the voice information into native text information by means of third-party voice service, processes the native text information, including extracting numerical characters, eliminating punctuation marks, converting predicates, and splitting the native text information into text information convenient for voice command analysis, including command information and numerical information.

The voice command analysis matches the input text information with the voice keyword information in the mapping table one by one, and normally finds a plurality of options with higher matching degree, only the first three options are reserved, and the parameter IDs of the three options are output. If no matching item can be found, an error is returned and the user is prompted to re-input the input which cannot be identified. The voice command mapping table used by the voice command parsing module is as follows:

TABLE 1 mapping table

Voice keyword Parameter ID SCPI Command
Frequency of PID_FREQ :FREQ
Power of PID_POWER :POW
Amplitude modulation state PID_AM :AM:STATE

The voice keyword may be a noun or a mobin phrase, and may also include a numerical value, but may not only include a numerical value, the parameter ID is an integer number, that is, an index of a storage location of the instrument parameter in the memory, and the SCPI command may be in a short format or a full format.

The parameter processing module has the main functions of extracting command parameters from the text information output by the voice data processing module according to the parameter information corresponding to the parameter ID, and for integer parameters and floating point parameters, the parameter information corresponds to numerical value information in the text information, and only the numerical value information needs to be converted into corresponding integer numbers and floating point numbers; for discrete parameters, the discrete value mapping table is matched with text information one by one to find appropriate discrete character information, and then the discrete character information is converted into discrete values, such as 0, 1, 2, 3 and the like; for event parameters, no processing is required, since such parameters are only used for triggering and do not carry data. After processing the parameter data, the parameter processing module finally outputs a complete SCPI command.

The command sending module has the main function of sending the complete SCPI command to a target instrument, can send the SCPI command by adopting a network SOCKET, and can also call a ready-made VISA library interface for sending, and in short, the module does not need to be designed and can be directly borrowed.

In summary, the present invention abstracts the instrument parameter resources into four categories, and defines a set of data resource logical structure for different types of parameters, which contains necessary information required by the analysis of voice commands, and is the basis of the technical solution of the present invention. Meanwhile, the invention provides a method for converting voice information into an SCPI command, thereby realizing voice control on a remote measuring instrument.

The method for classifying instrument parameter resources, defining data resource logic structure and converting voice information into SCPI commands is not associated with any operating system platform, and the voice control of the remote measuring instrument can be realized by using the programming language related to the platform for different operating system platforms. An extension of the invention is shown in figure 2.

It is to be understood that the above description is not intended to limit the present invention, and the present invention is not limited to the above examples, and those skilled in the art may make modifications, alterations, additions or substitutions within the spirit and scope of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种5G智慧杆

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!