A method for resource feedback, related apparatus, device, and storage medium

By introducing a knowledge graph into the intent recognition system and establishing the association between entity words, the problem of slot information not being recognized in the existing technology is solved, and more accurate resource feedback is achieved.

CN116414998BActive Publication Date: 2025-10-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210010073.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-05
Publication Date
2025-10-21
Estimated Expiration
2042-01-05

AI Technical Summary

Technical Problem

When the existing intent recognition system cannot match entity words in the NER stage, the slot information cannot be recognized, it is difficult to understand the user's intent, and the accuracy of resource feedback is low.

Method used

By using knowledge graphs to associate other entity words related to user intent, and establishing relationships between entity words based on knowledge graphs, we can enhance our understanding of user intent and provide more accurate resource feedback.

Benefits of technology

By using knowledge graphs to associate other entity words related to user intent, the accuracy of resource feedback is improved, enabling a better understanding of user intent and the provision of relevant resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116414998B_ABST
    Figure CN116414998B_ABST
Patent Text Reader

Abstract

The application discloses a resource feedback method related to human-computer interaction, and application scenarios at least include various terminals, such as mobile phones, computers, vehicle-mounted terminals and the like. The method provided by the application comprises the following steps: obtaining to-be-recognized speech; converting the to-be-recognized speech into target text, wherein the target text comprises K entity words; determining K slots according to the target text, and obtaining K entity words, wherein each slot corresponds to an entity word, and K is an integer greater than or equal to 1; obtaining T target entity words based on the K entity words through a knowledge graph; and feeding back target resources according to the T target entity words. The application also provides related devices, equipment and storage media. The application can associate other entity words related to the user's intention through the knowledge graph, so that the understanding of the user's intention is further strengthened, and then it is favorable to feed back more accurate resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a resource feedback method, related apparatus, equipment, and storage medium. Background Art

[0002] In recent years, the development of speech recognition technology has significantly changed the way people work and live. Applications such as instant messaging, intelligent customer service, and voice assistants have emerged, greatly facilitating our lives. Intent recognition, as a subtask within speech recognition technology, plays a crucial role.

[0003] Currently, existing intent recognition systems consist of three main components: an access module, a named entity recognition (NER) module, and a knowledge management (KM) module. The access module provides an external service interface. The NER module extracts entity terms from search queries. The KM module identifies intent based on entity terms.

[0004] The inventors discovered that existing solutions have at least the following issues: The key to semantic understanding lies in intent recognition and slot extraction, which is performed during the NER process. If the dictionary in the NER process cannot match the entity word, the corresponding slot information cannot be identified, which makes it difficult to understand the user's intent, resulting in low accuracy in resource feedback based on intent recognition. Summary of the Invention

[0005] The present invention provides a resource feedback method, related apparatus, device, and storage medium. The present invention can associate other entity words related to user intent through the knowledge graph, thereby further strengthening the understanding of user intent and facilitating more accurate resource feedback.

[0006] In view of this, the present application provides a resource feedback method, including:

[0007] Get the speech to be recognized;

[0008] Convert the speech to be recognized into target text;

[0009] Determine K slots based on the target text and obtain K entity words, where each slot corresponds to an entity word and K is an integer greater than or equal to 1;

[0010] Based on K entity words, T target entity words are obtained through the knowledge graph, where the knowledge graph includes nodes and edges. Nodes are used to represent entity words, and edges are used to represent the association relationship between entity words. T is an integer greater than or equal to 1.

[0011] Target resources are fed back according to T target entity words, wherein each target entity word corresponds to a resource, and the target resources include at least one resource.

[0012] Another aspect of the present application provides a resource feedback method, comprising:

[0013] Display voice interaction controls;

[0014] In response to a touch operation on the voice interaction control, activating the voice input device;

[0015] Acquiring the speech to be recognized through a speech input device;

[0016] Send the speech to be recognized to the server so that the server converts the speech to be recognized into target text, determines K slots based on the target text, and obtains K entity words. Based on the K entity words, obtains T target entity words through the knowledge graph, where each slot corresponds to an entity word. The knowledge graph includes nodes and edges. Nodes are used to represent entity words, and edges are used to represent the association relationship between entity words. Each target entity word corresponds to a resource, and K and T are integers greater than or equal to 1.

[0017] Receiving a target resource sent by the server, wherein the target resource is determined by the server based on T target entity words, and the target resource includes at least one resource;

[0018] Display or play the target resource.

[0019] Another aspect of the present application provides a resource feedback device, comprising:

[0020] An acquisition module, used to acquire the speech to be recognized;

[0021] A processing module, used for converting the speech to be recognized into target text;

[0022] A determination module is used to determine K slots based on the target text and obtain K entity words, where each slot corresponds to an entity word and K is an integer greater than or equal to 1;

[0023] The acquisition module is further used to obtain T target entity terms through the knowledge graph based on the K entity terms, wherein the knowledge graph includes nodes and edges, the nodes are used to represent entity terms, and the edges are used to represent the association relationship between entity terms, and T is an integer greater than or equal to 1;

[0024] The feedback module is used to feed back target resources based on T target entity words, wherein each target entity word corresponds to a resource, and the target resources include at least one resource.

[0025] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0026] A determination module is specifically used to perform word segmentation processing on the target text to obtain M words and the domain label corresponding to each of the M words, where M is an integer greater than 1;

[0027] Determine the target intention sentence pattern based on M words and the domain labels corresponding to each of the M words;

[0028] Determine K slots based on the target intent sentence;

[0029] Obtain the entity words corresponding to each slot in the K slots from the target text to obtain K entity words.

[0030] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0031] The determination module is specifically used to perform word segmentation on the target text to obtain M words;

[0032] Match each of the M words with T dictionary trees to obtain a matching result for each word, where each dictionary tree corresponds to a domain label and T is an integer greater than or equal to 1;

[0033] According to the matching results of each word, the domain label corresponding to each word in the M words is determined.

[0034] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0035] The determination module is specifically used to perform word segmentation on the target text to obtain M words;

[0036] Search each of the M words according to T double-array dictionary trees to obtain a search result for each word, wherein the double-array dictionary tree includes a base array and a check array, and each double-array dictionary tree corresponds to a domain label, and T is an integer greater than or equal to 1;

[0037] According to the search results of each word, the domain label corresponding to each word in the M words is determined.

[0038] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0039] The determination module is specifically used to perform word segmentation processing on the target text to obtain M words and domain labels of N words in the M words, where M is an integer greater than 1 and N is an integer greater than or equal to 1 and less than M;

[0040] Then rewrite (MN) words to obtain the target words and their domain labels;

[0041] Determine the target intention sentence pattern based on the target word, the domain label of the target word, the M words, and the domain labels of the N words;

[0042] Determine K slots based on the target intent sentence;

[0043] Obtain the entity words corresponding to each slot in the K slots from the target text to obtain K entity words.

[0044] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0045] a determination module, specifically configured to query, based on the (MN) words, at least one word satisfying an edit distance less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1;

[0046] If at least one word is a term, the term is taken as the target term;

[0047] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0048] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0049] a determination module, specifically configured to query, based on the (MN) words, at least one word satisfying an edit distance less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1;

[0050] If at least one word is a term, get the heat value of the term;

[0051] If the heat value of a word is greater than or equal to the heat value threshold, the word is taken as the target word;

[0052] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0053] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0054] a determination module, specifically configured to query, based on the (MN) words, at least one word satisfying an edit distance less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1;

[0055] If the at least one word includes at least two words, then obtain the heat value of each word in the at least two words;

[0056] The words with the highest popularity value are used as target words;

[0057] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0058] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0059] A determination module, specifically, based on the (MN) words, searches R BK trees for at least one word that satisfies an edit distance less than or equal to a threshold edit distance, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1;

[0060] If at least one word is a term, obtain the semantic similarity between the term and (MN) words;

[0061] If the semantic similarity is greater than or equal to the semantic similarity threshold, the word is taken as the target word;

[0062] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0063] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0064] a determination module, specifically configured to query, based on the (MN) words, at least one word satisfying an edit distance less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1;

[0065] If the at least one word includes at least two words, obtaining the semantic similarity between each word in the at least two words and (MN) words;

[0066] The words with the highest semantic similarity are taken as the target words of (MN) words;

[0067] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0068] In one possible design, in another implementation of another aspect of the embodiment of the present application, the K entity words include a first entity word and a second entity word;

[0069] An acquisition module, specifically configured to determine, based on the knowledge graph, at least one attribute associated with the first entity term;

[0070] If the second entity word fails to match at least one attribute, the semantic similarity between the second entity word and each attribute is calculated;

[0071] If the maximum semantic similarity is greater than or equal to the similarity threshold, the attribute corresponding to the maximum semantic similarity is used as the modified second entity word;

[0072] Based on the first entity term and the modified second entity term, T target entity terms are obtained through the knowledge graph.

[0073] In one possible design, in another implementation of another aspect of the embodiment of the present application, the K entity words include a first entity word;

[0074] An acquisition module is specifically configured to acquire, if the intent is audio playback, T target entity terms associated with the first entity term based on the knowledge graph, where each target entity term corresponds to a version of the audio resource;

[0075] If it is a video playback intention, T target entity words associated with the first entity word are obtained according to the knowledge graph, where each target entity word corresponds to a version of the video resource.

[0076] In one possible design, in another implementation of another aspect of the embodiment of the present application, the K entity words include a first entity word and a second entity word;

[0077] An acquisition module, specifically configured to determine, based on the knowledge graph, at least one attribute associated with the first entity term;

[0078] If the second entity word matches the attribute successfully, T target entity words are obtained through the knowledge graph based on the second entity word.

[0079] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0080] The feedback module is specifically used to obtain the resources corresponding to each target entity word, and obtain T resources;

[0081] Determine the resource that meets the copyright feedback conditions from T resources as the target resource;

[0082] Feedback target resources.

[0083] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0084] The feedback module is specifically used to obtain the resources corresponding to each target entity word, obtaining T resources, where each resource has a popularity value;

[0085] Sort the T resources in descending order, and use the sorted T resources as the feed target resources;

[0086] Feedback target resources.

[0087] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0088] An acquisition module is specifically configured to receive a speech to be recognized sent by a terminal device, wherein the speech to be recognized is collected by the terminal device through a speech input device;

[0089] A feedback module is specifically used to determine target resources based on T target entity words;

[0090] Send the target resource to the terminal device so that the terminal device displays or plays the target resource.

[0091] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0092] An acquisition module, specifically used to acquire the speech to be recognized through a speech input device;

[0093] A feedback module is specifically used to determine target resources based on T target entity words;

[0094] Display or play the target resource.

[0095] Another aspect of the present application provides a resource feedback device, comprising:

[0096] A display module, used to display voice interaction controls;

[0097] A startup module, configured to start the voice input device in response to a touch operation on the voice interaction control;

[0098] An acquisition module, configured to acquire the speech to be recognized through a speech input device;

[0099] A sending module is used to send the speech to be recognized to the server so that the server converts the speech to be recognized into target text, determines K slots based on the target text, and obtains K entity words. Based on the K entity words, T target entity words are obtained through the knowledge graph, where each slot corresponds to an entity word. The knowledge graph includes nodes and edges. The nodes are used to represent entity words, and the edges are used to represent the association relationship between entity words. Each target entity word corresponds to a resource, and K and T are integers greater than or equal to 1.

[0100] A receiving module, configured to receive a target resource sent by a server, wherein the target resource is determined by the server based on T target entity words, and the target resource includes at least one resource;

[0101] The display module is also used to display or play the target resource.

[0102] On the other hand, the present application provides a server, comprising: a memory, a processor, and a bus system;

[0103] Wherein, the memory is used to store programs;

