Information interaction method and device
Through speech recognition and text length judgment, it is determined whether to generate a reply sentence, which solves the problem of device misjudgment and invalid feedback caused by meaningless word processing in the existing technology, and improves the intelligence of information interaction.
Patent Information
- Application Number
- CN202110766168.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-03-12
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2039-03-12
AI Technical Summary
Existing speech processing technology is difficult to effectively process some meaningless words uttered by users, resulting in device misjudgments and useless interactions, and increasing invalid feedback.
By receiving the user's voice and performing speech recognition, it determines whether to generate a reply sentence based on the length of the recognized text. If the length is less than or equal to the preset length, no reply will be generated. If the length is greater than the preset length, a reply will be generated. Use preset software development tools package for judgment.
It achieves rapid determination of invalid content for users, reduces invalid feedback, and improves the intelligence of information interaction.
Smart Images

Figure CN113488048B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, specifically to the field of Internet technology, and in particular to an information interaction method and device. Background Art
[0002] With the development of Internet technology, voice processing technology has made great progress. Through voice processing technology, users can interact with terminal devices.
[0003] When users speak, they may say some meaningless words, such as "ah". These words cannot express clear instructions. If the speech expressing these words is processed, some useless interactions may be achieved, and the device may make more mistakes in judging the speech. Summary of the invention
[0004] The embodiments of the present application provide an information interaction method and device.
[0005] In a first aspect, an embodiment of the present application provides an information interaction method, including: in response to receiving a user voice, performing voice recognition on the user voice to obtain text corresponding to the user voice; in response to determining that the rejection state is on, determining whether to generate a reply statement based on the text length of the text.
[0006] In some embodiments, determining whether to generate a reply statement based on the text length of the text includes: determining a comparison result between the text length and a preset text length, and determining whether to generate a reply statement based on the comparison result.
[0007] In some embodiments, based on the comparison result, determining whether to generate a reply statement includes: if the text length is less than or equal to the preset text length, determining not to generate a reply statement; if the text length is greater than the preset text length, determining to generate a reply statement.
[0008] In some embodiments, the method is applied to a terminal device to determine whether to generate a reply statement based on the length of the text, including: calling a preset software development kit to determine whether to generate a reply statement based on the length of the text.
[0009] In a second aspect, an embodiment of the present application provides an information interaction device, wherein a receiving unit is configured to, in response to receiving a user voice, perform voice recognition on the user voice to obtain text corresponding to the user voice; and a determining unit is configured to, in response to determining that the rejection state is on, determine whether to generate a reply statement based on the length of the text.
[0010] In some embodiments, the determination unit is further configured to perform the determination based on the text length of the text in the following manner to determine whether to generate a reply statement: determine a comparison result between the text length and a preset text length, and determine whether to generate a reply statement based on the comparison result.
[0011] In some embodiments, the determination unit is further configured to determine whether to generate a reply statement based on the comparison result in the following manner: if the text length is less than or equal to the preset text length, determine not to generate a reply statement; if the text length is greater than the preset text length, determine to generate a reply statement.
[0012] In some embodiments, the apparatus is applied to a terminal device, and the determination unit is further configured to execute the following method to determine whether to generate a reply statement based on the text length of the text: calling a preset software development kit to determine whether to generate a reply statement based on the text length of the text.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement a method as in any embodiment of the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method as in any embodiment of the first aspect.
[0015] The information interaction solution provided by the embodiment of the present application firstly performs speech recognition on the user's speech in response to receiving the user's speech to obtain the text corresponding to the user's speech. Afterwards, in response to determining that the rejection state is on, it is determined whether to generate a reply statement based on the length of the text. The embodiment of the present application can quickly determine the invalid content spoken by the user, so that the user can be selectively replied to, so as to reduce invalid feedback to the user and improve the intelligence of information interaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0017] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0018] Figure 2 is a flow chart of an embodiment of the information interaction method according to the present application;
[0019] Figure 3is a schematic diagram of an application scenario of the information interaction method according to the present application;
[0020] Figure 4 is a schematic diagram of the structure of an embodiment of an information interaction device according to the present application;
[0021] Figure 5 It is a structural diagram of a computer system of an electronic device suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0022] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] Figure 1 An exemplary system architecture 100 to which an embodiment of the information interaction method or information interaction apparatus of the present application can be applied is shown.
[0025] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0026] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as information interaction applications, video applications, live broadcast applications, instant messaging tools, email clients, social platform software, etc.
[0027] The terminal devices 101, 102, 103 here can be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers and desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0028] The server 105 may be a server providing various services, such as a background server providing support to the terminal devices 101, 102, and 103. The background server may analyze and process the user's voice and other data, and feed back the processing result (such as the result of determining whether to generate a reply statement) to the terminal device.
[0029] It should be noted that the information interaction method provided in the embodiment of the present application can be executed by the terminal device 101, 102, 103 or the server 105, and accordingly, the information interaction device can be set in the terminal device 101, 102, 103 or the server 105.
[0030] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0031] Continue to refer Figure 2 , shows a process 200 of an embodiment of an information interaction method according to the present application. The information interaction method comprises the following steps:
[0032] Step 201, in response to receiving a user voice, performing voice recognition on the user voice to obtain text corresponding to the user voice.
[0033] In this embodiment, the user can interact with the execution subject (eg Figure 1 The execution subject can receive the user's voice through an installed or connected microphone. In addition, the execution subject can perform voice recognition on the user's voice to convert the user's voice into text.
[0034] Step 202, in response to determining that the rejection state is on, determining whether to generate a reply statement based on the length of the text.
[0035] In this embodiment, if the above-mentioned execution subject determines that the rejection state of the terminal device is in the on state, it can determine the length of the above-mentioned text and determine whether to generate a reply statement based on the text length. The text length may refer to the number of words in the text. The reply statement here may be voice or text, referring to a statement that responds to the user's voice for interaction. Specifically, the rejection state is a characterization of whether to execute the process of determining whether to generate a reply statement based on the text length. The on state indicates execution, and correspondingly, the off state indicates non-execution. In practice, the rejection state can be represented by the value of the rejection flag stored by the above-mentioned execution subject. For example, the value of the rejection flag can be "0" and "1", indicating that the rejection state is in the off state and the on state, respectively.
[0036] The execution subject may determine whether to generate a reply statement in a variety of ways. For example, the execution subject may perform mathematical operations on the text length and other parameters, such as the other parameters may include the duration of the user's voice. The execution subject may weight the text length and the duration of the user's voice by using the weights set for the text length and the duration of the user's voice, and if the obtained weighted value is greater than a preset value, it is determined to generate a reply statement.
[0037] In some optional implementations of this embodiment, step 202 may include:
[0038] Determine a comparison result between the text length and a preset text length, and determine whether to generate a reply statement based on the comparison result.
[0039] In these implementations, the execution subject may compare the text length with a preset text length, and determine whether to generate a reply statement based on the comparison result. The preset text length is a pre-set conditional threshold for determining whether to generate a reply statement. For example, if the comparison result is that the text length is greater than or equal to the preset text length, the execution subject can generate a reply statement.
[0040] These implementations can use a preset text length for comparison, thereby quickly and relatively accurately determining whether to generate a reply statement.
[0041] In some optional application scenarios of this embodiment, the above steps, based on the comparison result, determine whether to generate a reply statement, which may include:
[0042] If the text length is less than or equal to the preset text length, it is determined not to generate a reply sentence; if the text length is greater than the preset text length, it is determined to generate a reply sentence.
[0043] In these optional application scenarios, the execution subject can use the relationship between the text length and the preset text length to determine whether to generate a reply statement. In these application scenarios, the condition for generating a reply statement indicated by the preset text length is that the text length is greater than the preset text length. For example, the text corresponding to the user voice included in the user voice information is "I want", the text length is 2, and the preset text length is 2. Then, the text length is equal to the preset text length, and the execution subject can determine to generate a reply statement.
[0044] These application scenarios can avoid generating a reply statement when determining that the text length is short, thereby reducing invalid feedback to users.
[0045] In some optional implementations of this embodiment, step 202 may include:
[0046] A preset software development kit is called to determine whether to generate a reply statement based on the length of the text.
[0047] These optional implementations can call a preset software development kit (SDK) to determine whether to generate a reply statement. In this way, the software development kit performs the determination process and then transmits the determination result to the business layer of the terminal device. In this way, these implementations can implement the process of efficiently and accurately determining whether to generate a reply statement on the terminal device.
[0048] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the information interaction method according to this embodiment. Figure 3 In the application scenario, the execution subject 301 can perform speech recognition on the user's speech in response to receiving the user's speech 302, and obtain the text "I want" corresponding to the user's speech. In response to determining that the rejection state is turned on, the execution subject 301 determines whether to generate a reply sentence 304 based on the text length 303 of the text.
[0049] The method provided by the above embodiment of the present application can quickly determine the invalid content spoken by the user, so that the user can be selectively replied to, so as to reduce invalid feedback to the user and improve the intelligence of information interaction. Moreover, the rejection state in this embodiment is determined by the terminal device, which is more flexible and can even be adjusted by the user himself. In addition, the above execution subject can determine whether to execute the rejection strategy according to the specific situation.
[0050] Further references Figure 4 As an implementation of the methods shown in the above figures, the present application provides an embodiment of an information interaction device, and the device embodiment is Figure 2Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0051] like Figure 4 As shown, the information interaction device 400 of this embodiment includes: a receiving unit 401, in response to receiving a user voice, performing voice recognition on the user voice to obtain text corresponding to the user voice; a determination unit 402, in response to determining that the rejection state is on, determines whether to generate a reply sentence based on the text length of the text.
[0052] In some embodiments, the receiving unit 401 of the information interaction device 400 may receive the user's voice through an installed or connected microphone. In addition, the execution subject may perform voice recognition on the user's voice to convert the user's voice into text.
[0053] In some embodiments, the determination unit 402 may determine the length of the text and determine whether to generate a reply statement based on the length of the text. The text length here may refer to the number of words in the text. The reply statement here may be voice or text, and refers to a statement that responds to the user's voice for interaction.
[0054] In some optional implementations of this embodiment, the determination unit is further configured to perform the determination based on the text length of the text in the following manner to determine whether to generate a reply statement: determine the comparison result between the text length and the preset text length, and determine whether to generate a reply statement based on the comparison result.
[0055] In some optional implementations of this embodiment, the determination unit is further configured to determine whether to generate a reply statement based on the comparison result in the following manner: if the text length is less than or equal to the preset text length, determine not to generate a reply statement; if the text length is greater than the preset text length, determine to generate a reply statement.
[0056] In some optional implementations of this embodiment, the apparatus is applied to a terminal device, and the determination unit is further configured to execute the following method to determine whether to generate a reply statement based on the text length of the text: calling a preset software development kit to determine whether to generate a reply statement based on the text length of the text.
[0057] like Figure 5As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0058] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0059] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium of the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with 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), an 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 above. In an embodiment of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus, or a device. In an embodiment of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-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 computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus, or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
[0060] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0061] The units involved in the embodiments described in the present application may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor includes a receiving unit and a determining unit. Among them, the names of these units do not constitute a limitation on the unit itself in some cases, for example, the determining unit may also be described as "a unit that determines whether to generate a reply statement based on the length of the text in response to determining that the rejection state is on."
[0062] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the device: in response to receiving the user's voice, performs voice recognition on the user's voice to obtain the text corresponding to the user's voice; in response to determining that the rejection state is on, determines whether to generate a reply statement based on the length of the text.
[0063] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. An information interaction method, comprising: In response to receiving a user voice, performing voice recognition on the user voice to obtain text corresponding to the user voice; In response to determining that the rejection state is an on state, determining whether to generate a reply statement based on the length of the text, the rejection state being represented based on a value of a pre-stored rejection flag; The step of determining whether to generate a reply statement based on the length of the text includes: If the weighted value of the text length and the user voice duration is greater than a preset value, it is determined to generate a reply statement.
2. The method according to claim 1, wherein: The method further comprises: If the weighted value of the text length and the user voice duration is not greater than a preset value, it is determined that no reply statement will be generated.
3. The method according to claim 1, wherein: The method is applied to a terminal device; as well as The determining whether to generate a reply statement based on the length of the text includes: A preset software development kit is called to determine whether to generate a reply statement based on the length of the text.
4. An information interaction device, comprising: A receiving unit, configured to, in response to receiving a user voice, perform voice recognition on the user voice to obtain text corresponding to the user voice; a determining unit configured to determine whether to generate a reply statement based on the length of the text in response to determining that the rejection state is an on state, wherein the rejection state is represented based on a value of a pre-stored rejection flag; The determining unit is further configured to determine whether to generate a reply statement based on the length of the text in the following manner: If the weighted value of the text length and the user voice duration is greater than a preset value, it is determined to generate a reply statement.
5. The device according to claim 4, wherein: The determining unit is further configured to: If the weighted value of the text length and the user voice duration is not greater than a preset value, it is determined that no reply statement will be generated.
6. The device according to claim 4, wherein: The apparatus is applied to a terminal device, and the determining unit is further configured to determine whether to generate a reply statement based on the length of the text in the following manner: A preset software development kit is called to determine whether to generate a reply statement based on the length of the text.
7. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.
8. A computer-readable storage medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Information interaction methods and devices
CN109949806B
Language model switching device and program for the same
JP2013050605A
