CN112767933A - Voice interaction method, device, equipment and medium for highway maintenance management system - Google Patents

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

Info

Publication number
CN112767933A
CN112767933A CN202011527765.2A CN202011527765A CN112767933A CN 112767933 A CN112767933 A CN 112767933A CN 202011527765 A CN202011527765 A CN 202011527765A CN 112767933 A CN112767933 A CN 112767933A
Authority
CN
China
Prior art keywords
instruction
character string
voice
rule
matching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011527765.2A
Other languages
Chinese (zh)
Other versions
CN112767933B (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 TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

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 the voice command to obtain a character string command; matching the character string instruction with instruction rules in an 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 road maintenance management system to execute the voice instruction. The voice interaction method realizes voice interaction of various operations of the highway maintenance management system through the 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 the user experience is remarkably improved.

Description

Voice interaction method, device, equipment and medium for 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, the construction of roads in China is rapidly developed, and road networks are already fully spread. The daily inspection and maintenance of the highway is an important link for maintaining the use quality of the highway after the highway is built. With the increase of the road mileage, the workload of maintenance detection and management is also sharply increased.
At present, a highway maintenance management system is constructed 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, and is in a normal state, and a large amount of work is spread around the highway maintenance management system. The technical contents disclosed in the documents of the invention patent application with the application number of 201810992856.X, the publication number of CN109145074A, the name of a common road maintenance engineering management system based on ArcGIS, the invention patent application with the application number of 201610720540.6, the publication number of CN106408678A, the name of a road maintenance patrol system and a method thereof, the invention patent application with the application number of 201911041343.1, the publication number of CN110942589A, the name of an intelligent road maintenance operation system and the like can be referred to.
However, the conventional highway maintenance management system adopts a mouse, a keyboard and other traditional information interaction modes, and has significant disadvantages in use convenience. For example, to view information about a certain road maintenance station, it is often necessary to perform multiple filtering from a multi-layer list, or manually enter the name of the road maintenance station in a search box and then click an associated button to search for the name. Especially for provincial and regional management units, when the data volume is large or the system function is complex, the traditional man-machine interaction mode is especially inefficient, the requirements of the management unit for carrying out rapid interaction on data with any dimension and any level in the management range are difficult to meet, and poor user experience is 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-transient computer readable storage medium, which are used for solving the technical problems of inconvenience in information interaction operation, low efficiency and the like of highway maintenance management in the prior art and realizing more convenient and efficient interaction operation in 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 the voice command to obtain a character string command;
matching the character string instruction with instruction rules in an 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 road 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 established in advance, wherein 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 interactive instruction rule base, and the method specifically comprises the following steps:
matching the character string instruction with the instruction types in the instruction rules;
if the instruction types are successfully matched, eliminating the instruction types in the character string instructions;
and if the instruction rule of which the instruction types are successfully matched only contains the instruction types and the character string instruction after the instruction types are 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 successfully matching the instruction types does not only contain the instruction types or the character string instructions after the instruction types are removed are not empty, matching the character string instructions after the instruction types are removed with the operation range supported by the successfully matched instruction types;
if the operation range is successfully matched, continuously eliminating the operation range in the character string instruction;
if the instruction rule with the successfully matched operation range does not contain the 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
If the instruction rule with the successfully matched operation range contains the execution condition or the character string instruction after the instruction type and the operation range are removed is not empty, matching the character string instruction after the instruction type and the operation range are removed with the execution condition supported by the successfully matched instruction type;
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.
The voice interaction method provided by the invention further comprises the following steps:
if the matching with any one of the instruction type, the operation range and the execution condition fails, the operation is stopped and the voice instruction is fed back to be incapable of being executed.
The voice interaction method provided by the invention further comprises the following steps:
converting each instruction rule in the interaction instruction rule base into a regular expression, wherein the regular expression at least comprises a fixed field and optionally comprises a variable field, the fixed field corresponds to the type of the instruction, and the variable field corresponds to the operating range and the execution condition.
According to the voice interaction method provided by the invention, wherein,
and recognizing the voice command locally or transmitting the voice command to the cloud terminal.
In a second aspect, the present invention further provides a voice interaction device for a highway maintenance management system, including:
the acquisition module is used for acquiring a 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 rule in the interactive instruction rule base;
and the notification module is used for notifying the road maintenance management system to execute the voice command when the character string command is successfully matched with the command rule in the interactive command rule base.
In a third aspect, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the voice interaction method of the road maintenance management system as described in any one of the above.
In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the voice interaction method of the road maintenance management system according to any one of the above.
According to the technical scheme, the voice interaction method, the voice interaction device, the electronic equipment and the computer readable storage medium of the highway maintenance management system provided by the invention have the advantages that the command in the form of the character string is obtained through the obtained command in the form of the voice, the command in the form of the character string 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 use convenience of the highway maintenance management system is improved, the rapid interaction requirements of data in any dimension and any level can be met even if 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 present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are part of embodiments of the invention, and that other drawings may be derived from those drawings by those skilled in the art without inventive 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 illustrating 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
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a voice interaction method of a highway maintenance management system, which comprises the following steps of:
step 101, acquiring a voice instruction;
when a user utters a voice command, the voice command may be captured by a microphone or any other device suitable for picking up sound.
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 Baidu speech recognition engine, a Korea fly recognition engine, or any other speech recognition engine suitable for the method of the present invention. After a voice command is recognized, a corresponding text string is returned, such as "show G6 high speed bridge".
Although the above description has been made taking the chinese speech input as an example, the present invention is not limited thereto, but can be applied to any language.
103, matching the character string instruction with an instruction rule in an interactive instruction rule base;
and matching the text character string obtained by recognizing the voice instruction with the instruction rule in the interactive instruction rule base based on natural language processing and rule matching technology. For example, the instruction rules may be converted into regular expressions, and the text strings may be matched with the regular expressions of the instruction rules. A Regular Expression (Regular Expression) is a logical formula that includes both normal characters and special characters, and can use predefined text rules to describe and filter strings that conform to certain syntactic rules.
And 104, when the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base, informing the road maintenance management system to execute the voice instruction.
And if the text character string is matched with a certain instruction rule by 100%, judging that the matching is successful, and informing the highway maintenance management system of the successful matching message so as to execute the operation corresponding to the voice instruction in the highway maintenance management system.
After the operation is started or executed, 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 using the display module, or the execution result is notified to the user by using the voice module.
The voice interaction process of each operation of the highway maintenance management system is realized through the steps of voice acquisition, voice recognition, rule matching, response execution and the like, compared with the prior art, the interactive operation of the highway maintenance management system is optimized, the use convenience of the highway maintenance management system is effectively improved, and therefore the user experience is remarkably improved.
Based on the content of the foregoing embodiment, in the voice interaction method of the road maintenance management system of this embodiment, the method further includes: before the voice instruction is acquired, an interactive instruction rule base is established in advance, wherein 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 rules can be statically stored in a JSON (Java Server object notation), XML (extensible markup language), database and other modes, and can be edited and set. Each instruction rule may consist of, for example, three parts "execution condition + instruction type + operation scope".
The instruction types are necessary options in the instruction rules, and each instruction type represents a type of operation in the highway maintenance management system, such as 'displaying … … highway', 'displaying three-dimensional model', 'closing window', and the like. Correspondingly, each voice command meeting the rules can be matched with a command type to indicate that the voice command requests the highway maintenance management system to perform a corresponding operation.
The operation range is used for filtering the specific operation content of the operation indicated by the filtering instruction type. For example, if the instruction type is "show … … highway", the operating range may be "G6 high speed"; the instruction type is "show … … patrol data", the operating range may be "1 month in 2020 to 10 months in 2020"; and so on. The operation scope belongs to the selectable item in the instruction rule, namely the operation scope can be unnecessary for some instruction types; and the operation range in one instruction rule may have more than one item, but a combination of two or more operation ranges, for example, the instruction type is "show … … highway … … patrol data", and accordingly, the operation ranges may be "G6 high speed", "1 month 2020 to 10 months 2020", respectively.
The execution condition represents under what condition the operation indicated by the instruction type is executed, for example, "if the number of defects is greater than 10", "after 5 minutes", "11 am tomorrow", and the like. Execution conditions are optional in instruction rules, i.e., execution conditions may not be needed 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 as long as the content included in the voice instruction falls within the corresponding range, it may be determined that it matches the execution condition. 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 matched one by one in the subsequent stage, and the matching process is clearer and more definite. The present invention is not limited thereto, and the instruction rules may be divided in other manners according to the operation logic.
Based on the content of the foregoing embodiment, in the voice interaction method of the road maintenance management system of this embodiment, the character string instruction is matched with the instruction rule in the interactive instruction rule base, and the method 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 the instruction type specifically includes:
matching the character string instruction with the instruction types in the instruction rules;
if the instruction types are successfully matched, eliminating the instruction types in the character string instructions;
and if the instruction rule of which the instruction types are successfully matched only contains the instruction types and the character string instruction after the instruction types are removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
It should be noted that, in the embodiment, when the character string instruction is successfully matched with the instruction type, if the instruction rule does not only include the instruction type, whether the instruction rule is successfully matched or not is finally determined, and the subsequent matching step needs to be continuously performed; if the instruction rule only contains the instruction type, then only the determination of whether the string instruction also contains only the instruction type is needed. Specifically, if the string instruction is empty after the instruction type is removed, it indicates that the string instruction also only contains the instruction type, and does not contain the operation range and the execution condition.
At this time, the two conditions that the command rule of (i) only includes the command type and the character string command after the command type is removed is null are simultaneously satisfied, which is the first case that the matching of the command rule is successful.
When the matching is not completed in the instruction type matching step, continuing the operation range matching step, specifically including:
if the instruction rule of successfully matching the instruction types does not only contain the instruction types or the character string instructions after the instruction types are removed are not empty, matching the character string instructions after the instruction types are removed with the operation range supported by the successfully matched instruction types;
if the operation range is successfully matched, continuously eliminating the operation range in the character string instruction;
and if the instruction rule with the successfully matched operation range does not contain the 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.
If at least one of the two conditions that the character string instruction after the instruction type is removed is null is not satisfied, the instruction rule only comprises the instruction type and indicates that the matching is not completed in the instruction type matching step.
If the operation range matching step is performed, the execution condition matching step is performed, and if the operation range matching step is performed, and if the operation range matching step is performed, the execution condition matching step is performed, the operation range matching step is performed.
It is also possible that (i) the operation range and/or the execution condition are not matched, but the operation range and/or the execution condition are not matched, and the operation range matching step/the execution condition matching step is also failed.
If the operation range matching step is successful, the execution condition matching step is not performed, and the operation range matching step is performed after the instruction type matching is successfully rejected.
In this embodiment, the character string instruction after the instruction type is removed is matched with the list of the operation ranges supported by the successfully matched instruction type, and if the character string instruction is successfully matched with the operation range, the operation range is removed from the character string instruction after the instruction type is removed.
Under the condition of successful matching to the operation range, if the instruction rule also contains an execution condition, whether the instruction rule can be successfully matched or not is judged, and the subsequent matching step is required to be continuously executed; if the instruction rule does not contain an execution condition, it is only necessary to determine whether the string instruction does not contain an execution condition. Specifically, if the string instruction is empty after the instruction type and the operation range are removed, it indicates that the execution condition is not included in the string instruction.
At this time, the third condition that the instruction rule does not include the execution condition and the fourth condition that the character string instruction after the instruction type and the operation range are eliminated is 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 perform the condition matching step, specifically including:
if the instruction rule with the successfully matched operation range contains the execution condition or the character string instruction after the instruction type and the operation range are removed is not empty, matching the character string instruction after the instruction type and the operation range are removed with the execution condition supported by the successfully matched instruction type;
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.
Similarly, if at least one of the conditions that the instruction rule III does not contain the execution condition and the character string instruction after the instruction type and the operation range are rejected is empty, the condition represents that the matching is not completed in the operation range matching step.
It may be that the third step is true but the fourth step is false, that is, the instruction rule whose operation range is successfully matched also does not include the execution condition, but the character string instruction after the instruction type and the operation range are removed is not null, the content of the character string which is not null is not matched, and the execution condition matching step obviously fails.
It is also possible that the instruction rule that the operation range is successfully matched but the instruction rule that the operation range is not matched but the operation range is successfully matched includes the execution condition, but the character string instruction after the instruction type and the operation range are removed is null, and at this time, the execution condition is not matched, and the execution condition matching step is also failed.
It is also possible that the third step is not true and the fourth step is not true, that is, the instruction rule whose operation range is successfully matched also includes an execution condition, and the character string instruction after the instruction type and the operation range are removed is not null, and at this time, whether the instruction rule can be successfully matched or not needs to be continuously checked in the step of matching the execution condition.
In this embodiment, the string instruction after the instruction type and the operation range are removed is matched with the list of the execution conditions supported by the successfully matched instruction type, and if the string instruction is successfully matched with the execution conditions, the instruction rule matching is successful.
This is the third case where the instruction rule matching is successful.
The three conditions respectively complete the 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 matching is successful, the highway maintenance management system can be notified to perform an operation corresponding to the voice instruction.
It should be noted that the voice interaction method of the present invention is not limited to the execution order of the steps in the foregoing embodiments, for example, the execution order of the operation range matching step and the execution condition matching step may be interchanged.
Based on the content of the foregoing embodiment, in the voice interaction method of the road maintenance management system of this embodiment, the method further includes: if the matching with any one of the instruction type, the operation range and the execution condition fails, the operation is stopped and the voice instruction is fed back to be incapable of being executed.
The instruction type matching step further comprises: the character string instructions are not matched with the instruction types in the instruction rules;
the operation range matching step further includes: the character string instruction after the instruction type is removed is not matched with the operation range supported by the successfully matched instruction type;
the performing the condition matching step further includes: and the character string instruction after the instruction type and the operation range are removed is not matched with the execution condition supported by the successfully matched instruction type.
With continued reference to fig. 2, the above case and the case of no match as exemplified in the previous embodiment all pertain to a match failure, so the system will abort the interaction and feed back a failure message to the user, for example by informing the user through a display module or a voice module. Alternatively, the response may be performed according to a predetermined rule, for example, when the instruction type and the operation range are successfully matched but the matching of the execution condition fails, the execution condition may be ignored or the voice instruction may be executed according to a default execution condition.
In this embodiment, statistics and analysis may also be performed on the failure feedback, and the interaction instruction rule base is updated and perfected on this basis.
Based on the content of the foregoing embodiment, in the voice interaction method of the road maintenance management system of this embodiment, the method further includes: converting each instruction rule in the interaction instruction rule base into a regular expression, wherein the regular expression at least comprises a fixed field and optionally comprises a variable field, the fixed field corresponds to the type of the instruction, and the variable field corresponds to the operating range and the execution condition.
Preferably, when the interchange interaction instruction rule base is established, the instruction rule is converted into a form of a regular expression according to the rule.
As mentioned above, each instruction rule contains the necessary data items, i.e., "instruction type" and optional data items, "operation range" and/or "execution condition", and the regular expression converted from the rule contains at least one fixed field, and may also contain a plurality of variable fields, where the fixed field is used to indicate instruction type and the variable field is used to indicate operation range and/or execution condition. For example, the instruction "show XXX road", where "show" and "road" are fixed fields, and "XXX" is a variable field representing different road names, then the instruction corresponds to the regular expression: and/or showing ([ ^ s ] +) highway $/i.
After the regular expression is adopted to represent the instruction rule, 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.
Firstly, adding an instruction rule 'show code highway' in an interactive instruction rule base, wherein 'code' indicates that the showing operation is executed by a highway maintenance management system aiming at the highway represented by 'code'. Converting the instruction rule into a regular expression: and/or showing ([ ^ s ] +) highway $/i.
After initiating the voice interaction, the user speaks the voice instruction "show G6 highway", the audio of which is picked up by the microphone.
The picked up audio is then recognized, resulting in the string instruction "show G6 highway".
And then, matching the text character string 'show G6 highway' with each regular expression form instruction rule in the interactive instruction rule base in sequence to match the instruction types, and when a 'show: highway' instruction is matched, displaying ([ ^ s ] +) highway $/i.exec (show G6 highway), returning to true result, wherein exec () represents that the character string in the text character string is searched and matched, so that the instruction type of 'show G6 highway' is successfully matched, and judging that the instruction type is 'show: code highway'.
Parts representing the type of the instruction, i.e., "show" and "highway", are removed from the text string "show G6 highway", and the character string is "G6 highway" after the type of the instruction is removed, and is matched with a list of operation ranges (for example, names of all highways) supported by the type of the instruction "show code highway". When the matching is performed to the 'G6 high speed', the returned result is true, that is, the operation content is successfully matched.
The instruction rule of the successfully matched code highway does not contain an execution condition, and accordingly the text string 'show G6 highway' is empty after the instruction type and the operation range are removed, so that the successful matching of the instruction rule can be judged at the moment.
The highway maintenance management system obtains a command of 'show: code highway', the code is 'G6 high speed', and then performs interactive operation of 'show G6 highway'.
The logic of the regular expression is simple and clear, the voice interaction method of the highway maintenance management system in the embodiment of the invention performs matching operation by using the regular expression, and the method has the advantages of wide application range and high operation speed.
Based on the content of the foregoing embodiment, in the voice interaction method of the road maintenance management system of this embodiment, the operation of recognizing the voice command is performed locally, or the voice command is transmitted to the cloud for performing.
The system can be set according to actual conditions and is identified by the local processor, and the audio file can be transmitted to the cloud end for identification through the Internet. Alternatively, if desired, the user may select whether to identify locally or in the cloud.
In addition, a primary interactive instruction rule base containing common instruction rules can be stored locally, when the voice instruction is acquired, recognition is preferentially carried out locally, and the primary interactive instruction rule base can guarantee successful recognition of most voice instructions which accord with the rules. And if the local identification fails, transmitting the voice command to the cloud end, and identifying by using a high-level interaction command rule base which is stored in the cloud end and contains all command rules.
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. And after the local matching instruction type is successful and under the condition that the instruction after the instruction type is removed is not empty, transmitting the instruction to the cloud end to continue matching the operation range and the execution condition.
The local identification stability is high, remote communication is not needed, and the method is more favorable for the areas with poor network conditions; the cloud identification database has large capacity and high processing speed, and is more favorable for the condition of large data volume or complex system. The voice interaction method can be further optimized by combining the characteristics of the two.
The voice interaction device of the road 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 referred to correspondingly. Referring to fig. 3, the voice interaction apparatus provided in this embodiment specifically includes:
the acquisition module is used for acquiring a 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 rule in the interactive instruction rule base;
and the notification module is used for notifying the road maintenance management system to execute the voice command when the character string command is successfully matched with the command rule in the interactive command rule base.
Since the voice interaction device provided by the embodiment of the present invention can be used for executing the voice interaction method described in the above embodiments, and the working principle and the beneficial effect are similar, detailed descriptions are omitted here, and specific contents can be referred to the description of the above embodiments.
In this embodiment, it should be noted that the apparatus in the embodiment of the present invention may be implemented by software and/or hardware, and may be integrated in a user terminal device such as a mobile phone, a tablet computer, and the like. The units in the device are only divided according to the functional logic, and are not limited to the above division as long as the corresponding functions can be realized. The units can be integrated into a whole or separately deployed; may be combined into one unit or further divided into a plurality of sub-units.
Based on the same inventive concept, another embodiment of the present invention provides an electronic device, referring to fig. 4, which may include: processor 810, communication interface 820, memory 830, and communication bus 840, wherein processor 810, communication interface 820, and memory 830 communicate with each other via communication bus 840.
The processor 810 may call the computer program in the memory 830 to perform a voice interaction method of the road maintenance management system, for example, the voice interaction method comprising the steps of: acquiring a voice instruction; recognizing the voice command to obtain a character string command; matching the character string instruction with instruction rules in an 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 road maintenance management system to execute the voice instruction.
It will be understood by those skilled in the art 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 aforementioned voice interaction method.
The logic instructions in the memory 830 may also be implemented in software as a functional unit and sold or used as a stand-alone product, which is stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
Based on the same inventive concept, yet another embodiment of the present invention provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the voice interaction method of the road maintenance management system. For example, the processor, when executing the computer program, implements the following: acquiring a voice instruction; recognizing the voice command to obtain a character string command; matching the character string instruction with instruction rules in an 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 road maintenance management system to execute the voice instruction.
Based on the same inventive concept, yet another embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the voice interaction method of the road maintenance management system described above. For example, the processor, when executing the computer program, implements the following: acquiring a voice instruction; recognizing the voice command to obtain a character string command; matching the character string instruction with instruction rules in an 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 road maintenance management system to execute the voice instruction.
Generally, the 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 detailed functions and extended functions that can be performed by the aforementioned computer program are described with reference to the above embodiments.
The above-described embodiments of the apparatus are merely illustrative, and units illustrated as separate components may or may not be physically separate, and components illustrated as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A voice interaction method of a highway maintenance management system is characterized by comprising the following steps:
acquiring a voice instruction;
recognizing the voice instruction to obtain a character string instruction;
matching the character string instruction with instruction rules in an 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 road maintenance management system to execute the voice instruction.
2. The voice interaction method of claim 1, further comprising:
before the voice instruction is acquired, the interactive instruction rule base is established in advance, 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, wherein the matching of the character string instruction with the instruction rule in the interaction instruction rule base specifically comprises:
matching the character string instruction with the instruction types in the instruction rules;
if the instruction types are successfully matched, eliminating the instruction types in the character string instruction;
and if the instruction rule with successfully matched instruction types only contains the instruction types and the character string instruction after the instruction types are removed is empty, judging that the character string instruction is successfully matched with the instruction rule in the interactive instruction rule base.
4. The voice interaction method of claim 3, further comprising:
if the instruction rule of successfully matching the instruction types does not only contain the instruction types or the character string instructions after the instruction types are removed are not empty, matching the character string instructions after the instruction types are removed with the operation range supported by the successfully matched instruction types;
if the operation range is successfully matched, continuously eliminating the operation range in the character string instruction;
if the instruction rule with the successfully matched operation range does not contain the 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
If the instruction rule with the successfully matched operation range contains an execution condition or the character string instruction after the instruction type and the operation range are removed is not empty, matching the character string instruction after the instruction type and the operation range are removed with the execution condition supported by the successfully matched instruction type;
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.
5. The voice interaction method of claim 4, further comprising:
and if the matching with any one of the instruction type, the operation range and the execution condition fails, stopping the operation and feeding back that the voice instruction cannot be executed.
6. The voice interaction method according to any one of claims 2 to 5, further comprising:
converting each instruction rule in the interaction instruction rule base into a regular expression, wherein the regular expression at least comprises a fixed field and optionally comprises a variable field, the fixed field corresponds to the instruction type, and the variable field corresponds to the operation range and the execution condition.
7. The voice interaction method according to any one of claims 1 to 5,
and the voice command is recognized locally, or the voice command is transmitted to a cloud terminal.
8. A voice interaction device of a road maintenance management system is characterized by comprising:
the acquisition module is used for acquiring a 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 rule in the interactive instruction rule base;
and the notification module is used for notifying the road maintenance management system to execute the voice command when the character string command is successfully matched with the command rule in the interactive command rule base.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the voice interaction method of a road maintenance management system according to any one of claims 1 to 7.
10. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the voice interaction method of a road maintenance management system according to any one of claims 1 to 7.
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 true CN112767933A (en) 2021-05-07
CN112767933B 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)

