Voice interaction method and device for device, storage medium and electronic device
By analyzing and supplementing the missing information in the interactive voice data, more accurate response sentences are generated, which solves the problem of inaccurate interactive sentences caused by incomplete information in the existing technology, and improves the accuracy and user experience of voice interaction.
Patent Information
- Application Number
- CN202210635792.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-06-07
AI Technical Summary
In the existing technology, the interactive sentences generated by the voice interaction method are inaccurate when the information is incomplete, which affects the user experience and the usage rate of smart devices.
By obtaining the interactive voice data in the target interaction request, it parses and supplements the missing object information, updates the reference information, generates a more accurate response statement, and sends it to the user object.
It improves the information integrity and accuracy of generated interactive sentences, solves the problem of inaccurate interactive sentences caused by incomplete information, and improves the user experience.
Smart Images

Figure CN115171680B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a voice interaction method and device for a device, a storage medium, and an electronic device. Background Art
[0002] In the related art, a user can register the user's voiceprint data in the App (Application) corresponding to the smart device and fill in the corresponding user information. In the process of voice interaction with the user, the user's identity (for example, the user's age, gender, etc.) can be distinguished based on the match with the registered voiceprint data, and a corresponding interaction sentence can be generated for the user.
[0003] However, when registering a voiceprint, the user is required to fill in detailed user information in order to accurately generate interaction statements for them. When the required information is incomplete, the generated interaction statements are inaccurate and fail to meet the user's expectations, affecting the user's interaction experience, thereby reducing the usage rate of smart devices.
[0004] It can be seen from this that the voice interaction method of the device in the related art has the problem of inaccurate generated interaction sentences due to incomplete required information. Summary of the invention
[0005] The embodiments of the present application provide a voice interaction method and device for a device, a storage medium and an electronic device, so as to at least solve the problem that the voice interaction method for a device in the related art has inaccurate generated interaction sentences due to incomplete required information.
[0006] According to one aspect of an embodiment of the present application, a voice interaction method of a device is provided, comprising: obtaining a target interaction request sent by a target device, wherein the target interaction request carries interaction voice data collected by the target device and corresponding to a target interaction statement issued by a user object; in response to the target interaction request, obtaining a set of reference information, wherein the set of reference information is information used to generate a response statement corresponding to the target interaction statement; when the attribute information of the preset object attribute of the user object in the set of reference information is empty, parsing the interaction voice data to obtain the attribute information of the preset object attribute; updating the set of reference information using the attribute information of the preset object attribute to obtain the updated set of reference information; using the updated set of reference information to generate a target response statement corresponding to the target interaction statement, and controlling the target device to issue the target response statement to the user object.
[0007] According to another aspect of an embodiment of the present application, a voice interaction device of a device is also provided, comprising: a first acquisition unit, used to acquire a target interaction request sent by a target device, wherein the target interaction request carries interaction voice data collected by the target device and corresponding to a target interaction statement issued by a user object; a second acquisition unit, used to acquire a set of reference information in response to the target interaction request, wherein the set of reference information is information used to generate a response statement corresponding to the target interaction statement; a parsing unit, used to parse the interaction voice data to obtain the attribute information of the preset object attribute when the attribute information of the preset object attribute of the user object in the set of reference information is empty; an updating unit, used to update the set of reference information using the attribute information of the preset object attribute to obtain the updated set of reference information; an execution unit, used to generate a target response statement corresponding to the target interaction statement using the updated set of reference information, and control the target device to issue the target response statement to the user object.
[0008] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the voice interaction method of the above-mentioned device when running.
[0009] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the voice interaction method of the device through the computer program.
[0010] In an embodiment of the present application, by parsing the interactive voice data when generating a response statement and supplementing the missing part of the object information based on the parsing result, the purpose of improving the completeness of the information required for generating the interactive statement can be achieved, and the technical effect of improving the accuracy of the generated interactive statement is achieved, thereby solving the problem of inaccurate generated interactive statements due to incomplete required information in the voice interaction method of the device in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0013] Figure 1 is a schematic diagram of a hardware environment of a voice interaction method of an optional device according to an embodiment of the present application;
[0014] Figure 2 is a flow chart of a voice interaction method of an optional device according to an embodiment of the present application;
[0015] Figure 3 is a flow chart of another optional voice interaction method of a device according to an embodiment of the present application;
[0016] Figure 4 is a schematic diagram of an optional voice interaction method of a device according to an embodiment of the present application;
[0017] Figure 5 is a structural block diagram of a voice interaction device of an optional device according to an embodiment of the present application;
[0018] Figure 6 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0019] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0021] According to one aspect of an embodiment of the present application, a voice interaction method for a device is provided. The voice interaction method for a device is widely used in smart home, smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the voice interaction method of the above device can be applied to Figure 1 In the hardware environment composed of the terminal 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0022] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0023] The voice interaction method of the device of the embodiment of the present application can be executed by the server 104, or by the terminal 102, or by both the server 104 and the terminal 102. The voice interaction method of the device of the embodiment of the present application can be executed by the terminal 102 or by a client installed thereon.
[0024] Taking the voice interaction method of the device in this embodiment executed by the server 104 as an example, Figure 2 is a flow chart of a voice interaction method of an optional device according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0025] Step S202: obtaining a target interaction request sent by a target device, wherein the target interaction request carries interaction voice data collected by the target device and corresponding to a target interaction sentence issued by a user.
[0026] The voice interaction method of the device in this embodiment can be applied to the scenario of voice interaction between the target device and the user of the target device. The above-mentioned target device can be a terminal device or a smart home device, which is not limited in this embodiment. The above-mentioned smart home device can be a smart home device located in the user's home, and can be an electronic device equipped with a smart chip such as a smart TV, a smart refrigerator, and a smart water heater. Compared with traditional home appliances, the above-mentioned smart home appliances have added computing modules, network interfaces, input and output devices, etc., so that the smart home appliances in this embodiment have the functions of intelligent analysis and intelligent services.
[0027] Optionally, the target object may be an object that has established a connection relationship with the smart home device, or an object that is located in the same location area as the smart home device. It may be used to represent a specific user, or it may be used to represent a user that is located in the same location area as the smart home device, which is not limited in this embodiment. For example, the target object may be a user that is located in the same room as the smart refrigerator.
[0028] In this embodiment, the server may obtain a target interaction request sent by the target device, wherein the target interaction request carries interactive voice data corresponding to the target interaction sentence issued by the user object and collected by the target device. Optionally, the target device may collect the target interaction sentence issued by the user object, obtain the interactive voice data corresponding to the target interaction sentence, and then send the target interaction request to the server.
[0029] Optionally, the target interaction request may carry other reference information in addition to the interactive voice data. Optionally, the reference information may be location information indicating the current location of the user, or health status information indicating the current location of the user, or other reference information, which is not limited in this embodiment.
[0030] It should be noted that the current location of the user or the current health status of the user can be directly indicated by the above reference information, or can be obtained after a certain processing of the above reference information. For example, the above reference information can be the longitude and latitude information of the user or the target device. By converting the longitude and latitude information, it can be converted into the province, administrative region, etc. where the user is located. For another example, the above reference information can be the user's facial image or images of other parts, body surface temperature, etc., and by converting the facial image or images of other parts, body surface temperature, etc., it can be converted into the health status of the user, such as good health status, poor health status, etc., which is not limited in this embodiment.
[0031] Step S204, in response to the target interaction request, obtaining a set of reference information, wherein the set of reference information is information used to generate a response statement corresponding to the target interaction statement.
[0032] In this embodiment, after the target interaction request is obtained, the target interaction request can be responded to. Optionally, a set of reference information can be obtained in response to the target interaction request, and the above set of reference information can be information used to generate a response statement corresponding to the target interaction statement. For different types of interaction requests, the reference information required to generate the corresponding response statement can be the same or different. According to the correspondence between the pre-configured interaction statement type and the reference information required to generate the response statement of the interaction statement, the above set of reference information corresponding to the target interaction statement can be determined.
[0033] Optionally, a set of reference information may include multiple types of reference information, which may include but is not limited to at least one of the following reference information: reference information that changes in real time over time, such as environmental status, health status, emotional type, etc., and reference information that does not change over time or changes slightly over time, such as age, gender, height. Optionally, a set of reference information may include object information related to the user object, such as health status, emotional type, age, gender, height, etc., and may also include information unrelated to the user object, such as environmental status. For different reference information, the method of obtaining the reference information can be set, such as obtaining from pre-stored object information, obtaining from information carried in an interaction request, obtaining from the network through a search engine, etc.
[0034] The process of acquiring a set of reference information in response to the target interaction request may be: acquiring each reference information according to the information acquisition method corresponding to the information type of each reference information in the set of reference information. There may be two acquisition results for each reference information, namely, the reference information is acquired (the result is not empty) and the corresponding reference information is not acquired (the result is empty). The acquisition results of different reference information may be the same or different.
[0035] For example, when a group of reference information is information A, information B, information C, and information D, information A and information B are information obtained from pre-stored object information, the information obtained by information A is not empty, the information obtained by information B is empty, information C is information obtained from interactive voice data, and information D is information obtained from the Internet through a search engine.
[0036] Step S206: When the attribute information of the preset object attribute of the object used in a set of reference information is empty, the interactive voice data is parsed to obtain the attribute information of the preset object attribute.
[0037] The server may pre-set a set of object attributes that are allowed to be obtained by parsing the interactive voice data, such as age, gender, etc. A set of reference information may include reference information in which the obtained information is empty. If the set includes attribute information belonging to a set of object attributes, and the attribute information of the preset object attribute is empty, the interactive voice data may be parsed to obtain the attribute information of the preset object attribute.
[0038] Optionally, the above-mentioned process of parsing the interactive voice data to obtain the attribute information of the preset object attribute may be: firstly parse the interactive voice data to obtain the voice features corresponding to the interactive voice data, and then determine the attribute information of the preset object attribute according to the determined voice features. Here, in addition to the attribute information of the preset object attribute being empty, a set of reference information may also contain other empty reference information. For other empty reference information, other methods may be used to obtain it, for example, by performing voice interaction with the object of use, attempting to generate a response statement under the condition that these attribute information are empty, or other methods, which are not limited in this embodiment.
[0039] Step S208: Use the attribute information of the preset object attribute to update a set of reference information to obtain an updated set of reference information.
[0040] In this embodiment, after the attribute information of the preset object attribute is obtained, the attribute information of the preset object attribute can be used to update a set of reference information to obtain an updated set of reference information. Optionally, the process of updating a set of reference information using the attribute information of the preset object attribute to obtain an updated set of reference information can be: updating the attribute information of the preset object attribute in a set of reference information to the parsed attribute information to obtain an updated set of reference information.
[0041] Optionally, after obtaining an updated set of reference information, the attribute information of the preset object attributes can be saved. The saving method can be to establish an index relationship between the attribute information of the preset object attributes and the use object and save it, for example, save the unique correspondence between the attribute information of the preset object attributes and the use object.
[0042] Step S210: Use the updated set of reference information to generate a target response statement corresponding to the target interaction statement, and control the target device to issue the target response statement to the user object.
[0043] In this embodiment, after obtaining an updated set of reference information, the updated set of reference information can be used to generate a target response statement corresponding to the target interaction statement. Optionally, the process of using the updated set of reference information to generate a target response statement corresponding to the target interaction statement can be: according to the interaction statement type of the target interaction statement, determine the response statement template corresponding to the interaction statement type, and fill each reference information in the updated set of reference information into the corresponding position of the response statement template, so as to obtain the target response statement; or, other response statement generation methods can also be used, which is not limited in this embodiment.
[0044] Optionally, after generating the target response statement, the target device may be controlled to issue the target response statement to the user. Optionally, the target response statement may be issued to the user by: announcing the target response statement to the user through a sound broadcast component (e.g., a speaker) on the target device; or displaying the target response statement in the form of text on a display component of the target device; or displaying the target response statement in the form of text on a display component of the user's terminal device, which is not limited in this embodiment.
[0045] Through the above steps S202 to S210, a target interaction request sent by the target device is obtained, wherein the target interaction request carries interactive voice data collected by the target device and corresponding to the target interaction statement issued by the user object; in response to the target interaction request, a set of reference information is obtained, wherein a set of reference information is information used to generate a response statement corresponding to the target interaction statement; when the attribute information of the preset object attributes of the user object in the set of reference information is empty, the interactive voice data is parsed to obtain the attribute information of the preset object attributes; the attribute information of the preset object attributes is used to update a set of reference information to obtain an updated set of reference information; the updated set of reference information is used to generate a target response statement corresponding to the target interaction statement, and the target device is controlled to issue a target response statement to the user object, thereby solving the problem of inaccurate generated interaction statements due to incomplete required information in the voice interaction method of the device in the related art, and improving the accuracy of the generated interaction statements.
[0046] In an exemplary embodiment, the interactive voice data is parsed to obtain the attribute information of the preset object attributes, including:
[0047] S11, performing voiceprint recognition on the interactive voice data to obtain a target voiceprint feature corresponding to the interactive voice data;
[0048] S12, determining attribute information of a preset object attribute according to the target voiceprint feature.
[0049] In this embodiment, the attribute information of the preset object attribute can be obtained by parsing the interactive voice data. Optionally, the interactive voice data can be firstly subjected to voiceprint recognition to obtain the target voiceprint feature corresponding to the interactive voice data, and then the attribute information of the preset object attribute can be determined according to the target voiceprint feature.
[0050] Optionally, the above process of performing voiceprint recognition on the interactive voice data to obtain the target voiceprint features corresponding to the interactive voice data can be: first, draw a voiceprint graph corresponding to the target interactive sentence according to the amplitude values of multiple sampling points included in the interactive voice data, and then determine the target voiceprint features corresponding to the interactive voice data according to the drawn voiceprint graph. It can also be other voiceprint recognition methods.
[0051] Optionally, there may be multiple types of attribute information of the preset object attributes determined according to the target voiceprint features, which may include but is not limited to at least one of the following: object age information (the preset object attributes include the object age), object gender information (the preset object attributes include the object gender), and may also include other attribute information of preset object attributes that can be identified by voiceprint features.
[0052] It should be noted that in the process of drawing a voiceprint corresponding to a target interactive sentence according to the amplitude values of multiple sampling points included in the interactive voice data, the drawn voiceprint is not an actual image, but a reference image for facilitating determination of the target voiceprint features.
[0053] Through this embodiment, the attribute information of the preset object attributes is determined based on the voiceprint features of the interactive voice data, which can improve the accuracy and convenience of determining the attribute information of the preset object attributes.
[0054] In an exemplary embodiment, determining the attribute information of the preset object attribute according to the target voiceprint feature includes at least one of the following:
[0055] S21, determining the age information of the user according to the target voiceprint feature, wherein the preset object attributes include the age of the user;
[0056] S22, determining the gender information of the user according to the target voiceprint feature, wherein the preset object attributes include the gender of the user.
[0057] In this embodiment, the attribute information of the preset object attribute can be determined according to the target voiceprint feature, and the attribute information of the preset object attribute can include at least one of the following: the object age information of the user, the object age information of the user.
[0058] As an optional implementation, the object age information of the user can be determined according to the target voiceprint feature, and the preset object attribute includes the object age. Optionally, a first reference voiceprint feature corresponding to different ages can be pre-set, and the target voiceprint feature is compared with the first reference voiceprint feature, and the age information corresponding to the first reference voiceprint feature matching the target voiceprint feature is determined as the object age information of the user, which is not limited in this embodiment.
[0059] As another optional implementation, the object gender information of the user can be determined based on the target voiceprint feature, and the preset object attribute includes the object gender. Optionally, a second reference voiceprint feature corresponding to different genders can be pre-set, and the target voiceprint feature is compared with the second reference voiceprint feature, and the gender information corresponding to the second reference voiceprint feature that matches the target voiceprint feature is determined as the object gender information of the user, which is not limited in this embodiment.
[0060] As another optional implementation, the gender information of the user and the age information of the user may be determined according to the target voiceprint feature, and the preset object attributes include the gender of the user and the age of the user.
[0061] For example, when it is determined that the user is a child based on the user's age information, the following response statement may be generated:
[0062] 1) Children, today is Children's Day. I wish you a happy holiday. It's a sunny day. Invite your friends to play together.
[0063] 2) Hello, are you unhappy? Let me tell you a nice story;
[0064] 3) Hello, Xiao Ming / Xiao Yue (user-defined nickname), you look so happy today. You are the most handsome guy today. You have helped me drive away the nasty dark clouds outside.
[0065] When it is determined that the user is an adult male based on the user's age information and the user's gender information, the following response statement may be generated:
[0066] 1) Good evening, sir. You must be tired today. Let's listen to some soothing music to relax.
[0067] 2) Hello, sir, it is cloudy today, but the temperature is very comfortable in the afternoon. Please take me to the stadium to watch the World Cup.
[0068] 3) Hello, XX (user-defined nickname), I am here. XX has officially entered the Metaverse, come and learn about the latest technology information.
[0069] When it is determined that the user is an adult female based on the user's age information and the user's gender information, the following response statement may be generated:
[0070] 1) Madam, are you unhappy about trivial matters again? How about I boil some water for you and give you a beauty massage to relax?
[0071] 2) Hello, ma'am, the UV index is a bit high today, please remember to take sun protection measures;
[0072] 3) Hello, Cuihua (user-defined nickname), I noticed that the water quality is a bit poor today, so I will turn on the purification mode of your water heater in advance.
[0073] When it is determined that the user is an elderly male based on the user's age information and the user's gender information, the following response statement may be generated:
[0074] 1) Lao Wang (user-defined nickname), today is the winter solstice, the temperature has dropped again, and there are strong winds, please remember to keep warm when you go out;
[0075] 2) Hello, Lao Wang (user-defined nickname), why are you sighing? How about we chat?
[0076] When it is determined that the user is an elderly female based on the user's age information and the user's gender information, the following response statement may be generated:
[0077] 1) Grandma (user-defined nickname), I am here. Today is Chinese New Year. It is very warm outside. Please take me for a walk.
[0078] 2) Hello, grandma (user-defined nickname), the humidity is a bit high today, so remember to protect your bones and joints, give yourself regular physical examinations, and stay healthy.
[0079] Through this embodiment, the object age information or the object gender information of the user is determined according to the voiceprint characteristics of the speech data, which can improve the comprehensiveness of the attribute information used to generate the response sentence, thereby improving the accuracy of the response sentence generation.
[0080] In an exemplary embodiment, in response to a target interaction request, a set of reference information is obtained, including:
[0081] S31, when a set of reference information includes the environment information where the target device is located, the environment information where the target device is currently located is acquired according to the device location information of the target device to obtain the target environment information.
[0082] In this embodiment, if the acquired set of reference information includes the environment information where the target device is located, the server can acquire the environment information where the target device is currently located according to the device location information of the target device, and obtain the target environment information. The device location information of the target device can be the latitude and longitude information of the target device, or can be the province, city, county or other administrative area category where the target device is located.
[0083] Optionally, the process of obtaining the target environment information by obtaining the current environment information of the target device according to the device location information of the target device may be: querying the environment information matching the location information according to the device location information of the target device to obtain the target environment information. For example, after obtaining the device location information of the target device, the server may search for the environment information matching the device location information on the Internet to obtain the target environment information.
[0084] Through this embodiment, according to the device location information of the target device, the current environment information of the target device is obtained, and a response statement is generated based on the current environment information of the device, which can improve the accuracy of the response statement generation.
[0085] In an exemplary embodiment, before acquiring the current environment information of the target device according to the device location information of the target device, the method further includes:
[0086] S41, when the target interaction request includes a device location field corresponding to the target device, extracting device location information of the target device from the device location field; or
[0087] S42, acquiring device location information of the target device from a set of pre-stored device location information according to the device identification of the target device.
[0088] In this embodiment, before obtaining the current environment information of the target device according to the device location information of the target device, the device location information of the target device can be obtained. The device location information of the target device can be extracted from the target interaction request, that is, the target interaction request carries the device location information of the target device, or can be obtained from pre-stored information, for example, according to the device identification of the target device, the pre-stored device location information of the target device is obtained.
[0089] As an optional implementation, when the target interaction request includes a device location field corresponding to the target device, the device location information of the target device can be extracted from the device location field. The device location field can be a pre-agreed field, which can be any allowed field in the target interaction request, for example, the first field of the target interaction request, the last field of the target interaction request, or a field in the middle of the target interaction request. The number of field bits of the device location field can be fixed, and the device location field is not limited in this embodiment.
[0090] For example, when the device location field in the target interaction request is set to the last 5 digits of the target interaction request, the device location information of the target device can be extracted from the last 5 digits of the target interaction request.
[0091] As an optional implementation, the device location information of the target device can be obtained from a set of pre-saved device location information according to the device identification of the target device. Optionally, the process of obtaining the device location information of the target device from a set of pre-saved device location information can be: searching for device location information whose device identification matches the device identification of the target device in the pre-saved set of device location information, and when device location information whose device identification matches the device identification of the target device is found, it is determined as the device location information of the target device.
[0092] Optionally, the device location information of the target device may also be extracted from the pre-saved device information of the target device, that is, the device location information is saved separately according to the device, rather than being saved as a group of device location information.
[0093] For example, when the device identification of the target device is E, if the pre-stored set of device location information includes the corresponding device location information with the device identification being E, it can be determined as the device location information of the target device.
[0094] Through this embodiment, the device location information of the target device is determined in multiple ways, which can improve the accuracy of determining the device location information, and further improve the accuracy of generating the response statement.
[0095] In an exemplary embodiment, in response to a target interaction request, a set of reference information is obtained, including at least one of the following:
[0096] S51, when a set of reference information includes health status information of a user object, performing image recognition on a target object image to obtain the health status information of the user object, wherein the target object image is carried in the target interaction request, and the target object image is an object image of the user object collected by the target device;
[0097] S52, when a set of reference information includes object emotion information of the user object, voice recognition is performed on the interactive voice data to obtain the object emotion information of the user object, wherein the object emotion information of the user object is used to indicate the current emotional state of the user object.
[0098] In this embodiment, after the target interaction request is obtained, a set of reference information may be obtained in response to the target interaction request. Optionally, the set of reference information may include at least one of the following: health status information of the user, and object emotion information of the user.
[0099] As an optional implementation, when a set of reference information includes the health status information of the user object, image recognition can be performed on the target object image to obtain the health status information of the user object. The above target object image is carried in the target interaction request, and the target object image is an object image of the user object collected by the target device.
[0100] Optionally, after the user object issues a target interaction statement, the target device can collect the target interaction statement and at the same time, collect the target interaction statement, perform image collection on the user object through an image collection component on the target device to obtain a target collection image. The above-mentioned image collection component can be at least one of the following: a thermal imaging sensor, a camera, or other image collection components.
[0101] As another optional implementation, when a set of reference information includes object emotion information of the user object, speech recognition can be performed on the interactive speech data to obtain the object emotion information of the user object, and the object emotion information of the user object is used to indicate the current emotional state of the user object.
[0102] Optionally, the above process of performing voice recognition on the interactive voice data to obtain the object emotion information of the user can be: first perform voiceprint recognition on the interactive voice data to obtain the target voiceprint features corresponding to the interactive voice data, and then determine the object emotion information of the user based on the target voiceprint features.
[0103] Optionally, the process of determining the object emotion information of the user according to the target voiceprint features is similar to the process of determining the object age information of the user according to the target voiceprint features, and will not be repeated in this embodiment. In addition, the voiceprint features of the user can also be identified to obtain the health status information of the user, and the image recognition of the aforementioned target object image can be performed to obtain the object emotion information of the user. Recognition of health status based on images and recognition of emotional status based on voiceprints have better recognition effects than other methods.
[0104] Through this embodiment, by acquiring the health status information and / or the emotion information of the user to generate a response statement, the accuracy of the response statement generation can be improved.
[0105] In an exemplary embodiment, after parsing the interactive voice data to obtain the attribute information of the preset object attribute, the method further includes:
[0106] S61, saving the attribute information of the usage object and the preset object attribute having a corresponding relationship.
[0107] In this embodiment, after obtaining the attribute information of the preset object attribute, the attribute information of the preset object attribute can be saved. Optionally, the attribute information of the user object and the preset object attribute having a corresponding relationship can be saved. For example, the user object and the object age information and object gender information corresponding to the user object can be saved, so that when responding to the interactive statement later, the object age information and object gender information of the user object can be determined by searching the object information of the user object saved in advance.
[0108] Optionally, information other than the attribute information of the preset object attributes of the user object in a set of reference information may also be saved. For example, since the historical health status or emotional state may be used when analyzing the health status or emotional state of the user object, the health status information of the user object and the object emotion information of the user object may be saved.
[0109] Optionally, since the health status information of the user and the object emotion information of the user may change frequently, the health status information of the user and the object emotion information of the user may be saved for a certain time threshold, and when the time threshold is exceeded, the currently received voice data may be re-recognized to obtain the health status information of the user and the object emotion information of the user, instead of using the saved historical information.
[0110] Through this embodiment, the attribute information of the corresponding usage objects and preset object attributes is saved, and the attribute information of the saved object attributes can be improved to facilitate the generation of subsequent response statements, thereby improving the timeliness and accuracy of the response statement generation.
[0111] The following is an explanation of the voice interaction method of the device in the embodiment of the present application in combination with optional examples. The target device is a smart home appliance.
[0112] The current voice interaction method requires users to register their voiceprint data on the App before the user's identity can be distinguished based on the voice they make, such as adult men, adult women, elderly men, elderly women, and children. The process is cumbersome and makes the user's usage cost too high.
[0113] This optional instance provides a method that supports interactive audio recognition of emotional voiceprints and provides personalized replies. Without adding other detection units, user audio is transmitted through a networked voice module, and the emotional voiceprint service analyzes the voiceprint emotional ID (Identifier, representation). The inference service performs inference calculations based on the information ID and emotional ID generated by the module position to generate personalized replies, simplify the preconditions for user voiceprint recognition, and better provide personalized interactive services for people in different environments, with different emotions, and of different ages, greatly enhancing the user experience.
[0114] Combination Figure 3 As shown, the process of the voice interaction method of the device in this optional example may include the following steps:
[0115] Step S302: The user binds the voice module through the App, and the voice module uploads the module's MAC (Medium Access Control) information and the location information obtained from the App to the recommendation service.
[0116] The above-mentioned voice module can be bound through the App and upload the user's location information, and collect and transmit user interaction audio.
[0117] Step S304: After the user interacts with the voice module, the voice module recognizes the interactive audio command and uploads the user interactive audio and module MAC to the emotional voiceprint service in an encrypted manner. The emotional voiceprint service can determine the user's expressed emotions and age through the user interactive audio.
[0118] Step S306, the emotional voiceprint service analyzes the interactive audio, determines the user's age and emotional state through the waveform of the audio frequency, generates an emotional ID, and transmits the emotional ID and module MAC to the recommendation service.
[0119] Step S308, the recommendation service analyzes the time data, water quality data, air pollution data, temperature data, humidity data, ultraviolet data and other information IDs of the user's location based on the location information of the module, combines the emotion ID, and generates active reminder content under different interactive audios.
[0120] The above-mentioned reasoning service can analyze the time data, water quality data, air pollution data, temperature data, humidity data, ultraviolet data, etc. around the user based on the user's location information to generate personalized reasoning services.
[0121] Combination Figure 4 As shown, when the home appliance already has configuration information, the process of the voice interaction method of the device in this optional example may include the following steps:
[0122] Step S402: The user uses the App to bind the voice module.
[0123] Step S404, synchronizing the location information of the App.
[0124] For example, the location information of the App can be synchronized to the voice module.
[0125] Step S406, upload the MAC information and location information of the module.
[0126] For example, the MAC information corresponding to the voice module and the location information of the App can be uploaded to the inference service.
[0127] Step S408, analyzing the time data, water quality data, air pollution data, temperature data, humidity data, and ultraviolet data corresponding to the module position to generate an information ID.
[0128] Step 410, speak interactive audio.
[0129] For example, a user may send an interactive voice to the device, and the device may collect the interactive voice sent by the user through a set voice module.
[0130] Step 412, identifying interactive audio.
[0131] For example, the interactive audio emitted by the user may be recognized through a voice module.
[0132] Step 414, start the timer.
[0133] Step 416, upload the audio to the cloud in an encrypted manner.
[0134] For example, the voice module can upload the acquired audio to the cloud in an encrypted manner so that the audio can be analyzed through the cloud-based emotional voiceprint service.
[0135] Step S418: ASR (Automatic Speech Recognition) audio recognition is completed. For example, the audio recognition can be completed by ASR.
[0136] Step S420, returning a response to the module. For example, after completing the recognition of the audio, a response may be returned to the voice module.
[0137] Step S422: The age stage and emotional state of the user. For example, the audio may be recognized by ASR to obtain the age stage and emotional state of the user.
[0138] Step S424, upload the emotion ID and module MAC. For example, the emotion ID (ie, the user's age and emotional state) and module MAC may be uploaded to the reasoning service.
[0139] Step S426, combining the information ID and the emotion ID to generate a personalized reply, and generating a personalized speech ID. For example, the reasoning service can analyze the user's location based on the module's location information.
[0140] Information IDs such as time data, water quality data, air pollution data, temperature data, humidity data, and ultraviolet data are combined with emotion IDs to generate active reminder content under different interactive audios.
[0141] Step S428: Initiate a TTS (Text To Speech) request for a personalized reply. For example, the voice module may send a TTS request for a personalized reply to a reasoning service in the cloud.
[0142] Step S430: Delegating the personalized reply words. For example, after receiving the TTS request sent by the voice module, the reasoning module may delegate the personalized reply words to the voice module.
[0143] Step S432: broadcasting the personalized reply words. For example, after receiving the decentralized personalized reply words, the voice module may broadcast the personalized reply words to the user.
[0144] Step S434, returning the broadcast result of the personalized reply speech. For example, after the voice module broadcasts the personalized reply speech to the user, it can return the broadcast result of the personalized reply speech to the inference service.
[0145] Step S436, recording the personalized speech ID that is successfully broadcasted. For example, after receiving the broadcast result of the personalized reply speech returned by the voice module, the inference service can record the personalized speech ID that is successfully broadcasted.
[0146] Step S438, using the valid personalized speech ID as a valid data set for continuous algorithm training.
[0147] Through this embodiment, without adding other detection units, user audio is transmitted through a networked voice module, the emotional voiceprint service analyzes the voiceprint emotional ID, and the inference service performs inference calculations based on the information ID and emotional ID generated by the module location to generate personalized replies, thereby greatly enhancing the user experience.
[0148] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0150] According to another aspect of an embodiment of the present application, a voice interaction device of a device for implementing the voice interaction method of the above-mentioned device is also provided. Figure 5 is a structural block diagram of a voice interaction device of an optional device according to an embodiment of the present application, such as Figure 5 As shown, the device may include:
[0151] A first acquisition unit 502 is used to acquire a target interaction request sent by a target device, wherein the target interaction request carries interaction voice data collected by the target device and corresponding to a target interaction sentence sent by a user object;
[0152] A second acquisition unit 504, connected to the first acquisition unit 502, is used to respond to the target interaction request and acquire a set of reference information, wherein the set of reference information is information used to generate a response statement corresponding to the target interaction statement;
[0153] The parsing unit 506 is connected to the second acquisition unit 504 and is used to parse the interactive voice data to obtain the attribute information of the preset object attribute when the attribute information of the preset object attribute of the object used in the set of reference information is empty;
[0154] An updating unit 508, connected to the parsing unit 506, is used to update a set of reference information using the attribute information of the preset object attribute to obtain an updated set of reference information;
[0155] The execution unit 510 is connected to the updating unit 508, and is used to generate a target response statement corresponding to the target interaction statement using the updated set of reference information, and control the target device to issue the target response statement to the user object.
[0156] It should be noted that the first acquisition unit 502 in this embodiment can be used to execute the above step S202, the second acquisition unit 504 in this embodiment can be used to execute the above step S204, the parsing unit 506 in this embodiment can be used to execute the above step S206, the updating unit 508 in this embodiment can be used to execute the above step S208, and the execution unit 510 in this embodiment can be used to execute the above step S210.
[0157] Through the above-mentioned module, when the attribute information of the preset object attributes of the object used in a set of reference information is empty, the interactive voice data is parsed to obtain the attribute information of the preset object attributes; the attribute information of the preset object attributes is used to update a set of reference information to obtain an updated set of reference information; the updated set of reference information is used to generate a target response statement corresponding to the target interactive statement, and the target device is controlled to issue the target response statement to the object used, thereby solving the problem of inaccurate generated interactive statements due to incomplete required information in the voice interaction method of the device in the related art, and improving the accuracy of the generated interactive statements.
[0158] In an exemplary embodiment, the determining module includes at least one of the following:
[0159] A first determination submodule is used to determine the object age information of the user according to the target voiceprint feature, wherein the preset object attributes include the object age;
[0160] The second determination submodule is used to determine the object gender information of the user according to the target voiceprint feature, wherein the preset object attributes include the object gender.
[0161] In an exemplary embodiment, the determining module includes at least one of the following:
[0162] A first determination submodule is used to determine the object age information of the user according to the target voiceprint feature, wherein the preset object attributes include the object age;
[0163] The second determination submodule is used to determine the object gender information of the user according to the target voiceprint feature, wherein the preset object attributes include the object gender.
[0164] In an exemplary embodiment, the second acquiring unit includes:
[0165] The acquisition module is used to acquire the current environment information of the target device according to the device location information of the target device, so as to obtain the target environment information when a set of reference information includes the environment information of the target device.
[0166] In an exemplary embodiment, the above device further comprises:
[0167] an extracting unit, configured to extract the device location information of the target device from the device location field before acquiring the current environment information of the target device according to the device location information of the target device, if the target interaction request includes a device location field corresponding to the target device; or
[0168] The third acquisition unit is used to acquire the device location information of the target device from a set of pre-stored device location information according to the device identification of the target device.
[0169] In an exemplary embodiment, the second acquisition unit includes at least one of the following:
[0170] a second recognition module, configured to perform image recognition on a target object image to obtain the health status information of the user object when a set of reference information includes the health status information of the user object, wherein the target object image is carried in the target interaction request, and the target object image is an object image of the user object collected by the target device;
[0171] The third recognition module is used to perform speech recognition on the interactive speech data when a set of reference information includes object emotion information of the user object, so as to obtain the object emotion information of the user object, wherein the object emotion information of the user object is used to indicate the current emotional state of the user object.
[0172] In an exemplary embodiment, the above device further comprises:
[0173] The storage unit is used to store the corresponding usage objects and the attribute information of the preset object attributes after parsing the interactive voice data to obtain the attribute information of the preset object attributes.
[0174] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0175] According to another aspect of the embodiments of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of the voice interaction method of any of the above devices in the embodiments of the present application.
[0176] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0177] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0178] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0179] According to another aspect of an embodiment of the present application, an electronic device for implementing the voice interaction method of the above-mentioned device is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0180] Figure 6 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 6 As shown, it includes a processor 602, a communication interface 604, a memory 606 and a communication bus 608, wherein the processor 602, the communication interface 604 and the memory 606 communicate with each other through the communication bus 608, wherein,
[0181] Memory 606, used to store computer programs;
[0182] The processor 602 is used to implement the voice interaction method of the device of the above embodiment when executing the computer program stored in the memory 606.
[0183] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The communication interface is used for communication between the electronic device and other devices.
[0184] The above-mentioned memory may include RAM, or may include non-volatile memory (non-volatile memory), for example, at least one disk memory. Optionally, the memory may also be at least one storage device located far away from the above-mentioned processor.
[0185] As an example, the memory 606 may include, but is not limited to, the first acquisition unit 502, the second acquisition unit 504, the parsing unit 506, the updating unit 508, and the executing unit 510 in the control device of the device. In addition, other module units in the control device of the device may also be included but are not limited to, which will not be described in detail in this example.
[0186] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0187] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0188] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only. The device for implementing the voice interaction method of the above-mentioned device may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 6 The structure of the electronic device is not limited. Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations shown.
[0189] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0190] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0191] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0192] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0193] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0194] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A voice interaction method for a device, characterized in that: include: Acquire a target interaction request sent by a target device, wherein the target interaction request carries interactive voice data collected by the target device and corresponding to a target interaction sentence issued by a user object; In response to the target interaction request, obtaining a set of reference information, wherein the set of reference information is information used to generate a response statement corresponding to the target interaction statement; When the attribute information of the preset object attribute of the use object in the set of reference information is empty, parsing the interactive voice data to obtain the attribute information of the preset object attribute; Using the attribute information of the preset object attribute to update the set of reference information, to obtain the updated set of reference information; Generate a target response statement corresponding to the target interaction statement using the updated set of reference information, and control the target device to issue the target response statement to the user object; The step of obtaining a set of reference information in response to the target interaction request includes: Determine the set of reference information corresponding to the target interactive statement according to the correspondence between the pre-configured interactive statement type and the reference information required to generate the response statement of the interactive statement, wherein the set of reference information includes at least one of the following: reference information that changes in real time with time, reference information that does not change with time, object information related to the use object, and information that is unrelated to the use object; Among them, using the attribute information of the preset object attribute to update the set of reference information to obtain the updated set of reference information includes: updating the attribute information of the preset object attribute in the set of reference information to the parsed attribute information to obtain the updated set of reference information.
2. The method according to claim 1, characterized in that The step of parsing the interactive voice data to obtain the attribute information of the preset object attribute includes: Performing voiceprint recognition on the interactive voice data to obtain a target voiceprint feature corresponding to the interactive voice data; According to the target voiceprint feature, attribute information of the preset object attribute is determined.
3. The method according to claim 2, characterized in that The determining of the attribute information of the preset object attribute according to the target voiceprint feature includes at least one of the following: Determining the object age information of the user according to the target voiceprint feature, wherein the preset object attribute includes the object age; According to the target voiceprint feature, the gender information of the user object is determined, wherein the preset object attribute includes the gender of the user object.
4. The method according to any one of claims 1 to 3, characterized in that: The step of obtaining a set of reference information in response to the target interaction request includes: In the case that the set of reference information includes the environment information where the target device is located, the environment information where the target device is currently located is acquired according to the device location information of the target device to obtain the target environment information.
5. The method according to claim 4, characterized in that Before acquiring the current environment information of the target device according to the device location information of the target device, the method further includes: In the case where the target interaction request includes a device location field corresponding to the target device, extracting device location information of the target device from the device location field; or According to the device identification of the target device, the device location information of the target device is obtained from a set of pre-stored device location information.
6. The method according to any one of claims 1 to 3, characterized in that: The step of obtaining, in response to the target interaction request, a set of reference information includes at least one of the following: In a case where the set of reference information includes the health status information of the user object, performing image recognition on a target object image to obtain the health status information of the user object, wherein the target object image is carried in the target interaction request, and the target object image is an object image of the user object collected by the target device; In the case where the set of reference information includes the object emotion information of the user object, speech recognition is performed on the interactive speech data to obtain the object emotion information of the user object, wherein the object emotion information of the user object is used to indicate the current emotional state of the user object.
7. The method according to any one of claims 1 to 3, characterized in that After parsing the interactive voice data to obtain the attribute information of the preset object attribute, the method further includes: The attribute information of the usage object and the preset object attribute having a corresponding relationship is saved.
8. A voice interaction device for a device, characterized in that: include: A first acquisition unit is used to acquire a target interaction request sent by a target device, wherein the target interaction request carries interactive voice data collected by the target device and corresponding to a target interaction sentence issued by a user object; A second acquisition unit, configured to acquire a set of reference information in response to the target interaction request, wherein the set of reference information is information used to generate a response statement corresponding to the target interaction statement; a parsing unit, configured to parse the interactive voice data to obtain the attribute information of the preset object attribute when the attribute information of the preset object attribute of the use object in the set of reference information is empty; An updating unit, configured to update the set of reference information using the attribute information of the preset object attribute to obtain the updated set of reference information; an execution unit, configured to generate a target response statement corresponding to the target interaction statement using the updated set of reference information, and control the target device to issue the target response statement to the user object; The second acquisition unit is further used to implement the acquisition of a set of reference information in response to the target interaction request through the following steps: determining the set of reference information corresponding to the target interaction statement according to the correspondence between the pre-configured interaction statement type and the reference information required for generating a response statement of the interaction statement, wherein the set of reference information includes at least one of the following: reference information that changes in real time with time, reference information that does not change with time, object information related to the use object, and information that is not related to the use object; Among them, the updating unit is also used to implement the updating of the set of reference information using the attribute information of the preset object attributes through the following steps to obtain the updated set of reference information: updating the attribute information of the preset object attributes in the set of reference information to the parsed attribute information to obtain the updated set of reference information.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