[0104] The processor is used to execute the program in the memory, and the processor is used to perform the above-mentioned methods according to the instructions in the program code;

[0105] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

[0106] On the other hand, the present application provides a terminal device, comprising: a memory, a processor, and a bus system;

[0107] Wherein, the memory is used to store programs;

[0108] The processor is used to execute the program in the memory, and the processor is used to perform the above-mentioned methods according to the instructions in the program code;

[0109] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

[0110] Another aspect of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.

[0111] Another aspect of the present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the above aspects.

[0112] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0113] In an embodiment of the present application, a method for resource feedback is provided, which first obtains a speech to be recognized, and then converts the speech to be recognized into a target text, wherein the target text includes K entity words. Thus, K slots are determined according to the target text, and K entity words are obtained, each slot corresponding to an entity word. Next, based on the K entity words, T target entity words are obtained through the knowledge graph. Finally, the target resource can be fed back based on the T target entity words. In the above manner, a knowledge graph is constructed using existing resources, and an association relationship between entity words is established based on the knowledge graph. When a user plays a resource on demand, other entity words (i.e., T target entity words) related to the user's intention (i.e., target intention information) can be associated with the knowledge graph, thereby further strengthening the understanding of the user's intention, which is conducive to feedback of more accurate resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0114] Figure 1 A schematic diagram of the physical architecture of the resource feedback system in an embodiment of the present application;

[0115] Figure 2 A schematic diagram of a framework of a resource feedback system in an embodiment of the present application;

[0116] Figure 3 A flowchart of a resource feedback method in an embodiment of the present application;

[0117] Figure 4 A schematic diagram of a dictionary tree in an embodiment of the present application;

[0118] Figure 5 A schematic diagram of a BK tree in an embodiment of the present application;

[0119] Figure 6 This is another schematic diagram of the BK tree in the embodiment of the present application;

[0120] Figure 7 This is a schematic diagram of the knowledge graph in the embodiment of this application;

[0121] Figure 8 A schematic diagram of constructing a knowledge graph in an embodiment of the present application;

[0122] Figure 9 A schematic diagram of recommending resources based on copyright information in an embodiment of the present application;

[0123] Figure 10 This is a schematic diagram of recommending resources based on popularity ranking in an embodiment of the present application;

[0124] Figure 11 This is another flowchart of the resource feedback method in an embodiment of the present application;

[0125] Figure 12 This is a schematic diagram of triggering resource push based on voice input in an embodiment of the present application;

[0126] Figure 13 A schematic diagram of a resource feedback device in an embodiment of the present application;

[0127] Figure 14 This is another schematic diagram of the resource feedback device in an embodiment of the present application;

[0128] Figure 15 A schematic diagram of the structure of the server in the embodiment of the present application;

[0129] Figure 16 This is a structural diagram of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION

[0130] The present invention provides a resource feedback method, related apparatus, device, and storage medium. The present invention can associate other entity words related to user intent through the knowledge graph, thereby further strengthening the understanding of user intent and facilitating more accurate resource feedback.

[0131] The terms "first", "second", "third", "fourth", etc. (if any) 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 sequential order. It should be understood that the numbers used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "corresponding to" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes 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.

[0132] With the development of computers and artificial intelligence (AI), the ways humans interact with machines are becoming increasingly diverse. Among these various interaction methods, voice interaction is the most natural, convenient, and direct for humans. Human-computer interaction requires speech recognition and semantic understanding. Speech recognition uses speech technology to convert human speech into natural audio text. Key speech technologies include automatic speech recognition (ASR), speech synthesis, and voiceprint recognition. Enabling computers to hear, see, speak, and feel is the future direction of human-computer interaction, with speech becoming one of the most promising methods for future human-computer interaction. Semantic understanding involves analyzing the text generated by speech recognition using natural language processing (NLP) technology to infer the speaker's intended meaning. NLP is a key area of ​​research in computer science and AI. It studies the theories and methods that enable effective communication between humans and computers using natural language. NLP is a discipline that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language, the language people use in daily life, and is closely related to the study of linguistics. NLP technologies typically include text processing, semantic understanding, machine translation, robotic question answering, knowledge graphs, and other technologies.

[0133] It can be seen that accurately understanding user intentions plays an important role in providing more accurate resource feedback. Based on this, this application proposes an intention recognition method based on knowledge graph, which is applied to Figure 1The resource feedback system shown in the figure includes a server and a terminal device, and the client is deployed on the terminal device, wherein the client can be run on the terminal device in the form of a browser, or can be run on the terminal device in the form of an independent application (APP), etc. The specific presentation form of the client is not limited here. The server involved in this application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal device can be a smart phone, smart speaker, robot, tablet computer, laptop computer, PDA, personal computer, smart TV, smart watch, vehicle-mounted device, wearable device, etc., but is not limited to this. The terminal device and the server can be directly or indirectly connected by wired or wireless communication, and this application does not limit it here. The number of servers and terminal devices is also not limited. The solution provided in this application can be completed independently by the terminal device, can be completed independently by the server, or can be completed by the terminal device and the server in cooperation. This application does not make any specific limitations on this.

[0134] For example, consider a smart speaker equipped with a microphone. A user speaks into the microphone, for example, "Play song B by singer A." The smart speaker encodes the user's speech and sends it to a server. After decoding the user's speech, the server converts it into target text, performs semantic recognition on the target text, and finally, based on the semantic recognition results, searches for audio resources that can be fed back. The server then pushes the audio resource to the smart speaker, which then plays it.

[0135] It is understood that in an online scenario, the terminal device sends the collected speech to be recognized to the server, which recognizes the speech and feeds back resources. In an offline scenario, the terminal device can also directly perform speech recognition after collecting the speech to be recognized and feed back local resources.

[0136] The resource feedback method provided in this application can be used in different scenarios. For example, in the intelligent song-on-demand function, there are usage scenarios such as precise on-demand (for example, song, singer, song + singer, song + version, etc.) and type on-demand (for example, song language, related film and television and song style, etc.). This application uses existing resource data to perform data cleaning and knowledge graph construction, and establishes relevant point-edge relationships in the background. And establish a dictionary of keywords in different fields, so that when users play songs, the recognition accuracy can be improved in several links.

[0137] based on Figure 1 The resource feedback system shown below will be combined with Figure 2 This section describes the resource recommendation process. Figure 2 , Figure 2 The following is a schematic diagram of a resource feedback system according to an embodiment of the present application, specifically:

[0138] In step S1, the user inputs a voice, and the voice is recognized based on ASR technology.

[0139] In step S2, pattern matching is performed on the recognized text, wherein both step S1 and step S2 use a preset dictionary.

[0140] In step S3, the proper noun is determined based on the slot in the pattern matching template. If the word corresponding to the slot cannot be identified, the word is corrected based on a distance dictionary. The distance dictionary can specifically be a metric tree in a discrete metric space, i.e., a BK (Burkhard-Keller) tree.

[0141] In step S4, the knowledge graph is used to standardize and rewrite the identified proper nouns. If they meet the requirements, no rewriting is required.

[0142] In step S5, resources (eg, songs, videos, etc.) related to the text content are retrieved based on the resource library.

[0143] In step S6, all recalled resources are sorted, and resources that meet the requirements are selected and pushed to the user.

[0144] Since this application involves some terms related to professional fields, they will be explained below for ease of understanding.

[0145] (1) Knowledge Graph (KG): It is a series of different graphs that show the development process and structural relationship of knowledge. It uses visualization technology to describe knowledge resources and their carriers, and mines, analyzes, constructs, draws and displays knowledge and their interrelationships.

[0146] (2) User query: the text obtained by converting the instruction speech issued by the user, that is, the "target text" in this application.

[0147] (3) User intent: The logic that the user wants to execute intelligently, extracted from the user query.

[0148] (4) Slot: Extract keywords in the user query.

[0149] (5) Named entity recognition (NER): Identify proper nouns such as names of people or places from user queries.

[0150] In combination with the above introduction, the following will introduce the resource feedback method in this application. Please refer to Figure 3 , an embodiment of the resource feedback method in the embodiment of the present application includes:

[0151] 110. Obtain the speech to be recognized;

[0152] In one or more embodiments, the resource feedback device obtains the speech to be recognized input by the user.

[0153] It should be noted that the resource feedback device can be deployed on a server, or deployed on a terminal device, or deployed on a system consisting of a server and a terminal device, which is not limited here.

[0154] 120. Convert the speech to be recognized into target text;

[0155] In one or more embodiments, the resource feedback device uses ASR technology to convert the speech to be recognized into target text.

[0156] Specifically, the speech to be recognized is first preprocessed, including but not limited to framing and noise reduction. Feature extraction is then performed on the framed speech to obtain speech signal features. These features are then decoded using a speech recognition model (including an acoustic model and a language model) to obtain the target text (i.e., the user query).

[0157] 130. Determine K slots according to the target text and obtain K entity words, where each slot corresponds to an entity word and K is an integer greater than or equal to 1;

[0158] In one or more embodiments, the resource feedback device performs word segmentation on the target text, thereby obtaining word segmentation results and domain labels for each word. Based on this, pattern matching can be performed on the target text to extract corresponding slots after matching, that is, to obtain K slots.

[0159] Specifically, after extracting K slots, NER recognition can be performed on each slot to identify the corresponding entity words for each slot. The entity words here can be understood as proper nouns, such as singer names, song titles, movie titles, etc.

[0160] 140. Based on K entity words, obtain T target entity words through the knowledge graph, where the knowledge graph includes nodes and edges, nodes are used to represent entity words, and edges are used to represent the association relationship between entity words, and T is an integer greater than or equal to 1;

[0161] In one or more embodiments, illustratively, when K is 1, other entity terms related to the entity term can be obtained through the knowledge graph as target entity terms. For example, if the entity term is the song title "Sunny Day," the knowledge graph can be used to query whether three singers have sung this song. Therefore, the T target entity terms include "Singer A," "Singer B," and "Singer C." Exemplarily, when K is greater than 1, the knowledge graph can be used to obtain T target entity terms based on the relationships between the entity terms.

[0162] Knowledge graphs can be used to normalize or rewrite entity terms, effectively improving the accuracy and normalization of intent recognition and facilitating the subsequent provision of better resources for users. Specifically, suppose the target text is "Play the opening theme song of TV series A," where "TV series A" is an entity term corresponding to the slot. Based on this, the knowledge graph shows that the opening theme song of TV series A is "Song A" and that the performer of "Song A" is "Singer A." Therefore, the slot can be rewritten as "Singer A" and "Song A."

[0163] It can be understood that the knowledge graph consists of nodes and edges, each node represents an entity word, and each edge is the association relationship between entity words.

[0164] 150. Feedback target resources based on T target entity words, where each target entity word corresponds to a resource, and the target resources include at least one resource.

[0165] In one or more embodiments, the resource feedback device searches for corresponding resources based on T target entity terms. For example, if the T target entity terms include "singer A," "singer B," and "singer C," the device searches for song resource A sung by singer A, song resource B sung by singer B, and song resource C sung by singer C. A specific push strategy is then used to select one or more song resources as target resources, and the target resources are pushed.

[0166] It is understandable that song resource A, song resource B, and song resource C may be different versions of the same song.

[0167] In an embodiment of the present application, a method for resource feedback is provided. In the above manner, a knowledge graph is constructed using existing resources, and an association relationship between entity words is established based on the knowledge graph. When a user orders a resource on demand, other entity words (i.e., T target entity words) related to the user's intent (i.e., target intent information) can be associated with the knowledge graph, thereby further strengthening the understanding of the user's intent, which is conducive to feedback of more accurate resources.

[0168] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, K slots are determined according to the target text, and K entity words are obtained, which may specifically include:

