Voice interaction method and device, storage medium and electronic equipment
Through voice interaction methods, users' voices are obtained and processed, and terminal interaction is achieved using pre-trained keyword models, which solves the problem of difficult operation of smart terminals and improves the interactive experience between the elderly and visually impaired people.
Patent Information
- Application Number
- CN202411455865.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-01-10
AI Technical Summary
The existing smart terminal interaction method is difficult to operate for the elderly and visually impaired, and the learning cost is high, which cannot meet the special needs of users.
Through voice interaction method, the voice input by the user is obtained, converted into voice signals, preprocessed, determine the characteristics of the voice signal, input the pre-trained keyword model, output keywords, obtain data in the database based on the keywords, and display voice Interaction results to achieve accurate human-computer interaction.
It improves the user experience and meets the special needs of users, especially the interaction between the elderly and visually impaired groups, making terminal operation more convenient and intuitive.
Smart Images

Figure CN119296535A_ABST
Abstract
Description
Background Art
[0002] With the development of terminal technology, human life is increasingly inseparable from various terminal applications. The interaction between users and terminals is also gradually improving. Take mobile terminals as an example, from the keyboard interaction of non-smartphone peripherals to the touch screen graphic interaction of smart phones.
[0003] In the prior art, when processing business through smart terminals, interaction on the page is performed through click operations, which improves the use efficiency and user experience of the mobile terminal. However, for the elderly, the visually impaired and other groups, excessive human-computer interaction makes user operation difficult and the learning cost high.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The present disclosure provides a voice interaction method and device, a storage medium and an electronic device, which at least to a certain extent overcome the problem that terminal interaction in related technologies cannot meet the special needs of users.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, a voice interaction method is provided, including: obtaining voice input by a user and converting the voice into a voice signal; preprocessing the voice signal and determining the characteristics of the voice signal; inputting the characteristics of the voice signal into a pre-trained keyword model and outputting keywords; obtaining corresponding data in a database according to the keywords, rendering the corresponding data in the database on a front-end page, and displaying the voice interaction results.
[0008] In some embodiments, the preprocessing of the speech signal to determine the characteristics of the speech signal includes: framing the speech signal and windowing the framed speech signal; performing a discrete Fourier transform on the windowed speech signal to determine the power spectrum of the speech signal; inputting the power spectrum of the speech signal into a Mel filter group to output the characteristics of the speech signal.
[0009] In some embodiments, the step of inputting the power spectrum of the speech signal into a Mel filter group and outputting the characteristics of the speech signal comprises: inputting the power spectrum of the speech signal into a Mel filter group, performing discrete cosine transform on the output of the Mel filter group, and outputting Mel-frequency cepstral coefficient characteristics of the speech signal.
[0010] In some embodiments, after acquiring the voice input by the user and converting the voice into a voice signal, the method further includes: converting the voice signal into text information and displaying it on a front-end page; acquiring first operation information from the user, wherein the first operation information indicates that the user confirms whether the text information is consistent with the voice expression input by the user; if the first operation information indicates that the user confirms that the text information is consistent with the voice expression input by the user, preprocessing the voice signal to determine the characteristics of the voice signal; if the first operation information indicates that the user confirms that the text information is inconsistent with the voice expression input by the user, reacquiring the voice input by the user.
[0011] In some embodiments, after obtaining corresponding data in a database according to the keyword, rendering the corresponding data in the database on a front-end page, and displaying the voice interaction result, the method further includes: obtaining second operation information of the user, the second operation information indicating that the user confirms whether the voice interaction result is consistent with the voice expression input by the user; if the second operation information indicates that the user confirms that the voice interaction result is consistent with the voice expression input by the user, the voice interaction is terminated; if the second operation information indicates that the user confirms that the voice interaction result is inconsistent with the voice expression input by the user, the voice signal is re-preprocessed to determine the characteristics of the voice signal.
[0012] In some embodiments, the pre-trained keyword model includes: determining the pre-trained keyword model based on constructing a decision tree, wherein the decision tree performs decision analysis through a tree structure.
[0013] In some embodiments, constructing a decision tree includes: obtaining historical speech; clustering the first letters of keywords in the historical speech, combining words with the same first letters in the keywords into a tree structure, and assigning different keywords with the same first character to different tree branches to construct a decision tree.
[0014] According to another aspect of the present disclosure, a voice interaction device is also provided, including: a voice acquisition and conversion module, used to acquire the voice input by the user and convert the voice into a voice signal; a voice preprocessing module, used to preprocess the voice signal and determine the characteristics of the voice signal; a keyword output module, used to input the characteristics of the voice signal into a pre-trained keyword model and output keywords; a voice display module, used to acquire corresponding data in a database according to the keywords, render the corresponding data in the database on a front-end page, and display the voice interaction results.
[0015] According to another aspect of the present disclosure, an electronic device is also provided, which includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned voice interaction methods by executing the executable instructions.
[0016] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the voice interaction method described in any one of the above is implemented.
[0017] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the voice interaction method of any one of the above is implemented.
[0018] The voice interaction method provided in the embodiments of the present disclosure obtains the voice input by the user and converts the voice into a voice signal; pre-processes the voice signal to determine the characteristics of the voice signal; inputs the characteristics of the voice signal into a pre-trained keyword model and outputs the keyword; obtains the corresponding data in the database according to the keyword, renders the corresponding data in the database on the front-end page, and displays the voice interaction result. The present disclosure extracts features and recognizes keywords of the voice input by the user, and finally calls the corresponding data in the database according to the keyword to render on the front-end, which can perform accurate human-computer interaction on the terminal according to the user's voice, meet the special needs of the user, and improve the user experience.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0021] Figure 1 A schematic diagram showing a structure of a voice interaction system in an embodiment of the present disclosure;
[0022] Figure 2 A flow chart of a voice interaction method in an embodiment of the present disclosure is shown;
[0023] Figure 3 A voice interaction method process in an embodiment of the present disclosure is shown Figure 1 Flowcharts of specific examples;
[0024] Figure 4 A flowchart showing another specific example of a voice interaction method flowchart in an embodiment of the present disclosure;
[0025] Figure 5 A flowchart showing another specific example of a voice interaction method flowchart in an embodiment of the present disclosure;
[0026] Figure 6 A flowchart showing another specific example of a flow chart of a voice interaction method in an embodiment of the present disclosure;
[0027] Figure 7 A schematic diagram showing a decision tree in a voice interaction method in an embodiment of the present disclosure;
[0028] Figure 8 A schematic diagram of a voice interaction device in an embodiment of the present disclosure is shown;
[0029] Fig. 9 A structural block diagram of a computer device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0031] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0032] For ease of understanding, before introducing the embodiments of the present disclosure, several terms involved in the embodiments of the present disclosure are first explained as follows:
[0033] MFCC: Mel Frequency Cepstrum Coefficient, Mel Frequency Cepstrum Coefficient;
[0034] FFT: Fast Fourier Transform, fast Fourier transform;
[0035] DCT: Discrete Cosine Transform, discrete cosine transform.
[0036] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.
[0037] Figure 1 FIG. 1 shows an exemplary application system architecture diagram to which the voice interaction method in the embodiment of the present disclosure can be applied. Figure 1 As shown, the system architecture may include a terminal device 101 , a network 102 and a server 103 .
[0038] The network 102 is a medium for providing a communication link between the terminal device 101 and the server 103, and can be a wired network or a wireless network.
[0039] Optionally, the wireless network or wired network described above uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPSec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.
[0040] The terminal device 101 can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, wearable devices, augmented reality devices, virtual reality devices, etc.
[0041] Optionally, the client of the application installed in different terminal devices 101 is the same, or the client of the same type of application based on different operating systems. Based on the different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile client, a PC client, etc.
[0042] In one example of the present disclosure, the terminal can obtain voice input by the user and convert the voice into a voice signal; preprocess the voice signal to determine the characteristics of the voice signal; input the characteristics of the voice signal into a pre-trained keyword model and output the keyword; obtain the corresponding data in the database according to the keyword, render the corresponding data in the database on the front-end page, and display the voice interaction results.
[0043] The server 103 may be a server that provides various services, such as a background management server that provides support for the device operated by the user using the terminal device 101. The background management server may analyze and process the received request and other data, and feed back the processing results to the terminal device.
[0044] Optionally, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0045] Those skilled in the art will know that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration, and any number of terminal devices, networks and servers may be provided according to actual needs, and the embodiments of the present disclosure do not limit this.
[0046] Figure 2 A flow chart of a voice interaction method in an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the voice interaction method provided in the embodiment of the present disclosure includes the following steps:
[0047] S202, obtaining the voice input by the user, and converting the voice into a voice signal.
[0048] It should be noted that the above-mentioned voice can be the external form of language, the symbol system that most directly records people's thinking activities, and is the sound with certain social significance emitted by people's vocal organs. For example, the user inputs voice through a microphone. The above-mentioned voice signal can be an analog signal generated by the vibration of sound in the air, which is manifested as a continuous and smooth waveform in real life. The horizontal axis of the voice signal represents the time axis, and the vertical axis represents the strength or amplitude of the sound.
[0049] S204, preprocessing the speech signal to determine the characteristics of the speech signal.
[0050] It should be noted that the above preprocessing may be speech signal processing, the purpose of which is to extract effective speech information in a complex speech environment. For example, the above preprocessing may include noise reduction processing, frame processing, feature extraction, etc. The above feature may be a sensitive MFCC feature.
[0051] For example, when the user inputs a series of speech, it is represented by a set Q, and the connection between different speech is represented by and, so that Q = {t1, t2, t3, ..., t n}Using T to represent the frequency of input speech in the set, the following formula (1) can be determined:
[0052] T= {(c i1 ,f),(c i2 ,f)...(c is )}; (1)
[0053] Among them, c i1 ,c i2 ,c is Respectively represent different speech input definitions, and f represents the definition frequency. The input speech is analyzed through the language library and its main definitions are extracted and processed to obtain the accurate definition of speech expression. The processed definition set is expressed as the following formula (2):
[0054] D i = {w i1 ,w i2 ,...,w i3 ,...,w im}; (2)
[0055] Among them, w i1 ,w i2 ,w i3 ,w im Represent different keywords respectively, and calculate the corresponding frequencies to obtain the following formula (3):
[0056] D i ={(w i2 ,g(di ,s1));(w i2 ,g(d i ,s i ));...;(w ij ,g(d i ,s1));...;(w im ,g(d i ,s2))};(3)
[0057] Among them, g represents a constant, s and d represent the corresponding frequencies of the processed speech respectively. The simple statistical method is used, and the result obtained is not accurate enough to express the meaning of the whole speech. Therefore, the calculation process is improved to obtain the following formula (4):
[0058]
[0059] where h j and P i can represent the adjustment coefficient, h j is the overall speech, P i The specific position of the speech in it needs to be obtained according to the actual situation. Through the above operations, the preliminary preprocessing of the speech is completed.
[0060] S206, input the features of the speech signal into a pre-trained keyword model, and output keywords.
[0061] It should be noted that the above keywords may be used to trigger specific responses or operations, for example, keywords for specific operations on a page.
[0062] S208, obtaining corresponding data in the database according to the keywords, rendering the corresponding data in the database on the front-end page, and displaying the voice interaction results.
[0063] It should be noted that the above rendering can refer to the process of generating HTML pages from data in the database and displaying them to users through browser parsing. This process is the core of dynamic Web applications, which allows developers to dynamically generate page content based on different data instead of manually writing static HTML files for each change.
[0064] The present invention performs feature extraction and keyword recognition on the voice input by the user, and finally calls the corresponding data in the database according to the keywords for rendering on the front end. It can perform accurate human-computer interaction on the terminal according to the user's voice, meet the user's special needs, and improve the user experience.
[0065] In one embodiment of the present disclosure, Figure 3As shown, the voice interaction method provided in the embodiment of the present disclosure can pre-process the voice signal through the following steps to determine the characteristics of the voice signal, thereby improving the accuracy and adaptability of voice signal recognition:
[0066] S302, framing the speech signal, and windowing the framed speech signal;
[0067] S304, performing discrete Fourier transform on the windowed speech signal to determine a power spectrum of the speech signal;
[0068] S306, inputting the power spectrum of the speech signal into the Mel filter bank, and outputting the features of the speech signal.
[0069] For example, to extract speech feature parameters, the original waveform of speech is difficult to identify directly, and some methods are needed to complete the extraction of feature parameters. The specific extraction process is as follows: speech signal, preprocessing windowing, FFT, filter bank, discrete cosine DCT, MFCC output. The input speech is pre-processed and the lip radiation effect is analyzed so that the acquired speech signal has a smaller high-frequency part. The preprocessing can reduce the influence of noise to obtain an accurate signal, and the processed signal and the original signal are calculated. The formula is as follows (5):
[0070] y(m)=x(m)-0.97*x(m-1); (5)
[0071] Among them, y(m) represents the processed signal and x(m) represents the original signal.
[0072] In order to ensure that the short-term analysis results of speech signals are more accurate, it is necessary to process speech signals in frames. The formation process of speech is different from that of sound wave vibrations, and the formation speed is very slow. Therefore, according to the principle of short-term stability, the time range of the frame length is fixed within 10 to 30 ms, and the overlapping frame is used to avoid errors at both ends of the signal. In the overlapping frame processing process, the overlapping part of the previous and next frames is represented by the frame shift, the frame length is set to 30 ms, and the frame shift is set to 15 ms. Based on the finite length window, the frame is now divided into frames in combination with weighted processing. The original signal is represented by o(n) and s(n) respectively, and the frame length is represented by N, and the expression of the rectangular window and the Hamming window is obtained as follows (6):
[0073]
[0074] Compared with the Hamming window, the main lobe width of the rectangular window is reduced by about one-fold, showing a higher resolution. However, the Hamming window is smoother and can better present the signal spectrum characteristics. Therefore, the Hamming window is selected to analyze the speech spectrum; the rectangular window is used to calculate the short-time energy and average amplitude. After the frame processing, the segmented short-time speech signal is obtained and regarded as an independent random signal. The discrete cosine transform is used to obtain the final feature parameter C n , calculated by the following formula (7):
[0075]
[0076] Among them, C n represents the characteristic parameter; M represents the number of filter groups; n represents a single frame of speech signal; i represents the output result.
[0077] In one example of the present disclosure, the power spectrum of a speech signal is input into a Mel filter bank, and the characteristics of the output speech signal include: inputting the power spectrum of the speech signal into the Mel filter bank, performing discrete cosine transform on the output of the Mel filter bank, and outputting the Mel frequency cepstrum coefficient characteristics of the speech signal. The present disclosure inputs the power spectrum of a speech signal into a Mel filter bank, and extracts MFCC features through discrete cosine transform, which can simulate the auditory characteristics of the human ear, reduce dimensionality and decorrelate, enhance robustness, and improve the accuracy of speech recognition.
[0078] In one embodiment of the present disclosure, Figure 4 As shown, the voice interaction method provided in the embodiment of the present disclosure further includes the following steps after obtaining the voice input by the user and converting the voice into a voice signal, which can adjust and optimize the algorithm and model of voice recognition according to the user's feedback to improve the overall recognition accuracy and efficiency:
[0079] S402, converting the voice signal into text information and displaying it on the front-end page;
[0080] S404, obtaining first operation information of the user, where the first operation information indicates whether the text information confirmed by the user is consistent with the voice expression input by the user;
[0081] S406, if the first operation information indicates that the user confirms that the text information is consistent with the voice expression input by the user, preprocessing the voice signal to determine the characteristics of the voice signal;
[0082] S408: If the first operation information indicates that the user confirmation text information is inconsistent with the voice expression input by the user, the voice input by the user is re-acquired.
[0083] In one embodiment of the present disclosure, Figure 5As shown, the voice interaction method provided in the embodiment of the present disclosure further includes the following steps after obtaining the corresponding data in the database according to the keywords, rendering the corresponding data in the database on the front-end page, and displaying the voice interaction results. Through the user confirmation mechanism, the user can immediately point out the conversion error, thereby ensuring that the subsequent processing is based on the correct text information and reducing misunderstandings and erroneous operations:
[0084] S502, obtaining second operation information of the user, where the second operation information indicates whether the voice interaction result is confirmed by the user to be consistent with the voice expression input by the user;
[0085] S504, if the second operation information indicates that the user confirms that the voice interaction result is consistent with the voice expression input by the user, then the voice interaction is terminated;
[0086] S506: If the second operation information indicates that the user confirms that the voice interaction result is inconsistent with the voice expression input by the user, the voice signal is preprocessed again to determine the characteristics of the voice signal.
[0087] In a specific example, Figure 6 As shown, the voice interaction method provided in the embodiment of the present disclosure includes the following steps:
[0088] S601, user voice input;
[0089] S602, speech translation and analysis;
[0090] S603, display "Is this the operation you want?", if a yes instruction is received, jump to S604, if a no instruction is received, jump to S601;
[0091] S604, intelligent start interaction model;
[0092] S605, intelligently analyzing the user business interaction logic;
[0093] S606, the front end finds the corresponding business logic through data comparison and criticism, and requests and completes the corresponding interface;
[0094] S607, calling a database;
[0095] S608, data return;
[0096] S609, intelligent monitoring data arrives;
[0097] S610, front-end data rendering;
[0098] S611, display "Is this the operation you want?", if a yes instruction is received, end the process, if a no instruction is received, jump to S604.
[0099] In the voice interaction process disclosed in the present invention, first, the user enters the intelligent interaction interface, performs voice input for the keywords in the interface, and translates and analyzes the voice. The results of the analysis are presented to the user through text. If the content that the user wants to access is not hit, the intelligent interaction recognition is performed again, that is, the voice input is performed again. If the operation that the user wants to complete is hit, the intelligent interaction mode is entered, and the front end performs the relevant operations of the page through the keywords after intelligent analysis, requests the corresponding interface, and finally obtains the data in the database through the server. The front end monitors the data update and renders the page, and finally completes the entire process of intelligent interaction. Converting voice signals into text information and introducing a user confirmation mechanism not only improves user experience and system performance, but also promotes technological innovation and trust enhancement, laying a solid foundation for the widespread application of voice recognition technology. In addition, in the process of intelligent interaction, the keywords of user operations are the top priority. The front end calls the corresponding service through the keywords, completes the request of the corresponding interface, and renders the corresponding data. Among them, the keyword analysis link is the top priority for the accurate analysis of user behavior in this article, which is mainly divided into the following processes: voice input, voice preprocessing, feature extraction, model output keywords, output the final result for keyword processing, and feedback and update according to the results.
[0100] Among them, keyword recognition includes voice input, voice preprocessing, feature extraction, keyword recognition model, keyword processing, output results, feedback and update. Voice input includes the user inputting voice through a microphone and the voice signal being converted into a digital signal; voice preprocessing includes noise reduction processing and voice frame processing of the voice signal; feature extraction includes extracting voice features and vectorizing voice features; the keyword recognition model includes using the trained key model to classify voice features and output keyword recognition results; keyword processing includes logical mapping processing of the recognized keywords and corresponding processing of the keywords in combination with the business scenario; the output results include the user receiving the keywords on the page to continue or abandon the operation, mapping the processed keywords with the page response service, and operating the corresponding interface interaction; feedback and update include the user's feedback on the processing results and adjusting the keyword recognition model or processing strategy based on the feedback.
[0101] In one embodiment of the present disclosure, the pre-trained keyword model includes: determining the pre-trained keyword model according to building a decision tree, wherein the decision tree performs decision analysis through a tree structure. Making decisions through a tree structure can correctly classify instances and is suitable for processing classification and regression problems.
[0102] In one embodiment of the present disclosure, building a decision tree includes: obtaining historical speech; clustering the first letters of keywords in the historical speech, combining words with the same first letter in the keywords into a tree structure, and different keywords with the same first character belong to different tree branches to build a decision tree. Through such a construction process, a tree structure clustered by first letters can be obtained, in which each node represents a specific first letter, and the child nodes are all keywords under the first letter. This structure can be suitable for organizing data with a hierarchical relationship, such as keywords classified by first letters.
[0103] In a specific example, a keyword recognition decision tree is established based on the clustering of the first letters of the keywords. The input content of the decision tree is the keyword, and the sensitivity factor is set according to the keyword, and finally the following is obtained: Figure 7 The decision tree shown.
[0104] Figure 7 The keyword decision tree analyzes the keyword statistics. Let n represent the number of keywords, a represent a single keyword, i and j represent keywords and sensitive words, and m represent the keyword length. In the calculation process, k represents the node number. After inputting keyword a, the keyword feature set F is arbitrarily distributed into K subsets, and the attribute features between each subset are not overlapped. Each feature subset has H = n / K attribute features. At this time, the keyword length L is expressed by the following formula (8):
[0105]
[0106] Among them, the length of Chinese is m, and its first letter is obtained. Based on this, the corresponding subtree query is entered and output. The depth of the decision tree is determined by the length of the keyword with higher frequency. When the output result meets the actual requirements, the result is directly output for the next keyword processing; when the output result cannot meet the requirements, the decision tree operation needs to be repeated until the output result meets the requirements, thereby completing the parameter initialization processing. In addition, each node in the decision tree stores information such as keywords, keyword frequency, and sensitivity level. Through the keyword recognition algorithm, the word frequency and position factor in the input voice are calculated, and the voice information after the decision tree query is obtained. In order to balance the impact of voice length on keyword intelligent recognition, the text length and error coefficient are represented by len and s respectively, then k = len × s. And through the k node values, the calculation formula for obtaining the voice weight W (weight) is the following formula (9):
[0107]
[0108] According to formula (9), the sensitivity threshold is set to 0 to obtain the voice sensitivity calculation result. When the sensitivity of a word in the voice is greater than the sensitivity threshold, the word is a keyword; when the word sensitivity is less than the threshold, the word is not a keyword. According to the sensitivity calculation, the specific keyword matching results are shown. Through the above operations, the recognition of voice keywords is completed and the recognition results are presented. The highest score is obtained and presented to the user.
[0109] Serial number Keywords Fraction 1 Query 0.5 2 download 0.7
[0110] The user can decide whether to continue based on the operational feedback presented on the interface. If it does not meet psychological expectations, the user can directly enter the next intelligent recognition by inputting the voice again after giving feedback. The algorithm model is continuously updated through a large amount of user feedback, and the sensitivity threshold of the model is appropriately adjusted according to different business scenarios. Intelligent recognition and keyword matching are completed in combination with specific business scenarios. The front end calls the corresponding data service through scene and service mapping, monitors the arrival of data, and completes the data rendering of the interface.
[0111] The present invention uses recognition algorithms, voice input, voice preprocessing, feature extraction, model output keywords, outputs final results based on keyword processing, and updates based on the results. The user completes an intelligent interaction, from voice recognition to automatic data service request and automatic rendering of front-end interface data.
[0112] Based on the same inventive concept, the present disclosure also provides a voice interaction device, as described in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0113] Figure 8 A schematic diagram of a voice interaction device in an embodiment of the present disclosure is shown. Figure 8 As shown, the device includes: a speech acquisition and conversion module 81, a speech preprocessing module 82, a keyword output module 83 and a speech display module 84:
[0114] The voice acquisition and conversion module 81 is used to acquire the voice input by the user and convert the voice into a voice signal;
[0115] A speech preprocessing module 82, used to preprocess the speech signal and determine the characteristics of the speech signal;
[0116] A keyword output module 83, used to input the features of the speech signal into a pre-trained keyword model and output keywords;
[0117] The voice display module 84 is used to obtain corresponding data in the database according to keywords, render the corresponding data in the database on the front-end page, and display the voice interaction results.
[0118] In one example of the present disclosure, the above-mentioned speech preprocessing module 82 is also used to frame the speech signal and window the framed speech signal; perform discrete Fourier transform on the windowed speech signal to determine the power spectrum of the speech signal; input the power spectrum of the speech signal into the Mel filter group to output the characteristics of the speech signal.
[0119] In one example of the present disclosure, the speech preprocessing module 82 is further used to input the power spectrum of the speech signal into a Mel filter bank, and perform discrete cosine transform on the output of the Mel filter bank to output Mel-frequency cepstral coefficient features of the speech signal.
[0120] In one example of the present disclosure, the above-mentioned voice interaction device also includes a first operation confirmation module, which is used to convert the voice signal into text information and display it on the front-end page; obtain the user's first operation information, the first operation information indicating whether the user confirms that the text information is consistent with the voice expression input by the user; if the first operation information indicates that the user confirms that the text information is consistent with the voice expression input by the user, the voice signal is preprocessed to determine the characteristics of the voice signal; if the first operation information indicates that the user confirms that the text information is inconsistent with the voice expression input by the user, the voice input by the user is re-acquired.
[0121] In one example of the present disclosure, the above-mentioned voice interaction device also includes a second operation confirmation module, which is used to obtain the user's second operation information, and the second operation information indicates whether the user confirms that the voice interaction result is consistent with the voice expression input by the user; if the second operation information indicates that the user confirms that the voice interaction result is consistent with the voice expression input by the user, the voice interaction is terminated; if the second operation information indicates that the user confirms that the voice interaction result is inconsistent with the voice expression input by the user, the voice signal is re-preprocessed to determine the characteristics of the voice signal.
[0122] In an example of the present disclosure, the pre-trained keyword model in the keyword output module 83 includes: determining the pre-trained keyword model according to constructing a decision tree, wherein the decision tree performs decision analysis through a tree structure.
[0123] In one example of the present disclosure, constructing a decision tree in the keyword output module 83 includes: obtaining historical speech; clustering the first letters of the keywords in the historical speech, combining words with the same first letters in the keywords into a tree structure, and different keywords with the same first character belong to different tree branches to construct a decision tree.
[0124] It should be noted that the above-mentioned voice acquisition conversion module 81, voice preprocessing module 82, keyword output module 83 and voice display module 84 correspond to S202 to S208 in the method embodiment, and the examples and application scenarios implemented by the above-mentioned modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned method embodiment. It should be noted that the above-mentioned modules as part of the device can be executed in a computer system such as a set of computer executable instructions.
[0125] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0126] Refer to the following Fig. 9 The electronic device 900 according to this embodiment of the present disclosure is described. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0127] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include but are not limited to: at least one processing unit 910, at least one storage unit 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).
[0128] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 executes the steps described in the above “Exemplary Method” section of this specification according to various exemplary embodiments of the present disclosure.
[0129] For example, the processing unit 910 can execute the following steps of the above-mentioned method embodiment: obtain the voice input by the user and convert the voice into a voice signal; preprocess the voice signal to determine the characteristics of the voice signal; input the characteristics of the voice signal into a pre-trained keyword model and output the keyword; obtain the corresponding data in the database according to the keyword, render the corresponding data in the database on the front-end page, and display the voice interaction results.
[0130] For example, the processing unit 910 can execute the following steps of the above-mentioned method embodiment: frame the speech signal and window the framed speech signal; perform discrete Fourier transform on the windowed speech signal to determine the power spectrum of the speech signal; input the power spectrum of the speech signal into the Mel filter group and output the characteristics of the speech signal.
[0131] For example, the processing unit 910 may execute the following steps of the above method embodiment: input the power spectrum of the speech signal into the Mel filter bank, perform discrete cosine transform on the output of the Mel filter bank, and output the Mel-frequency cepstral coefficient features of the speech signal.
[0132] For example, the processing unit 910 can execute the following steps of the above method embodiment: converting the voice signal into text information and displaying it on the front-end page; obtaining the user's first operation information, the first operation information indicating whether the user confirms that the text information is consistent with the voice expression input by the user; if the first operation information indicates that the user confirms that the text information is consistent with the voice expression input by the user, preprocessing the voice signal to determine the characteristics of the voice signal; if the first operation information indicates that the user confirms that the text information is inconsistent with the voice expression input by the user, re-acquiring the voice input by the user.
[0133] For example, the processing unit 910 can execute the following steps of the above-mentioned method embodiment: obtaining the user's second operation information, the second operation information indicating whether the user confirms that the voice interaction result is consistent with the voice expression input by the user; if the second operation information indicates that the user confirms that the voice interaction result is consistent with the voice expression input by the user, then ending the voice interaction; if the second operation information indicates that the user confirms that the voice interaction result is inconsistent with the voice expression input by the user, then re-preprocessing the voice signal to determine the characteristics of the voice signal.
[0134] For example, the processing unit 910 may execute the following steps of the above method embodiment: determining a pre-trained keyword model based on constructing a decision tree, wherein the decision tree performs decision analysis through a tree structure.
[0135] For example, the processing unit 910 can execute the following steps of the above method embodiment: obtain historical speech; cluster the first letters of the keywords in the historical speech, combine the words with the same first letters in the keywords into a tree structure, and different keywords with the same first character belong to different tree branches to construct a decision tree.
[0136] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .
[0137] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0138] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0139] The electronic device 900 may also communicate with one or more external devices 940 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or may communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0140] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0141] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer program product, which includes: a computer program, which implements the above-mentioned voice interaction method when executed by a processor.
[0142] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.
[0143] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0144] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0145] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0146] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0147] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0148] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0149] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0150] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A voice interaction method, characterized in that: include: Acquire the voice input by the user and convert the voice into a voice signal; Preprocessing the speech signal to determine the characteristics of the speech signal; Inputting the features of the speech signal into a pre-trained keyword model and outputting keywords; The corresponding data in the database is obtained according to the keyword, and the corresponding data in the database is rendered on the front-end page to display the voice interaction result.
2. The voice interaction method according to claim 1, characterized in that: The preprocessing of the speech signal to determine the characteristics of the speech signal comprises: Frame the speech signal, and window the framed speech signal; Performing a discrete Fourier transform on the windowed speech signal to determine a power spectrum of the speech signal; The power spectrum of the speech signal is input into the Mel filter bank, and the features of the speech signal are output.
3. The voice interaction method according to claim 2, characterized in that: The power spectrum of the speech signal is input into a Mel filter bank, and the characteristics of the output speech signal include: The power spectrum of the speech signal is input into a Mel filter bank, and a discrete cosine transform is performed on the output of the Mel filter bank to output a Mel-frequency cepstral coefficient feature of the speech signal.
4. The voice interaction method according to any one of claims 1 to 3, characterized in that: After acquiring the voice input by the user and converting the voice into a voice signal, the method further includes: Convert the voice signal into text information and display it on the front-end page; Acquiring first operation information of the user, where the first operation information indicates that the user confirms whether the text information is consistent with the voice expression input by the user; If the first operation information indicates that the user confirms that the text information is consistent with the voice expression input by the user, preprocessing the voice signal to determine the characteristics of the voice signal; If the first operation information indicates that the user confirms that the text information is inconsistent with the voice expression input by the user, the voice input by the user is re-acquired.
5. The voice interaction method according to claim 4, characterized in that: After acquiring corresponding data in a database according to the keyword, rendering the corresponding data in the database on a front-end page, and displaying the voice interaction result, the method further includes: Acquiring second operation information of the user, where the second operation information indicates that the user confirms whether the voice interaction result is consistent with the voice expression input by the user; If the second operation information indicates that the user confirms that the voice interaction result is consistent with the voice expression input by the user, then the voice interaction is terminated; If the second operation information indicates that the user confirms that the voice interaction result is inconsistent with the voice expression input by the user, the voice signal is preprocessed again to determine the characteristics of the voice signal.
6. The voice interaction method according to claim 1, characterized in that: The pre-trained keyword model includes: A pre-trained keyword model is determined based on constructing a decision tree, wherein the decision tree performs decision analysis through a tree structure.
7. The voice interaction method according to claim 6, characterized in that: The construction of the decision tree comprises: Get historical audio; The first letters of the keywords in the historical speech are clustered, and the words with the same first letters in the keywords are combined into a tree structure. Different keywords with the same first character belong to different tree branches to build a decision tree.
8. A voice interaction device, characterized in that: include: A voice acquisition and conversion module is used to acquire the voice input by the user and convert the voice into a voice signal; A speech preprocessing module, used to preprocess the speech signal and determine the characteristics of the speech signal; A keyword output module, used to input the features of the speech signal into a pre-trained keyword model and output keywords; The voice display module is used to obtain the corresponding data in the database according to the keyword, render the corresponding data in the database on the front-end page, and display the voice interaction result.
9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the voice interaction method described in any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the voice interaction method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Intelligent recommendation method and system for industrial design products and storage medium
CN120952923A