CN112767933B - Voice interaction method, device, equipment and medium of highway maintenance management system - Google Patents

Voice interaction method, device, equipment and medium of highway maintenance management system Download PDF

Info

Publication number
CN112767933B
CN112767933B CN202011527765.2A CN202011527765A CN112767933B CN 112767933 B CN112767933 B CN 112767933B CN 202011527765 A CN202011527765 A CN 202011527765A CN 112767933 B CN112767933 B CN 112767933B
Authority
CN
China
Prior art keywords
instruction
character string
rule
matching
voice
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.)
Active
Application number
CN202011527765.2A
Other languages
Chinese (zh)
Other versions
CN112767933A (en
Inventor
侯芸
张艳红
董元帅
洪海
闫旭亮
樊永伟
田佳磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Checsc Highway Maintenance And Test Technology Co ltd
China Highway Engineering Consultants Corp
Original Assignee
Checsc Highway Maintenance And Test Technology Co ltd
China Highway Engineering Consultants Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Checsc Highway Maintenance And Test Technology Co ltd, China Highway Engineering Consultants Corp filed Critical Checsc Highway Maintenance And Test Technology Co ltd
Priority to CN202011527765.2A priority Critical patent/CN112767933B/en
Publication of CN112767933A publication Critical patent/CN112767933A/en
Application granted granted Critical
Publication of CN112767933B publication Critical patent/CN112767933B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue

Abstract

The invention provides a voice interaction method, a voice interaction device, electronic equipment and a storage medium of a highway maintenance management system. The voice interaction method comprises the following steps: acquiring a voice instruction; recognizing a voice instruction to obtain a character string instruction; matching the character string instruction with the instruction rules in the interactive instruction rule base; and when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base, informing the highway maintenance management system to execute the voice instruction. According to the voice interaction method, voice interaction of various operations of the highway maintenance management system is achieved through steps of voice acquisition, voice recognition, rule matching, response execution and the like, so that the interaction process in the highway maintenance management system is more convenient and efficient, and user experience is remarkably improved.

Description

Voice interaction method, device, equipment and medium of highway maintenance management system
Technical Field
The invention relates to the technical field of highway maintenance, in particular to a voice interaction method, a voice interaction device, electronic equipment and a storage medium of a highway maintenance management system.
Background
In recent years, highway construction in China rapidly develops, and highway networks are fully paved. The daily inspection maintenance of the highway is an important link for maintaining the use quality of the highway after the highway is built. As road mileage increases, maintenance detection and management workload also increases dramatically.
At present, the construction of a highway maintenance management system based on information technologies such as a geographic information system GIS, a building information model BIM, the Internet of things and an unmanned aerial vehicle becomes normal, and a great deal of work is developed around the management system. The technical contents disclosed in the patent application of the invention with the application number of 201810992856.X, the publication number of CN109145074A and the name of an ArcGIS-based common highway maintenance engineering management system, the patent application with the application number of 201610720540.6, the publication number of CN106408678A and the name of a highway maintenance inspection system and a method thereof, the patent application with the application number of 201911041343.1, the publication number of CN110942589A and the name of an intelligent highway maintenance operation system and other documents can be referred to.
However, the existing highway maintenance management systems all adopt the traditional information interaction modes such as a mouse, a keyboard and the like, and have remarkable defects in use convenience. For example, to view information about a road maintenance facility, it is often necessary to perform multiple filtering from a multi-layer list, or manually enter the road maintenance facility name in a search box, and then click on an associated button to find the facility. Especially for provincial management units, when the data amount is large or the system functions are complex, the traditional man-machine interaction mode is especially low-efficiency, so that the requirements of the management units on quick interaction of data in any dimension and level in the management range are difficult to meet, and poor user experience is also easily caused.
Disclosure of Invention
The invention provides a voice interaction method and a voice interaction device of a highway maintenance management system, corresponding electronic equipment and a non-transitory computer readable storage medium, which are used for solving the technical problems of inconvenient information interaction operation, low efficiency and the like of the highway maintenance management in the prior art and realizing more convenient and efficient interaction operation in the highway maintenance management.
In a first aspect, the present invention provides a voice interaction method for a highway maintenance management system, including the following steps:
acquiring a voice instruction;
recognizing a voice instruction to obtain a character string instruction;
matching the character string instruction with the instruction rules in the interactive instruction rule base;
and when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base, informing the highway maintenance management system to execute the voice instruction.
The voice interaction method provided by the invention further comprises the following steps:
before the voice instruction is acquired, an interactive instruction rule base is pre-established, and each instruction rule in the interactive instruction rule base at least comprises an instruction type, and optionally comprises an operation range and/or an execution condition.
According to the voice interaction method provided by the invention, the character string instruction is matched with the instruction rule in the interaction instruction rule base, and the voice interaction method specifically comprises the following steps:
matching the character string instruction with the instruction types in each instruction rule;
if the instruction type is successfully matched, eliminating the instruction type in the character string instruction;
if the instruction rule with successful instruction type matching only comprises the instruction type and the character string instruction after the instruction type is removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
The voice interaction method provided by the invention further comprises the following steps:
if the instruction rule of successful instruction type matching contains not only the instruction type or the character string instruction after the instruction type is removed is not empty, matching the character string instruction after the instruction type is removed with the operation range supported by the instruction type which is successfully matched;
if the operation range is successfully matched, continuing to reject the operation range in the character string instruction;
if the instruction rule with the successfully matched operation range does not contain an execution condition and the character string instruction after the instruction type and the operation range are removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base; or alternatively
If the instruction rule with successful operation range matching contains an execution condition or the character string instruction after the instruction type and the operation range are removed is not null, matching the character string instruction after the instruction type and the operation range with the execution condition supported by the instruction type with successful matching;
if the execution condition is successfully matched, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
The voice interaction method provided by the invention further comprises the following steps:
if the voice command fails to match any one of the command type, the operation range and the execution condition, the operation is stopped and the voice command cannot be executed.
The voice interaction method provided by the invention further comprises the following steps:
each instruction rule in the interactive instruction rule base is converted into a regular expression, wherein the regular expression at least comprises fixed fields and optionally variable fields, the fixed fields correspond to the instruction types, and the variable fields correspond to the operation range and the execution conditions.
According to the voice interaction method provided by the invention, wherein,
the voice command is identified locally or transmitted to the cloud for execution.
In a second aspect, the present invention further provides a voice interaction device of a highway maintenance management system, including:
the acquisition module is used for acquiring the voice instruction;
the recognition module is used for recognizing the voice command to obtain a character string command;
the matching module is used for matching the character string instruction with the instruction rules in the interactive instruction rule base;
and the notification module is used for notifying the highway maintenance management system to execute the voice instruction when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule library.
In a third aspect, the present invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the voice interaction method of the highway maintenance management system as any one of the above when executing the computer program.
In a fourth aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the voice interaction method of a highway maintenance management system as described in any of the above.
According to the voice interaction method, the voice interaction device, the electronic equipment and the computer readable storage medium of the highway maintenance management system, the command in the form of the character string is obtained through the command in the form of the acquired voice, the command is matched with the command rule in the rule base, and the command is executed by the highway maintenance management system when the matching is successful, so that the convenience of using the highway maintenance management system is improved, the rapid interaction requirement of data in any dimension and any level can be met even when the data volume is large or the system function is complex, the more convenient and efficient interaction operation in the highway maintenance management is realized, and the user experience is remarkably improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or of the prior art, the following description will make a brief introduction to the drawings used as required in the description of the embodiments or of the prior art. It will be apparent to those of ordinary skill in the art that the drawings in the following description are a part of the embodiments of the invention and that other drawings may be derived from them without undue effort.
FIG. 1 is a flowchart of a voice interaction method of a highway maintenance management system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a matching step in a voice interaction method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a voice interaction device of a highway maintenance management system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a voice interaction method of a highway maintenance management system, which is shown in fig. 1 and comprises the following steps:
step 101, obtaining a voice instruction;
when a user issues a voice command, the voice command may be acquired through a microphone or any other device suitable for pickup.
The voice command is a piece of audio, and the audio file can be stored in wav, mp3 or any other audio format suitable for processing by a processor.
Step 102, recognizing a voice instruction to obtain a character string instruction;
the speech recognition may be performed by an existing recognition engine, such as a hundred degree speech recognition engine, a mass flow recognition engine, or any other speech recognition engine suitable for the method of the present invention. After recognition of a voice command, a corresponding text string is returned, for example, "show G6 high speed bridge".
Although described above by taking a chinese speech input as an example, the present invention is not limited thereto, but may be applied to any language.
Step 103, matching the character string instruction with the instruction rule in the interactive instruction rule base;
based on natural language processing and rule matching technology, matching the text character string obtained by recognizing the voice instruction with the instruction rule in the interactive instruction rule base. For example, the instruction rules may be converted into the form of regular expressions, matching text strings with the regular expressions of the individual instruction rules. A regular expression (Regular Expression) is a logical formula comprising common characters and special characters, which can describe, filter character strings conforming to a certain syntactic rule using predefined text rules.
And 104, notifying the highway maintenance management system to execute the voice instruction when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
If the text character string is 100% matched with a certain instruction rule, the matching is judged to be successful, and a message of successful matching is notified to the highway maintenance management system so that an operation corresponding to the voice instruction is executed in the highway maintenance management system.
After the execution operation is started or finished, the execution state or the execution result can be fed back, for example, the operation process is displayed on the man-machine interaction interface in real time by adopting a display module, or the execution result is notified to the user through voice by adopting a voice module.
According to the method and the system, the voice interaction process of each operation of the highway maintenance management system is achieved through the steps of voice acquisition, voice recognition, rule matching, response execution and the like, and compared with the prior art, the interactive operation of the highway maintenance management system is optimized, the convenience in use of the highway maintenance management system is effectively improved, and therefore user experience is remarkably improved.
Based on the foregoing embodiment, in the voice interaction method of the highway maintenance management system of the present embodiment, the voice interaction method further includes: before the voice instruction is acquired, an interactive instruction rule base is pre-established, and each instruction rule in the interactive instruction rule base at least comprises an instruction type, and optionally comprises an operation range and/or an execution condition.
Specifically, when the interactive instruction rule base of the highway maintenance management system is established, the instruction rule can be statically stored in a JSON mode, an XML mode, a database mode and the like, and can be edited and set. Each instruction rule may consist of, for example, three parts of "execution condition+instruction type+operation range".
Wherein the instruction types are necessary options in the instruction rules, each instruction type representing a class of operations in the highway maintenance management system, such as "show … … highway", "show three-dimensional model", "close window", etc. Accordingly, each rule-compliant voice command may also be matched to a command type that indicates that it requests the highway maintenance management system to perform a corresponding operation.
The operation range is used for filtering specific operation content of the operation indicated by the screening instruction type. For example, the instruction type is "show … … highway", then the operating range may be "G6 high speed"; the instruction type is "show … … patrol data", then the operation range can be "1 month in 2020 to 10 months in 2020"; etc. The operation scope belongs to an optional item in the instruction rule, namely the operation scope is not needed for certain instruction types; and there may be more than one operating range in one instruction rule, but a combination of two or more operating ranges, for example, the instruction type is "show … … highway … … patrol data", and accordingly, the operating ranges may be "G6 high speed", "1 month in 2020 to 10 months in 2020", respectively.
The execution condition represents under what condition the operation indicated by the instruction type is executed, for example, "if the number of diseases is greater than 10", "after 5 minutes", "11 am on the open day", and the like. The execution conditions belong to an option in the instruction rule, i.e. execution conditions may not be required for certain instruction types. For the threshold condition, the time condition, and the like exemplified above, a threshold range, a time range, and the like may be set, and it may be determined that they match the execution conditions as long as the content contained in the voice instruction falls within the corresponding range. In some cases, there may be more than one execution condition in an instruction rule.
By dividing the instruction rule into three parts of instruction type, execution condition and operation range, the acquired voice instructions can be conveniently matched part by part in the subsequent stage, and the matching process is clearer and clearer. However, the present invention is not limited thereto, and the instruction rule may be divided in other manners consistent with the operation logic.
Based on the foregoing embodiment, in the voice interaction method of the highway maintenance management system of the present embodiment, matching the character string instruction with the instruction rule in the interaction instruction rule base includes at least one of an instruction type matching step, an operation range matching step, and an execution condition matching step.
Referring to fig. 2, the step of matching instruction types specifically includes:
matching the character string instruction with the instruction types in each instruction rule;
if the instruction type is successfully matched, eliminating the instruction type in the character string instruction;
if the instruction rule with successful instruction type matching only comprises the instruction type and the character string instruction after the instruction type is removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
In this embodiment, it should be noted that, if the instruction rule includes not only the instruction type but also whether the instruction rule can be successfully matched if the character string instruction is successfully matched to the instruction type, further the subsequent matching step needs to be continuously executed; if the instruction rule contains only the instruction type, then it is only necessary to determine whether the string instruction also contains only the instruction type. Specifically, if the string instruction is empty after the instruction type is removed, it means that the string instruction also contains only the instruction type, and does not contain the operation range and the execution condition.
At this time, the two conditions that (1) the instruction rule only contains the instruction type and (2) the character string instruction after the instruction type is rejected is empty are simultaneously satisfied, which is the first case that the instruction rule matching is successful.
When matching is not completed in the instruction type matching step, continuing to perform an operation range matching step, wherein the operation range matching step specifically comprises the following steps:
if the instruction rule of successful instruction type matching contains not only the instruction type or the character string instruction after the instruction type is removed is not empty, matching the character string instruction after the instruction type is removed with the operation range supported by the instruction type which is successfully matched;
if the operation range is successfully matched, continuing to reject the operation range in the character string instruction;
if the instruction rule with successful operation range matching does not contain an execution condition and the character string instruction after the instruction type and the operation range are removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
(1) The instruction rule only comprises the instruction type and (2) the condition that the character string instruction after eliminating the instruction type is empty, if at least one of the two conditions is not satisfied, the matching is not completed in the instruction type matching step.
It is possible that (1) is true but (2) is not true, that is, the instruction rule that the instruction type matching is successful only includes the instruction type, does not include the operation range and the execution condition, but the string instruction after the instruction type is removed is not null, and the string content that is not null is not matched at this time, and obviously fails when the operation range matching step/the execution condition matching step is performed.
It is also possible that (1) is not satisfied but (2) is satisfied, that is, the instruction rule that the instruction type matching is successful includes not only the instruction type but also the operation range and/or the execution condition, but the string instruction after the instruction type is rejected is empty, and at this time, the operation range and/or the execution condition is not matched, and also fails when the operation range matching step/the execution condition matching step is performed.
It is also possible that (1) is not satisfied and (2) is not satisfied, that is, the instruction rule that the instruction type matching is successful includes not only the instruction type but also the operation range and/or the execution condition, and the string instruction after the instruction type is removed is not null, at this time, whether the instruction rule can be successfully matched or not, and it is necessary to continue checking in the operation range matching step and the execution condition matching step.
In this embodiment, the string instruction after the instruction type is removed is matched with the list of the operation ranges supported by the instruction type successfully matched, and if the string instruction is successfully matched with the operation range, the operation range is removed from the string instruction after the instruction type is removed.
If the instruction rule also contains an execution condition under the condition of successful matching to the operation range, whether the instruction rule can be successfully matched finally or not is judged, and the subsequent matching step is required to be continuously executed; if the instruction rule does not include an execution condition, then it is only necessary to determine whether the string instruction also does not include an execution condition. Specifically, if the string instruction is empty after the instruction type and the operation range are removed, it means that the execution condition is not included in the string instruction either.
At this time, (3) the instruction rule does not contain an execution condition and (4) the two conditions of eliminating the instruction type and the character string instruction after the operation range being empty are simultaneously satisfied, which is the second case that the instruction rule matching is successful.
When the matching is not completed in the operation range matching step, continuing to execute the condition matching step, specifically comprising:
if the instruction rule with successful operation range matching contains an execution condition or the character string instruction after the instruction type and the operation range are removed is not null, matching the character string instruction after the instruction type and the operation range with the execution condition supported by the instruction type with successful matching;
if the execution condition is successfully matched, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
Similarly, (3) the instruction rule does not include an execution condition and (4) if at least one of the two conditions that the type of the reject instruction and the string instruction after the operation range is empty is not satisfied, it means that the matching is not completed in the operation range matching step.
It is possible that (3) is true but (4) is not true, that is, the instruction rule that the operation range is successfully matched does not include an execution condition, but the string instruction after the instruction type and the operation range are removed is not null, and the content of the string that is not null is not matched at this time, and obviously fails when the execution condition matching step is performed.
It is also possible that (3) is not satisfied but (4) is satisfied, that is, the instruction rule that the operation range is successfully matched also includes an execution condition, but the string instruction after the instruction type and the operation range are removed is empty, and at this time, the execution condition is not matched, and also fails when the execution condition matching step is performed.
It is also possible that (3) is not satisfied and (4) is not satisfied, that is, the instruction rule whose operation range is also successfully matched includes an execution condition, and the string instruction after the instruction type and the operation range are rejected is not null, at this time, whether the instruction rule can be successfully matched or not, and it is necessary to continue checking in the execution condition matching step.
In this embodiment, the string instruction after the instruction type and the operation range are removed is matched with the list of execution conditions supported by the instruction type that is successfully matched, and if the string instruction is successfully matched with the execution conditions, the instruction rule is successfully matched.
This is the third case where instruction rule matching is successful.
The three conditions respectively complete successful matching of the instruction rule in the instruction type matching step, the operation range matching step and the execution condition matching step. Once the match is successful, the highway maintenance management system may be notified to perform an operation corresponding to the voice command.
It should be noted that, the voice interaction method of the present invention is not limited to the execution sequence of the steps in the foregoing embodiments, for example, the execution sequence of the operation range matching step and the execution condition matching step may be interchanged.
Based on the foregoing embodiment, in the voice interaction method of the highway maintenance management system of the present embodiment, the voice interaction method further includes: if the voice command fails to match any one of the command type, the operation range and the execution condition, the operation is stopped and the voice command cannot be executed.
The instruction type matching step further includes: the character string instruction is not matched with the instruction types in each instruction rule;
the operation range matching step further includes: the character string instructions after the instruction types are removed are not matched with the operation range supported by the successfully matched instruction types;
the performing condition matching step further includes: the character string instructions after the instruction type and the operation range are removed are not matched with the execution conditions supported by the successfully matched instruction type.
With continued reference to fig. 2, the above-described case and the case without matching exemplified in the previous embodiment all belong to a matching failure, so the system will suspend the interactive operation and feedback a failure message to the user, for example, informing the user through a display module or a voice module. Alternatively, the response may be based on a predetermined rule, for example, if the instruction type and the operation range are successfully matched, but the execution condition is failed, the voice instruction may be executed by ignoring the execution condition or by default.
In this embodiment, statistics and analysis may also be performed on the failure feedback, and on this basis, the interaction instruction rule base may be updated and perfected.
Based on the foregoing embodiment, in the voice interaction method of the highway maintenance management system of the present embodiment, the voice interaction method further includes: each instruction rule in the interactive instruction rule base is converted into a regular expression, wherein the regular expression at least comprises fixed fields and optionally variable fields, the fixed fields correspond to the instruction types, and the variable fields correspond to the operation range and the execution conditions.
Preferably, when the interaction instruction rule base is established, the instruction rules are converted into the form of regular expressions according to rules.
As previously described, each instruction rule contains the mandatory data item, namely "instruction type" and the optional data item, "operating scope" and/or "execution condition", and the regular expression converted from it contains at least one fixed field, and may also contain a number of variable fields, where a fixed field is used to represent the instruction type and a variable field is used to represent the operating scope and/or execution condition. For example, the instruction "show XXX highway", where "show" and "highway" are fixed fields, "XXX" is a variable field, representing a different highway name, then the instruction corresponds to the regular expression: the/(s ] +) shows $/i for the road.
After the instruction rule is expressed by the regular expression, the instruction rule matching step is executed, and the character string obtained by voice recognition is matched with the regular expression. An example of matching with regular expressions is given below.
First, the instruction rule "show code highway" is added in the interactive instruction rule library, and "code" indicates that the show operation is performed by the highway maintenance management system for the highway represented by "code". Converting the instruction rule into a regular expression: the/(s ] +) shows $/i for the road.
After the voice interaction is initiated, the voice command "show G6 highway" is spoken by the user, and the audio of the voice command is picked up by the microphone.
And then, the picked-up audio is identified to obtain a character string instruction of 'exhibiting G6 expressway'.
Then, matching the text character string 'display G6 expressway' with the instruction rules in the form of each regular expression in the interactive instruction rule library in sequence, and when matching to the 'display code expressway', displaying ([ ≡s ] +) highways $/i.exec ('display G6 expressway'), returning a true result, wherein exec () represents that the character string in the text character string is searched and matched, so that the 'display G6 expressway' instruction type is successfully matched, and judging that the instruction type is 'display code expressway'.
The part representing the instruction type, namely the display and the highway, is removed from the text character string of the display G6 highway, the character string after removing the instruction type is the G6 highway, and the character string is matched with a list (for example, names of all highways) of operation ranges supported by the display code highway. When the matching is carried out to the G6 high speed, the return result is true, namely the matching of the operation content is successful.
The instruction rule with successful matching of the code highway does not contain an execution condition, and correspondingly, the text character string is empty after the instruction type and the operation range of the G6 highway are displayed, so that the instruction rule can be judged to be successfully matched.
The highway maintenance management system obtains a command of 'code highway', wherein the code is 'G6 high speed', and then carries out the interactive operation of 'exhibiting G6 highway'.
The regular expression has simple and clear logic, and the voice interaction method of the highway maintenance management system in the embodiment of the invention utilizes the regular expression to carry out matching operation, and has wide application range and high operation speed.
Based on the foregoing embodiments, in the voice interaction method of the highway maintenance management system of the present embodiment, the operation of recognizing the voice command is performed locally, or the voice command is transmitted to the cloud end.
The system can be set by a local processor according to actual conditions to carry out identification operation, and can also transmit the audio file to a cloud for identification through the Internet. Alternatively, if desired, the user may choose whether to identify locally or at the cloud.
In addition, a primary interaction instruction rule base containing common instruction rules can be stored locally, when voice instructions are acquired, recognition is performed locally preferentially, and the primary interaction instruction rule base can ensure successful recognition of most voice instructions conforming to the rules. If the local recognition fails, the voice command is transmitted to the cloud, and the high-level interaction command rule base which is stored in the cloud and contains all command rules is used for recognition.
Optionally, the instruction type may also be stored in the local interaction instruction rule base, and the operation range and the execution condition may also be stored in the cloud interaction instruction rule base. After the local matching instruction type is successful, and under the condition that the instruction after the instruction type is removed is not empty, the instruction is transmitted to the cloud end to continue matching the operation range and the execution condition.
The local recognition stability is high, remote communication is not needed, and the method is more beneficial to the areas with poor network conditions; the cloud identification database has large capacity and high processing speed, and is more beneficial to the conditions of large data volume or complex system. By combining the characteristics of the two, the voice interaction method can be further optimized.
The voice interaction device of the highway maintenance management system provided by the invention is described below, and the voice interaction device described below and the voice interaction method described above can be correspondingly referred to each other. Referring to fig. 3, the voice interaction device provided in this embodiment specifically includes:
the acquisition module is used for acquiring the voice instruction;
the recognition module is used for recognizing the voice command to obtain a character string command;
the matching module is used for matching the character string instruction with the instruction rules in the interactive instruction rule base;
and the notification module is used for notifying the highway maintenance management system to execute the voice instruction when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule library.
The voice interaction device provided by the embodiment of the present invention can be used for executing the voice interaction method described in each embodiment, and its working principle and beneficial effects are similar, so that details will not be described herein, and the specific content can be referred to the description of the above embodiments.
In this embodiment, it should be noted that, the apparatus of the embodiment of the present invention may be implemented in a software and/or hardware manner, and may be integrated in a user terminal device such as a mobile phone, a tablet computer, or the like. The units in the device are simply divided according to the functional logic, and are not limited to the above-described division, as long as the corresponding functions can be realized. Each unit can be integrated into a whole or can be separately deployed; can be combined into one unit or further split into a plurality of sub-units.
Based on the same inventive concept, a further embodiment of the present invention provides an electronic device, see fig. 4, which may include: processor 810, communication interface 820, memory 830, and communication bus 840, wherein processor 810, communication interface 820, memory 830 accomplish communication with each other through communication bus 840.
The processor 810 may invoke a computer program in the memory 830 to perform a voice interaction method of the highway maintenance management system, for example, comprising the steps of: acquiring a voice instruction; recognizing a voice instruction to obtain a character string instruction; matching the character string instruction with the instruction rules in the interactive instruction rule base; and when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base, informing the highway maintenance management system to execute the voice instruction.
Those skilled in the art will appreciate that the processor 810 may also implement the voice interaction method provided by any embodiment of the present invention, and that the electronic device shown in fig. 4 is only an example, and may also be implemented by any device capable of invoking instructions to implement the foregoing voice interaction method.
The logic instructions in memory 830 described above may also be implemented in the form of software functional units and sold or used as a stand-alone product, where they are stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
Based on the same inventive concept, a further embodiment of the present invention provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the voice interaction method of the above-mentioned highway maintenance management system. For example, the processor when executing the computer program implements the following: acquiring a voice instruction; recognizing a voice instruction to obtain a character string instruction; matching the character string instruction with the instruction rules in the interactive instruction rule base; and when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base, informing the highway maintenance management system to execute the voice instruction.
Based on the same inventive concept, a further embodiment of the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the voice interaction method of the highway maintenance management system described above. For example, the processor when executing the computer program implements the following: acquiring a voice instruction; recognizing a voice instruction to obtain a character string instruction; matching the character string instruction with the instruction rules in the interactive instruction rule base; and when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base, informing the highway maintenance management system to execute the voice instruction.
In general, the aforementioned storage medium may include various media that can store program codes, such as a U disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It will be appreciated that the refinement and expansion functions that the aforementioned computer program may perform are described with reference to the above embodiments.
The apparatus embodiments described above are merely illustrative, in which elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. The voice interaction method of the highway maintenance management system is characterized by comprising the following steps of:
acquiring a voice instruction;
identifying the voice command to obtain a character string command;
matching the character string instruction with an instruction rule in an interactive instruction rule base;
when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base, notifying the highway maintenance management system to execute the voice instruction;
the matching the character string instruction with the instruction rule in the interactive instruction rule base specifically comprises the following steps:
matching the character string instruction with the instruction types in each instruction rule;
if the instruction type is successfully matched, eliminating the instruction type in the character string instruction;
if the instruction rule with the successfully matched instruction type only comprises the instruction type and the character string instruction after the instruction type is removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base;
if the instruction rule of successful instruction type matching does not only contain the instruction type or the character string instruction after the instruction type is removed is not null, matching the character string instruction after the instruction type is removed with the operation range supported by the instruction type which is successfully matched;
if the operation range is successfully matched, continuing to reject the operation range in the character string instruction;
if the instruction rule with the successfully matched operation range does not contain an execution condition and the character string instruction after the instruction type and the operation range are removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base; or alternatively
If the instruction rule with successful operation range matching contains an execution condition or the character string instruction after the instruction type and the operation range are not null, matching the character string instruction after the instruction type and the operation range with the execution condition supported by the instruction type with successful matching; and if the execution condition is successfully matched, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
2. The voice interaction method according to claim 1, further comprising:
before the voice instruction is acquired, the interactive instruction rule base is pre-established, and each instruction rule in the interactive instruction rule base at least comprises an instruction type, and optionally comprises an operation range and/or an execution condition.
3. The voice interaction method according to claim 2, further comprising:
if the matching of any one of the instruction type, the operation range and the execution condition fails, the operation is stopped and the voice instruction cannot be executed in feedback.
4. A method of voice interaction according to claim 2 or 3, further comprising:
each instruction rule in the interactive instruction rule base is converted into a regular expression, wherein the regular expression at least comprises fixed fields and optional variable fields, the fixed fields correspond to the instruction types, and the variable fields correspond to the operation range and the execution conditions.
5. A voice interaction method according to any of the claims 1-3, characterized in,
the voice command is recognized locally or transmitted to the cloud for carrying out.
6. A voice interactive apparatus for a highway maintenance management system, comprising:
the acquisition module is used for acquiring the voice instruction;
the recognition module is used for recognizing the voice instruction to obtain a character string instruction;
the matching module is used for matching the character string instruction with the instruction rules in the interaction instruction rule base;
the notification module is used for notifying the highway maintenance management system to execute the voice instruction when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule library;
the matching module is specifically configured to:
matching the character string instruction with the instruction types in each instruction rule;
if the instruction type is successfully matched, eliminating the instruction type in the character string instruction;
if the instruction rule with the successfully matched instruction type only comprises the instruction type and the character string instruction after the instruction type is removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base;
if the instruction rule of successful instruction type matching does not only contain the instruction type or the character string instruction after the instruction type is removed is not null, matching the character string instruction after the instruction type is removed with the operation range supported by the instruction type which is successfully matched;
if the operation range is successfully matched, continuing to reject the operation range in the character string instruction;
if the instruction rule with the successfully matched operation range does not contain an execution condition and the character string instruction after the instruction type and the operation range are removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base; or alternatively
If the instruction rule with successful operation range matching contains an execution condition or the character string instruction after the instruction type and the operation range are not null, matching the character string instruction after the instruction type and the operation range with the execution condition supported by the instruction type with successful matching; and if the execution condition is successfully matched, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the voice interaction method of the highway maintenance management system according to any one of claims 1 to 5.
8. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the voice interaction method of the highway maintenance management system of any of claims 1 to 5.
CN202011527765.2A 2020-12-22 2020-12-22 Voice interaction method, device, equipment and medium of highway maintenance management system Active CN112767933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011527765.2A CN112767933B (en) 2020-12-22 2020-12-22 Voice interaction method, device, equipment and medium of highway maintenance management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011527765.2A CN112767933B (en) 2020-12-22 2020-12-22 Voice interaction method, device, equipment and medium of highway maintenance management system