[0169] Perform word segmentation on the target text to obtain M words and the domain label corresponding to each of the M words, where M is an integer greater than 1;

[0170] Determine the target intention sentence pattern based on M words and the domain labels corresponding to each of the M words;

[0171] Determine K slots based on the target intent sentence;

[0172] Obtain the entity words corresponding to each slot in the K slots from the target text to obtain K entity words.

[0173] In one or more embodiments, a method for extracting slots and obtaining entity words is introduced. As can be seen from the aforementioned embodiments, the target text can be segmented using a Hidden Markov Model (HMM) and a Viterbi algorithm, and then M words and the domain labels corresponding to each of the M words are obtained based on dictionary matching. Combined with the M words and the domain labels corresponding to each of the M words, the target intent sentence pattern can be determined, and then the slots therein are preliminarily extracted, that is, K slots are obtained. Based on this, the words corresponding to each slot are extracted as entity words, and K entity words are obtained.

[0174] Specifically, the word segmentation link can use open source methods, for example, using the Viterbi algorithm and HMM based on dynamic programming ideas for word segmentation. Among them, the Viterbi algorithm is an algorithm for finding the shortest path. In the word segmentation task, word segmentation is abstracted as finding a reasonable division method so that each fragment can constitute a word, while doing the task of as few divisions as possible. HMM is an algorithm model that is derived between implicit sequences, visible sequences and transition state machines. In the word segmentation task, the target text is the visible sequence, the token sequence after word segmentation is the hidden sequence, and the state machine contains information such as the word frequency of each word (that is, the probability of the word). The word segmentation task can be abstracted into the work of finding the implicit sequence with the highest probability given the known visible sequence and the state machine.

[0175] After word segmentation, the target text can be accurately matched with the dictionary to obtain the specific word information. The dictionary includes words and their corresponding domain labels.

[0176] For example, suppose the target text is "Play Jack's Sunny Day", where the domain labels of "play" and "of" are "stop words", the domain label of "Jack" is "singer's name", and the domain label of "sunny day" is "song name". Therefore, the target intent sentence that can be matched is "Play [singer's name]'s [song name]". Based on this, two slots are extracted, namely "[singer's name]" and "[song name]". The entity word corresponding to the slot "[singer's name]" is "Jack", and the entity word corresponding to the slot "[song name]" is "sunny day".

[0177] Secondly, in the embodiment of the present application, a method for extracting slots and obtaining entity words is provided. Through the above method, for target texts that do not require error correction, slot extraction can be performed directly, providing a basis for subsequent processing, thereby improving the feasibility and operability of the solution.

[0178] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the target text is segmented to obtain M words and the field label corresponding to each of the M words, which may specifically include:

[0179] Perform word segmentation on the target text to obtain M words;

[0180] Match each of the M words with T dictionary trees to obtain a matching result for each word, where each dictionary tree corresponds to a domain label and T is an integer greater than or equal to 1;

[0181] According to the matching results of each word, the domain label corresponding to each word in the M words is determined.

[0182] In one or more embodiments, a method for accurately matching segmentation results using a dictionary tree is introduced. As can be seen from the aforementioned embodiments, after segmentation, a dictionary can be used to match the segmentation results. The dictionary can be a hash tree or a dictionary tree, etc. The following will use the dictionary tree to match the segmentation results as an example.

[0183] Specifically, we perform trie matching on the M words obtained after word segmentation, where each trie corresponds to a domain label. Assuming the target text is "play Jack's sunny day", the token sequence after word segmentation is "play / Jack / of / sunny day". At this point, we know that "Jack" and "sunny day" are nouns. For example, we perform trie matching on "Jack". For ease of understanding, please refer to Figure 4 , Figure 4 This is a schematic diagram of a dictionary tree in an embodiment of the present application. As shown in the figure, the field label of the dictionary tree is "singer name". The dictionary tree includes multiple nodes, and each node represents a text unit (for example, a word).

[0184] Based on this, the search begins at the root node, obtaining the first character of the searched word. Based on this character, the corresponding subtree is selected and the search continues in that subtree. Within that subtree, the second character of the searched keyword is obtained, and further subtrees are selected for search. At a certain node, all characters in the word have been retrieved. Therefore, "Jack" successfully matches the trie, and the domain label of that trie is used as the domain label for "Jack."

[0185] As you can understand, a trie is an ordered tree used to store associative arrays, where the keys are typically strings. All descendants of a node share the same prefix. In this application, different tries are constructed based on different domain fields, for example, a song name trie and an artist name trie. By splitting the trie size, matching speed is improved.

[0186] Again, in the embodiments of the present application, a method for accurately matching the segmentation results using a dictionary tree is provided. This method can reduce query time by utilizing the common prefixes of strings, minimize unnecessary string comparisons, and achieve high query efficiency, which is conducive to improving the efficiency of resource feedback.

[0187] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the target text is segmented to obtain M words and the field label corresponding to each of the M words, which may specifically include:

[0188] Perform word segmentation on the target text to obtain M words;

[0189] Search each of the M words according to T double-array dictionary trees to obtain a search result for each word, wherein the double-array dictionary tree includes a base array and a check array, and each double-array dictionary tree corresponds to a domain label, and T is an integer greater than or equal to 1;

[0190] According to the search results of each word, the domain label corresponding to each word in the M words is determined.

[0191] In one or more embodiments, a method for accurately matching the segmentation results using a double-array dictionary tree is introduced. As can be seen from the above embodiments, after the segmentation, a dictionary can be used to match the segmentation results, and the dictionary can be a double-array trie tree (DAT tree).

[0192] Specifically, a double-array dictionary tree query is performed on the M words obtained after word segmentation, where each double-array dictionary tree corresponds to a domain label. In order to reduce the space waste of the dictionary tree structure and ensure the efficiency of the dictionary tree query, two arrays can be used to represent the dictionary tree. These two arrays are the base array and the check array. The elements in the base array and the check array are one-to-one corresponding. Each element in the base array is equivalent to a node in the dictionary tree, and its value is used as the base value for state transfer. The check value in the check array is used to check whether the state exists.

[0193] Based on this, each of the M words is searched to obtain the search results for each word. Finally, the domain label corresponding to the double-array dictionary tree that successfully matches the word is used as the domain label of the word.

[0194] Again, in the embodiment of the present application, a method for performing accurate matching of the word segmentation results using a double-array dictionary tree is provided. By using the above method, memory usage can be greatly saved, query efficiency is high, and the efficiency of resource feedback is improved.

[0195] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, K slots are determined according to the target text, and K entity words are obtained, which may specifically include:

[0196] Perform word segmentation on the target text to obtain M words and domain labels of N words in the M words, where M is an integer greater than 1 and N is an integer greater than or equal to 1 and less than M;

[0197] Then rewrite (MN) words to obtain the target words and their domain labels;

[0198] Determine the target intention sentence pattern based on the target word, the domain label of the target word, the M words, and the domain labels of the N words;

[0199] Determine K slots based on the target intent sentence;

[0200] Obtain the entity words corresponding to each slot in the K slots from the target text to obtain K entity words.

[0201] In one or more embodiments, a method for correcting words is described. As can be seen from the aforementioned embodiments, after word segmentation, a dictionary (e.g., a dictionary tree or a double-array dictionary tree, etc.) can be used to match M words. If at least one word fails to match, while the remaining N words all match successfully, then, on the one hand, the failed word needs to be corrected, and on the other hand, the domain label of the word can be determined based on the dictionary.

[0202] It can be understood that the at least one word that fails to match is the (MN) words in this application.

[0203] Specifically, a pre-constructed BK (Burkhard-Keller) tree can be used to correct (MN) words, thereby obtaining the corrected words, i.e., the target words. At the same time, since each BK tree also has a corresponding domain label, the domain label of the target word can be determined. Based on this, the target word, the domain label of the target word, the correct N words among the M words, and the domain labels of these N words can be used to match the corresponding target intent sentence. In this way, the corresponding K slots can be extracted, and the entity words corresponding to each slot can be obtained, that is, K entity words are obtained.

[0204] Secondly, in the embodiments of the present application, a method for correcting words is provided. Through the above method, considering that the dictionary for NER matching may be limited by speed requirements and only use high-frequency words, the error correction capability is limited. Therefore, the introduction of an error correction mechanism can correct words that cannot be successfully matched when performing NER dictionary matching mode, thereby better understanding the user's intention and helping to improve resource recall rate.

[0205] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, (MN) words are rewritten to obtain target words and domain labels of the target words, which may specifically include:

[0206] According to the (MN) words, query at least one word whose edit distance is less than or equal to the edit distance threshold from R BK trees, where each BK tree corresponds to a domain label and R is an integer greater than or equal to 1;

[0207] If at least one word is a term, the term is taken as the target term;

[0208] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0209] In one or more embodiments, a method for performing approximate word searches is described. As can be seen from the aforementioned embodiments, in practice, there may be (MN) words that fail to match the dictionary, and therefore, (MN) words need to be corrected. For ease of explanation, the following explanation will use the correction of one word as an example.

[0210] Specifically, a BK tree can be used to correct unmatched words, where each BK tree corresponds to a domain label. Assuming the target text is "Play Jack's Sunny," the token sequence after word segmentation is "Play / Jack / of / Sunny," meaning M is 4. "Play," "Jack," and "of" all successfully match the dictionary, while "Sunny" fails to match. Therefore, the word to be corrected is "Sunny." Based on the target intent sentence "Play [Singer Name]'s [Song Name]," we know that the word "Sunny" should belong to "Song Name," so "Sunny" is extracted for subsequent correction.

[0211] In practical applications, R BK trees are pre-built. For ease of understanding, see Figure 5 , Figure 5 This is a schematic diagram of a BK tree in an embodiment of the present application. As shown in the figure, the domain label of the BK tree is "song name". The BK tree includes multiple nodes, each of which represents a word. Assuming that the edit distance threshold is set to 1, an approximate search with an edit distance of 1 is required through the BK tree. Among them, the edit distance of "sunny day" is 1, and the edit distance of "clear sky" is 3. Therefore, only one word meets the condition that the edit distance is less than or equal to the edit distance threshold.

[0212] Based on this, the word "sunny" in the target text is changed to "sunny day". And the domain label of the BK tree is used as the domain label of "sunny day".

[0213] As you can understand, the BK tree is also used for approximate string matching. Based on this data structure, many automatic correction functions can be implemented. For two strings, string A should be converted to string B using the minimum number of character operations. Character operations mainly include deleting a character, inserting a character, and changing one character to another.

[0214] Secondly, in the embodiment of the present application, a method for similar search of words is provided. Through the above method, the BK tree can be used to correct the words that cannot be matched successfully, achieving the purpose of automatic correction, thereby better understanding the user's intention and improving the resource recall rate.

[0215] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, (MN) words are rewritten to obtain target words and domain labels of the target words, which may specifically include:

[0216] According to the (MN) words, query at least one word whose edit distance is less than or equal to the edit distance threshold from R BK trees, where each BK tree corresponds to a domain label and R is an integer greater than or equal to 1;

[0217] If at least one word is a term, get the heat value of the term;

[0218] If the heat value of a word is greater than or equal to the heat value threshold, the word is taken as the target word;

[0219] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0220] In one or more embodiments, another method for performing approximate word searches is described. As can be seen from the aforementioned embodiments, in practice, there may be (MN) words that fail to match the dictionary, and therefore, (MN) words need to be corrected. For ease of explanation, the following explanation will use the correction of one word as an example.

