Chat record searching method and device, storage medium and program product
Through the combination of deep learning natural language recognition model and multi-dimensional prompt words, intelligent analysis and efficient retrieval of chat records are realized, and the problems of inefficient and insufficient accuracy of chat records search in the existing technology are solved.
Patent Information
- Application Number
- CN202411688522.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art relies on keyword matching in chat record search, which is inefficient and difficult to obtain accurate search results.
The natural language recognition model of deep learning is used to combine multi-dimensional prompt words for hierarchical search, and intelligent analysis and efficient retrieval of chat records are achieved through steps such as intention recognition and content matching.
It significantly improves the search efficiency and accuracy of chat records, can more accurately identify user intentions and match related chat records, providing a more efficient user experience.
Smart Images

Figure CN119537552A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence (AI) technology, and in particular to a chat record search method, device, storage medium and program product. Background Art
[0002] With the rapid development of Internet technology and the widespread popularity of Internet applications (such as instant messaging applications, social applications, and e-commerce applications), users generate a large number of chat records in these Internet applications every day. These chat records are not only traces of communication, but also important information assets, which may contain key business data and personal information. Efficient and accurate management of these chat records is of great significance to improving work efficiency and ensuring data security. Especially in enterprise and team collaboration, quickly finding relevant chat records can greatly promote decision-making efficiency and project progress.
[0003] At present, some Internet applications, such as instant messaging applications, support the search of chat records, but they mainly rely on keyword matching and require users to provide precise keywords to search historical records. On the one hand, searching in massive chat records based on keywords is very inefficient; on the other hand, if the user cannot provide accurate keywords, no search results will be obtained. Summary of the invention
[0004] Multiple aspects of the present application provide a chat record search method, device, storage medium and program product to improve the search efficiency and accuracy of chat records.
[0005] An embodiment of the present application provides a chat record search method, which is applied to a server device, where the server is responsible for maintaining multiple historical chat records generated by a target application on the terminal device, and each historical chat record has summary information. The method includes: receiving a query question sent by the terminal device, where the query question is used to request to query a target chat record that matches the query question from multiple historical chat records; inputting the query question into a first natural language recognition model for intent recognition to obtain a query intent corresponding to the query question, where the query intent at least includes question subject information corresponding to the query question; performing intent matching on the question subject information with content subject information in the summary information of the multiple historical chat records to obtain candidate summary information that matches the question subject information; inputting the query question and the candidate summary information into a second natural language recognition model for problem matching to obtain target summary information that matches the query question; inputting the historical chat records corresponding to the question subject information and the target summary information into a third natural language recognition model for content matching to obtain a target chat record that matches the question subject information; and sending the target chat record to the terminal device so that the terminal device displays the target chat record to the user.
[0006] An embodiment of the present application also provides a chat record search method, which is applied to a terminal device, where a target application is running on the terminal device, and the target application supports AI-based chat record query. The method includes: displaying a first application page, which includes an AI-based chat record query entry; responding to a trigger operation on the chat record query entry, displaying a chat query interface, which includes an input control; responding to a user's input operation based on the input control, obtaining a query question input by the user, and sending the query question to a server, so that the server adopts the steps in the chat record search method to obtain and return the target chat record; and displaying the target chat record returned by the server.
[0007] An embodiment of the present application also provides an electronic device, including: a processor and a memory, the memory being used to store a computer program. When the computer program is executed by the processor, the processor is enabled to implement the steps in the chat record search method provided in the embodiment of the present application.
[0008] An embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps in the chat record search method provided in the embodiment of the present application.
[0009] An embodiment of the present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement the steps in the chat record search method provided in the embodiment of the present application.
[0010] In an embodiment of the present application, a chat record search method based on AI technology is provided. By combining a natural language recognition model of deep learning, multi-dimensional prompt words are used for hierarchical search optimization to achieve intelligent parsing and efficient retrieval of chat records. The method specifically includes: receiving a query question sent by a terminal device, parsing the query intent using a first natural language recognition model, and obtaining question subject information; then, matching this information with the content subject in the summary information of the historical chat record, and screening out candidate summary information; matching the query question with the candidate summary information through a second natural language recognition model to determine the target summary information; finally, combining the question subject information and the target summary information, using a third natural language recognition model to match the content of the historical chat record, finding the most relevant target chat record and sending it to the terminal device for display, with the help of the powerful processing power of the large language model, high-precision intent recognition and content matching are achieved, and at the same time, the search efficiency is significantly improved through a layer-by-layer screening mechanism, providing users with an efficient chat record search experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0012] Figure 1a A flowchart of a chat record search method provided for an exemplary embodiment of the present application;
[0013] Figure 1b A schematic diagram of a natural language recognition model architecture of a chat record search method provided by an exemplary embodiment of the present application;
[0014] Figure 2 A schematic diagram of a natural language recognition model structure provided for an exemplary embodiment of the present application;
[0015] Figure 3 A flowchart of another chat record search method provided for an exemplary embodiment of the present application;
[0016] Figure 4 A flowchart of another chat record search method provided for an exemplary embodiment of the present application;
[0017] Figure 5 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0019] In response to the technical problem that the existing chat record search method relies on keyword matching, resulting in low efficiency and inaccurate search results, this application first uses a machine model built with a deep neural network to analyze and understand chat records. Although this method can better understand semantics and improve search accuracy, it also has the problem of low search efficiency when facing searching massive chat record data. Therefore, in an embodiment of the present application, not only is the search performed through a deep learning natural language recognition model, but a hierarchical search is also performed in combination with multi-dimensional prompt words, providing a chat record search method based on AI technology, wherein the method specifically receives a query question sent by a terminal device, uses a first natural language recognition model to parse the query intent, and obtains question subject information; then, matches this information with the content subject in the summary information of the historical chat record, and screens out candidate summary information; matches the query question with the candidate summary information through a second natural language recognition model, and determines the target summary information; finally, combines the question subject information and the target summary information, uses a third natural language recognition model to match the content of the historical chat record, finds the most relevant target chat record and sends it to the terminal device for display, and uses the powerful processing power of the large language model to achieve high-precision intent recognition and content matching, while significantly improving the search efficiency through a layer-by-layer screening mechanism, providing users with an efficient chat record search experience.
[0020] Figure 1a A flow chart of a chat record search method provided for an exemplary embodiment of the present application. The method can be based on Figure 1b The natural language recognition model architecture diagram shown is implemented as follows Figure 1b As shown, the model architecture diagram includes: a first natural language model, intent matching, a second natural language model, a third natural language model, a fourth natural language recognition model, and a fifth natural language recognition model. Figure 1a As shown, the chat record search method is applied to the server, which is responsible for maintaining multiple historical chat records generated by the target application on the terminal device, and each chat record has summary information. The method includes:
[0021] S101, receiving a query question sent by a terminal device;
[0022] S102, inputting the query question into the first natural language recognition model to perform intent recognition to obtain the query intent corresponding to the query question;
[0023] S103, performing intent matching on the question subject information in the query intent and the content subject information in the summary information of the multiple historical chat records to obtain candidate summary information matching the question subject information;
[0024] S104, inputting the query question and the candidate summary information into a second natural language recognition model for question matching to obtain target summary information matching the query question;
[0025] S105, inputting the historical chat records corresponding to the question subject information and the target summary information into a third natural language recognition model for content matching to obtain a target chat record matching the question subject information;
[0026] S106. Send the target chat record to the terminal device so that the terminal device can display the target chat record to the user.
[0027] In the embodiment of the present application, the server is responsible for maintaining multiple historical chat records generated by the target application on the terminal device, and each historical chat record has summary information. Among them, the server maintains multiple historical chat records generated by the target application on the terminal device, which not only includes storing chat records, but also may involve operations such as backup, synchronization, and retrieval of chat record data; among them, the server is not limited to a single physical server or virtual machine, it can be a cluster composed of multiple servers, or it can be a service provided based on a cloud computing platform. As long as it can provide stable data storage and processing capabilities and support large-scale concurrent access, the system or platform can be used as a server, and the embodiment of the present application does not limit it.
[0028] In the embodiment of the present application, the target application is installed and running on the terminal device, and the user communicates with other users through the target application and generates chat records. The terminal device is responsible for sending the chat records to the server corresponding to the target application. The embodiment of the present application does not limit the physical form of the terminal device. As long as it can run the target application and establish an effective communication connection with the server, it can be regarded as a terminal device. For example, the terminal device can be a smart phone, a tablet computer, a smart watch, or even a TV or car entertainment system with networking function.
[0029] In the embodiments of the present application, the application type of the target application is not limited. As long as it is installed on the terminal device, has a chat function, allows the user to communicate with other users, and generates various chat records, it can be regarded as the target application in the embodiments of the present application. For example, the target application can be a social application, an instant messaging tool, a life service application, a short video / live broadcast platform, or a shopping platform.
[0030] In an embodiment of the present application, the server receives a query question sent by a terminal device, and the query question is used to request to query a target chat record adapted to the query question from multiple historical chat records. Among them, the user can specify the conditions or content of the historical chat record to be queried by sending a text as a query question on the terminal device. The format or content of the query question can be any form of text, as long as it can express the user's query needs, and this is not limited in the embodiment of the present application. For example, the query question can be a keyword-based query text (such as "CRM system"), it can be a query text input for a specific person (such as "what was discussed with Zhang San"), it can also be a comprehensive query (such as "What is the purpose of discussing the CRM system with Zhang San on January 1, 2024"), and it can also be a fuzzy query (such as "What is the discussion about the product") and any form of question can be queried and retrieved through the chat record search method of the present application. Historical chat records can be improved in terms of accessibility and query management efficiency.
[0031] In an embodiment of the present application, after receiving the query question sent by the terminal device, the server inputs the query question into the first natural language recognition model for intent recognition to obtain the query intent corresponding to the query question, and the query intent at least includes the question subject information corresponding to the query question. Among them, the first natural language recognition model is a machine learning model specifically used for natural language processing, which can efficiently and accurately recognize the intent of the input query question and extract the corresponding question subject information; intent recognition is a subtask of the natural language recognition model, which can perform word segmentation, part-of-speech tagging and other processing on the query question input by the user, and then extract its query intent through intent classification through the model; query intent is the specific demand or purpose expressed by the user through the query question, and the query intent includes the query question and the main content of the query question; among them, the question subject information corresponding to the query question can reflect the instructions of the query question, and perform standardized analysis for the next step of retrieval, thereby achieving improved accuracy.
[0032] In the embodiment of the present application, the summary information of each historical chat record includes at least content subject information and the chat time range corresponding to the historical chat record. The summary information is a concise summary of each historical chat record, including content subject information and chat time range, which can quickly retrieve and understand the main content of the chat record without re-retrieval of the entire chat record, thereby improving the efficiency of chat record search.
[0033] Optionally, the content theme information is part of the chat record summary information, mainly including the chat content summary and the chat keyword, which together describe the main content and theme of the chat record. Among them, the chat content summary is a brief summary of the main content of the chat record. The chat content summary can be a text summary converted from any form of chat record such as text, picture or video, and the present application embodiment does not limit this; the chat keyword is a theme or keyword extracted from the chat record, which is used to identify the chat record. The chat keyword can be very flexible. In the present application embodiment, the type of chat keyword is not limited. For example, the chat keyword can be a key word of the chat record (such as Shanghai, travel, hotel), or it can be an entity recognition of the picture (such as Shanghai, Shanghai International Hotel, Shanghai Station), or it can be emotional information (such as happiness, tension, expectation), etc. Among them, the chat time range refers to the time interval of a historical chat record, including the start time and end time of the chat record. The chat records within a specific time period can be screened and searched according to the time range, so as to realize the pre-screening of the chat records, reduce the search range of the chat records, reduce the calculation amount of the natural language model, and thus improve the efficiency of the search.
[0034] In an embodiment of the present application, based on the content subject information in the summary information of multiple historical chat records, the question subject information in the query intent is intentionally matched with the content subject information in the summary information of multiple historical chat records to obtain candidate summary information that matches the question subject information. Among them, the question subject information in the query intent refers to the subject or keyword contained in the query question raised by the user. For example, if the query question raised by the user is "How to set an alarm on an Apple phone?", then "Apple phone" and "set an alarm" are the subject information of this question. Intent matching is a process of comparing and matching the user's current question subject information with the content subject information in the summary information of multiple historical chat records. After intent matching, at least one set of summary information related to the question subject information of the user's current query question will be obtained. These summary information are used as candidate summary information. The chat records corresponding to the candidate summary information may contain answers or relevant information to solve the user's current query question. This process can achieve preliminary screening without re-retrieval of the entire chat record, making the chat record finally searched more accurate and targeted, thereby further improving efficiency.
[0035] In an embodiment of the present application, based on the candidate summary information that matches the question subject information obtained above, the query question and the candidate summary information are input into the second natural language recognition model for question matching to obtain the target summary information that matches the query question. Among them, the second natural language recognition model is used to analyze the correlation between the query question and the candidate summary information. According to the calculated correlation, the second natural language recognition model will select at least one candidate summary information that is considered to have a high correlation with the query question. These selected candidate summary information are marked as target summary information that matches the query question, and the target summary information will be used for further search. Through the above process, it is possible to find which historical chat candidate summary information is most relevant to the user's query question more quickly without browsing a large number of chat records, thereby improving the accuracy and efficiency of the search.
[0036] In an embodiment of the present application, based on the target summary information obtained above, the historical chat records corresponding to the question subject information and the target summary information are input into the third natural language recognition model for content matching to obtain the target chat records matching the question subject information. Among them, the third natural language recognition model is used to deeply analyze and match the specific content of the chat records to find the historical chat records matching the question subject information. The third natural language recognition model calculates the correlation between the historical chat records corresponding to the question subject information and the target summary information. According to the calculated correlation, the third natural language recognition model will select the chat records that are considered to be highly relevant to the question subject information. These chat records will be marked as target chat records matching the question subject information. Through the above method, users can more accurately search for chat records related to the query question. During the search process, the chat records are screened layer by layer to obtain a small number of chat records that match the query question, reducing the calculation pressure of the natural language recognition model, thereby improving the search efficiency and user experience. This method is particularly suitable for scenarios where specific relevant information needs to be quickly located from a large number of chat records.
[0037] In an embodiment of the present application, based on the target chat record obtained above, the target chat record is sent to the terminal device so that the terminal device can display the target chat record to the user. Among them, the server device sends the target chat record determined after natural language processing and content matching to the user's terminal device. After the terminal device receives these data, it will display them to the user in a clear and easy-to-understand format in the user interface of the target application, including the text, time range and participant information of the chat record. Users can directly view these chat records that are most relevant to their query questions on the terminal device and interact with them, such as continuing to search, etc., thereby improving the efficiency and convenience of searching and reviewing chat records.
[0038] Further, in some optional embodiments of the present application, based on the target chat record obtained above, the query question and the target chat record can also be input into the fourth natural language recognition model for generating and processing the reply information, so as to obtain the target reply information adapted to the query question; the target reply information is sent to the terminal device, so that the terminal device can display the target reply information to the user. Among them, the user's query question and the matched target chat record are used as input and provided to the fourth natural language recognition model. The fourth natural language recognition model analyzes the user's query question and the content of the matched target chat record, generates a target reply information adapted to the query question and sends it back to the terminal device. This target reply information is intended to directly answer the user's query question. After the terminal device receives the target reply information, it displays it to the user, so that the user can see the reply adapted to their query question. This process provides a more intelligent and interactive search experience, which can not only display the chat record corresponding to the query question, but also provide targeted replies, thereby better meeting the user's information needs.
[0039] In some optional embodiments of the present application, the summary information of the historical chat record is based on the historical chat record reported by the receiving terminal device, and a historical chat record uploaded by the terminal device between two adjacent blank periods is identified, and the blank period refers to a time period with a duration greater than a set duration threshold and the terminal device has not uploaded any historical chat record; the identified historical chat record between the two adjacent blank periods is input into the fifth natural language recognition model to extract the summary information to obtain the summary information of the historical chat record. In this case, the server can filter out the time period when the user actually communicates by identifying the historical chat records uploaded by the terminal device between two adjacent blank periods, and ignore those gaps without communication. By inputting the historical chat records into the natural language recognition model, the summary information of these chat records can be extracted, rather than every detail of the entire conversation. This method can automatically process a large number of chat records, so that when searching for chat records, it is not necessary to retrieve each conversation in the chat record, thereby improving the search efficiency.
[0040] In the above embodiment of the present application, in step S102, the query question is input into the first natural language recognition model for intent recognition to obtain the query intent corresponding to the query question. In this embodiment, the internal implementation structure of the first natural language model is not limited. Figure 2As shown, an example of the internal implementation structure of the first natural language model is shown. In this example, the first natural language model includes: D: a first text processing layer, E: a first feature extraction layer, and F: an intent recognition layer. Based on the internal implementation structure of the first natural language model, a specific implementation method of inputting a query question into the first natural language recognition model for intent recognition to obtain a query intent corresponding to the query question includes: the query question is subjected to intent recognition through the first natural language recognition model, and the query subject information in the query intent corresponding to the query question is output at F: the intent recognition layer, and the query intent includes the question subject information and the query question. Inputting the query question into the first natural language recognition model for intent recognition to obtain the query intent corresponding to the query question, including: inputting the query question into the text processing layer for word segmentation processing, and performing word form restoration processing on the word segmentation results to obtain multiple target word segments; inputting the multiple target word segments into the feature extraction layer for multi-dimensional feature extraction to obtain target multi-dimensional features of the multiple word segments, the target multi-dimensional features including at least two of lexical features, grammatical features, semantic features and context features; inputting the target multi-dimensional features of the multiple word segments into the intent recognition layer, identifying whether the target word segmentation belongs to the intent word according to the target multi-dimensional features of each target word segmentation, and generating question topic information according to the identified intent word; combining the query question and the question topic information according to the set format to obtain the query intent. Among them, the user's query question is input into the D: first text processing layer of the first natural language recognition model, and word segmentation processing is performed, that is, the query question is split into separate vocabulary units (that is, the sentence is decomposed into single words), and then the word segmentation results are restored to parts of speech to obtain multiple target word segments, that is, the vocabulary is restored to its basic form, for example, "run", "run", "run" and so on are unified as run. This step is very important to reduce the impact of vocabulary changes and improve the accuracy of subsequent processing.
[0041] Based on the vocabulary obtained through the above processing, the target vocabulary is input into F: the first feature extraction layer, and the multi-dimensional features of each vocabulary are extracted. These features include but are not limited to at least two of vocabulary features, grammatical features, semantic features and contextual features. By extracting these features, the first natural language model can more accurately understand the role and meaning of each vocabulary in a specific context. Among them, the vocabulary feature refers to the basic attributes of the vocabulary itself, including part of speech, word frequency and word length, for example, "meeting" is a noun, and "prepare" is a verb; high-frequency vocabulary may play a core role in the text; longer vocabulary may carry more information. Grammatical features refer to the position and role of vocabulary in the sentence structure, including syntactic roles and dependency relationships, for example, in "What do I need to prepare for the meeting tomorrow?", "I" is the subject, "need" is the predicate, and "what to prepare" is the object; there is a subject-predicate relationship between "I" and "need", and there is a verb-object relationship between "need" and "prepare". Semantic features refer to the meaning and concept of words, including synonyms, antonyms, hyponyms, and sentiment polarity. For example, "discussion" and "discussion" are synonyms; "start" and "end" are antonyms; "animal" is the hypernym of "dog", and "dog" is the hyponym of "animal"; "good" is a positive sentiment word and "bad" is a negative sentiment word. Contextual features refer to the contextual information of words in a sentence or paragraph, including the position of words, the influence of words before and after, sentence structure, and paragraph information. For example, "tomorrow" is at the beginning of a sentence, indicating time; "meeting" in "tomorrow's meeting", the preceding "tomorrow's meeting" indicates that this is an upcoming meeting; "what do I need to prepare for tomorrow's meeting?" is a question; if the entire paragraph is discussing meeting preparation, then the meaning of the word "prepare" is clearer. Then, the extracted multi-dimensional features are input into F: the intent recognition layer, which is responsible for identifying which words belong to the intent layer, that is, the words directly related to the user's query intent, and then generating the topic information of the question based on the identified intent words. The topic information of the question is the core content of the user's query question. For example, in the question “How to make a cake?”, “how”, “make”, and “cake” may be key intent words, which together express the user’s intention to learn how to make a cake.
[0042] Based on the subject words of the question generated by the above method, the original query question and the identified question subject information are combined in a set format to form a query intent, which will be used for subsequent query processing and response generation. For example, the query question input by the user is: "What do I need to prepare for my meeting tomorrow?" The server inputs the query question into the first natural language recognition model. The first natural language recognition model first performs word segmentation on the query question at the first text processing layer, splitting it into vocabulary units of "I", "tomorrow", "of", "meeting", "need", "prepare", and "what". Due to the characteristics of Chinese, this query question does not need to be restored; at the first feature extraction layer, multi-dimensional feature extraction is performed on the above vocabulary units, "I": lexical features (personal pronouns), grammatical features (subject), semantic features (speaker himself), contextual features (asking for personal information), "tomorrow": lexical features (time nouns), grammatical features (time adverbials), semantic features (a certain time point in the future), contextual features (asking for future information), "of": lexical features (particles), grammatical features (attributive markers), semantic features (connecting attributives and central words), contextual features (indicating affiliation), "meeting" : lexical features (nouns), grammatical features (objects), semantic features (formal discussion of activities), contextual features (asking for information about specific activities), "need": lexical features (verbs), grammatical features (predicates), semantic features (necessity), contextual features (expressing concern for a certain need), "preparation": lexical features (verbs), grammatical features (predicates), semantic features (prior arrangements), contextual features (asking about prior preparations), "what": lexical features (interrogative pronouns), grammatical features (objects), semantic features (asking about specific content), contextual features (expressing curiosity or concern about specific matters); identify intent words based on the extracted features: "tomorrow", "meeting", "preparation", "work", these intent words constitute the question subject information, expressing the user's intention to know what preparations are needed before tomorrow's meeting; the query intent finally output is the query question (what do I need to prepare for tomorrow's meeting) and question subject information ("tomorrow", "meeting", "preparation", "work").
[0043] In the above embodiment of the present application, in step S103, the question subject information in the query intent is matched with the content subject information in the summary information of multiple historical chat records to obtain candidate summary information that matches the question subject information. In this embodiment, the internal implementation structure of the server pre-screening is not limited. Figure 2As shown, it is an example of the internal implementation structure of the server pre-screening. In this example, the internal structure of the server pre-screening includes: G: time range filtering layer, H: information matching calculation layer. Based on the internal implementation structure of the server pre-screening, a method of inputting the question information in the query intent and the content subject information in the summary information of multiple chat records into the server pre-screening for intent matching to obtain candidate summary information matching the question subject information includes: the server matches the chat time range in the multiple summary information according to the search time range condition selected by the user at the G: time range filtering layer to obtain the preliminary summary information within the search time range of the chat time range network; the question subject information and the content subject information in the preliminary summary information are matched at the H: information matching calculation layer to obtain the candidate summary information matching the question subject information. A search time range corresponding to the query question sent by a receiving terminal device; the summary information of each historical chat record also includes: the chat time range corresponding to the historical chat record; the question subject information is intent-matched with the content subject information in the summary information of multiple historical chat records to obtain candidate summary information matching the question subject information, including: according to the search time range, matching within the chat time range in multiple summary information to obtain preliminary summary information whose chat time range falls within the search time range; when the preliminary summary information is not empty, the question subject information is intent-matched with the content subject information in the preliminary summary information to obtain candidate summary information matching the question subject information. Among them, in G: time range filtering layer, the server receives the query question sent by the terminal and the search time range specified by the user. The server selects the records whose chat time range overlaps with the user-specified time range from the summary information of all historical chat records according to the search time range specified by the user. The summary information of these records is selected as the preliminary summary information; after obtaining the preliminary summary information, it is detected whether the preliminary summary information is empty. If it is not empty, the question subject information in the user's query question and the content subject information in these preliminary summary information are further matched with the intention in H: information matching calculation layer. According to the above intention matching, at least one set of candidate summary information matching the question subject information is generated. This information is the result of dual screening of time and intention. The efficiency and accuracy of chat record search are improved through dual screening in pre-screening.
[0044] In an embodiment of the present application, in the H: information matching calculation layer in the server-side pre-screening, intent matching is performed, wherein the question subject information includes question subject words, and the content subject information includes: a chat content summary and a chat subject word; the question subject information is intent matched with the content subject information in the preliminary summary information to obtain candidate summary information matching the question subject information, including: for each preliminary summary information, calculating a first matching degree between the question subject word and the chat content summary in the preliminary summary information, and calculating a second matching degree between the question subject word and the chat subject word in the preliminary summary information; according to the first matching degree and the second matching degree, Calculate the degree of match between the question subject information and the preliminary summary information; select summary information whose matching degree meets the set matching degree condition from each preliminary summary information according to the matching degree between the question subject information and each preliminary summary information as candidate summary information; or, for each preliminary summary information, calculate the degree of match between the question subject word and the chat subject word in the preliminary summary information as the degree of match between the question subject information and the preliminary summary information; select summary information whose matching degree meets the set matching degree condition from each preliminary summary information according to the matching degree between the question subject information and each preliminary summary information as candidate summary information.
[0045] The preliminary summary information is obtained by performing the G: time range filtering layer before the H: information matching time layer. According to the search time range specified by the user, the summary information of all historical chat records whose chat time range falls within the search time range is filtered out as the preliminary summary information. Based on the preliminary summary information, the question topic information obtained in the first natural language recognition model and the content topic information in the preliminary summary information are matched at the H: information matching calculation layer. For each preliminary summary information, the first matching degree between the question subject word and the chat content summary and the second matching degree between the question subject word and the chat content subject word are calculated. The two matching degrees are combined to calculate the total matching degree between the question subject information and the preliminary summary information. Finally, according to the total matching degree, the summary information whose matching degree meets the preset matching degree condition is selected as the candidate summary information. The calculation of the first matching degree can be achieved by calculating the frequency / position of the question subject in the chat content summary, and the calculation of the second matching degree can be achieved by calculating the similarity between the question subject word and the chat subject word. The comprehensive matching degree can be calculated using the weighted average method. Among them, the preset matching condition can be a set matching threshold, such as 0.8, and only the preliminary summary information with a comprehensive matching degree exceeding 0.8 will be selected as the candidate summary information; the preset matching condition can also be to sort all the preliminary summary information according to the comprehensive matching degree, and then select the top N summary information as the candidate summary information, where N is a specified number, such as 3, and this application does not limit this. For example, the question raised by the user is "What is the budget of project X?", where "project X" and "budget" are the question keywords, and the server selects three preliminary summary information according to the time range: preliminary summary information A is a chat content summary of "discussing the launch of project X", and the chat keywords are "project X" and "launch"; preliminary summary information B is a chat content summary of "sharing holiday photos", and the chat keywords are "holiday" and "photos"; preliminary summary information C is a chat content summary of "project X budget allocation", and the chat keywords are "project X" and "budget". For the preliminary summary information A, both the first matching degree and the second matching degree are high, because both contain "project X", and the comprehensive matching degree is also high; for the preliminary summary information B, both the first matching degree and the second matching degree are low, because both are not related to "project X" and "budget", and the comprehensive matching degree is also low; for the preliminary summary information C, both the first matching degree and the second matching degree are high, because the chat keywords in the preliminary summary information contain both "project X" and "budget". For example, the matching degree threshold is set to 0.7, and the comprehensive matching degrees of the preliminary summary information A and C both exceed this threshold, so the preliminary summary information is selected as the candidate summary information. Through this method, it is possible to quickly and accurately pre-screen from a large number of historical chat records, thereby improving the efficiency and accuracy of chat record search.
[0046] Optionally, based on the preliminary summary information obtained by the G: time range filtering layer, the matching degree between the question subject words and the chat subject words in the preliminary summary information can also be calculated for each preliminary summary information in the H: information matching calculation layer as the matching degree between the question subject information and the preliminary summary information; according to the matching degree between the question subject information and each preliminary summary information, the summary information whose matching degree meets the set matching degree condition is selected from each preliminary summary information as the candidate summary information. Among them, for each preliminary summary information, the matching degree between the question subject words and the chat subject words in the preliminary summary information is directly calculated as the matching degree between the question subject information and the preliminary summary information. According to the matching degree between the question subject information and each preliminary summary information, the summary information whose matching degree meets the preset matching degree condition is selected as the candidate summary information. Among them, the preset matching degree condition is the same as defined above and will not be repeated here. For example, a user inputs a query question as "What is the budget for Project X?", where "Project X" and "Budget" are question keywords; the system selects the following three preliminary summary information according to the time range, namely, preliminary summary information A: the chat keyword is "Project X, start-up", preliminary summary information B: the chat keyword is "holiday, photo", and preliminary summary information C: the chat keyword is "Project X, budget"; for preliminary summary information A, the question keyword "Project X" matches the chat keyword, but "budget" does not match, for preliminary summary information B, the question keywords "Project X" and "budget" do not match, and for summary information C, the question keywords "Project X" and "budget" both match the chat keyword; the matching degree threshold is set to 0.5, the matching degree of preliminary summary information A is 0.5 (because only one word is matched), the matching degree of preliminary summary information B is 0 (because no word is matched), and the matching degree of preliminary summary information C is 1 (because both words are matched); only the matching degree of summary information C exceeds the threshold, so it is selected as candidate summary information. Through this process, summary information related to the user's query question can be quickly pre-screened from historical chat records, thereby providing users with more accurate search results.
[0047] In the above embodiment of the present application, in step S104, the query question and the candidate summary information are input into the second natural language recognition model for question matching to obtain the target summary information matching the query question. In this embodiment, the internal implementation structure of the second natural language recognition model is not limited. Figure 2As shown, an example of the internal implementation structure of the second natural language recognition model is shown. In this example, the internal structure of the second natural language recognition model includes: I: second text processing layer, J: second feature extraction layer, K: semantic processing layer, and L: content processing layer. Based on the internal implementation structure of the second natural language recognition model, the specific implementation method of inputting the query question and the candidate summary information into the second natural language recognition model for question matching to obtain the target summary information matching the query question includes: inputting the query question and the candidate summary information into the second natural language recognition model for question matching to obtain the target summary information matching the query question at the output of L: content processing layer; inputting the query question and the candidate summary information into the second natural language recognition model for question matching to obtain the target summary information matching the query question, including: inputting the query question and the candidate summary information into the second natural language recognition model, calculating the semantic relevance and / or content relevance between the query question and the candidate summary information; according to the semantic relevance and / or content relevance between the query question and the candidate summary information, selecting the summary information whose semantic relevance and / or content relevance meets the first set relevance condition as the target summary information. Among them, semantic relevance refers to the relevance of two information in meaning, which takes into account the deep meaning and contextual relationship of the vocabulary; content relevance refers to the similarity of two information in content, based on direct matching of vocabulary and phrases; among them, the two information refer to the query question and the candidate summary information; the first set relevance condition can be to set a fixed threshold (such as 0.5 or 0.7), and only when the relevance exceeds this threshold, the candidate summary information is considered to be relevant to the query question; the first set relevance condition can also be not to set a specific threshold, but to select the top N candidate summary information with the highest relevance as the result, N represents the number, which can be 1, 2 or 3, and the embodiment of the present application does not limit the form of the first set relevance condition.
[0048] In an embodiment of the present application, the query question and the candidate summary information are input into the second natural language recognition model, and the semantic relevance and / or content relevance between the query question and the candidate summary information are calculated, including: the query question and the candidate summary information are respectively input into the second text processing layer for word segmentation processing, and the word form restoration processing is performed on the word segmentation result to obtain a first word segmentation sequence and a second word segmentation sequence; the first word segmentation sequence and the second word segmentation sequence are respectively input into the second feature extraction layer for multidimensional feature extraction to obtain a first multidimensional feature and a second multidimensional feature; the first multidimensional feature or the second multidimensional feature at least includes a lexical feature, a grammatical feature and a semantic feature; the first multidimensional feature and the second multidimensional feature are input into the semantic processing layer, and the semantic features in the first multidimensional feature and the second multidimensional feature are mainly used to calculate the relevance, and the lexical feature and the grammatical feature are supplemented to obtain the semantic relevance between the query question and the candidate summary information; and / or, the first multidimensional feature and the second multidimensional feature are input into the content processing layer, and the lexical feature and the grammatical feature in the first multidimensional feature and the second multidimensional feature are mainly used to calculate the relevance, and the semantic feature is supplemented to obtain the content relevance between the query question and the candidate summary information. The second natural language recognition model is used to calculate the semantic relevance and / or content relevance between the query question and the candidate summary information. This model includes multiple levels, and each level is responsible for processing different tasks.
[0049] Among them, I: the second text processing layer performs word segmentation processing on the query question and candidate summary information, splits the text into separate vocabulary units, performs word form restoration processing, and restores the vocabulary to its basic form to obtain the first word segmentation sequence and the second word segmentation sequence for subsequent processing; then, the first word segmentation sequence and the second word segmentation sequence are respectively input into J: the second feature extraction layer to extract multi-dimensional features to obtain the first multi-dimensional features and the second multi-dimensional features. The second feature extraction layer extracts multi-dimensional features of the word segmentation results, including lexical features (such as part of speech, word frequency), grammatical features (such as syntactic structure, dependency relationship) and semantic features (such as word meanings, synonyms), the second feature extraction layer is the same as the method of the first feature extraction layer above, which will not be repeated here; the extracted first multidimensional features and second multidimensional features are input into K: semantic processing layer, the semantic processing layer mainly uses the extracted semantic features, supplemented by lexical features and grammatical features, to calculate the semantic relevance between the query question and the candidate summary information; and / or, the first multidimensional features and the second multidimensional features are input into L: content processing layer mainly uses the extracted lexical features and grammatical features, supplemented by semantic features, to calculate the content relevance between the query question and the candidate summary information.
[0050] Among them, it is determined which features are "primary" and which features are "auxiliary", and different weights are assigned to different features. These weights reflect the importance of each feature in calculating semantic relevance and content relevance. Among them, the weight assignment is "primary", and the features that are assigned higher weights are because they are the most critical to determining the relevance between texts. In K: semantic processing layer, semantic features are set as "primary" because they can capture the deep meaning and contextual relationship of the text; in L: content processing layer, lexical features and grammatical features are set as "primary" because they can capture the direct content and structure of the text. The weight assignment is "auxiliary", and the features that are assigned lower weights provide additional information but have less impact on relevance. In K: semantic processing layer, lexical features and grammatical features are set as "auxiliary" because they complement semantic features and provide more comprehensive text information; in J: content processing layer, semantic features are set as "auxiliary" because they provide supplementary information of deep meaning.
[0051] For example, the user's query question is "Please find the room number of the hotel room we mentioned before?", and the candidate summary information is "We stayed in room 101 of the hotel last time we traveled." The query question and the candidate summary information are input into the second natural language recognition model, and processed by the second text processing layer to obtain the first segmentation sequence ["please", "find", "before", "said", "hotel", "room", "house number", "what"] and the second segmentation sequence ["last time", "travel", "we", "stay in", "hotel", "of", "101", "room"]; next, these segmentation sequences will be input into the second feature extraction layer to extract multi-dimensional features; assuming that the semantic feature weight (first weight value) is 0.6, the lexical feature weight (second weight value) is 0.3, and the grammatical feature weight (third weight value) is 0.1; the semantic relevance is calculated in the semantic processing layer, assuming that the semantic similarity calculation result is "hotel" and "hotel": 1, "room" and "room": 1, and the semantic similarity of other words is lower, assuming is 0.2, semantic relevance = 0.6*(1.0+1.0+0.2+0.2)+0.3*(lexical similarity)+0.1*(grammatical similarity)=0.6*(1.0+1.0+0.2+0.2)+0.3*(0.8+0.8)+0.1*(0.5+0.5)=2.02; calculate content relevance at the content processing layer, assuming that the lexical similarity calculation result is "hotel" and "hotel": 1, "room" and "room": 1, and the lexical similarity of other words is lower , assuming it is 0.1, assuming that the grammatical similarity calculation result is the subject-predicate structure matching degree: 0.8, content relevance = 0.3*(1.0+1.0+0.1+0.1)+0.1*0.8+0.6*(semantic similarity) = 0.3*(1.0+1.0+0.1+0.1)+0.1*0.8+0.6*(0.4+0.4) = 1.22; The first setting relevance condition is to set the threshold to 1, the semantic relevance is 2.02, and the content relevance is 1.22, all of which exceed the threshold. Therefore, the candidate summary information is selected as the target summary information. This embodiment demonstrates how to calculate the semantic relevance and content relevance between the query question and the candidate summary information through specific data and weights, and can accurately select relevant summary information as the target summary information based on these calculation results, providing users with more accurate search results.
[0052] In the above embodiment of the present application, in step S105, the historical chat records corresponding to the question subject information and the target summary information are input into the third natural language recognition model for content matching to obtain the target chat records matching the question subject information. In this embodiment, the internal implementation structure of the third natural language recognition model is not limited. Figure 2As shown, an example of the internal implementation structure of the third natural language recognition model is shown. In this example, the internal structure of the third natural language recognition model includes: M: text processing layer, N: feature extraction layer, O: relevance calculation layer. Among them, the target summary information is extracted by the server to obtain candidate chat records, and the candidate chat records are the historical chat records corresponding to the target summary information.
[0053] Based on the internal implementation structure of the third natural language recognition model, the historical chat records corresponding to the question subject information and the target summary information are input into the third natural language recognition model for content matching to obtain the target chat records matching the question subject information. The specific implementation method includes: on the basis of obtaining the above-mentioned target summary information, the historical chat records corresponding to the question subject information and the target summary information are input into the third natural language recognition model for content matching to obtain the target chat records matching the question subject information at the O: relevance calculation layer output; the summary information of each historical chat record also includes: the chat time range corresponding to the historical chat record; the historical chat records corresponding to the question subject information and the target summary information are input into the third natural language recognition model for content matching The third natural language recognition model performs content matching to obtain target chat records that match the question topic information, including: according to the chat time range in the target summary information, obtaining historical chat records within the chat time range from the chat record information library as candidate chat records; inputting the question topic information and the candidate chat records into the third natural language recognition model, calculating the semantic relevance and / or content relevance between the question topic information and each candidate chat record; according to the semantic relevance and / or content relevance between the question topic information and each candidate chat record, selecting a chat record whose semantic relevance and / or content relevance meets the second set relevance condition from each candidate chat record as the target chat record. Among them, the candidate chat records are historical chat records obtained by the server from the chat record information base within the time range of the target summary information; the summary information of each historical chat record includes content topic information and the chat time range corresponding to the historical chat record, and the server retrieves the historical chat records within the time range from the chat record information base according to the chat time range in the target summary information, and these records are used as candidate chat records; the chat record information base is a database or data storage system that stores all historical chat records, which is used to store and manage all historical chat records so that the system can quickly retrieve and extract relevant information when needed.
[0054] The third natural language recognition model is used to calculate the semantic relevance and / or content relevance between the question topic information and the candidate chat records, and select the chat records that meet the second set relevance condition as the target chat records according to the calculated semantic relevance and / or content relevance. Among them, the model structure of the third language recognition model M: text processing layer and N: feature extraction layer and the internal calculation process refer to the second natural language recognition model, which will not be repeated here. Among them, the second natural language recognition model is to screen out the target summary information that best matches the user's query question from a large amount of preliminary summary information, and O: relevance calculation layer includes semantic processing and content processing. When calculating semantic relevance and content relevance, more attention is paid to lexical features and grammatical features, because the preliminary summary information has usually been preliminarily screened, and the main purpose is to further refine the match; while the model of the third language recognition model is used in the final matching stage, and the specific chat record that best matches the user's query question is selected from the time range of the target summary information. When calculating semantic relevance and content relevance, more attention is paid to semantic features, because the specific content of the candidate chat record is more detailed, and more precise semantic matching is required to ensure accuracy.
[0055] For example, a user enters a query question: "What do I need to prepare for my meeting tomorrow?", and the search time range is from November 1, 2024 to November 7, 2024. A target summary information has been screened out, which is a chat content summary "Discussing preparations for tomorrow's meeting, including preparing meeting materials, confirming the list of participants, etc.", and the chat time range is from November 1, 2024 to November 3, 2024; the chat time range from November 1, 2024 to November 3, 2024 in the target summary information is obtained, and historical chat records within the chat time range are searched and extracted from the chat record information library as candidate chat records. Assume that 3 candidate chat records are extracted, namely, Candidate Chat Record 1: "What materials do I need to prepare for tomorrow's meeting?", Candidate Chat Record 2: "Confirm the names of the participants Single and project X related materials, to ensure that everyone receives the notification. ", Candidate chat record 3: "Discuss the agenda for tomorrow's meeting."; The question subject information and candidate chat records are respectively segmented and morphologically restored in the third natural language model, and the lexical features, grammatical features and semantic features are extracted. Then, the semantic relevance and content relevance between the query question and each candidate chat record are calculated, and the semantic relevance of candidate chat record 1 is calculated to be 0.8, and the content relevance is 0.75; the semantic relevance of candidate chat record 2 is 0.75, and the content relevance is 0.7; the semantic relevance of candidate chat record 3 is 0.7, and the content relevance is 0.65; according to the set relevance conditions (for example, the semantic relevance threshold is 0.7, and the content relevance threshold is 0.6), chat record 1 and chat record 2 are selected as target chat records. In the above manner, the user's query question can be understood and matched more accurately, and adapted chat records can be provided to help users quickly find the required information.
[0056] Figure 3 A flowchart of another chat record search method provided by an exemplary embodiment of the present application. Figure 3 As shown, the method includes:
[0057] S30a, the server receives chat records generated by the user in the process of using the target application reported by the terminal device, and from the perspective of the server, these chat records are called historical chat records;
[0058] S30b, as the historical chat records are continuously reported, the server identifies the historical chat records between two adjacent blank periods from the received historical chat records according to the reporting time interval between the historical chat records;
[0059] S30c, the server inputs the historical chat records identified between two adjacent blank periods into a fifth natural language recognition model to obtain summary information of the multiple historical chat records;
[0060] S300: The user enters a query question on the terminal device and selects a search time range, and the terminal device sends the query question entered by the user and the search time range selected by the user to the server;
[0061] S301, the server inputs the query question into the first natural language recognition model for intent recognition to obtain the query intent corresponding to the query question;
[0062] S302, the server matches the chat time ranges in the multiple segments of summary information according to the search time range condition selected by the user to obtain preliminary summary information of the chat time range network within the search time range;
[0063] S303, the server performs intent matching on the question subject information and the content subject information in the preliminary summary information to obtain candidate summary information matching the question subject information;
[0064] S304, the server inputs the query question and the candidate summary information into the second natural language recognition model for question matching, so as to obtain target summary information matching the query question;
[0065] S305, the server inputs the historical chat records corresponding to the question subject information and the target summary information into the third natural language recognition model for content matching to obtain the target chat records matching the question subject information;
[0066] S306: The server inputs the query question and the target chat record into a fourth natural language recognition model to generate reply information, so as to obtain target reply information adapted to the query question;
[0067] S307, the server sends the target chat record to the terminal device, so that the terminal device displays the target chat record to the user;
[0068] S308: The terminal device displays the target chat record and target reply information to the user.
[0069] In the embodiment of the present application, steps S300 and S308 focus on describing the interaction process between the user and the target application, which can be completed using the terminal device, and steps S301 to S307 focus on describing the search process for the target chat record, which can be completed using the server device. It is explained here that the terminal device and the server device can be implemented as the same device. For example, in some small applications or local applications, the terminal device can have built-in server functions and perform all processing directly locally; of course, the terminal device and the server device can also be two different devices. For example, the terminal device can be a user device such as a smartphone or tablet computer, and the server device can be a remote server or cloud platform, which exchanges and processes data through the network.
[0070] In the above embodiment of the present application, in step S306, the server inputs the query question and the target chat record into the fourth natural language recognition model for generating the reply information to obtain the target reply information adapted to the query question. In this embodiment, the internal implementation structure of the fourth natural language model is not limited. Figure 2 As shown, it is an example of the internal implementation structure of the first natural language model. In this example, the fourth natural language model includes: P: text processing layer, Q: feature extraction layer, R: content extraction layer, S: reply generation layer. Based on the internal implementation structure of the fourth natural language model, a server inputs the query question and the target chat record into the fourth natural language recognition model for reply information generation processing to obtain the target reply information adapted to the query question. The specific implementation method includes: based on the above search to obtain the target chat record, the query question and the target chat record can be input into the fourth natural language recognition model for reply information generation processing to obtain the target reply information adapted to the query question at S: reply generation layer output, including: inputting the query question and the target chat record into the fourth natural language recognition model, extracting at least one chat segment adapted to the query question from the target chat record according to the query question; generating initial reply information according to the at least one chat segment, and correcting the format and tone of the initial reply information according to the text format and emotional requirements corresponding to the target application scenario to which the query question belongs, so as to obtain the target reply information. Among them, the calculation process inside P: text processing layer and Q: feature extraction layer is the same as that in the second natural language recognition model. Please refer to the processing process of the second natural language recognition model, which will not be repeated here. Among them, P: text processing layer in the fourth natural language recognition model performs word segmentation processing on the query question and the target chat record, and performs word form restoration processing on the word segmentation result. R: content extraction layer extracts at least one chat segment adapted to the query question from the target chat record according to the query question, which is used to generate target reply information adapted to the query question in the reply generation layer. In S: reply generation layer, initial reply information is generated according to the extracted chat segment, and the initial reply information is formatted and corrected in tone according to the text format and emotional requirements corresponding to the target application scenario to which the query question belongs, so as to obtain the target reply information.
[0071] In the embodiments of the present application, the target application scenario refers to the specific usage scenario involved in the user's query question, which is not limited in the embodiments of the present application. It can be a business scenario involving business activities, work communication, meeting arrangements, etc.; it can also be a child education scenario involving children's learning, homework tutoring, parent communication, etc.; it can also be a shopping scenario involving product purchases, after-sales services, and order inquiries, etc. Among them, different application scenarios have different requirements for the format and emotional needs of reply information. For example, in a business scenario, the text format will use a standard format email or a formal report format, and the emotional needs use formal language and terminology and ensure that the information is accurate and professional; in a child education scenario, the text format uses a parent notification format or a homework tutoring format, etc., and the emotional needs use a friendly tone of expression and ensure that the information is clear and easy to understand; in a shopping scenario, the text format uses an order status notification format or a product recommendation format, etc., and the emotional needs use a warm tone and expression and ensure that the information is accurate and professional.
[0072] Among them, the format correction at the S: reply generation layer is to adjust the structure and format the initial reply information according to the text format requirements of the target application scenario, such as adding necessary elements (salutation, closing remarks, signature, etc.). The structural adjustment ensures that the information structure is clear and well-organized, and ensures that the target reply information conforms to the format of the specific application scenario. The tone correction at the S: reply generation layer is to adjust the tone of the reply information according to the emotional needs of the target application scenario to make it more in line with the user's expectations, such as selecting appropriate words and expressions to ensure that the reply information meets the user's expectations and that there is no impolite or unprofessional language in the reply information. For example, the user's query question is: "Please find out what the house number of the hotel room you asked before is?", and the target chat record contains the following fragment: "The hotel room number we booked is 101, which is next to the lobby." The model filters out "The hotel room number is 101" from the target chat record, and the initial response generated by the fourth natural language recognition model is "The house number of the hotel room is 101." According to the application scenario (for example, customer service), the fourth natural language recognition model adjusts the response to a more friendly format and outputs it as the target response information: "Hello, the hotel room number you asked about before is 101. I hope this can help you." Through this process, users can be provided with response information that is both accurate and in line with a specific communication style, thereby improving user experience and satisfaction.
[0073] In the above embodiment of the present application, in steps S30a to S30c, the server receives chat records generated by users in the process of using the target application reported by the terminal device. From the perspective of the server, these chat records are called historical chat records; as the historical chat records are continuously reported, the server identifies the historical chat records located between two adjacent blank time periods from the received historical chat records based on the reporting time intervals between these historical chat records; the server inputs the identified historical chat records located between two adjacent blank time periods into the fifth natural language recognition model to obtain summary information of multiple historical chat records. In this embodiment, the internal implementation structure of the fifth natural language model is not limited. Figure 2 As shown, it is an example of the internal implementation structure of the fifth natural language model. In this example, the fifth natural language model includes: A: text processing layer, B: feature extraction layer, C: summary generation layer. Based on the internal implementation structure of the fifth natural language model, the server inputs the historical chat records identified between two adjacent blank periods into the fifth natural language recognition model to obtain the summary information of multiple historical chat records. The specific implementation method includes: inputting the historical chat records identified between two adjacent blank periods into the fifth natural language recognition model to obtain the summary information of multiple historical chat records. Receive the historical chat records reported by the terminal device, and identify a historical chat record uploaded by the terminal device between two adjacent blank periods, the blank period refers to a time period with a duration greater than a set duration threshold, and the terminal device does not upload any historical chat records; input the identified historical chat record between two adjacent blank periods into the fifth natural language recognition model to extract summary information, so as to obtain the summary information of the historical chat record. Among them, the blank period refers to a time period in the chat record with a duration greater than a preset duration threshold, and during this time period, the terminal device does not upload any chat records. This threshold is set as needed, and can be 2 minutes or 5 minutes, and the present application embodiment does not limit this. The chat records between two adjacent blank time periods are continuous paragraphs in the conversation, and are surrounded by two time periods without chat records in time.
[0074] In an embodiment of the present application, the fifth natural language recognition model is used to extract summary information from historical chat records. The server inputs the chat records located between two adjacent blank periods into the fifth natural language recognition model. The fifth natural language recognition model uses deep learning model technology to extract text features, such as word embedding, sentence embedding, etc., in A: text processing layer, and converts the text into a vector representation in a high-dimensional space; using natural language understanding technology, such as attention mechanism and recurrent neural network, in B: feature extraction layer, analyze the context and semantic information of the chat record and extract key information points; then, in C: summary generation layer, the extracted key information points are integrated to generate summary information of the historical chat record, including its time range and content theme information, and the content theme information includes chat content summary and chat keywords. Among them, the structure of the fifth natural language model is the same as that in the second natural language recognition model. See the processing process of the second natural language recognition model, which will not be repeated here. Through these technologies and methods, the fifth natural language recognition model can effectively extract valuable summary information from a large number of chat records, helping users quickly understand the key conversation content, so that in the subsequent search process, it is not necessary to search all the chat record content, which can effectively reduce the storage and computing requirements of the model, improve the efficiency of chat record search and reduce the operating cost of the model. Among them, because the chat records are dynamically generated and specifically determined by user behavior, the fifth natural language recognition model processes the chat records dynamically, and its execution order is not limited to Figure 3 As shown, before step S300, during the entire chat record search process, when other models are performing their corresponding operations, the fifth natural language model may be performing its corresponding operations, so there is no order of precedence in the processing process of this fifth natural language recognition model.
[0075] In an embodiment of the present application, the first natural language recognition model, the second natural language recognition model, the third natural language recognition model, the fourth natural language recognition model and the fifth natural language recognition model are obtained by training the same natural language recognition model using different sample prompt words and their annotation results. Among them, there is a basic natural language recognition model, which is a general model that has not been trained for a specific task and has the basic ability to process natural language; sample prompt words refer to input samples used to train the model, and these samples contain specific prompt words, that is, keywords or phrases, which the model needs to pay special attention to and learn; the annotation results refer to the correct output or answer corresponding to the sample prompt words, and these annotation results provide the model with learning goals and feedback. Among them, the first natural language recognition model, the second natural language recognition model, the third natural language recognition model, the fourth natural language recognition model and the fifth natural language recognition model are all derived from the same basic model, but they are trained to perform different tasks or process different types of inputs. Each model is given different sample prompt words and annotation results to adapt to its specific application scenario. For example, the first model may be trained to recognize and extract data in a specific format, while the second model may be trained to generate a response.
[0076] During the training process, each model is exposed to different datasets that contain specific prompt words and corresponding annotation results to shape the model's understanding and processing capabilities for specific tasks. In this way, even though these models are based on the same base model, they can develop unique expertise by learning from different samples and annotation results. This approach allows the same base natural language recognition model to learn to perform a variety of different tasks through different training datasets, thereby generating a series of specialized natural language recognition models. Each model is optimized for a specific application scenario. This approach provides flexibility because the performance of the model can be adjusted or optimized by simply changing the training data, and is also scalable because more models can be easily added to handle new or different tasks.
[0077] like Figure 3 As shown, there is a first judgment node between step S302 and step S303. The first judgment node determines the next step by checking whether the preliminary summary information obtained by the search in step S302 is not empty. If the preliminary summary information is empty, it means that no relevant chat records are found under the current search conditions. At this time, the server will return the time of extracting the abnormal information and send it to the terminal to display a message indicating "no relevant chat records are found" to the user, so that the user can adjust the search strategy in time according to the query results, such as re-modifying and submitting the query question or relaxing the time range; further, by Figure 3The fourth judgment node shown indicates whether the user stops searching. If the user chooses to stop searching, the search ends. If the user chooses not to stop searching, the user needs to correct the query problem and reselect the search time range to retry other queries or adjust the time range to ensure the flexibility and efficiency of the search process. In the first judgment node, if the preliminary selection summary information is not empty, then continue to execute step S303 to perform the intent matching screening stage. Through the first judgment node, the user experience is enhanced, making the entire search process more smooth and humane.
[0078] like Figure 3 As shown, there is a second judgment node between step S303 and step S304. The second judgment node determines the next step by checking whether the screening summary information searched in step S303 is not empty. The judgment logic of the second judgment node and the processing when it is judged to be empty are the same as those of the first judgment node above, and will not be repeated here. Among them, if the second judgment node judges that the candidate summary information is not empty, then continue to execute step S304.
[0079] like Figure 3 As shown, there is a third judgment node between step S304 and step S305. The third judgment node determines the next step by checking whether the target summary information searched in step S304 is not empty. The judgment logic of the third judgment node and the processing when it is judged to be empty are the same as those of the first judgment node and the second judgment node in the above text, and will not be repeated here. Among them, if the third judgment node judges that the target summary information is not empty, then continue to execute step S305.
[0080] In the embodiments of the present application, Figure 3 Step S307 is shown, the target chat record is sent to the terminal device, so that the terminal device can display the target chat record to the user; S308, the terminal displays the target chat record and the target reply information to the user.
[0081] Figure 4 A flowchart of another chat record search method provided by an exemplary embodiment of the present application is shown below. Figure 4 As shown, a chat record search method is applied to a terminal, a target application is running on the terminal device, and the target application supports AI-based chat record query. The method includes:
[0082] S401, after the target application is started, a first application page is displayed, and the first application page includes an AI-based chat record query entry;
[0083] S402, in response to a triggering operation on a chat record query entry, displaying a chat query interface, where the chat query interface includes an input control;
[0084] S403, responding to the user's input operation based on the input control, obtaining the query question input by the user, and sending the query question to the server, so that the server can obtain the target chat record and return it;
[0085] S404: Display the target chat record returned by the server.
[0086] In the embodiment of the present application, the specific form of the first application page is not limited. The first application interface refers to the application interface that the user sees first after starting the target application. This interface can be the main page of the application or a specific chat window interface. On the first application page, there is an AI-based chat record query entrance. The embodiment of the present application does not limit the chat query entrance. The user can use this entrance to start the chat record query function. This entrance can be used as the entrance. The chat query entrance can be a floating window style or fixed in a certain position of the chat interface. The advantage of this design is that the user can quickly start the query function without leaving the current chat environment to improve the use efficiency.
[0087] In the embodiment of the present application, the trigger operation is not limited. The trigger operation refers to any interaction between the user and the query entry, such as a click, a long press, or a slide. When the user performs the trigger operation, the application will display a new interface, which is the chat query interface. On the chat query interface, there are one or more input controls, such as text boxes, through which the user can enter the chat records corresponding to the information or questions to be queried.
[0088] In an embodiment of the present application, when the user enters query information through the input control, this information will be collected by the application and sent to the server as part of the request. After the server receives the user's query request, it will search for relevant chat records in the database based on the query content. After completing the search, the server will package the found chat records into response data and send it back to the user's terminal device. Finally, the target application will receive the response data from the server and display the chat records in this data to the user, which may be displayed directly in the same query interface or by jumping to a new interface to display the results.
[0089] In an embodiment of the present application, in response to a trigger operation on a chat record query entry, a chat query interface is displayed, including: in response to a trigger operation on a chat record query entry, a chat query interface is displayed on a first application page; or, in response to a trigger operation on a chat record query entry, a jump is made from the first application page to the chat query interface; or, in response to a trigger operation on a chat record query entry, the first application page and the chat query interface are embedded in the same page as two tabs for display. Among them, when a user triggers a chat record query entry, the target application can display a chat query interface, including displaying the chat query interface on the same page. After the user triggers the query entry, the chat query interface will be directly expanded or popped up on the same page without leaving the current first application page. For example, if a user is viewing a chat window, after clicking on the query entry, the query interface may appear as a pop-up layer above the current chat window, and the user can enter query conditions in this pop-up layer. Alternatively, jump from the first application page to the chat query interface. After the user triggers the query entry, the application will navigate to a new page, namely the chat query interface, which means that the user will temporarily leave the current first application page and enter a new page dedicated to querying chat records. This method is suitable for situations where more space is needed to display query options or result display. Alternatively, the first application page and the chat query interface are embedded in the same page as two tabs for display: After the user triggers the query entry, the application embeds the first application page and the chat query interface as two tabs in the same page. The user can switch back and forth to view the content by clicking different tabs. This method allows the user to perform query operations without losing the current context, and also provides enough space to display the query interface and results. Among them, the tab is also called a tab, which is a user interface component that allows multiple pages or content blocks to coexist in one window. The user can switch the displayed content by clicking different tabs. For example, the current chat window is displayed in one tab, and the query interface is displayed in another tab, and the user can easily switch between the two.
[0090] Among them, the chat query interface is displayed on the same page, and the user can immediately see the query interface on the current page without waiting for the page to load or jump, which improves the response speed. When the user is querying, the user can still see the current chat content, which helps to better understand and construct the query conditions, and the pop-up layer or expanded query interface does not take up too much screen space, making the interface look more concise and intuitive; jumping from the first application page to the chat query interface by jumping to a dedicated query page allows the user to focus on the query operation and avoid interference from other content, and the new page can provide more space to display complex query options and advanced functions, which is suitable for query requirements that require detailed settings. The query interface and the chat interface are separated, making the function of each interface clearer and easier for users to understand and operate; the first application page and the chat query interface are embedded in the same page as two tabs for display, and the user can quickly switch between the chat content and the query interface without returning or reopening the page multiple times, which improves the operation efficiency, and the user can view and refer to the current chat content at any time when querying, which helps to construct the query conditions more accurately. The tab design can make full use of the screen space and display multiple content blocks at the same time, making the interface more compact and efficient. These different display methods not only improve users' operational efficiency and satisfaction, but also enable them to perform well in various usage scenarios.
[0091] In an embodiment of the present application, the target reply information adapted to the query question returned by the server is received, and the target reply information is displayed. Among them, displaying the target chat record and the target reply information includes: displaying or classifying the target chat record in the first area of the chat query interface, and the target chat record has the function of locating the chat interface to which it belongs; displaying the target reply information in the second area of the chat query interface. Among them, the first area refers to a specific area in the chat query interface for displaying the target chat record. The first area can be a position close to the question input area, such as below or to the right of the input control. The advantage of this design is that the user can quickly view the chat record related to the query question, and the operation is more intuitive; it can also be a position away from the question input area, such as on the other side or bottom of the page. The advantage of this design is that more space can be left for the input control and the query button, making the interface look neater. The specific location depends on the design of the target application and the needs of user experience. The second area refers to a specific area in the chat query interface for displaying the target reply information. The second area is opposite to the first area and is located in a different part of the interface so that the user can view the chat record and reply information at the same time. For example, the second area is located near the question input area, below or to the right of the input control, close to where the user inputs; it can also be located away from the question input area, on the other side or bottom of the page, keeping a certain distance from the input control. For example, the user enters a query question in the chat query interface: "What is the progress of the project discussed last week?" In the first area, the left area of the chat query interface displays the target chat records found, and there is a "View Details" button next to each record. Click it to jump to the corresponding chat interface; in the second area, the target reply information generated by the server is displayed in the measured area of the chat query interface: "The progress of the project discussed last week is as follows: Task A has been completed, Task B is in progress, and is expected to be completed next week."
[0092] In an embodiment of the present application, the target reply information adapted to the query question returned by the server is received, and the target reply information is displayed. Among them, displaying the target chat record and the target reply information can be the expression method described above, or it can also be to display the target reply information in the chat query interface, and display a floating layer on the chat query interface, display or classify the target chat record in the floating layer, and the target chat record has the function of locating the chat interface to which it belongs. Among them, the floating layer is an independent layer temporarily displayed above the current page, which is used to display the target chat record. The user can perform further operations by clicking on the content in the floating layer. The floating layer can be dynamically displayed and hidden as needed without affecting the content of the main interface. Among them, the content in the floating layer can include interactive elements such as connections and buttons, and the user can click on these elements to perform more operations. For example, the user entered the query question in the chat query interface: "What is the progress of the project discussed last week?". The target reply information generated by the server is displayed in the main area of the chat query interface: "The progress of the project discussed last week is as follows: Task A has been completed, Task B is in progress and is expected to be completed next week." A floating layer is displayed above the chat query interface, showing the found target chat records. There can be a "View Details" button next to each record, which jumps to the corresponding chat interface after clicking. Through the above two methods, users can quickly and accurately find and view the chat records and related information they care about, thereby improving communication and work efficiency.
[0093] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as S401, S402, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0094] Figure 5 The following is a schematic diagram of an electronic device structure provided by an exemplary embodiment of the present application. Figure 5 As shown, the electronic device includes: a memory 54 and a processor 55.
[0095] The memory 54 is used to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, chat record data, query data, user interface elements, etc.
[0096] The memory 54 can be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0097] The processor 55 is coupled to the memory 54 and is used to execute the computer program in the memory 54, so as to provide: a chat record search method, applied to a server device, the server is responsible for maintaining multiple historical chat records generated by a target application on the terminal device, and each historical chat record has summary information, the method comprising: receiving a query question sent by the terminal device, the query question is used to request to query a target chat record adapted to the query question from the multiple historical chat records; inputting the query question into a first natural language recognition model for intent recognition to obtain a query intent corresponding to the query question, the query intent at least including question subject information corresponding to the query question; performing intent matching on the question subject information with content subject information in the summary information of the multiple historical chat records to obtain candidate summary information matching the question subject information; inputting the query question and the candidate summary information into a second natural language recognition model for question matching to obtain target summary information matching the query question; inputting the historical chat records corresponding to the question subject information and the target summary information into a third natural language recognition model for content matching to obtain target chat records matching the question subject information; and sending the target chat record to the terminal device so that the terminal device displays the target chat record to the user.
[0098] In an optional embodiment, the processor 55 inputs the query question and the target chat record into the fourth natural language recognition model to generate the reply information to obtain the target reply information adapted to the query question; and sends the target reply information to the terminal device so that the terminal device can display the target reply information to the user.
[0099] In an optional embodiment, the first natural language recognition model includes a first text processing layer, a first feature extraction layer and an intent recognition layer. The processor 55 inputs the query question into the first natural language recognition model for intent recognition to obtain the query intent corresponding to the query question, including: inputting the query question into the text processing layer for word segmentation processing, and performing word form restoration processing on the word segmentation results to obtain multiple target word segments; inputting the multiple target word segments into the feature extraction layer for multi-dimensional feature extraction to obtain target multi-dimensional features of the multiple word segments, the target multi-dimensional features including at least two of lexical features, grammatical features, semantic features and contextual features; inputting the target multi-dimensional features of the multiple word segments into the intent recognition layer, identifying whether the target word segmentation belongs to the intent word according to the target multi-dimensional features of each target word segmentation, and generating question subject information according to the identified intent word; combining the query question and the question subject information according to the set format to obtain the query intent.
[0100] In an optional embodiment, the processor 55 receives a search time range corresponding to the query question sent by the terminal device; the summary information of each historical chat record also includes: the chat time range corresponding to the historical chat record; the question subject information is intent-matched with the content subject information in the summary information of multiple historical chat records to obtain candidate summary information matching the question subject information, including: according to the search time range, matching within the chat time range in multiple summary information to obtain preliminary summary information whose chat time range falls within the search time range; when the preliminary summary information is not empty, the question subject information is intent-matched with the content subject information in the preliminary summary information to obtain candidate summary information matching the question subject information.
[0101] In an optional embodiment, the question subject information includes question keywords, and the content subject information includes: a chat content summary and chat keywords; the processor 55 performs intent matching on the question subject information with the content subject information in the preliminary summary information to obtain candidate summary information matching the question subject information, including: for each preliminary summary information, calculating a first matching degree between the question keyword and the chat content summary in the preliminary summary information, and calculating a second matching degree between the question keyword and the chat keyword in the preliminary summary information; calculating the matching degree between the question subject information and the preliminary summary information according to the first matching degree and the second matching degree; selecting summary information whose matching degree meets the set matching degree condition from each preliminary summary information according to the matching degree between the question subject information and each preliminary summary information as candidate summary information; or, for each preliminary summary information, calculating the matching degree between the question keyword and the chat keyword in the preliminary summary information as the matching degree between the question subject information and the preliminary summary information; selecting summary information whose matching degree meets the set matching degree condition from each preliminary summary information according to the matching degree between the question subject information and each preliminary summary information as candidate summary information.
[0102] In an optional embodiment, the processor 55 inputs the query question and the candidate summary information into a second natural language recognition model for question matching to obtain target summary information that matches the query question, including: inputting the query question and the candidate summary information into the second natural language recognition model, calculating the semantic relevance and / or content relevance between the query question and the candidate summary information; based on the semantic relevance and / or content relevance between the query question and the candidate summary information, selecting summary information whose semantic relevance and / or content relevance meets a first set relevance condition as the target summary information.
[0103] In an optional embodiment, the second natural language recognition model includes: a second text processing layer, a second feature extraction layer, a semantic processing layer, and a content processing layer; the processor 55 inputs the query question and the candidate summary information into the second natural language recognition model, and calculates the semantic relevance and / or content relevance between the query question and the candidate summary information, including: inputting the query question and the candidate summary information into the second text processing layer for word segmentation processing, and performing word form restoration processing on the word segmentation result to obtain a first word segmentation sequence and a second word segmentation sequence; inputting the first word segmentation sequence and the second word segmentation sequence into the second feature extraction layer for multi-dimensional feature extraction, to obtain a first multi-dimensional feature and a second multi-dimensional feature. The first multidimensional feature or the second multidimensional feature at least includes a lexical feature, a grammatical feature and a semantic feature; the first multidimensional feature and the second multidimensional feature are input into a semantic processing layer, and the semantic features in the first multidimensional feature and the second multidimensional feature are used as a main factor to calculate the relevance, and the lexical feature and the grammatical feature are used as a supplement to obtain the semantic relevance between the query question and the candidate summary information; and / or, the first multidimensional feature and the second multidimensional feature are input into a content processing layer, and the lexical feature and the grammatical feature in the first multidimensional feature and the second multidimensional feature are used as a supplement to calculate the relevance, and the content relevance between the query question and the candidate summary information is obtained.
[0104] In an optional embodiment, the summary information of each historical chat record also includes: the chat time range corresponding to the historical chat record; the processor 55 inputs the historical chat records corresponding to the question topic information and the target summary information into the third natural language recognition model for content matching to obtain the target chat record matching the question topic information, including: according to the chat time range in the target summary information, obtaining the historical chat records within the chat time range from the chat record information library as candidate chat records; inputting the question topic information and the candidate chat records into the third natural language recognition model, calculating the semantic relevance and / or content relevance between the question topic information and each candidate chat record; according to the semantic relevance and / or content relevance between the question topic information and each candidate chat record, selecting from each candidate chat record a chat record whose semantic relevance and / or content relevance meets the second set relevance condition as the target chat record.
[0105] In an optional embodiment, the processor 55 inputs the query question and the target chat record into a fourth natural language recognition model to perform reply information generation processing to obtain target reply information adapted to the query question, including: inputting the query question and the target chat record into the fourth natural language recognition model, extracting at least one chat segment adapted to the query question from the target chat record according to the query question; generating initial reply information according to the at least one chat segment, and performing format correction and tone correction on the initial reply information according to the text format and emotional requirements corresponding to the target application scenario to which the query question belongs, to obtain the target reply information.
[0106] In an optional embodiment, the processor 55 receives historical chat records reported by the terminal device, and identifies a historical chat record uploaded by the terminal device between two adjacent blank periods, where the blank period refers to a time period whose duration is greater than a set duration threshold and the terminal device has not uploaded any historical chat records; the identified historical chat record between two adjacent blank periods is input into the fifth natural language recognition model to extract summary information to obtain summary information of the historical chat record.
[0107] In an optional embodiment, the processor 55 is used for a chat record search method, which is applied to a terminal device, and a target application is running on the terminal device, and the target application supports AI-based chat record query. The method includes: displaying a first application page, which includes an AI-based chat record query entry; responding to a trigger operation on the chat record query entry, displaying a chat query interface, and the chat query interface includes an input control; responding to a user's input operation based on the input control, obtaining a query question input by the user, and sending the query question to a server, so that the server can obtain and return the target chat record; and displaying the target chat record returned by the server.
[0108] In an optional embodiment, the processor 55 responds to a trigger operation on a chat record query entrance and displays a chat query interface, including: responding to a trigger operation on the chat record query entrance and displaying the chat query interface on the first application page; or, responding to a trigger operation on the chat record query entrance and jumping from the first application page to the chat query interface; or, responding to a trigger operation on the chat record query entrance and displaying the first application page and the chat query interface as two tabs embedded in the same page.
[0109] In an optional embodiment, the processor 55 receives target reply information adapted to the query question returned by the server, and displays the target reply information; wherein, displaying the target chat records and the target reply information includes: displaying or categorizing the target chat records in the first area of the chat query interface, and the target chat records have the function of locating the chat interface to which they belong; displaying the target reply information in the second area of the chat query interface; or, displaying the target reply information in the chat query interface, and displaying a floating layer on the chat query interface, displaying or categorizing the target chat records in the floating layer, and the target chat records have the function of locating the chat interface to which they belong.
[0110] Further, if Figure 5 As shown, the computing platform also includes: a communication component 56, a display 57, a power component 58, an audio component 59 and other components. Figure 5 Only some components are shown schematically, which does not mean that the computing platform only includes Figure 5 Components shown.
[0111] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be executed by the computing platform in the above method embodiment.
[0112] Above Figure 5 The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0113] Above Figure 5 The display in the embodiment includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0114] Above Figure 5The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0115] Above Figure 5 The audio component in can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.
[0116] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0117] The present application is described with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, and the combination of the process and / or box in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.
[0118] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0119] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0120] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0121] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0122] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0123] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0124] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A chat record search method, characterized in that: Applied to a server device, the server is responsible for maintaining multiple historical chat records generated by a target application on a terminal device, and each historical chat record has summary information. The method includes: Receiving a query question sent by a terminal device, wherein the query question is used to request to query a target chat record that matches the query question from the multiple historical chat records; Inputting the query question into a first natural language recognition model for intent recognition to obtain a query intent corresponding to the query question, wherein the query intent at least includes question subject information corresponding to the query question; Performing intent matching on the question subject information and the content subject information in the summary information of the multiple historical chat records to obtain candidate summary information matching the question subject information; Inputting the query question and the candidate summary information into a second natural language recognition model for question matching to obtain target summary information matching the query question; Inputting the historical chat records corresponding to the question subject information and the target summary information into a third natural language recognition model for content matching to obtain a target chat record matching the question subject information; The target chat record is sent to the terminal device so that the terminal device displays the target chat record to the user.
2. The method according to claim 1, characterized in that: The method further comprises: Inputting the query question and the target chat record into a fourth natural language recognition model to generate reply information, so as to obtain target reply information adapted to the query question; The target reply information is sent to the terminal device so that the terminal device displays the target reply information to the user.
3. The method according to claim 1, characterized in that The first natural language recognition model includes a first text processing layer, a first feature extraction layer and an intent recognition layer. The query question is input into the first natural language recognition model for intent recognition to obtain the query intent corresponding to the query question, including: Inputting the query question into the text processing layer for word segmentation processing, and performing word form restoration processing on the word segmentation results to obtain multiple target word segments; Inputting the plurality of target word segments into the feature extraction layer to extract multi-dimensional features to obtain target multi-dimensional features of the plurality of word segments, wherein the target multi-dimensional features include at least two of lexical features, grammatical features, semantic features, and contextual features; Inputting the target multi-dimensional features of the plurality of segmented words into the intention recognition layer, identifying whether the target segmented word belongs to an intention word according to the target multi-dimensional features of each target segmented word, and generating question topic information according to the identified intention word; The query question and the question subject information are combined according to a set format to obtain the query intention.
4. The method according to claim 1, characterized in that: Also includes: Receiving a search time range corresponding to the query question sent by the terminal device; The summary information of each historical chat record also includes: the chat time range corresponding to the historical chat record; Intentionally matching the question subject information with content subject information in the summary information of the multiple historical chat records to obtain candidate summary information matching the question subject information includes: According to the search time range, matching is performed in the chat time ranges in the plurality of summary information to obtain preliminary summary information whose chat time range falls within the search time range; In the case that the preliminary summary information is not empty, the question subject information is intentionally matched with the content subject information in the preliminary summary information to obtain candidate summary information matching the question subject information.
5. The method according to claim 4, characterized in that The question subject information includes question keywords, and the content subject information includes: a chat content summary and chat keywords; performing intent matching on the question subject information and the content subject information in the preliminary summary information to obtain candidate summary information matching the question subject information, including: For each preliminary summary information, a first matching degree between the question subject word and the chat content summary in the preliminary summary information is calculated, and a second matching degree between the question subject word and the chat subject word in the preliminary summary information is calculated; based on the first matching degree and the second matching degree, a matching degree between the question subject information and the preliminary summary information is calculated; based on the matching degree between the question subject information and each preliminary summary information, summary information whose matching degree meets the set matching degree condition is selected from each preliminary summary information as candidate summary information; or For each preliminary summary information, the matching degree between the question subject word and the chat subject word in the preliminary summary information is calculated as the matching degree between the question subject information and the preliminary summary information; according to the matching degree between the question subject information and each preliminary summary information, the summary information whose matching degree meets the set matching degree condition is selected from each preliminary summary information as the candidate summary information.
6. The method according to claim 1, characterized in that Inputting the query question and the candidate summary information into a second natural language recognition model for question matching to obtain target summary information matching the query question, including: Inputting the query question and the candidate summary information into a second natural language recognition model, and calculating the semantic relevance and / or content relevance between the query question and the candidate summary information; According to the semantic relevance and / or content relevance between the query question and the candidate summary information, the summary information whose semantic relevance and / or content relevance meets a first set relevance condition is selected as the target summary information.
7. The method according to claim 6, characterized in that The second natural language recognition model includes: a second text processing layer, a second feature extraction layer, a semantic processing layer and a content processing layer; Inputting the query question and the candidate summary information into a second natural language recognition model, and calculating the semantic relevance and / or content relevance between the query question and the candidate summary information, including: Inputting the query question and the candidate summary information into the second text processing layer for word segmentation processing respectively, and performing lemma restoration processing on the word segmentation results to obtain a first word segmentation sequence and a second word segmentation sequence; Inputting the first word segmentation sequence and the second word segmentation sequence into the second feature extraction layer for multi-dimensional feature extraction, respectively, to obtain the first multi-dimensional feature and the second multi-dimensional feature; the first multi-dimensional feature or the second multi-dimensional feature at least includes lexical feature, grammatical feature and semantic feature; The first multidimensional features and the second multidimensional features are input into the semantic processing layer, and the relevance is calculated mainly based on the semantic features in the first multidimensional features and the second multidimensional features, and supplemented by lexical features and grammatical features, so as to obtain the semantic relevance between the query question and the candidate summary information; and / or, the first multidimensional features and the second multidimensional features are input into the content processing layer, and the relevance is calculated mainly based on the lexical features and grammatical features in the first multidimensional features and the second multidimensional features, and supplemented by semantic features, so as to obtain the content relevance between the query question and the candidate summary information.
8. The method according to claim 1, characterized in that The summary information of each historical chat record also includes: the chat time range corresponding to the historical chat record; inputting the historical chat record corresponding to the question subject information and the target summary information into the third natural language recognition model for content matching to obtain the target chat record matching the question subject information, including: According to the chat time range in the target summary information, historical chat records within the chat time range are obtained from a chat record information database as candidate chat records; Inputting the question topic information and the candidate chat records into a third natural language recognition model, and calculating the semantic relevance and / or content relevance between the question topic information and each candidate chat record; According to the semantic relevance and / or content relevance between the question topic information and each candidate chat record, a chat record whose semantic relevance and / or content relevance meets a second set relevance condition is selected from each candidate chat record as a target chat record.
9. The method according to claim 2, characterized in that: Inputting the query question and the target chat record into a fourth natural language recognition model to generate reply information to obtain target reply information adapted to the query question, including: Inputting the query question and the target chat record into a fourth natural language recognition model, and extracting at least one chat segment adapted to the query question from the target chat record according to the query question; Initial reply information is generated according to the at least one chat segment, and the format and tone of the initial reply information are corrected according to the text format and emotional requirements corresponding to the target application scenario to which the query question belongs, so as to obtain target reply information.
10. The method according to any one of claims 1 to 9, characterized in that: Also includes: Receive historical chat records reported by terminal devices, and identify a section of historical chat records uploaded by the terminal device between two adjacent blank periods, where the blank period refers to a time period with a duration greater than a set duration threshold and the terminal device does not upload any historical chat records; The identified historical chat record segment between two adjacent blank time periods is input into the fifth natural language recognition model to extract summary information, so as to obtain summary information of the historical chat record segment.
11. A chat record search method, characterized in that: Applied to a terminal device, a target application is running on the terminal device, and the target application supports AI-based chat record query, and the method includes: Displaying a first application page, wherein the first application page includes an AI-based chat record query entry; In response to a triggering operation on the chat record query entry, displaying a chat query interface, the chat query interface including an input control; In response to the user's input operation based on the input control, obtaining the query question input by the user, and sending the query question to the server, so that the server adopts the method according to any one of claims 1 to 10 to obtain the target chat record and return it; Display the target chat record returned by the server.
12. The method according to claim 11, characterized in that In response to the triggering operation of the chat record query entry, a chat query interface is displayed, including: In response to a triggering operation on the chat record query entry, displaying the chat query interface on the first application page; or In response to a triggering operation on the chat record query entry, jumping from the first application page to the chat query interface; or In response to a triggering operation on the chat record query entry, the first application page and the chat query interface are embedded as two tab pages in the same page for display.
13. The method according to claim 11 or 12, characterized in that: Also includes: Receiving target reply information adapted to the query question returned by the server, and displaying the target reply information; wherein displaying the target chat record and the target reply information includes: Displaying or categorizing the target chat records in the first area of the chat query interface, and the target chat records have the function of locating the chat interface to which they belong; displaying the target reply information in the second area of the chat query interface; or The target reply information is displayed in the chat query interface, and a floating layer is displayed on the chat query interface. The target chat records are displayed or categorized in the floating layer, and the target chat records have the function of locating the chat interface to which they belong.
14. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the processor is enabled to implement the steps in the method according to any one of claims 1 to 13.
15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is enabled to implement the steps in the method according to any one of claims 1 to 13.
16. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, enables the processor to implement the steps of the method according to any one of claims 1 to 13.
Citation Information
Cited By
Session message processing method and device, storage medium and program product
CN121193700A
Session message processing method, device, storage medium and program product
CN121193700B