Cited By (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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080235004A1 (en) * 2007-03-21 2008-09-25 International Business Machines Corporation Disambiguating text that is to be converted to speech using configurable lexeme based rules
CN109558479A (en) * 2018-11-29 2019-04-02 北京羽扇智信息科技有限公司 Rule matching method, device, equipment and storage medium
CN109727592A (en) * 2017-10-31 2019-05-07 上海幻电信息科技有限公司 O&M instruction executing method, medium and terminal based on natural language speech interaction
CN109766483A (en) * 2018-12-28 2019-05-17 平安科技(深圳)有限公司 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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080235004A1 (en) * 2007-03-21 2008-09-25 International Business Machines Corporation 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
CN109558479A (en) * 2018-11-29 2019-04-02 北京羽扇智信息科技有限公司 Rule matching method, device, equipment and storage medium
CN109766483A (en) * 2018-12-28 2019-05-17 平安科技(深圳)有限公司 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

Cited By (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

Also Published As

Publication number Publication date
CN112767933B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN108984650B (en) Computer-readable recording medium and computer device
JP2020521210A (en) Information processing method and terminal, computer storage medium
CN105657129A (en) Call information obtaining method and device
CN103324666A (en) Topic tracing method and device based on micro-blog data
US11495227B2 (en) Artificial intelligence (AI) based user query intent analyzer
CN112579733B (en) Rule matching method, rule matching device, storage medium and electronic equipment
CN111159987A (en) Data chart drawing method, device, equipment and computer readable storage medium
CN113051362A (en) Data query method and device and server
CN109522399B (en) Method and apparatus for generating information
CN111798118B (en) Enterprise operation risk monitoring method and device
CN111553138B (en) Auxiliary writing method and device for standardizing content structure document
CN115099239A (en) Resource identification method, device, equipment and storage medium
CN112507139A (en) Knowledge graph-based question-answering method, system, equipment and storage medium
CN105335466A (en) Audio data retrieval method and apparatus
CN111191153A (en) Information technology consultation service display device
CN112767933B (en) Voice interaction method, device, equipment and medium of highway maintenance management system
CN113609100A (en) Data storage method, data query method, data storage device, data query device and electronic equipment
CN115248890A (en) User interest portrait generation method and device, electronic equipment and storage medium
CN117709347A (en) Multi-mode content key job information timeliness error investigation method, device, equipment and medium
CN117407507A (en) Event processing method, device, equipment and medium based on large language model
US20220327147A1 (en) Method for updating information of point of interest, electronic device and storage medium
CN115526500A (en) Benefit-administration information pushing method, benefit-administration information pushing device, benefit-administration information pushing equipment, benefit-administration information pushing medium and program product
CN105786929A (en) Information monitoring method and device
CN114118937A (en) Information recommendation method and device based on task, electronic equipment and storage medium
CN114860872A (en) Data processing method, device, equipment and storage medium

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