[0221] Specifically, a BK tree can be used to correct unmatched words, where each BK tree corresponds to a domain label. Assuming the target text is "Play Jack's Sunny," the token sequence after word segmentation is "Play / Jack / of / Sunny," meaning M is 4. "Play," "Jack," and "of" all successfully match the dictionary, while "Sunny" fails to match. Therefore, the word to be corrected is "Sunny." Based on the target intent sentence "Play [Singer Name]'s [Song Name]," we know that the word "Sunny" should belong to "Song Name," so "Sunny" is extracted for subsequent correction.

[0222] In practical applications, R BK trees are pre-built. For easier understanding, please refer to Figure 5The domain label of this BK tree is "song title." The BK tree consists of multiple nodes, each representing a word. Assuming the edit distance threshold is set to 1, we need to perform an approximate search with an edit distance of 1 through the BK tree. The edit distance for "sunny day" is 1, and the edit distance for "clear sky" is 3. Therefore, only one word meets the condition of an edit distance less than or equal to the edit distance threshold.

[0223] Based on this, the popularity value of the word "sunny day" is further obtained, where the higher the popularity value, the greater the popularity of the word. For example, the words can be sorted and filtered based on the point information (e.g., song popularity value) and point edge information (e.g., the number of songs by a singer) stored in the knowledge graph, and words that do not meet the popularity value threshold are filtered out.

[0224] It is understood that the popularity value can be calculated based on clicks, searches, or views, and the calculation method is not limited. If the popularity value of the word "sunny day" is greater than or equal to the popularity value threshold, the word "clear" in the target text is changed to "sunny day". The domain label of the BK tree is used as the domain label of "sunny day".

[0225] Secondly, the embodiments of the present application provide another method for similarly searching for words. Through the above method, a BK tree can be used to correct words that cannot be successfully matched, achieving the purpose of automatic correction. In addition, only words with a popularity value higher than the popularity value threshold are changed, thereby better understanding the user's intention and improving the resource recall rate.

[0226] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, (MN) words are rewritten to obtain target words and domain labels of the target words, which may specifically include:

[0227] According to the (MN) words, query at least one word whose edit distance is less than or equal to the edit distance threshold from R BK trees, where each BK tree corresponds to a domain label and R is an integer greater than or equal to 1;

[0228] If the at least one word includes at least two words, then obtain the heat value of each word in the at least two words;

[0229] The words with the highest popularity value are used as target words;

[0230] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0231] In one or more embodiments, another method for performing approximate word searches is described. As can be seen from the aforementioned embodiments, in practice, there may be (MN) words that fail to match the dictionary, and therefore, (MN) words need to be corrected. For ease of explanation, the following explanation will use the correction of one word as an example.

[0232] Specifically, a BK tree can be used to correct unmatched words, where each BK tree corresponds to a domain label. Assuming the target text is "Play Jack's Sunny," the token sequence after word segmentation is "Play / Jack / of / Sunny," meaning M is 4. "Play," "Jack," and "of" all successfully match the dictionary, while "Sunny" fails to match. Therefore, the word to be corrected is "Sunny." Based on the target intent sentence "Play [Singer Name]'s [Song Name]," we know that the word "Sunny" should belong to "Song Name," so "Sunny" is extracted for subsequent correction.

[0233] In practical applications, R BK trees are pre-built. For ease of understanding, see Figure 6 , Figure 6 This is another schematic diagram of the BK tree in an embodiment of the present application. As shown in the figure, the domain label of the BK tree is "song name". The BK tree includes multiple nodes, each of which represents a word. Assuming that the edit distance threshold is set to 1, an approximate search with an edit distance of 1 is required through the BK tree. Among them, the edit distance of "sunny day" is 1, and the edit distance of "clear sky" is also 1. Therefore, there are two words that meet the condition that the edit distance is less than or equal to the edit distance threshold.

[0234] Based on this, we obtain the popularity values ​​of the word "sunny day" and the word "clear sky," sort the popularity values ​​of the words, and filter out words that do not meet the popularity threshold. Finally, we select the word with the highest popularity value from the words that meet the popularity threshold as the target word. Assuming the target word is "sunny day," we change "clear" in the target text to "sunny day." Furthermore, the domain label of this BK tree is used as the domain label of "sunny day."

[0235] In one case, words can be filtered based on the relationships in the knowledge graph. For example, if singer Jack has only sung "sunny day," then the word "clear sky" can be filtered out. In another case, if singer Jack has sung both "sunny day" and "clear sky," that is, if the knowledge graph determines that at least two words meet the association condition, then the heat value needs to be further used to select words.

[0236] Secondly, in the embodiment of the present application, another method for approximate search of words is provided. Through the above method, the BK tree can be used to correct the words that cannot be matched successfully, thereby achieving the purpose of automatic correction. In addition, if there are at least two words that simultaneously meet the condition that the edit distance is less than or equal to the edit distance threshold, then the word with a higher heat value can be preferentially selected as the target word, thereby being more in line with the search for popular information, thereby being able to better understand the user's intention and helping to improve the resource recall rate.

[0237] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, (MN) words are rewritten to obtain target words and domain labels of the target words, which may specifically include:

[0238] According to the (MN) words, query at least one word whose edit distance is less than or equal to the edit distance threshold from R BK trees, where each BK tree corresponds to a domain label and R is an integer greater than or equal to 1;

[0239] If at least one word is a term, obtain the semantic similarity between the term and (MN) words;

[0240] If the semantic similarity is greater than or equal to the semantic similarity threshold, the word is taken as the target word;

[0241] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0242] In one or more embodiments, another method for performing approximate word searches is described. As can be seen from the aforementioned embodiments, in practice, there may be (MN) words that fail to match the dictionary, and therefore, (MN) words need to be corrected. For ease of explanation, the following explanation will use the correction of one word as an example.

[0243] Specifically, a BK tree can be used to correct unmatched words, where each BK tree corresponds to a domain label. Assuming the target text is "Play Jack's Sunny," the token sequence after word segmentation is "Play / Jack / of / Sunny," meaning M is 4. "Play," "Jack," and "of" all successfully match the dictionary, while "Sunny" fails to match. Therefore, the word to be corrected is "Sunny." Based on the target intent sentence "Play [Singer Name]'s [Song Name]," we know that the word "Sunny" should belong to "Song Name," so "Sunny" is extracted for subsequent correction.

[0244] In practical applications, R BK trees are pre-built. For easier understanding, please refer to Figure 5 , the domain label of this BK tree is "song name". The BK tree includes multiple nodes, and each node represents a word. Assuming that the edit distance threshold is set to 1, approximate search with an edit distance of 1 needs to be performed through the BK tree. Among them, the edit distance of "Sunny Day" is 1, and the edit distance of "Clear Sky" is 3. Therefore, only one word meets the condition that the edit distance is less than or equal to the edit distance threshold.

[0245] Based on this, further calculate the semantic similarity between the word "Sunny Day" and the word "Sunny". Among them, the higher the semantic similarity, the greater the degree of semantic similarity between the words. If the semantic similarity between the word "Sunny Day" and the word "Sunny" is greater than or equal to the semantic similarity threshold, then change "Sunny" in the target text to "Sunny Day". And use the domain label of this BK tree as the domain label of "Sunny Day".

[0246] Secondly, in the embodiments of the present application, another way to perform approximate search on words is provided. Through the above method, the BK tree can be used to correct errors in words that cannot be successfully matched, achieving the purpose of automatic correction. In addition, considering that there may be cases of slips of the tongue, therefore, it is easier to meet the user's intention by preferentially changing the word to a word that is semantically close, which is beneficial to improving the resource recall rate.

[0247] Optionally, on the basis of the above Figure 3 In another optional embodiment provided by the embodiments of the present application corresponding to each of the above embodiments, (M - N) words are rewritten to obtain the target word and the domain label of the target word, which may specifically include:

[0248] According to (M - N) words, query at least one word that satisfies the edit distance less than or equal to the edit distance threshold from R BK trees, where each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1;

[0249] If at least one word includes at least two words, obtain the semantic similarity between each word in the at least two words and the (M - N) words;

[0250] Use the word with the highest semantic similarity as the target word for the (M - N) words;

[0251] According to the BK tree to which the target word belongs, use the domain label of the BK tree as the domain label of the target word.

[0252] In one or more embodiments, another method for performing approximate word searches is described. As can be seen from the aforementioned embodiments, in practice, there may be (MN) words that fail to match the dictionary, and therefore, (MN) words need to be corrected. For ease of explanation, the following explanation will use the correction of one word as an example.

[0253] Specifically, a BK tree can be used to correct unmatched words, where each BK tree corresponds to a domain label. Assuming the target text is "Play Jack's Sunny," the token sequence after word segmentation is "Play / Jack / of / Sunny," meaning M is 4. "Play," "Jack," and "of" all successfully match the dictionary, while "Sunny" fails to match. Therefore, the word to be corrected is "Sunny." Based on the target intent sentence "Play [Singer Name]'s [Song Name]," we know that the word "Sunny" should belong to "Song Name," so "Sunny" is extracted for subsequent correction.

[0254] In practical applications, R BK trees are pre-built. For easier understanding, please refer to Figure 6 The domain label of this BK tree is "song title." The BK tree consists of multiple nodes, each representing a word. Assuming the edit distance threshold is set to 1, we need to perform an approximate search with an edit distance of 1 through the BK tree. The edit distance of "sunny day" is 1, and the edit distance of "clear sky" is also 1. Therefore, two words meet the condition that the edit distance is less than or equal to the edit distance threshold.

[0255] Based on this, we further calculate the semantic similarity between the words "sunny day" and "clear sky," and the semantic similarity between the words "clear sky" and "clear sky." We filter out words that do not meet the semantic similarity threshold. Finally, we select the word with the highest semantic similarity from the words that meet the semantic similarity threshold as the target word. Assuming the target word is "sunny day," we change "clear sky" in the target text to "sunny day." Furthermore, the domain label of this BK tree is used as the domain label for "sunny day."

[0256] Secondly, the embodiments of the present application provide another method for similar search of words. Through the above method, the BK tree can be used to correct the words that cannot be successfully matched, thereby achieving the purpose of automatic correction. In addition, considering the possibility of slips of the tongue, changing the word to the most semantically similar word is more likely to meet the user's intention, thereby helping to improve resource recall rate.

[0257] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the K entity words include a first entity word and a second entity word;

[0258] Based on K entity words, T target entity words are obtained through a knowledge graph, which may specifically include:

[0259] According to the knowledge graph, determine at least one attribute associated with the first entity word;

[0260] If the second entity word fails to match at least one attribute, calculate the semantic similarity between the second entity word and each attribute;

[0261] If the maximum semantic similarity is greater than or equal to the similarity threshold, use the attribute corresponding to the maximum semantic similarity as the modified second entity word;

[0262] Based on the first entity word and the modified second entity word, obtain T target entity words through the knowledge graph.

[0263] In one or more embodiments, a method for rewriting entity words based on a knowledge graph is introduced. As can be seen from the foregoing embodiments, the entity words identified from the target text may be inconsistent with the entity words stored in the knowledge graph. Therefore, rewriting can be performed by comparing the attributes and relationships between the entity words already extracted from the target text.

[0264] Specifically, assume that the target text is "Play the opening theme of movie A", and the token sequence after word segmentation is "Play movie A / of / opening theme". Based on this, query the attributes of each entity word and the one-hop relationships in the knowledge graph respectively. During the process, fuzzy matching is performed through semantic similarity, and the entity words are modified according to the matching results.