Publications (2)

Publication Number Publication Date
CN112767933A CN112767933A (en) 2021-05-07
CN112767933B true CN112767933B (en) 2023-06-27

Family

ID=75695132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011527765.2A Active CN112767933B (en) 2020-12-22 2020-12-22 Voice interaction method, device, equipment and medium of highway maintenance management system

Country Status (1)

Country Link
CN (1) CN112767933B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11546217B1 (en) * 2021-09-14 2023-01-03 Hewlett Packard Enterprise Development Lp Detecting configuration anomaly in user configuration

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8538743B2 (en) * 2007-03-21 2013-09-17 Nuance Communications, Inc. Disambiguating text that is to be converted to speech using configurable lexeme based rules
CN109727592A (en) * 2017-10-31 2019-05-07 上海幻电信息科技有限公司 O&M instruction executing method, medium and terminal based on natural language speech interaction
CN109558479B (en) * 2018-11-29 2022-12-02 出门问问创新科技有限公司 Rule matching method, device, equipment and storage medium
CN109766483B (en) * 2018-12-28 2024-04-19 平安科技(深圳)有限公司 Regular expression generation method, device, computer equipment and storage medium
CN111309299A (en) * 2020-01-15 2020-06-19 珠海格力智能装备有限公司 Industrial robot language processing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112767933A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
CN109522556B (en) Intention recognition method and device
CN107766371B (en) Text information classification method and device
US11899681B2 (en) Knowledge graph building method, electronic apparatus and non-transitory computer readable storage medium
JP6894534B2 (en) Information processing method and terminal, computer storage medium
CN109408811B (en) Data processing method and server
US20230409648A1 (en) Composite index on hierarchical nodes in the hierarchical data model within case model
US11106906B2 (en) Systems and methods for information extraction from text documents with spatial context
CN110263009A (en) Generation method, device, equipment and the readable storage medium storing program for executing of log classifying rules
CN109740159B (en) Processing method and device for named entity recognition
CN112579733B (en) Rule matching method, rule matching device, storage medium and electronic equipment
CN113051362A (en) Data query method and device and server
KR20220064016A (en) Method for extracting construction safety accident based data mining using big data
CN111798118B (en) Enterprise operation risk monitoring method and device
CN114595686A (en) Knowledge extraction method, and training method and device of knowledge extraction model
CN115982376A (en) Method and apparatus for training models based on text, multimodal data and knowledge
CN112767933B (en) Voice interaction method, device, equipment and medium of highway maintenance management system
US8862609B2 (en) Expanding high level queries
CN113609100A (en) Data storage method, data query method, data storage device, data query device and electronic equipment
CN111177653A (en) Credit assessment method and device
CN113407678B (en) Knowledge graph construction method, device and equipment
CN112328812B (en) Domain knowledge extraction method and system based on self-adjusting parameters and electronic equipment
CN115292506A (en) Knowledge graph ontology construction method and device applied to office field
CN113961811A (en) Conversational recommendation method, device, equipment and medium based on event map
CN114860872A (en) Data processing method, device, equipment and storage medium
CN113742496A (en) Power knowledge learning system and method based on heterogeneous resource fusion

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
GR01 Patent grant
GR01 Patent grant