A Human-Machine Dialogue Method and System for a Digital Energy-Saving Pump
The method and system for human-machine dialogue in digital energy-efficient pumps utilize a standard word library with expanded words and statistical analysis to enhance command recognition accuracy and efficiency, addressing computational resource limitations and user language adaptability.
Patent Information
- Application Number
- CN202510286305.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-03-12
AI Technical Summary
The prior art cannot effectively realize efficient human-computer dialogue on digital energy-saving pumps, mainly due to the difficulty of configuring advanced deep learning algorithms due to the computing power limitation, which leads to difficulty in identifying instructions.
A standard vocabulary of digital energy-saving pumps is constructed, including the instruction library words and their out-of-order expansion words, combined with the character co-occurrence matrix and expansion word frequency analysis of historical multilingual and dialect pronunciation data, and a database keyword search and statistical analysis method with low computing power consumption is adopted to optimize the storage structure through the prefix tree algorithm to achieve high-precision instruction recognition.
In a low-computer environment, efficient and intelligent human-computer dialogue interaction is achieved, which improves the accuracy and fault tolerance of command recognition, reduces the amount of computing, adapts to different language backgrounds and accents, and optimizes the efficiency of the vocabulary management.
Smart Images

Figure CN119811376B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of human - machine dialogue, and particularly relates to a human - machine dialogue method and system for a digital energy - saving pump. Background Art
[0002] In fields such as industry, agriculture, and urban water supply, the intelligent operation control of water pumps is crucial. Although human - machine dialogue technology provides a direction for improving its management level, there are many challenges when used for the control of digital energy - saving pumps. For example, most existing human - machine dialogue methods perform semantic similarity matching through speech recognition combined with deep semantic analysis. However, this matching requires a high - level computing power support device to support the corresponding calculation process. Due to energy - saving and configuration device limitations on energy - saving pumps, it is impossible to configure advanced deep - learning algorithms for advanced speech operation processes. Therefore, how to use low - computing - power devices on energy - saving pumps to achieve fast and effective human - machine dialogue is one of the important problems that the existing technology needs to solve. For example, the Chinese patent with the authorization announcement number CN110555095B discloses a human - machine dialogue method and device, and the Chinese patent with the authorization announcement number CN114691852B discloses a human - machine dialogue system and method. The above - mentioned existing technologies have various defects. They all achieve high - precision speech dialogue through relatively advanced algorithm models in semantic analysis and deep - learning matching. However, these methods require advanced processing devices and high - configured computing power, which cannot be achieved by the energy - saving pumps corresponding to this application. Therefore, the corresponding methods cannot be migrated to the human - machine dialogue process of the energy - saving pumps corresponding to this application.
[0003] Therefore, the present invention provides a human - machine dialogue method and system for a digital energy - saving pump. Summary of the Invention
[0004] In view of the deficiencies of the prior art, the present invention proposes a human - machine dialogue method and system for a digital energy - saving pump. This method first generates a speech sentence containing multiple words based on the dialogue speech input by the user, and then combines a preset digital energy - saving pump standard word library and a digital energy - saving pump instruction library. Through unique association analysis, it accurately determines the control instructions in the dialogue speech. Among them, the digital energy - saving pump standard word library covers all the words in the instruction library and their extended words, and these extended words are composed of all the anagram permutations of the words, greatly improving the accuracy of instruction recognition. Finally, it executes the determined control instructions, thereby realizing efficient and intelligent human - machine dialogue interaction in the scenario of a digital energy - saving pump with low computing power, and effectively solving the long - standing instruction recognition problem in this field.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A human - machine dialogue method for a digital energy - saving pump, comprising:
[0007] Generate a voice statement according to the dialogue voice input by the user; the voice statement includes multiple words;
[0008] Combine a preset digital energy-saving pump standard word library and a digital energy-saving pump instruction library to determine the control instructions in the dialogue voice;
[0009] Execute the control instructions, where the digital energy-saving pump standard word library includes all the words in the digital energy-saving pump instruction library and the extended words of all the words, and the extended words include all the anagram arrangements of the words.
[0010] Specifically, the construction steps of the digital energy-saving pump standard word library include:
[0011] Based on all the control instruction texts in the digital energy-saving pump instruction library, obtain control instruction word vectors through a word segmentation algorithm;
[0012] Based on the control instruction word vectors, through a statistical algorithm, obtain the occurrence frequency of each key character in the effective text word vectors, and obtain the keyword frequency levels according to the occurrence frequency of each key character, and sort them in descending order;
[0013] According to the sorting result, arrange the key characters with the highest keyword frequency level and the remaining characters in the control instruction word vectors in ascending or descending order to form key character groups, and place the key character group identical to the control instruction text in the first place to obtain the first keyword extended group, and set a prefix mapping in the first keyword extended group;
[0014] Remove the key character with the highest keyword frequency level, and repeat the process of obtaining the first keyword extended group to obtain the keyword extended groups corresponding to the remaining key characters;
[0015] According to the keyword frequency levels, store all the keyword extended groups corresponding to each control instruction text in sub-nodes through a prefix tree algorithm to obtain the digital energy-saving pump standard word library.
[0016] Specifically, the steps of setting the prefix mapping include:
[0017] Establish a prefix mapping between the key character groups after the first position in the keyword extended group and the key character group at the first position. When the found key character group is any key character group after the first position, perform a search feedback using the key character group at the first position through the prefix mapping.
[0018] Specifically, the steps of storing in sub-nodes through a prefix tree algorithm include:
[0019] According to the keyword extended groups corresponding to each control instruction text, use the key character as the root node, and determine the mounting order chain of the remaining character storage nodes according to the remaining character position information in the keyword extended words;
[0020] Based on the position information of the keyword in the keyword expansion words, establish the connection relationship between the key characters and the node mounting order chain, and obtain the storage node tree corresponding to the keyword expansion words.
[0021] Furthermore, the establishment of the connection relationship between the keyword and the node mounting order chain is specifically as follows:
[0022] Assume that the key character corresponding to the current keyword expansion word is in the third position. Then, keep the remaining characters under the corresponding tree node, set the third tree node as an empty node, and connect the corresponding empty node to the root node to obtain the connection relationship between the keyword and the node mounting order chain.
[0023] Specifically, the steps of storing in separate nodes through the prefix tree algorithm further include:
[0024] Group the key characters that are the same as the control instruction text and perform hot encoding as the standard hot encoding of the keyword expansion words;
[0025] At the same time, for the remaining grouped words of the first keyword expansion group, adjust the standard hot encoding of the keyword expansion words according to the character position information in the corresponding composition to obtain the hot encoding vector corresponding to each remaining group of words in the first keyword expansion group;
[0026] According to the standard hot encoding of the keyword expansion words and the hot encoding vectors corresponding to each remaining group of words, obtain the character position hot encoding set corresponding to the first keyword expansion group;
[0027] Based on the acquisition process of the character position hot encoding set corresponding to the first keyword expansion group, obtain the character position hot encoding sets of the keyword expansion groups corresponding to the remaining key characters, and embed each character position hot encoding into the node mounting order chain of the corresponding keyword expansion word.
[0028] Specifically, the steps of constructing the standard word library of the digital energy-saving pump further include:
[0029] Obtain the historical speech sentences corresponding to the different dialects or multi-lingual control voices of historical users and the number of correct control instruction text searches;
[0030] According to the historical speech sentences, the correct control instruction text, and the search frequency, combine the keyword expansion groups through the text segmentation algorithm to obtain the character co-occurrence matrix in the historical speech sentences;
[0031] The character co-occurrence matrix is constructed by the character position hot encoding of the corresponding keyword expansion words in the historical speech sentences;
[0032] Based on the character co-occurrence matrix, obtain the frequencies of historical keyword expansion phrases, colloquial keyword expansion phrases, and the corresponding character position hot encodings, and add the colloquial keyword expansion phrases and the corresponding character position hot encodings to the corresponding keyword expansion phrase sets.
[0033] Specifically, the steps for constructing the digital energy-saving pump standard thesaurus further include:
[0034] Obtain the frequency of each keyword expansion word based on the frequencies of historical keyword expansion phrases and the corresponding character position hot encodings;
[0035] Build the frequency of each obtained keyword expansion word into the corresponding keyword expansion word in the digital energy-saving pump standard thesaurus;
[0036] Set a frequency threshold. When the frequency of the corresponding keyword expansion word is greater than the frequency threshold, map the corresponding keyword expansion word to the frequent word node configured in the digital energy-saving pump standard thesaurus.
[0037] Specifically, the steps for determining the control instruction in the dialogue voice include:
[0038] Based on the process of obtaining the keyword expansion phrases, obtain the real-time voice statement keyword expansion phrase set according to the real-time obtained voice statement;
[0039] According to each keyword expansion phrase corresponding to each keyword frequency level in the real-time voice statement keyword expansion phrase set, perform loop parallel path search through a multi-threaded search queue to obtain the real-time standard control instruction keyword expansion phrase set;
[0040] Obtain the real-time standard control instruction text based on the real-time standard control instruction keyword expansion phrase set combined with the digital energy-saving pump instruction library.
[0041] Specifically, the steps for performing loop parallel path search through a multi-threaded search queue include:
[0042] Construct a search queue for each keyword expansion word according to the keyword expansion words in each keyword expansion phrase in the real-time voice statement keyword expansion phrase set;
[0043] Based on the historical keyword expansion word frequencies, perform a priority search mark on the search queues containing keyword expansion words with frequencies greater than the frequency threshold to obtain the priority search queue;
[0044] Based on the priority search queue, use parallel threads to search for the frequent word nodes and the node attachment order chains corresponding to non-frequent words under the digital energy-saving pump standard thesaurus to obtain the first real-time standard control instruction keyword expansion phrase set;
[0045] If the number of keyword expansion phrase sets of the first real-time standard control instruction is greater than one, the remaining search queues in the keyword expansion word search queue are used to perform a secondary search on the first real-time standard control instruction keyword expansion phrase set to obtain the real-time standard control instruction keyword expansion phrase set.
[0046] A man-machine dialogue system for a digital energy-saving pump, comprising: an acquisition module and an instruction generation module;
[0047] The acquisition module is used to generate a voice statement according to the dialogue voice input by the user; the voice statement includes a plurality of words;
[0048] The instruction generation module is used to determine the control instruction in the dialogue voice by combining a preset digital energy-saving pump standard word library and a digital energy-saving pump instruction library.
[0049] Compared with the prior art, the beneficial effects of the present invention are:
[0050] Aiming at the deficiencies of the prior art, in terms of instruction recognition, by means of a digital energy-saving pump standard word library containing the words in the instruction library and their scrambled expansion words, combined with the character co-occurrence matrix, position vector and expansion word frequency analysis constructed from historical multi-language and dialect voice data, the accuracy of instruction recognition is greatly improved, and it can effectively handle complex input situations such as accents and disordered word orders; at the level of computing power requirements, bypassing the dependence on advanced deep learning algorithms, using low-computing-power-consuming methods such as database keyword search and statistical analysis, and reducing the search range by setting frequency thresholds and preferentially matching high-frequency words, etc., significantly reducing the amount of computation, which is in line with the low-computing-power operating environment of the energy-saving pump; in particular, the dynamic optimization mechanism based on historical data in this application can continuously update the expansion word frequency, making the word library keep up with the changes in the user's language habits, and at the same time optimizing the storage structure to improve the efficiency of word library management and use. Description of the Drawings
[0051] Figure 1 It is a flow chart of a man-machine dialogue method for a digital energy-saving pump of the present invention;
[0052] Figure 2 It is a module diagram of a man-machine dialogue system for a digital energy-saving pump of the present invention. Detailed Embodiments
[0053] Embodiment 1
[0054] Most of the existing man-machine dialogue methods use high-precision deep learning algorithms for corresponding semantic recognition and matching, but this also results in the need for a large amount of memory and computing power, increasing the implementation cost. And digital energy-saving pumps are mainly used for pumping and irrigation, which makes them consume a large amount of energy themselves. Therefore, it is impossible to configure the memory and computing devices to support high-precision operations for the operations in the aspect of man-machine dialogue. For this reason, please refer toFigure 1 , an embodiment provided by the present invention: a human-computer dialogue method for a digital energy-saving pump, the steps including:
[0055] S1. Generate a speech sentence according to the dialogue speech input by the user; the speech sentence includes multiple words;
[0056] Further, in this embodiment, the speech sentence is generated by calling a pre-trained speech and language recognition model. Here, only the corresponding recognition interface is called, and the corresponding speech and language recognition model is built into the edge computing node for speech recognition.
[0057] Further, the speech and language recognition model in this embodiment is obtained by fine-tuning the pre-trained Whisper-Tiny model using Chinese dialects, Mandarin, and foreign language voices from different regions, and can recognize different dialects and different languages, and convert the recognized language into Chinese.
[0058] This process uses Chinese dialects, Mandarin, and foreign language voices from different regions to fine-tune the pre-trained Whisper-Tiny model, enabling the model to recognize different dialects and different languages and convert them into Chinese; this greatly improves the versatility and adaptability of the system, can meet the needs of users with different language backgrounds, and expands the scope of use of the product; for example, different dialects have differences in pronunciation, intonation, and vocabulary usage. During the fine-tuning process, the model can gradually capture these differences and optimize its own parameters, so as to accurately recognize different speech inputs and convert them into a unified Chinese expression for subsequent processing. In addition, in actual application scenarios, such as the control scenario of a digital energy-saving pump, when the model is deployed on the edge computing node, when the user inputs dialogue speech, the edge node can immediately process it without uploading the speech data to the cloud; this not only speeds up the recognition speed but also reduces the network cost and latency caused by data transmission. For some scenarios with high real-time requirements and inconvenient data transmission, this method can effectively ensure the stable operation of the system while reducing the high cost caused by relying on cloud computing.
[0059] S2. Combine a preset digital energy-saving pump standard word library and a digital energy-saving pump instruction library to determine the control instruction in the dialogue speech; wherein, the digital energy-saving pump standard word library includes all the words in the digital energy-saving pump instruction library and the expansion words of all the words, and the expansion words include all the scrambled words of the words.
[0060] Further, in this embodiment, the digital energy-saving pump standard word library includes all the scrambled words of the words in the instruction library as extended words, which significantly increases the possibility of control instruction matching; even when there are cases of disordered word order in the user's input speech, the system can still accurately recognize the correct control instruction, improving the fault tolerance of the system to the user's input. For example, the standard instruction is "start the water pump", and the user may say "the water pump starts". Since the word library contains scrambled extended words such as "the water pump starts", the system can recognize it as a valid control instruction during the matching process, thereby accurately executing the corresponding operation and enhancing the user experience.
[0061] Further, the construction steps of the digital energy-saving pump standard word library in this embodiment include:
[0062] Based on all the control instruction texts in the digital energy-saving pump instruction library, through the word segmentation algorithm, obtain the control instruction word vectors;
[0063] Based on the control instruction word vectors, through the statistical algorithm, obtain the occurrence frequency of each key character in the effective text word vectors, and obtain the keyword frequency level according to the occurrence frequency of each key character, and arrange them in descending order;
[0064] According to the arrangement result, arrange the key characters with the highest keyword frequency level and the remaining characters in the control instruction word vectors in ascending or descending order to form key character groups, and place the key character group that is the same as the control instruction text in the first place to obtain the first keyword extended group, and set a pre-mapping in the first keyword extended group;
[0065] Further, in this embodiment, arranging the key character groups in ascending or descending order specifically means:
[0066] Suppose the corresponding control instruction word vector is "turn on the water pump"; disassemble "turn on the water pump" to obtain the four characters "open", "start", "water", and "pump", and randomly arrange and combine these four characters in ascending or descending order, such as "turn on", "start open", "turn on the water pump", "the water pump turns on", "turn on the pump", "pump starts open", etc. Among them, "turn on the water pump" is the key character group that is the same as the control instruction word vector and is placed in the first place of the keyword extended group; the remaining groups are combined with "turn on the water pump" to form the corresponding keyword extended group.
[0067] Further, the keyword extended group in this embodiment is constructed from multiple keyword extended words.
[0068] Further, the steps of setting the pre-mapping in this embodiment include:
[0069] Establish a pre - mapping between the key character groups after the first one in the keyword expansion phrase and the key character group of the first one. When the found key character group is any key character group after the first one, perform a search feedback using the key character group of the first one through the pre - mapping.
[0070] Remove the key character with the highest keyword frequency level, and repeat the process of obtaining the first keyword expansion phrase to obtain the keyword expansion phrases corresponding to the remaining key characters.
[0071] For each control instruction text, according to the keyword frequency level of all keyword expansion phrases, store them in sub - nodes through the prefix tree algorithm to obtain the standard word library of digital energy - saving pumps.
[0072] Further, the step of storing in sub - nodes through the prefix tree algorithm in this embodiment includes:
[0073] Based on the keyword expansion phrases corresponding to each control instruction text, use the key character as the root node, and determine the mounting order chain of the remaining character storage nodes according to the remaining character position information in the keyword expansion word.
[0074] According to the position information of the keyword in the keyword expansion word, establish a connection relationship between the key character and the mounting order chain of the nodes to obtain the storage node tree corresponding to the keyword expansion word.
[0075] Perform hot - encoding on the key character groups that are the same as the control instruction text as the standard hot - encoding of the keyword expansion word.
[0076] At the same time, for the remaining groups of the first keyword expansion phrase, adjust the standard hot - encoding of the keyword expansion word according to the character position information in the corresponding composition to obtain the hot - encoding vectors corresponding to each remaining group of the first keyword expansion phrase.
[0077] According to the standard hot - encoding of the keyword expansion word and the hot - encoding vectors corresponding to each remaining group, obtain the character position hot - encoding set corresponding to the first keyword expansion phrase.
[0078] Based on the acquisition process of the character position hot - encoding set corresponding to the first keyword expansion phrase, obtain the character position hot - encoding sets of the keyword expansion phrases corresponding to the remaining key characters, and embed each character position hot - encoding into the mounting order chain of the corresponding keyword expansion word.
[0079] This process first determines the keyword frequency levels through a statistical algorithm and constructs extended phrases accordingly, so that phrases related to high-frequency keywords have higher priority during search, reducing unnecessary search paths. The prefix tree algorithm uses keywords as root nodes and constructs a storage structure based on character position information, enabling rapid positioning along character paths during search and avoiding traversing the entire thesaurus. For example, when searching for instructions related to "start", starting from the "qi" character node of the prefix tree, relevant phrases can be quickly found according to the order chain of character position mounts; hot encoding further encodes the character position features of the phrases, enabling the system to more quickly determine the combination order of the phrases during search. Combining with the pre-mapping, when encountering incomplete or out-of-order phrases, the accurate match can also be quickly found through the mapping relationship, thus greatly accelerating the search speed.
[0080] The clear thesaurus structure in this process enables developers to intuitively understand the organization method of the thesaurus; for example, when new control instructions need to be added, according to the existing keyword frequency calculation, extended phrase construction, and prefix tree storage rules, the new instructions and their extended words can be reasonably incorporated into the digital energy-saving pump standard thesaurus; the combination of character position hot encoding and node mount order chain makes each character position feature in each extended phrase have more obvious differences, making it more straightforward to find the corresponding out-of-order extended phrases during search.
[0081] Furthermore, the construction steps of the digital energy-saving pump standard thesaurus in this embodiment further include:
[0082] Obtaining the historical speech sentences corresponding to different dialects or multilingual control voices of historical users and the search times of the correct control instruction text;
[0083] According to the historical speech sentences, the correct control instruction text, and the search frequencies, through a text segmentation algorithm combined with the keyword extended phrases, a character co-occurrence matrix in the historical speech sentences is obtained;
[0084] The character co-occurrence matrix is constructed by the character position hot encoding of the corresponding keyword extended words in the historical speech sentences;
[0085] Based on the character co-occurrence matrix, obtain the frequencies of the historical keyword extended phrases, colloquial keyword extended phrases, and the corresponding character position hot encodings, and add the colloquial keyword extended phrases and the corresponding character position hot encodings to the corresponding keyword extended phrase sets.
[0086] Furthermore, the colloquial keyword extended phrases in this embodiment are constructed according to the non-standardized control instruction text analyzed each time a voice instruction is received, for example:
[0087] In scenarios corresponding to different dialects and multilinguals:
[0088] Considering that historical users may have controlled voices in different dialects or multiple languages, real-time voice statements may be expressed in various dialects or different languages. For example, for the instruction "start the water pump", in some dialects it may be expressed as "turn on the pump", or there are corresponding expressions in other languages. At this time, the system needs to understand these diverse expression methods based on the historical voice data of different dialects and multiple languages incorporated when constructing the standard vocabulary of digital energy-saving pumps.
[0089] In the scenario corresponding to colloquial and non-standard expressions:
[0090] In actual conversations, users may use colloquial, abbreviated or non-standard expression methods. For example, "make the pump go faster" may be a colloquial expression of "increase the speed of the water pump". The system needs to flexibly match the keyword expansion phrases to identify such non-standard instruction expressions, which requires that the keyword expansion phrases not only contain different permutations and combinations of standard instructions, but also cover some common colloquial expression forms.
[0091] In the scenario corresponding to complex contexts and ellipsis:
[0092] In actual conversations, users may give instructions in complex contexts or omit some information because it is known from the context. For example, in the case where the water pump has been discussed, the user may only say "start", and at this time the system needs to combine the previous conversation history and relevant information in the standard vocabulary of digital energy-saving pumps to accurately identify the complete control instruction as "start the water pump".
[0093] Obtain the frequency of each keyword expansion word according to the frequency of occurrence of the historical keyword expansion phrases and the corresponding character position hot encoding;
[0094] Incorporate the obtained frequency of each keyword expansion word under the corresponding keyword expansion word in the standard vocabulary of digital energy-saving pumps;
[0095] Set a frequency threshold. When the frequency of the corresponding keyword expansion word is greater than the frequency threshold, map the corresponding keyword expansion word to the frequent word node configured in the standard vocabulary of digital energy-saving pumps.
[0096] This process can make the standard vocabulary of digital energy-saving pumps better adapt to the language habits of different users by obtaining the historical voice statements corresponding to the historical user's different dialects or multilingual control voices and the number of times of correct control instruction text searches, combining the text segmentation algorithm with keyword expansion phrases to construct a character co-occurrence matrix, and then obtaining the frequency of keyword expansion words, thereby improving the accuracy of instruction recognition. For example, in some dialects, the combination of specific words is relatively fixed. By analyzing the character co-occurrence relationship in historical voice statements and constructing a character co-occurrence matrix, these language patterns can be captured. For instance, in a certain regional dialect, the two characters "pump" and "open" often appear together in control instructions, and this relationship can be reflected by the character co-occurrence matrix. Based on this, by obtaining the frequency of keyword expansion phrases and the occurrence frequency of the corresponding character position hot encoding, the actual occurrence frequency, that is, the frequency, of each keyword expansion word can be more accurately understood. Incorporating the frequency information into the standard vocabulary of digital energy-saving pumps, when identifying real-time voice statements, the system can give priority to keyword expansion words with high frequencies, thus improving the accuracy of instruction recognition. Secondly, in actual human-computer interaction, users tend to use more colloquial expressions. For example, a user may say "turn on the pump" instead of the standard "start the water pump". By analyzing historical voice statements, these colloquial keyword expansion phrases, such as "turn on the pump" and its corresponding character position hot encoding, are extracted and incorporated into the vocabulary. In this way, when the system receives a similar colloquial instruction, it can accurately identify based on the information in the vocabulary, enabling users to use the standard instruction format without having to deliberately do so, improving the convenience and comfort of user use, and enhancing the user interaction experience. In addition, when searching for control instructions, frequently used instructions should be quickly locatable. By setting a frequency threshold, high-frequency keyword expansion words are stored in the frequent word nodes. When the system receives a real-time voice statement for instruction matching, it first searches in the frequent word nodes. Since the keyword expansion words in the frequent word nodes are those frequently used by users, matching items can be found more quickly, reducing the search time and consumption of computing resources. For example, if "start the water pump" is a frequently used instruction, after mapping it to the frequent word node, the system can give priority to searching in this node when identifying relevant instructions, greatly improving the search efficiency. Finally, over time and with the increase in the number of users, the language habits and common instructions of users may change. This process continuously updates information such as the character co-occurrence matrix and the frequency of keyword expansion words by continuously collecting the voice data of historical users, and then adjusts the storage and mapping relationships of keyword expansion words in the standard vocabulary of digital energy-saving pumps. For example, if it is found that a certain new colloquial expression gradually becomes popular after a period of time, the system can incorporate it into the vocabulary and perform corresponding optimizations by analyzing the new historical data, so that the vocabulary can always adapt to the latest user needs.
[0097] Further, the steps of determining the control instruction in the dialogue voice include:
[0098] Based on the real-time obtained speech sentences and the process of obtaining the keyword expansion phrases, obtain a real-time speech sentence keyword expansion phrase set;
[0099] According to the keyword expansion phrases corresponding to each keyword frequency level in the real-time speech sentence keyword expansion phrase set, perform cyclic parallel path search through a multi-threaded search queue to obtain a real-time standard control instruction keyword expansion phrase set;
[0100] Further, the steps of performing cyclic parallel path search through a multi-threaded search queue in this embodiment include:
[0101] According to the keyword expansion words in each keyword expansion phrase in the real-time speech sentence keyword expansion phrase set, construct a search queue for each keyword expansion word;
[0102] According to the historical keyword expansion word frequency, mark the search queues containing keyword expansion words with a frequency greater than the frequency threshold for priority search to obtain a priority search queue;
[0103] Based on the priority search queue, use parallel threads to search for the order chains of frequent word nodes and nodes corresponding to non-frequent words in the digital energy-saving pump standard word library to obtain a first real-time standard control instruction keyword expansion phrase set;
[0104] If the number of the first real-time standard control instruction keyword expansion phrase sets is greater than one, perform secondary search on the first real-time standard control instruction keyword expansion phrase set through the remaining search queues in the keyword expansion word search queue to obtain a real-time standard control instruction keyword expansion phrase set.
[0105] Combine the real-time standard control instruction keyword expansion phrase set with the digital energy-saving pump instruction library to obtain a real-time standard control instruction text.
[0106] This process performs cyclic parallel path search through a multi-threaded search queue, which can significantly improve the efficiency of searching for control instructions, reduce the time required for searching, and enable the system to convert the user's dialogue voice into standard control instructions more quickly; in the traditional search process, usually search keyword expansion phrases one by one in sequence, which is less efficient when dealing with a large amount of data. By using a multi-threaded search queue, multiple search tasks can be performed simultaneously, parallel processing different keyword expansion phrases, making full use of the advantages of modern multi-core processors and accelerating the overall search speed.
[0107] In the above process, since the keyword expansion words with high frequency are more likely to be the control instructions that the user wants to express in actual use, putting them in the priority search queue can enable the system to process these high-probability options first. For example, when the user often uses an instruction such as "start the water pump", the corresponding keyword expansion word has a high frequency. By preferentially searching for this word, a matching item can be found in the digital energy-saving pump standard word library faster, reducing the search for low-frequency word groups and improving the search efficiency and accuracy. This priority search mechanism is an optimization based on historical usage data. The system can allocate more computing resources to the most likely search path according to past usage situations, reducing the waste of search time on infrequently used or low-frequency word groups and improving the response speed of the system to the user's frequently used instructions.
[0108] In the above process, when multiple possible real-time standard control instruction keyword expansion phrase sets are found through the priority search queue, there may be multiple qualified results. At this time, through secondary search, the remaining search queue can be further screened to exclude mis-matched or inaccurate matching results. For example, the first search may generate multiple candidate results due to the similarity of some keyword expansion words. The secondary search can further refine and screen by checking other keyword expansion words, and finally find the control instruction that best meets the user's intention, avoiding misjudgment caused by the limitations of a single search and improving the accuracy of instruction recognition.
[0109] S3. Execute the control instruction to obtain the first effective control feedback voice and the control feedback interface.
[0110] Furthermore, in this embodiment, according to the control instruction, the corresponding operation process of the digital energy-saving pump is controlled, and the operation result is generated into the corresponding first effective control feedback voice and fed back to the control instruction issuer. At the same time, through the control feedback interface built in the digital energy-saving pump, the corresponding operation process is displayed in real time, and the display result is kept consistent with the feedback content of the first effective control feedback voice.
[0111] Furthermore, the digital energy-saving pump in this embodiment activates the man-machine dialogue interface in the normal operation state, checks the interface, icons, display and operation states, and interacts with the corresponding control instruction issuer.
[0112] Embodiment 2
[0113] Please refer to Figure 2 , another embodiment provided by the present invention: A man-machine dialogue system for a digital energy-saving pump, comprising: an acquisition module, an instruction generation module, and a feedback module;
[0114] The acquisition module is used to generate a voice statement according to the dialogue voice input by the user; the voice statement includes multiple words;
[0115] An instruction generation module, configured to determine a control instruction in the conversation voice by combining a preset digital energy-saving pump standard word library and a digital energy-saving pump instruction library.
[0116] A feedback module, configured to obtain a first effective control feedback voice and a control feedback interface based on the control instruction in the conversation voice.
[0117] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments without departing from the spirit and scope protected by the present invention and the claims. All of these fall within the protection scope of the present invention.
[0118] If the technical solution of the present disclosure involves personal information, before the product applying the technical solution of the present disclosure processes personal information, it has clearly informed the personal information processing rules and obtained the personal's independent consent. If the technical solution of the present disclosure involves sensitive personal information, before the product applying the technical solution of the present disclosure processes sensitive personal information, it has obtained the personal's separate consent and at the same time meets the requirement of "express consent". For example, at a personal information collection device such as a camera, a clear and prominent sign is set to inform that the personal information collection range has been entered and personal information will be collected. If an individual voluntarily enters the collection range, it is regarded as consenting to the collection of their personal information; or on a personal information processing device, when the personal information processing rules are informed by obvious signs / information, personal authorization is obtained through pop-up messages or by asking the individual to upload their personal information by themselves; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
Claims
1. A human-machine dialogue method for a digital energy-saving pump, characterized in that, Including: Generating a voice statement according to the dialogue voice input by the user; the voice statement includes multiple words; Combining a preset digital energy-saving pump standard word library and a digital energy-saving pump instruction library to determine the control instruction in the dialogue voice; Executing the control instruction, wherein the digital energy-saving pump standard word library includes all the words in the digital energy-saving pump instruction library and the extended words of all the words, and the extended words include all the anagram arrangements of the words; The construction steps of the digital energy-saving pump standard word library include: Based on all the control instruction texts in the digital energy-saving pump instruction library, obtaining control instruction word vectors through a word segmentation algorithm; Based on the control instruction word vectors, through a statistical algorithm, obtaining the occurrence frequency of each key character in the effective text word vectors, and obtaining a keyword frequency level according to the occurrence frequency of each key character, and arranging them in descending order; According to the arrangement result, arranging the key characters with the highest keyword frequency level and the remaining characters in the control instruction word vectors in ascending or descending order to form key character groups, and placing the key character group identical to the control instruction text in the first place to obtain the first keyword extended group, and setting a prefix mapping in the first keyword extended group; Removing the key character with the highest keyword frequency level, and repeating the process of obtaining the first keyword extended group to obtain the keyword extended groups corresponding to the remaining key characters; According to the keyword frequency level, storing all the keyword extended groups corresponding to each control instruction text in sub-nodes through a prefix tree algorithm to obtain a digital energy-saving pump standard word library.
2. The human-machine dialogue method of a digital energy-saving pump according to claim 1, characterized in that, The steps of setting the prefix mapping include: Establishing a prefix mapping between the key character groups after the first position in the keyword extended group and the key character group at the first position. When the found key character group is any key character group after the first position, performing a search feedback using the key character group at the first position through the prefix mapping.
3. The human-machine dialogue method of a digital energy-saving pump according to claim 2, characterized in that, The steps of storing in sub-nodes through the prefix tree algorithm include: According to the keyword extended groups corresponding to each control instruction text, using the key character as the root node, and determining the order chain of the remaining character storage nodes to be mounted according to the remaining character position information in the keyword extended word; Establishing a connection relationship between the key character and the order chain of the nodes to be mounted according to the position information of the keyword in the keyword extended word to obtain a storage node tree corresponding to the keyword extended word.
4. The human-machine dialogue method of a digital energy-saving pump according to claim 3, characterized in that, The steps of storing in sub-nodes through the prefix tree algorithm also include: Performing one-hot encoding on the key character group identical to the control instruction text as the standard one-hot encoding of the keyword extended word; At the same time, adjusting the standard one-hot encoding of the keyword extended word according to the character position information in the corresponding composition of the remaining groups in the first keyword extended group to obtain the one-hot encoding vector corresponding to each remaining group in the first keyword extended group; Obtaining a character position one-hot encoding set corresponding to the first keyword extended group according to the standard one-hot encoding of the keyword extended word and the one-hot encoding vector corresponding to each remaining group; Based on the acquisition process of the character position hot encoding set corresponding to the first keyword expansion phrase, obtain the character position hot encoding set of the remaining keyword characters, and embed each character position hot encoding into the node mounting order chain of the corresponding keyword expansion word.
5. The human-machine dialogue method of a digital energy-saving pump as claimed in claim 4, wherein, The steps for constructing the digital energy-saving pump standard vocabulary library further include: Obtain the historical speech sentences corresponding to the different dialects or multilingual control voices of historical users and the number of times of correct control instruction text searches; According to the historical speech sentences, correct control instruction texts, and search frequencies, combine the keyword expansion phrases through a text segmentation algorithm to obtain the character co-occurrence matrix in the historical speech sentences; The character co-occurrence matrix is constructed by the character position hot encoding of the corresponding keyword expansion words in the historical speech sentences; Based on the character co-occurrence matrix, obtain the frequencies of occurrence of historical keyword expansion phrases, colloquial keyword expansion phrases, and corresponding character position hot encodings, and add the colloquial keyword expansion phrases and corresponding character position hot encodings to the corresponding keyword expansion phrase sets.
6. The human-machine dialogue method of a digital energy-saving pump according to claim 5, characterized in that, The steps for constructing the digital energy-saving pump standard vocabulary library further include: According to the frequencies of occurrence of historical keyword expansion phrases and corresponding character position hot encodings, obtain the frequency of each keyword expansion word; Build the obtained frequency of each keyword expansion word into the corresponding keyword expansion word in the digital energy-saving pump standard vocabulary library; Set a frequency threshold. When the frequency of the corresponding keyword expansion word is greater than the frequency threshold, map the corresponding keyword expansion word to the frequent word node configured in the digital energy-saving pump standard vocabulary library.
7. The human-machine dialogue method of a digital energy-saving pump according to claim 6, characterized in that, The steps for determining the control instruction in the dialogue voice include: According to the real-time obtained speech sentence, based on the acquisition process of the keyword expansion phrase, obtain the real-time speech sentence keyword expansion phrase set; According to each keyword expansion phrase corresponding to each keyword frequency level in the real-time speech sentence keyword expansion phrase set, perform cyclic parallel path search through a multi-threaded search queue to obtain the real-time standard control instruction keyword expansion phrase set; According to the real-time standard control instruction keyword expansion phrase set combined with the digital energy-saving pump instruction library, obtain the real-time standard control instruction text.
8. The human-machine dialogue method of a digital energy-saving pump as claimed in claim 7, wherein, The steps for performing cyclic parallel path search through a multi-threaded search queue include: According to each keyword expansion word in each keyword expansion phrase in the real-time speech sentence keyword expansion phrase set, construct a search queue for each keyword expansion word; According to the historical keyword expansion word frequencies, perform a priority search mark on the search queues containing keyword expansion words with frequencies greater than the frequency threshold to obtain the priority search queue; Based on the priority search queue, use parallel threads to search the frequent word nodes and the node mounting order chains corresponding to non-frequent words under the digital energy-saving pump standard vocabulary library to obtain the first real-time standard control instruction keyword expansion phrase set; If the number of the first real-time standard control instruction keyword expansion phrase sets is greater than one, perform a secondary search on the first real-time standard control instruction keyword expansion phrase set through the remaining search queues in the keyword expansion word search queue to obtain the real-time standard control instruction keyword expansion phrase set.
9. A man-machine dialogue system for a digital energy-saving pump, which is used to implement the man-machine dialogue method for a digital energy-saving pump described in any one of claims 1-8, characterized in that, Include: An acquisition module and an instruction generation module; The obtaining module is configured to generate a speech statement according to the user's input dialogue speech; the speech statement includes a plurality of words; The instruction generation module is configured to determine the control instruction in the dialogue speech by combining a preset digital energy-saving pump standard word library and a digital energy-saving pump instruction library.
Citation Information
Patent Citations
Human-computer dialogue method and device
CN110555095B
Human-computer dialogue system and method
CN114691852B
Control method and device based on speech recognition
CN113160821A
Sensitive word matching method and device, electronic equipment and storage medium
CN116975379A