[0265] Exemplarily, take "movie A" as the first entity word and "opening theme" as the second entity word. For ease of understanding, please refer to Figure 7 , Figure 7 which is a schematic diagram of the knowledge graph in an embodiment of this application. As shown in the figure, there are two attributes associated with "movie A", namely "theme song" and "lead actor". It can be seen that "opening theme" fails to match both "theme song" and "lead actor" (that is, the text contents are different). Based on this, it is necessary to calculate the semantic similarity between "opening theme" and "theme song", and calculate the semantic similarity between "opening theme" and "lead actor" respectively. If the semantic similarity between "opening theme" and "theme song" is relatively high, then "opening theme" is rewritten as "theme song", that is, the modified second entity word is "theme song". Thus, the target text is obtained as "Play the theme song of movie A", and based on the knowledge graph, it can be determined that the T target entity words include "Jack" and "Tom".

[0266] It should be noted that the knowledge graph can also store other meta-information (i.e., attribute information), including but not limited to the artist's representative works, style, album sales, and search popularity. Meta-information plays a role in subsequent sorting and recommendation after resource recall.

[0267] It is understandable that data preparation for knowledge graphs is a prerequisite for data search. Knowledge graphs are stored in graph databases and data is prepared through offline preprocessing. Figure 8 , Figure 8 This is a schematic diagram of constructing a knowledge graph in an embodiment of the present application. As shown in the figure, the open source knowledge graph includes common sense information, for example, Jack is a singer, Mary is an actor, etc. Music meta-information is updated periodically (for example, daily) in an offline manner. The music meta-information includes but is not limited to the singer's name, album name, popularity value, and whether there is copyright, etc. The daily scheduled mapping and simplification (map reduce) task based on the big data platform tool will convert the data format of songs whose popularity values ​​meet the threshold according to the daily updated song popularity, and form hot word entries to be inserted into the dictionary. At the same time, several pairs of triples (for example, singer-singing-song) will be generated and inserted into the graph database.

[0268] Secondly, in the embodiments of this application, a method for rewriting entity terms based on the knowledge graph is provided. Through the above method, considering that the attributes in the knowledge graph usually use fixed expressions, it is possible to select whether to rewrite the entity terms in the target text based on semantic similarity, so as to achieve the purpose of normalization and standardization of entity terms.

[0269] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the K entity words include a first entity word;

[0270] Based on K entity words, T target entity words are obtained through the knowledge graph, which can specifically include:

[0271] If it is an audio playback intent, then T target entity words associated with the first entity word are obtained according to the knowledge graph, where each target entity word corresponds to a version of the audio resource;

[0272] If it is a video playback intention, T target entity words associated with the first entity word are obtained according to the knowledge graph, where each target entity word corresponds to a version of the video resource.

[0273] In one or more embodiments, a method for implementing entity-term association based on a knowledge graph is described. As can be seen from the aforementioned embodiments, the knowledge graph is stored in a graph structure, using a storage model where each key value (KV) stores one type of edge for each node. When querying the metadata and one-hop relationships of a node, a KV prefix scan can be used to achieve this.

[0274] Specifically, basic graph data query capabilities, such as querying metadata and one-hop relationships within the knowledge graph, can be implemented using an embeddable database (RocksDB). RocksDB is a Log-Structured Merge Tree (LSM-tree) architecture engine that provides key-value storage and read / write capabilities, developed based on the persistent key-value standalone database (LevelDB). Because it converts random user modifications (insertions) into sequential writes to a write-ahead log (WAL) file, it offers higher write throughput.

[0275] For example, assuming the target text is "play a sunny day", the corresponding target intent sentence is "play a [song name]", where "sunny day" is the first entity word. According to the target intent sentence, it can be determined that it belongs to the audio playback intent. For ease of understanding, please refer to Figure 7 It can be seen that the T target entity words associated with “sunny day” are “Jack” and “Tom”, that is, the “sunny day” sung by “Jack” and the “sunny day” sung by “Tom” can be obtained as audio resources for feedback.

[0276] For example, assuming the target text is "play movie A", its corresponding target intent sentence is "play [title]", where "movie A" is the first entity word. According to the target intent sentence, it can be determined that it belongs to the video playback intent. For ease of understanding, please refer to Figure 7 , it can be seen that the T target entity words associated with “Movie A” are “Movie A”, so Movie A is fed back as a video resource.

[0277] Secondly, the present application provides an embodiment of a method for implementing entity word association based on a knowledge graph. Through this method, meta-information queries and one-hop relationship queries are performed on entity words based on the knowledge graph, thereby enriching the information content of entity words and providing more reference information for subsequent resource acquisition, sorting, and recommendation. This helps to improve the user experience.

[0278] Optionally, in the above Figure 3On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the K entity words include a first entity word and a second entity word;

[0279] Based on K entity words, T target entity words are obtained through the knowledge graph, which can specifically include:

[0280] Determine, based on the knowledge graph, at least one attribute associated with the first entity term;

[0281] If the second entity word matches the attribute successfully, T target entity words are obtained through the knowledge graph based on the second entity word.

[0282] In one or more embodiments, a method for implementing entity-word association based on a knowledge graph is introduced. As can be seen from the aforementioned embodiments, more relevant information can be associated through the knowledge graph.

[0283] Specifically, assuming the target text is "Play the theme song of movie A", the corresponding target intent sentence is "Play [song type] of [movie title]". Among them, "movie A" is the first entity word and "theme song" is the second entity word. For easier understanding, please refer to Figure 7 , it can be seen that there are two attributes associated with the first entity word, namely "theme song" and "starring". Among them, the attribute "theme song" successfully matches the second entity word (that is, the semantics are consistent). Therefore, by querying the "theme song" attribute of "Movie A", the first-hop query result is obtained, that is, "sunny day". Through the knowledge graph, a two-hop query is performed, and it is known that "sunny day" has been sung by multiple singers. Therefore, the second-hop query results are obtained, that is, "Jack" and "Tom". Based on this, it is determined that the T target entity words include "Jack" and "Tom". These T target entity words can be provided to the subsequent environment for sorting, recommendation and other operations.

[0284] Secondly, the present application provides an embodiment of a method for implementing entity word association based on a knowledge graph. This method allows for meta-information queries and multi-hop relationship queries on entity words based on the knowledge graph, thereby enriching the information content of entity words and providing more reference information for subsequent resource acquisition, sorting, and recommendation. This helps improve the user experience.

[0285] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, feeding back target resources based on T target entity words may specifically include:

[0286] Get the resources corresponding to each target entity word, and get T resources;

[0287] Determine the resource that meets the copyright feedback conditions from T resources as the target resource;

[0288] Feedback target resources;

[0289] or,

[0290] Feedback of target resources based on T target entity words may specifically include:

[0291] Obtain the resources corresponding to each target entity word, obtaining T resources, where each resource has a popularity value;

[0292] Sort the T resources in descending order, and use the sorted T resources as the feed target resources;

[0293] Feedback target resources.

[0294] In one or more embodiments, multiple methods of pushing resources based on different strategies are introduced. As can be seen from the above embodiments, T resources corresponding to T target entity words can be obtained. The following will be explained using song resources as an example.

[0295] 1. Push resources based on copyright;

[0296] For ease of understanding, please refer to Figure 9 , Figure 9 This is a schematic diagram of recommending resources based on copyright information in an embodiment of the present application. As shown in the figure, assuming that the T target entity words found based on the knowledge graph search are "Jack," "Tom," "Mary," "John," and "Landa," it can be determined that the T resources include the song "Sunny Day" sung by these five singers. However, only the song "Sunny Day" sung by Tom is copyrighted, so this song resource meets the copyright feedback condition. Therefore, the song "Sunny Day" sung by Tom can be pushed, or the song "Sunny Day" sung by Tom can be played directly.

[0297] 2. Push resources based on popularity;

[0298] For ease of understanding, please refer to Figure 10 , Figure 10 This is a schematic diagram of recommending resources based on popularity ranking in an embodiment of the present application. As shown in the figure, assuming that the T target entity words searched based on the knowledge graph are "Jack", "Tom", "Mary", "John" and "Landa", based on this, it can be determined that the T resources include the song "Sunny Day" sung by these five singers. Therefore, all five songs can be used as target resources and sorted in descending order according to their popularity values. As a result, a list corresponding to these five songs can be fed back, or the song "Sunny Day" sung by Tom can be played directly.

[0299] It is understandable that in practical applications, the results of multi-way recall can also be screened and sorted in multiple dimensions and finally combined into the required format.

[0300] Secondly, in the embodiment of the present application, a variety of methods for pushing resources based on different strategies are provided. Through the above methods, different push strategies can be adopted for different types of resources, thereby improving the flexibility of the solution.

[0301] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the server obtains the speech to be recognized, which may specifically include:

[0302] The server receives the speech to be recognized sent by the terminal device, wherein the speech to be recognized is collected by the terminal device through a speech input device;

[0303] The server feeds back target resources based on the T target entity words, which may specifically include:

[0304] The server determines the target resource based on T target entity words;

[0305] Send the target resource to the terminal device so that the terminal device displays or plays the target resource.

[0306] In one or more embodiments, a method for collecting voice is introduced. As can be seen from the above embodiments, a user can input his or her voice through a terminal device, and the terminal device feeds the user's voice back to a server, which processes the voice and feeds back resources.

[0307] Specifically, the terminal device provides a voice input function, and the user inputs voice through a voice input device (for example, a microphone). The terminal device sends the voice to be recognized to the server. Based on this, the server can determine the target resource in combination with T target entity words and send the target resource to the terminal device. For example, the target resource can be a picture, an article, an audio or a video, etc., which is not limited here. As a result, the terminal device can display or play the target resource.

[0308] Secondly, in an embodiment of the present application, a method for collecting voice is provided. Through the above method, the voice is recognized by the server when connected to the Internet. The server has high computing power and storage resources, so it is beneficial to improve the efficiency of voice recognition.

[0309] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the terminal device obtains the speech to be recognized, which may specifically include:

[0310] The terminal device obtains the speech to be recognized through the speech input device;

[0311] The terminal device feeds back target resources based on the T target entity words, which may specifically include:

[0312] The terminal device determines the target resource based on the T target entity words;

[0313] Display or play the target resource.

[0314] In one or more embodiments, another method of collecting voice is introduced. As can be seen from the above embodiments, the user can input his own voice through the terminal device, and the terminal device processes the voice and feeds back the resource.

[0315] Specifically, the terminal device provides a voice input function, and the user inputs voice through a voice input device (for example, a microphone). Based on this, the terminal device can determine and push target resources from the local resource library in combination with T target entity words. For example, the target resource can be a picture, article, audio or video, etc., which is not limited here. As a result, the terminal device can display or play the target resource.

[0316] Secondly, the embodiment of the present application provides another method for collecting voice. Through the above method, the terminal device directly recognizes the voice, so that resource recommendation services can still be provided to users when the network is not connected. This improves the flexibility of resource recommendation.

[0317] In combination with the above introduction, the following will introduce the resource feedback method in this application. Please refer to Figure 11 Another embodiment of the resource feedback method in the embodiment of the present application includes:

[0318] 210. The terminal device displays a voice interaction control;

[0319] In one or more embodiments, an application interface of a target application is displayed on the terminal device, where the target application may be an intelligent assistant application or a music application, etc. A voice interaction control is displayed on the application interface of the target application, and clicking the voice interaction control triggers the voice input function.

[0320] 220. The terminal device responds to a touch operation on the voice interaction control and activates a voice input device;

[0321] In one or more embodiments, after the user clicks the voice interaction control, the voice input device can be activated. Figure 12 , Figure 12 This is a schematic diagram of triggering resource push based on voice input in an embodiment of the present application. Figure 12 As shown in Figure (A), A1 is used to indicate a voice interaction control. Clicking the voice interaction control can start the voice input device.

[0322] 230. The terminal device obtains the speech to be recognized through the speech input device;

[0323] In one or more embodiments, after the terminal device starts the voice input device, it can collect the user's voice to obtain the voice to be recognized.

[0324] 240. The terminal device sends the speech to be recognized to the server, so that the server converts the speech to be recognized into target text, determines K slots based on the target text, and obtains K entity words. Based on the K entity words, T target entity words are obtained through the knowledge graph, where each slot corresponds to an entity word, the knowledge graph includes nodes and edges, the nodes are used to represent entity words, and the edges are used to represent the association relationship between entity words. Each target entity word corresponds to a resource, and K and T are integers greater than or equal to 1.

[0325] In one or more embodiments, the terminal device sends the speech to be recognized to the server. The server uses ASR technology to convert the speech to be recognized into target text. Based on this, the target text is segmented to obtain the segmentation results and the domain label of each word. The target text is pattern matched, and the corresponding slots are extracted after matching, that is, K slots are obtained. Each slot corresponds to an entity word. Next, T target entity words can be searched using the knowledge graph, and finally, the corresponding resources are searched according to the T target entity words. A certain push strategy is used to select one or more song resources as target resources, and the target resources are pushed.

[0326] It should be noted that the actions performed by the server can be found in Figure 3 Steps 110 to 150 in the corresponding embodiment are not described in detail here.

[0327] 250. The terminal device receives a target resource sent by the server, wherein the target resource is determined by the server based on T target entity words, and the target resource includes at least one resource;

[0328] In one or more embodiments, the terminal device receives a target resource sent by a server, where the target resource includes at least one resource (eg, a song, a video, or a picture, etc.).

[0329] 260. The terminal device displays or plays the target resource.

[0330] In one or more embodiments, the target resource is displayed or played by the terminal device.

[0331] Specifically, assuming that the target resource is a song resource, based on this, you can refer to Figure 12In Figure (B), the target resource includes five songs, which are displayed in descending order of popularity. Click a song to play it. Alternatively, you can directly play the most popular song, which is the target resource.

[0332] In an embodiment of the present application, a method for resource feedback is provided. In the above manner, a knowledge graph is constructed using existing resources, and an association relationship between entity words is established based on the knowledge graph. When a user orders a resource on demand, other entity words (i.e., T target entity words) related to the user's intent (i.e., target intent information) can be associated with the knowledge graph, thereby further strengthening the understanding of the user's intent, which is conducive to feedback of more accurate resources.

[0333] The resource feedback device in this application is described in detail below. Figure 13 , Figure 13 This is a schematic diagram of an embodiment of a resource feedback device in an embodiment of the present application. The resource feedback device 30 includes:

[0334] An acquisition module 310 is used to acquire the speech to be recognized;

[0335] A processing module 320 is used to convert the speech to be recognized into target text;

[0336] A determination module 330 is configured to determine K slots based on the target text and obtain K entity words, where each slot corresponds to an entity word and K is an integer greater than or equal to 1;

[0337] The acquisition module 310 is further configured to acquire T target entity terms based on the K entity terms through a knowledge graph, wherein the knowledge graph includes nodes and edges, the nodes are used to represent entity terms, the edges are used to represent the association relationship between entity terms, and T is an integer greater than or equal to 1;

[0338] The feedback module 340 is configured to feed back target resources based on the T target entity words, wherein each target entity word corresponds to a resource, and the target resources include at least one resource.

[0339] In an embodiment of the present application, a resource feedback device is provided. Using the above device, a knowledge graph is constructed using existing resources, and an association relationship between entity words is established based on the knowledge graph. When a user orders a resource on demand, other entity words (i.e., T target entity words) related to the user's intention (i.e., target intention information) can be associated with the knowledge graph, thereby further strengthening the understanding of the user's intention, which is conducive to feedback of more accurate resources.

[0340] Optionally, in the above Figure 13On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0341] The determination module 330 is specifically configured to perform word segmentation processing on the target text to obtain M words, where M is an integer greater than 1;

[0342] If M words successfully match the preset dictionary, the target text is segmented to obtain M words and the corresponding domain labels for each of the M words;

[0343] According to the domain label corresponding to each entity word, the target template is determined from N candidate templates;

[0344] Determine target intent information based on target template.

[0345] In an embodiment of the present application, a resource feedback device is provided. Using the above device, slot extraction can be performed directly for target text that does not require error correction, providing a basis for subsequent processing, thereby improving the feasibility and operability of the solution.

[0346] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0347] The determination module 330 is specifically configured to perform word segmentation processing on the target text to obtain M words;

[0348] Match each of the M words with T dictionary trees to obtain a matching result for each word, where each dictionary tree corresponds to a domain label and T is an integer greater than or equal to 1;

[0349] According to the matching results of each word, the domain label corresponding to each word in the M words is determined.

[0350] In an embodiment of the present application, a resource feedback device is provided. Using the device, common prefixes of character strings can be used to reduce query time, minimize unnecessary string comparisons, and achieve high query efficiency, thereby improving resource feedback efficiency.

[0351] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0352] The determination module 330 is specifically configured to perform word segmentation processing on the target text to obtain M words;

[0353] Search each of the M words according to T double-array dictionary trees to obtain a search result for each word, wherein the double-array dictionary tree includes a base array and a check array, and each double-array dictionary tree corresponds to a domain label, and T is an integer greater than or equal to 1;

[0354] According to the search results of each word, the domain label corresponding to each word in the M words is determined.

[0355] In an embodiment of the present application, a resource feedback device is provided. The above device can greatly save memory usage, increase query efficiency, and improve the efficiency of resource feedback.

[0356] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0357] The determination module 330 is specifically configured to perform word segmentation processing on the target text to obtain M words and domain labels of N words among the M words, where M is an integer greater than 1 and N is an integer greater than or equal to 1 and less than M;

[0358] Then rewrite (MN) words to obtain the target words and their domain labels;

[0359] Determine the target intention sentence pattern based on the target word, the domain label of the target word, the M words, and the domain labels of the N words;

[0360] Determine K slots based on the target intent sentence;

[0361] Obtain the entity words corresponding to each slot in the K slots from the target text to obtain K entity words.

[0362] In an embodiment of the present application, a resource feedback device is provided. Using this device, the dictionary used for NER matching may be limited by speed requirements, using only high-frequency words and having limited error correction capabilities. Therefore, an error correction mechanism is introduced to correct unmatched words during NER dictionary matching, thereby better understanding user intent and improving resource recall.

[0363] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0364] The determining module 330 is specifically configured to query, based on the (MN) words, at least one word whose edit distance is less than or equal to a threshold value of the edit distance from R BK trees, where each BK tree corresponds to a domain label and R is an integer greater than or equal to 1;

[0365] If at least one word is a term, the term is taken as the target term;

[0366] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0367] In an embodiment of the present application, a resource feedback device is provided. Using the device, a BK tree can be used to correct unmatched words, achieving the purpose of automatic correction, thereby better understanding user intent and improving resource recall rate.

[0368] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0369] The determining module 330 is specifically configured to query, based on the (MN) words, at least one word whose edit distance is less than or equal to a threshold value of the edit distance from R BK trees, where each BK tree corresponds to a domain label and R is an integer greater than or equal to 1;

[0370] If at least one word is a term, get the heat value of the term;

[0371] If the heat value of a word is greater than or equal to the heat value threshold, the word is taken as the target word;

[0372] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0373] In an embodiment of the present application, a resource feedback device is provided. Using this device, a BK tree can be used to correct unmatched words, achieving automatic correction. Furthermore, only words with a popularity value above a threshold are changed, thereby better understanding user intent and improving resource recall.

[0374] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0375] The determining module 330 is specifically configured to query, based on the (MN) words, at least one word whose edit distance is less than or equal to a threshold value of the edit distance from R BK trees, where each BK tree corresponds to a domain label and R is an integer greater than or equal to 1;

[0376] If the at least one word includes at least two words, then obtain the heat value of each word in the at least two words;

[0377] The words with the highest popularity value are used as target words;

[0378] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0379] In an embodiment of the present application, a resource feedback device is provided. Using the above device, a BK tree can be used to correct words that cannot be successfully matched, thereby achieving the purpose of automatic correction. In addition, if there are at least two words that simultaneously meet the condition that the edit distance is less than or equal to the edit distance threshold, the word with the higher popularity value can be preferentially selected as the target word. This is more consistent with the search for popular information, thereby better understanding the user's intention and helping to improve the resource recall rate.

[0380] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0381] The determination module 330 specifically searches for at least one word satisfying an edit distance less than or equal to an edit distance threshold from R BK trees based on the (MN) words, where each BK tree corresponds to a domain label and R is an integer greater than or equal to 1;

[0382] If at least one word is a term, obtain the semantic similarity between the term and (MN) words;

[0383] If the semantic similarity is greater than or equal to the semantic similarity threshold, the word is taken as the target word;

[0384] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0385] In an embodiment of the present application, a resource feedback device is provided. Using this device, a BK tree can be used to correct unmatched words, achieving automatic correction. Furthermore, considering the possibility of slips of the tongue, replacing words with semantically similar ones is preferred to better align with user intent, thereby improving resource recall.

[0386] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0387] The determining module 330 is specifically configured to query, based on the (MN) words, at least one word whose edit distance is less than or equal to a threshold value of the edit distance from R BK trees, where each BK tree corresponds to a domain label and R is an integer greater than or equal to 1;

[0388] If the at least one word includes at least two words, obtaining the semantic similarity between each word in the at least two words and (MN) words;

[0389] The words with the highest semantic similarity are taken as the target words of (MN) words;

[0390] According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

[0391] In an embodiment of the present application, a resource feedback device is provided. Using this device, a BK tree can be used to correct unmatched words, achieving automatic correction. Furthermore, considering the possibility of slips of the tongue, replacing a word with a semantically closest one can more easily align with the user's intent, thereby improving resource recall.

[0392] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application, the K entity words include a first entity word and a second entity word;

[0393] The acquisition module 310 is specifically configured to determine, based on the knowledge graph, at least one attribute associated with the first entity term;

[0394] If the second entity word fails to match at least one attribute, the semantic similarity between the second entity word and each attribute is calculated;

[0395] If the maximum semantic similarity is greater than or equal to the similarity threshold, the attribute corresponding to the maximum semantic similarity is used as the modified second entity word;

[0396] Based on the first entity term and the modified second entity term, T target entity terms are obtained through the knowledge graph.

[0397] In an embodiment of the present application, a resource feedback device is provided. Using the above device, considering that attributes in a knowledge graph are usually expressed in fixed terms, it is possible to select whether entity terms in the target text need to be rewritten based on semantic similarity, thereby achieving the purpose of normalizing and standardizing entity terms.

[0398] Optionally, in the above Figure 13On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application, the K entity words include a first entity word;

[0399] The acquisition module 310 is specifically configured to acquire T target entity terms associated with the first entity term based on the knowledge graph if the intent is audio playback, wherein each target entity term corresponds to a version of the audio resource;

[0400] If it is a video playback intention, T target entity words associated with the first entity word are obtained according to the knowledge graph, where each target entity word corresponds to a version of the video resource.

[0401] In an embodiment of the present application, a resource feedback device is provided. Using this device, meta-information queries and one-hop relationship queries are performed on entity terms based on a knowledge graph. This enriches the information content of entity terms and provides more reference information for subsequent resource acquisition, ranking, and recommendation. This helps improve the user experience.

[0402] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application, the K entity words include a first entity word and a second entity word;

[0403] The acquisition module 310 is specifically configured to determine, based on the knowledge graph, at least one attribute associated with the first entity term;

[0404] If the second entity word matches the attribute successfully, T target entity words are obtained through the knowledge graph based on the second entity word.

[0405] In one embodiment of the present application, a resource feedback device is provided. Using this device, meta-information queries and multi-hop relationship queries are performed on entity terms based on a knowledge graph. This enriches the information content of entity terms and provides more reference information for subsequent resource acquisition, ranking, and recommendation. This helps improve the user experience.

[0406] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0407] Feedback module 340 is specifically used to obtain resources corresponding to each target entity word, obtaining T resources;

[0408] Determine the resource that meets the copyright feedback conditions from T resources as the target resource;

[0409] Feedback target resources.

[0410] In an embodiment of the present application, a resource feedback device is provided. By using the device, different push strategies can be adopted for different types of resources, thereby improving the flexibility of the solution.

[0411] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0412] Feedback module 340 is specifically configured to obtain resources corresponding to each target entity word, obtaining T resources, where each resource has a popularity value;

[0413] Sort the T resources in descending order, and use the sorted T resources as the feed target resources;

[0414] Feedback target resources.

[0415] In an embodiment of the present application, a resource feedback device is provided. By using the device, different push strategies can be adopted for different types of resources, thereby improving the flexibility of the solution.

[0416] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0417] The acquisition module 310 is specifically configured to receive a speech to be recognized sent by a terminal device, wherein the speech to be recognized is collected by the terminal device through a speech input device;

[0418] Feedback module 340, specifically configured to determine target resources based on T target entity words;

[0419] Send the target resource to the terminal device so that the terminal device displays or plays the target resource.

[0420] In an embodiment of the present application, a resource feedback device is provided. Using the above device, a server recognizes speech in an online environment. The server has high computing power and storage resources, which is conducive to improving speech recognition efficiency.

[0421] Optionally, in the above Figure 13 On the basis of the corresponding embodiment, in another embodiment of the resource feedback device 30 provided in the embodiment of the present application,

[0422] An acquisition module 310 is specifically configured to acquire a speech to be recognized through a speech input device;

[0423] Feedback module 340, specifically configured to determine target resources based on T target entity words;

[0424] Display or play the target resource.

[0425] In an embodiment of the present application, a resource feedback device is provided. Using the device, a terminal device directly recognizes speech, thereby providing resource recommendation services to users even when offline. This improves the flexibility of resource recommendations.

[0426] The resource feedback device in this application is described in detail below. Figure 14 , Figure 14 This is a schematic diagram of an embodiment of a resource feedback device in an embodiment of the present application. The resource feedback device 40 includes:

[0427] Display module 410, for displaying voice interaction controls;

[0428] The activation module 420 is configured to activate the voice input device in response to a touch operation on the voice interaction control;

[0429] An acquisition module 430 is configured to acquire a speech to be recognized through a speech input device;

[0430] A sending module 440 is configured to send the speech to be recognized to a server so that the server converts the speech to be recognized into a target text, determines K slots based on the target text, and obtains K entity words. Based on the K entity words, T target entity words are obtained through a knowledge graph, wherein each slot corresponds to an entity word, the knowledge graph includes nodes and edges, the nodes are used to represent entity words, the edges are used to represent associations between entity words, each target entity word corresponds to a resource, and K and T are integers greater than or equal to 1;

[0431] A receiving module 450 is configured to receive a target resource sent by the server, wherein the target resource is determined by the server based on T target entity words, and the target resource includes at least one resource;

[0432] The display module 410 is further configured to display or play the target resource.

[0433] In an embodiment of the present application, a resource feedback device is provided. Using the above device, a knowledge graph is constructed using existing resources, and an association relationship between entity words is established based on the knowledge graph. When a user orders a resource on demand, other entity words (i.e., T target entity words) related to the user's intention (i.e., target intention information) can be associated with the knowledge graph, thereby further strengthening the understanding of the user's intention, which is conducive to feedback of more accurate resources.

[0434] The embodiment of the present application also provides another resource feedback device, which can be applied to a server. Figure 15This is a schematic diagram of a server structure provided in an embodiment of the present application. The server 500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 522 (for example, one or more processors) and a memory 532, and one or more storage media 530 (for example, one or more massive storage devices) for storing application programs 542 or data 544. Among them, the memory 532 and the storage medium 530 can be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 522 can be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the server 500.

[0435] The server 500 may also include one or more power supplies 526, one or more wired or wireless network interfaces 550, one or more input and output interfaces 558, and / or one or more operating systems 541, such as Windows Server 2003 or Windows Server 2003R. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.

[0436] The steps performed by the server in the above embodiment can be based on the Figure 15 The server structure shown.

[0437] The embodiment of the present application also provides another resource feedback device that can be applied to a terminal device. Figure 16 For ease of explanation, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The terminal device can be any terminal device including a mobile phone, tablet computer, personal digital assistant (PDA), point of sales (POS), car computer, etc., taking the mobile phone as an example:

[0438] Figure 16 The block diagram shows a partial structure of a mobile phone related to the terminal device provided in the embodiment of the present application. Figure 16The mobile phone includes components such as a radio frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a wireless fidelity (WiFi) module 670, a processor 680, and a power supply 690. Those skilled in the art will understand that Figure 16 The mobile phone structure shown in the figure does not constitute a limitation to the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0439] The following combination Figure 16 A detailed introduction to the various components of a mobile phone:

[0440] The RF circuit 610 can be used to receive and send signals during information transmission or calls. In particular, after receiving the downlink information from the base station, it is sent to the processor 680 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 610 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 610 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0441] The memory 620 can be used to store software programs and modules. The processor 680 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 620. The memory 620 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 620 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0442] The input unit 630 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632. The touch panel 631, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 631) and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 631 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 680. It can also receive commands sent by the processor 680 and execute them. In addition, the touch panel 631 can be implemented using various types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch panel 631, the input unit 630 may further include other input devices 632. Specifically, the other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick.

[0443] The display unit 640 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 640 may include a display panel 641. Optionally, the display panel 641 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 631 may cover the display panel 641. When the touch panel 631 detects a touch operation on or near it, it is transmitted to the processor 680 to determine the type of touch event. Subsequently, the processor 680 provides corresponding visual output on the display panel 641 according to the type of touch event. Although in Figure 16 In the embodiment, the touch panel 631 and the display panel 641 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 631 and the display panel 641 can be integrated to realize the input and output functions of the mobile phone.

[0444] The mobile phone may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 641 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described here.

[0445] Audio circuit 660, speaker 661, and microphone 662 provide an audio interface between the user and the phone. Audio circuit 660 converts received audio data into electrical signals and transmits them to speaker 661, which then converts them into sound signals for output. Microphone 662, on the other hand, converts collected sound signals into electrical signals, which are then received by audio circuit 660 and converted into audio data. The audio data is then processed by processor 680 and then transmitted to, for example, another phone via RF circuit 610. Alternatively, the audio data can be output to memory 620 for further processing.

[0446] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse the web and access streaming media through the WiFi module 670. It provides users with wireless broadband Internet access. Figure 16A WiFi module 670 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0447] Processor 680 is the control center of the mobile phone, connecting all parts of the mobile phone using various interfaces and circuits. It executes software programs and / or modules stored in memory 620 and accesses data stored in memory 620 to perform various functions and process data. Optionally, processor 680 may include one or more processing units. Alternatively, processor 680 may integrate an application processor and a modem processor, with the application processor primarily handling the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 680.

[0448] The mobile phone also includes a power supply 690 (such as a battery) for supplying power to various components. Optionally, the power supply can be logically connected to the processor 680 through a power management system, thereby managing charging, discharging, and power consumption through the power management system.

[0449] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0450] The steps performed by the terminal device in the above embodiment can be based on the Figure 16 The terminal device structure shown.

[0451] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.

[0452] An embodiment of the present application also provides a computer program product including a program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.

[0453] It is understandable that in the specific implementation of this application, data related to voice and text is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0454] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0455] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0456] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0457] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0458] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0459] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A resource feedback method, characterized in that: include: Get the speech to be recognized; Converting the speech to be recognized into target text; Determine K slots according to the target text and obtain K entity words, wherein each slot corresponds to an entity word, K is an integer greater than or equal to 1, and the entity word is a proper noun; Based on the K entity words, T target entity words are obtained through a knowledge graph, wherein the knowledge graph includes nodes and edges, the nodes are used to represent entity words, the edges are used to represent associations between entity words, and T is an integer greater than or equal to 1; Feedback target resources based on the T target entity words, wherein each target entity word corresponds to a resource, and the target resources include at least one resource; The step of determining K slots based on the target text and obtaining K entity words includes: Performing word segmentation on the target text to obtain M words and a domain label corresponding to each of the M words, where M is an integer greater than 1; Determining a target intent sentence pattern based on the M words and the domain label corresponding to each of the M words; Determine the K slots according to the target intention sentence pattern; The entity words corresponding to each of the K slots are obtained from the target text to obtain the K entity words.

2. The method according to claim 1, characterized in that The word segmentation processing of the target text to obtain M words and the domain label corresponding to each of the M words includes: Performing word segmentation processing on the target text to obtain the M words; Matching each of the M words with T dictionary trees to obtain a matching result for each word, wherein each dictionary tree corresponds to a domain label, and T is an integer greater than or equal to 1; According to the matching result of each word, the domain label corresponding to each word in the M words is determined.

3. The method according to claim 1, characterized in that The word segmentation processing of the target text to obtain M words and the domain label corresponding to each of the M words includes: Performing word segmentation processing on the target text to obtain the M words; Searching each of the M words according to T double-array dictionary trees to obtain a search result for each word, wherein the double-array dictionary tree includes a base array and a check array, and each double-array dictionary tree corresponds to a domain label, and T is an integer greater than or equal to 1; According to the search result of each word, the field label corresponding to each word in the M words is determined.

4. The method according to claim 1, wherein The step of determining K slots according to the target text and obtaining K entity words further includes: Performing word segmentation on the target text to obtain M words and domain labels of N words among the M words, wherein M is an integer greater than 1 and N is an integer greater than or equal to 1 and less than M; Then, (MN) words are rewritten to obtain target words and domain labels of the target words; Determining a target intention sentence pattern according to the target word, the domain label of the target word, the M words, and the domain labels of the N words; Determine the K slots according to the target intention sentence pattern; The entity words corresponding to each of the K slots are obtained from the target text to obtain the K entity words.

5. The method according to claim 4, characterized in that The rewriting process of (MN) words to obtain target words and domain labels of the target words includes: According to the (MN) words, query at least one word whose edit distance is less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word is a word, taking the word as the target word; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

6. The method according to claim 4, characterized in that The rewriting process of (MN) words to obtain target words and domain labels of the target words includes: According to the (MN) words, query at least one word whose edit distance is less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word is a word, obtaining the popularity value of the word; If the popularity value of the word is greater than or equal to the popularity value threshold, the word is used as the target word; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

7. The method according to claim 4, characterized in that The rewriting process of (MN) words to obtain target words and domain labels of the target words includes: According to the (MN) words, query at least one word whose edit distance is less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word includes at least two words, obtaining the popularity value of each word in the at least two words; The word with the highest popularity value is used as the target word; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

8. The method according to claim 4, characterized in that The rewriting process of (MN) words to obtain target words and domain labels of the target words includes: According to the (MN) words, query at least one word whose edit distance is less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word is a word, obtaining the semantic similarity between the word and the (MN) words; If the semantic similarity is greater than or equal to the semantic similarity threshold, the word is used as the target word; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

9. The method according to claim 4, characterized in that The rewriting process of (MN) words to obtain target words and domain labels of the target words includes: According to the (MN) words, query at least one word whose edit distance is less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word includes at least two words, obtaining the semantic similarity between each word in the at least two words and the (MN) words; Taking the word with the highest semantic similarity as the target word of the (MN) words; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

10. The method according to claim 1, characterized in that The K entity words include a first entity word and a second entity word; The step of obtaining T target entity words through the knowledge graph based on the K entity words includes: Determining, based on the knowledge graph, at least one attribute associated with the first entity term; If the second entity word fails to match the at least one attribute, calculating the semantic similarity between the second entity word and each attribute; If the maximum semantic similarity is greater than or equal to the similarity threshold, the attribute corresponding to the maximum semantic similarity is used as the modified second entity word; Based on the first entity word and the modified second entity word, the T target entity words are obtained through the knowledge graph.

11. The method according to claim 1, wherein The K entity words include a first entity word; The step of obtaining T target entity words based on the K entity words through the knowledge graph includes: If it is an audio playback intention, then obtaining T target entity words associated with the first entity word according to the knowledge graph, wherein each target entity word corresponds to a version of the audio resource; If it is a video playback intention, T target entity words associated with the first entity word are obtained according to the knowledge graph, wherein each target entity word corresponds to a version of the video resource.

12. The method according to claim 1, characterized in that The K entity words include a first entity word and a second entity word; The step of obtaining T target entity words through the knowledge graph based on the K entity words includes: Determining, based on the knowledge graph, at least one attribute associated with the first entity term; If the second entity word successfully matches the attribute, the T target entity words are obtained through the knowledge graph based on the second entity word.

13. The method according to claim 1, wherein Feedback of target resources according to the T target entity words includes: Get the resources corresponding to each target entity word, and get T resources; Determining a resource that meets the copyright feedback condition from the T resources as the target resource; Feedback the target resource.

14. The method according to claim 1, wherein Feedback of target resources according to the T target entity words includes: Obtain the resources corresponding to each target entity word, obtaining T resources, where each resource has a popularity value; Sorting the T resources in descending order, and using the sorted T resources as the feed target resources; Feedback the target resource.

15. The method according to any one of claims 1 to 14, characterized in that The obtaining of the speech to be recognized includes: Receiving the speech to be recognized sent by the terminal device, wherein the speech to be recognized is collected by the terminal device through a speech input device; Feedback of target resources according to the T target entity words includes: Determine the target resource according to the T target entity words; The target resource is sent to the terminal device, so that the terminal device displays or plays the target resource.

16. The method according to any one of claims 1 to 14, characterized in that The obtaining of the speech to be recognized includes: Acquiring the speech to be recognized through a speech input device; Feedback of target resources according to the T target entity words includes: Determine the target resource according to the T target entity words; Display or play the target resource.

17. A method for resource feedback, characterized in that: include: Display voice interaction controls; In response to a touch operation on the voice interaction control, activating a voice input device; Acquiring the speech to be recognized through the speech input device; Sending the speech to be recognized to a server so that the server converts the speech to be recognized into a target text, determining K slots according to the target text, and obtaining K entity words, and obtaining T target entity words through a knowledge graph based on the K entity words, wherein each slot corresponds to an entity word, the entity word is a proper noun, the knowledge graph includes nodes and edges, the nodes are used to represent entity words, the edges are used to represent associations between entity words, each target entity word corresponds to a resource, and K and T are integers greater than or equal to 1; Receiving a target resource sent by the server, wherein the target resource is determined by the server according to the T target entity words, and the target resource includes at least one resource; Display or play the target resource; The step of determining K slots based on the target text and obtaining K entity words includes: Performing word segmentation on the target text to obtain M words and a domain label corresponding to each of the M words, where M is an integer greater than 1; Determining a target intent sentence pattern based on the M words and the domain label corresponding to each of the M words; Determine the K slots according to the target intention sentence pattern; The entity words corresponding to each of the K slots are obtained from the target text to obtain the K entity words.

18. A resource feedback device, characterized in that: include: An acquisition module, used to acquire the speech to be recognized; A processing module, configured to convert the speech to be recognized into target text; a determination module, configured to determine K slots according to the target text and obtain K entity words, wherein each slot corresponds to an entity word, K is an integer greater than or equal to 1, and the entity words are proper nouns; The acquisition module is further configured to acquire T target entity terms through a knowledge graph based on the K entity terms, wherein the knowledge graph includes nodes and edges, the nodes are used to represent entity terms, the edges are used to represent associations between entity terms, and T is an integer greater than or equal to 1; A feedback module is configured to provide feedback on target resources based on the T target entity words, wherein each target entity word corresponds to a resource, and the target resources include at least one resource; The determination module is specifically configured to perform word segmentation processing on the target text to obtain M words and a domain label corresponding to each of the M words, wherein M is an integer greater than 1; Determining a target intent sentence pattern based on the M words and the domain label corresponding to each of the M words; Determine the K slots according to the target intention sentence pattern; The entity words corresponding to each of the K slots are obtained from the target text to obtain the K entity words.

19. The device according to claim 18, characterized in that The determination module is configured to perform word segmentation processing on the target text to obtain the M words; Matching each of the M words with T dictionary trees to obtain a matching result for each word, wherein each dictionary tree corresponds to a domain label, and T is an integer greater than or equal to 1; According to the matching result of each word, the domain label corresponding to each word in the M words is determined.

20. The device according to claim 18, characterized in that The determination module is specifically configured to perform word segmentation processing on the target text to obtain the M words; Searching each of the M words according to T double-array dictionary trees to obtain a search result for each word, wherein the double-array dictionary tree includes a base array and a check array, and each double-array dictionary tree corresponds to a domain label, and T is an integer greater than or equal to 1; According to the search result of each word, the field label corresponding to each word in the M words is determined.

21. The device according to claim 18, characterized in that The determination module is specifically configured to perform word segmentation processing on the target text to obtain M words and domain labels of N words among the M words, wherein M is an integer greater than 1, and N is an integer greater than or equal to 1 and less than M; Then, (MN) words are rewritten to obtain target words and domain labels of the target words; Determining a target intention sentence pattern according to the target word, the domain label of the target word, the M words, and the domain labels of the N words; Determine the K slots according to the target intention sentence pattern; The entity words corresponding to each of the K slots are obtained from the target text to obtain the K entity words.

22. The device according to claim 21, characterized in that The determining module is specifically configured to query, based on the (MN) words, at least one word satisfying an edit distance less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word is a word, taking the word as the target word; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

23. The device according to claim 21, characterized in that The determining module is specifically configured to query, based on the (MN) words, at least one word satisfying an edit distance less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word is a word, obtaining the popularity value of the word; If the popularity value of the word is greater than or equal to the popularity value threshold, the word is used as the target word; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

24. The device according to claim 21, characterized in that The determining module is specifically configured to query, based on the (MN) words, at least one word satisfying an edit distance less than or equal to an edit distance threshold from R BK trees, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word includes at least two words, obtaining the popularity value of each word in the at least two words; The word with the highest popularity value is used as the target word; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

25. The device according to claim 21, characterized in that The determining module specifically searches for at least one word satisfying an edit distance less than or equal to an edit distance threshold from R BK trees based on the (MN) words, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word includes at least two words, obtaining the semantic similarity between each word in the at least two words and the (MN) words; Taking the word with the highest semantic similarity as the target word of the (MN) words; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

26. The device according to claim 21, characterized in that The determining module searches, based on the (MN) words, R BK trees for at least one word satisfying an edit distance less than or equal to an edit distance threshold, wherein each BK tree corresponds to a domain label, and R is an integer greater than or equal to 1; If the at least one word includes at least two words, obtaining the semantic similarity between each word in the at least two words and the (MN) words; Taking the word with the highest semantic similarity as the target word of the (MN) words; According to the BK tree to which the target word belongs, the domain label of the BK tree is used as the domain label of the target word.

27. The device according to claim 18, characterized in that The K entity words include a first entity word and a second entity word; The determination module is specifically configured to: the K entity words include a first entity word and a second entity word; The determining module is further configured to: Determining, based on the knowledge graph, at least one attribute associated with the first entity term; If the second entity word fails to match the at least one attribute, calculating the semantic similarity between the second entity word and each attribute; If the maximum semantic similarity is greater than or equal to the similarity threshold, the attribute corresponding to the maximum semantic similarity is used as the modified second entity word; Based on the first entity word and the modified second entity word, the T target entity words are obtained through the knowledge graph.

28. The device according to claim 18, wherein The K entity words include a first entity word and a second entity word; The acquisition module is specifically configured to acquire T target entity terms through a knowledge graph based on the K entity terms, and includes: If it is an audio playback intention, then obtaining T target entity words associated with the first entity word according to the knowledge graph, wherein each target entity word corresponds to a version of the audio resource; If it is a video playback intention, T target entity words associated with the first entity word are obtained according to the knowledge graph, wherein each target entity word corresponds to a version of the video resource.

29. The device according to claim 18, wherein The K entity words include a first entity word; an acquisition module, specifically configured to determine, based on the knowledge graph, at least one attribute associated with the first entity term; If the second entity word matches the attribute successfully, the T target entity words are obtained through the knowledge graph based on the second entity word.

30. The device according to claim 18, wherein The feedback module is specifically used to obtain the resources corresponding to each target entity word, and obtain T resources; Determining a resource that meets the copyright feedback condition from the T resources as the target resource; Feedback the target resource.

31. The device according to claim 18, wherein The feedback module is specifically used to obtain resources corresponding to each target entity word, obtaining T resources, wherein each resource has a popularity value; Sorting the T resources in descending order, and using the sorted T resources as the feed target resources; Feedback the target resource.

32. The device according to any one of claims 18 to 30, characterized in that The acquisition module is specifically configured to receive the speech to be recognized sent by the terminal device, wherein the speech to be recognized is collected by the terminal device through a speech input device; The feedback module is specifically configured to determine the target resource according to the T target entity words; The target resource is sent to the terminal device, so that the terminal device displays or plays the target resource.

33. The device according to any one of claims 18 to 30, wherein the acquisition module is specifically configured to acquire the speech to be recognized through a speech input device; The feedback module is specifically configured to determine the target resource according to the T target entity words; Display or play the target resource.

34. A resource feedback device, characterized in that: include: A display module, used to display voice interaction controls; A starting module, configured to start a voice input device in response to a touch operation on the voice interaction control; An acquisition module, configured to acquire the speech to be recognized through the speech input device; A sending module, configured to send the speech to be recognized to a server so that the server converts the speech to be recognized into a target text, determines K slots based on the target text, and obtains K entity words, and obtains T target entity words through a knowledge graph based on the K entity words, wherein each slot corresponds to an entity word, the entity word is a proper noun, the knowledge graph includes nodes and edges, the nodes are used to represent entity words, the edges are used to represent the association relationship between entity words, each target entity word corresponds to a resource, and K and T are integers greater than or equal to 1; A receiving module, configured to receive a target resource sent by the server, wherein the target resource is determined by the server according to the T target entity words, and the target resource includes at least one resource; A display module, used to display or play the target resource; The step of determining K slots based on the target text and obtaining K entity words includes: Performing word segmentation on the target text to obtain M words and a domain label corresponding to each of the M words, where M is an integer greater than 1; Determining a target intent sentence pattern based on the M words and the domain label corresponding to each of the M words; Determine the K slots according to the target intention sentence pattern; The entity words corresponding to each of the K slots are obtained from the target text to obtain the K entity words.

35. A server, characterized in that: include: Memory, processor, and bus system; Wherein, the memory is used to store programs; The processor is configured to execute the program in the memory, and the processor is configured to execute the method according to any one of claims 1 to 16 according to instructions in the program code; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

36. A terminal device, characterized in that: include: Memory, processor, and bus system; Wherein, the memory is used to store programs; The processor is configured to execute the program in the memory, and the processor is configured to execute the method according to claim 17 according to instructions in the program code; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

37. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 16, or the method according to claim 17.

38. A computer program product comprising a computer program and instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 16 is implemented, or the method according to claim 17 is implemented.

Citation Information

Patent Citations

  • Search processing method, device and equipment

    CN111309872A