Apartment intelligent agent question-answering method and system based on knowledge base
Patent Information
- Application Number
- CN202610433569.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-03
- Publication Date
- 2026-08-07
- Estimated Expiration
- 2046-04-03
AI Technical Summary
[0004]本发明的目的在于提供一种基于知识库的公寓智能体问答方法及系统,用于解决现有的公寓智能体的问答效果差的问题
先基于历史提问信息对目标问题文本包括的多个实体分词进行语义分析,以初步确定各个实体分词在目标问题文本中的重要程度,而后据此分析不同实体分词之间的关联程度,以获得多组协同数据集,再根据多组协同数据集来确定公寓智能体对各实体分词关联知识库的搜索深度,以实现对目标问题文本中不同实体分词的差异化处置,引导公寓智能体更好地理解目标问题文本,进而输出与用户需求更为适配的回答结果。
Smart Images

Figure CN121960803B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of intelligent agent interaction, specifically to a knowledge base-based question-answering method and system for apartment intelligent agents. Background Technology
[0002] The core concept of the apartment intelligent agent is to build a large model inference base, establish an apartment project knowledge base, and construct a smart apartment intelligent customer service system. Through quick functions and dialogue Q&A, it provides users (tenants and operation managers) with intelligent services such as rental consultation, property recommendation, bill inquiry, property work order generation and forwarding, and operation report generation.
[0003] During the application, it was found that the answers output by the existing apartment agent did not match the user's questions as well as expected. Summary of the Invention
[0004] The purpose of this invention is to provide a knowledge base-based question-answering method and system for apartment intelligent agents, in order to solve the problem of poor question-answering performance of existing apartment intelligent agents.
[0005] In a first aspect, one embodiment of the present invention provides a knowledge-based apartment intelligent agent question-answering method, the method comprising: Semantic analysis is performed on multiple entity segments included in the target question text based on historical question information to obtain multiple segmentation key values. The historical question information includes multiple historical question texts, and the multiple segmentation key values correspond one-to-one with the multiple entity segments. The segmentation key values are used to indicate the importance of the corresponding entity segments in the target question text. In the multiple entity segmentation, association analysis is performed on any two different entity segmentations based on the multiple segmentation key values to obtain multiple sets of collaborative datasets. The multiple sets of collaborative datasets correspond one-to-one with the multiple entity segmentations. The collaborative datasets include multiple collaborative data, which are used to indicate the degree of association between the corresponding two different entity segmentations. Data analysis is performed on the multiple collaborative datasets to obtain multiple library search intensities. The multiple library search intensities correspond one-to-one with the multiple entity segmentations. The library search intensities are used to indicate the search depth of the apartment agent in the knowledge base associated with the corresponding entity segmentation. Based on the word segmentation of the multiple entities and the search intensity of the multiple libraries, the apartment agent is controlled to perform question-and-answer processing to obtain the target answer information.
[0006] In some embodiments, the step of performing semantic analysis on multiple entity segments included in the target question text based on historical question information to obtain multiple segmentation key values includes: The frequency of occurrence of the target entity segmentation in the historical query information is analyzed to obtain the first key factor of the target entity segmentation, wherein the target entity segmentation is any entity segmentation among the plurality of entity segmentations; The semantic relationships between the target entity segmentation and other entity segments in the plurality of entity segments are analyzed to obtain the second key factor of the target entity segmentation; Based on the first and second key factors of the target entity word segmentation, the word segmentation key value corresponding to the target entity word segmentation is determined.
[0007] In some embodiments, the word segmentation key value and the corresponding first key factor are positively correlated, and the word segmentation key value and the corresponding second key factor are positively correlated.
[0008] In some embodiments, the step of analyzing the semantic association between the target entity segment and other entity segments among the plurality of entity segments to obtain the second key factor of the target entity segment includes: The multiple entity word segments are vectorized to obtain multiple word segmentation vectors; Among the multiple word segmentation vectors, the correlation between the word segmentation vector corresponding to the target entity word segmentation and the word segmentation vector corresponding to other entity word segmentation is analyzed to obtain multiple word vector correlation values corresponding to the target entity word segmentation; Analyze the central tendency of the multiple word vector correlation values corresponding to the target entity word segmentation to determine the second key factor of the target entity word segmentation.
[0009] In some embodiments, the step of performing association analysis on any two different entity segments based on the multiple segmentation key values to obtain multiple sets of collaborative datasets in the plurality of entity segmentation includes: The differences between the key values of the main entity segmentation and the key values of the secondary entity segmentation are analyzed to obtain the first difference factor of the main entity segmentation. The main entity segmentation is any entity segmentation among the plurality of entity segmentations, and the secondary entity segmentation is any entity segmentation among the plurality of entity segmentations that is different from the main entity segmentation. By analyzing the positional differences between main entity segmentation and subordinate entity segmentation in the target question text, a second difference factor of main entity segmentation is obtained; Based on the first and second difference factors of the main entity segmentation, the collaborative data of the main entity segmentation is determined.
[0010] In some embodiments, the step of analyzing the positional differences between the main entity segmentation and the subordinate entity segmentation in the target question text to obtain a second difference factor for the main entity segmentation includes: The difference in the occurrence positions of the main entity segment and the corresponding subordinate entity segment in the target question text is analyzed to obtain the segmentation position difference of the main entity segment; The ratio of the word position difference of the main entity word segment to the maximum position difference is calculated to obtain the second difference factor of the main entity word segmentation, wherein the maximum position difference is used to indicate the maximum deviation of the occurrence positions of two entity words in the target question text.
[0011] In some embodiments, the step of analyzing the difference between the segmentation key values of the main entity segmentation and the segmentation key values of the secondary entity segmentation to obtain the first difference factor of the main entity segmentation includes: Calculate the absolute difference between the segmentation key values of the main entity segmentation and the segmentation key values of the secondary entity segmentation to obtain the secondary key difference of the main entity segmentation; The ratio of the difference between the secondary key values of the main entity segmentation and the maximum key difference of the main entity segmentation is calculated to obtain the first difference factor of the main entity segmentation, wherein the maximum key difference is the maximum value among the multiple secondary key differences of the corresponding main entity segmentation.
[0012] In some embodiments, the step of performing data analysis based on the multiple sets of collaborative datasets to obtain the search strength of multiple libraries includes: In multiple collaborative datasets, the numerical intensity proportion of each collaborative dataset is analyzed to obtain multiple out-of-group collaborative intensities; In multiple collaborative datasets, the numerical concentration of multiple collaborative data included in each collaborative dataset is analyzed to obtain the collaborative strength within multiple groups; The search strength of multiple libraries is determined based on the external collaboration strength and the internal collaboration strength of the multiple groups.
[0013] In some embodiments, the library search intensity is determined based on the product of the corresponding out-of-group synergy intensity and the corresponding in-group synergy intensity.
[0014] Secondly, another embodiment of the present invention also provides an apartment intelligent agent question-answering system based on a knowledge base, the system comprising: The semantic analysis module is used to perform semantic analysis on multiple entity segments included in the target question text based on historical question information to obtain multiple segmentation key values. The historical question information includes multiple historical question texts, and the multiple segmentation key values correspond one-to-one with the multiple entity segments. The segmentation key values are used to indicate the importance of the corresponding entity segment in the target question text. The association analysis module is used to perform association analysis on any two different entity segments based on the multiple segmentation key values in the multiple entity segmentation to obtain multiple sets of collaborative datasets. The multiple sets of collaborative datasets correspond one-to-one with the multiple entity segments. The collaborative datasets include multiple collaborative data, which are used to indicate the degree of association between the corresponding two different entity segments. The data analysis module is used to perform data analysis based on the multiple sets of collaborative datasets to obtain multiple library search intensities. The multiple library search intensities correspond one-to-one with the multiple entity word segments. The library search intensities are used to indicate the search depth of the apartment agent in the knowledge base associated with the corresponding entity word segment. The question-answering module is used to control the apartment agent to perform question-answering processing based on the word segmentation of the multiple entities and the search intensity of the multiple libraries, so as to obtain the target answer information.
[0015] Thirdly, in another embodiment of the present invention, an electronic device is provided, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method described in the first aspect.
[0016] Fourthly, in another embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0017] The present invention has the following beneficial effects: First, semantic analysis is performed on multiple entity segments in the target question text based on historical question information to preliminarily determine the importance of each entity segment in the target question text. Then, the degree of correlation between different entity segments is analyzed to obtain multiple sets of collaborative datasets. Next, the search depth of the apartment agent in the knowledge base associated with each entity segment is determined based on the multiple sets of collaborative datasets, so as to realize differentiated processing of different entity segments in the target question text, guide the apartment agent to better understand the target question text, and thus output answer results that are more suitable for user needs. Attached Figure Description
[0018] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1This is a flowchart illustrating a knowledge-based question-answering method for apartment intelligent agents provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an apartment intelligent agent question-answering system based on a knowledge base, provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a knowledge-based apartment intelligent agent question-answering method and system proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0022] The following description, in conjunction with the accompanying drawings, details a specific solution for a knowledge-based apartment intelligent agent question-answering method and system provided by the present invention.
[0023] In one embodiment, the present invention provides a knowledge-based apartment intelligent agent question-answering method, such as... Figure 1 As shown, the method includes: Step S1: Based on historical question information, perform semantic analysis on the word segmentation of multiple entities in the target question text to obtain multiple word segmentation key values.
[0024] The historical question information includes multiple historical question texts, and the multiple word segmentation key values correspond one-to-one with the multiple entity word segments. The word segmentation key values are used to indicate the importance of the corresponding entity word segment in the target question text.
[0025] In this invention, the target question text can be understood as the user question text to be responded to by the apartment's intelligent agent. In application, the target question text can be received directly or indirectly based on the hardware interaction devices pre-deployed in the apartment. For example, when the hardware interaction device is a display screen that can write text, the user can form the aforementioned target question text by writing text on the display screen; and when the hardware interaction device is a voice interaction device, the user can form the aforementioned target question text by uttering the question (the voice interaction device converts the user's voice into the corresponding text content and reports it to the apartment's intelligent agent).
[0026] It should be noted that when the target question text contains only one entity segmentation, or when the length of the target question text is less than or equal to the preset length (for example, if the text length is measured by the number of characters, the preset length can be set to 6), the subsequent processing steps can be skipped and the target question text can be directly reported to the apartment agent.
[0027] It should be understood that the aforementioned apartment intelligent agent can be fine-tuned through external open-source interfaces (connecting to open-source large language models, such as deepseek), or it can be constructed through self-developed large language models. This invention does not limit this.
[0028] This invention specifically uses the jieba word segmentation tool to complete the word segmentation processing of the target question text (with the removal of modal particles). In practical applications, other word segmentation tools can also be selected to obtain the word segments of multiple entities included in the target question text, and this invention does not limit this.
[0029] Specifically, the steps of performing semantic analysis on multiple entity segments included in the target question text based on historical question information to obtain multiple segmentation key values include: The frequency of occurrence of the target entity segmentation in the historical query information is analyzed to obtain the first key factor of the target entity segmentation, wherein the target entity segmentation is any entity segmentation among the plurality of entity segmentations; The semantic relationships between the target entity segmentation and other entity segments in the plurality of entity segments are analyzed to obtain the second key factor of the target entity segmentation; Based on the first and second key factors of the target entity word segmentation, the word segmentation key value corresponding to the target entity word segmentation is determined.
[0030] The word segmentation key value and the corresponding first key factor are positively correlated, and the word segmentation key value and the corresponding second key factor are positively correlated.
[0031] Analysis revealed that the reason existing apartment AI agents output answers that do not match user needs is that they may misunderstand the importance of different keywords in the user's input question text. This causes the focus of the information search and aggregation process to deviate from the user's actual focus. Before sending the user's input question text into the apartment AI agent for processing, analyzing the question text in conjunction with past question information to distinguish the importance of different keywords and sending them as prompts along with the original question text can guide the apartment AI agent to better understand the target question text and thus output answers that are more suitable for the user's needs.
[0032] The higher the frequency of a keyword (i.e., entity segmentation) in historical question information, the higher the importance of that keyword in the question text; and the stronger the semantic association between a keyword and other entity segmentation in the question text, the higher the importance of that keyword in the question text.
[0033] The aforementioned historical question information can be obtained by collecting past apartment Q&A information, such as recordings of Q&A between apartment tenants and apartment managers, and work orders for issues submitted by apartment tenants.
[0034] For example, historical question texts containing target entity segmentation can be used as reference question texts. Then, the proportion of reference question texts in the historical question texts can be determined as the first key factor corresponding to the target entity segmentation, so as to scale the frequency of the target entity segmentation in the historical question information to the range of 0-1, thereby facilitating the subsequent use of the first key factor.
[0035] The higher the first key factor, the higher the frequency of the corresponding entity segmentation in multiple historical question texts.
[0036] The step of analyzing the semantic relationships between the target entity segmentation and other entity segments among the multiple entity segments to obtain the second key factor of the target entity segmentation includes: The multiple entity word segments are vectorized to obtain multiple word segmentation vectors; Among the multiple word segmentation vectors, the correlation between the word segmentation vector corresponding to the target entity word segmentation and the word segmentation vector corresponding to other entity word segmentation is analyzed to obtain multiple word vector correlation values corresponding to the target entity word segmentation; Analyze the central tendency of the multiple word vector correlation values corresponding to the target entity word segmentation to determine the second key factor of the target entity word segmentation.
[0037] In this invention, the above vectorization process is completed through a pre-trained word vector model (such as Word2Vec). The word vector correlation value can be understood as the absolute value of the cosine similarity between the corresponding two word segmentation vectors, and the second key factor is the average value of multiple word vector correlation values of the corresponding entity segmentation.
[0038] The higher the second key factor, the higher the semantic association between the corresponding entity segment and other entity segments among multiple entity segments.
[0039] The larger the keyword value of a word segmentation, the more important the corresponding entity segmentation is in the target question text.
[0040] For example, the segmentation key value of the target entity can be the product of its first key factor and second key factor.
[0041] Step S2: In the multiple entity segmentation, perform correlation analysis on any two different entity segmentations based on the multiple segmentation key values to obtain multiple sets of collaborative datasets.
[0042] The multiple sets of collaborative datasets correspond one-to-one with the multiple entity word segments. The collaborative datasets include multiple collaborative data, which are used to indicate the degree of association between two corresponding different entity word segments.
[0043] Further analysis revealed that while the aforementioned steps effectively identified the importance of different keywords in the question text, the differences in importance between these keywords could be too significant. This caused the apartment agent to overemphasize specific keywords with high importance during information search and integration, resulting in incomplete and inaccurate final answers. However, by performing correlation analysis on any two different entity segmentation words based on the multiple segmentation key values, the importance of entity segmentation words can be transformed from a single data point into a dataset composed of multiple collaborative data points. This can suppress the appearance of false core keywords, enhance the influence of keywords with weaker importance but closer association with other keywords, guide the apartment agent to accurately grasp the core of the question, and help the apartment agent output more comprehensive and accurate question-and-answer results.
[0044] Specifically, in the multiple entity segmentation, the step of performing association analysis on any two different entity segmentations based on the multiple segmentation key values to obtain multiple sets of collaborative datasets includes: The differences between the key values of the main entity segmentation and the key values of the secondary entity segmentation are analyzed to obtain the first difference factor of the main entity segmentation. The main entity segmentation is any entity segmentation among the plurality of entity segmentations, and the secondary entity segmentation is any entity segmentation among the plurality of entity segmentations that is different from the main entity segmentation. By analyzing the positional differences between main entity segmentation and subordinate entity segmentation in the target question text, a second difference factor of main entity segmentation is obtained; Based on the first and second difference factors of the main entity segmentation, the collaborative data of the main entity segmentation is determined.
[0045] In the above settings, the numerical differences of the segmented keywords between different entity segmentations are analyzed to initially determine the differences in their influence on the problem text. Based on this, the positional differences between different entity segmentations are further analyzed to suppress the formation of excessively large collaborative data between different entity segmentations with large positional intervals, thereby adapting to the characteristics of the concentrated distribution of strongly semantically related entity segmentations in the problem text.
[0046] The step of analyzing the difference between the key values of the main entity segmentation and the key values of the secondary entity segmentation to obtain the first difference factor of the main entity segmentation includes: Calculate the absolute difference between the segmentation key values of the main entity segmentation and the segmentation key values of the secondary entity segmentation to obtain the secondary key difference of the main entity segmentation; The ratio of the difference between the secondary key values of the main entity segmentation and the maximum key difference of the main entity segmentation is calculated to obtain the first difference factor of the main entity segmentation, wherein the maximum key difference is the maximum value among the multiple secondary key differences of the corresponding main entity segmentation.
[0047] The step of analyzing the positional differences between the main entity segmentation and the subordinate entity segmentation in the target question text to obtain the second difference factor of the main entity segmentation includes: The difference in the occurrence positions of the main entity segment and the corresponding subordinate entity segment in the target question text is analyzed to obtain the segmentation position difference of the main entity segment; The ratio of the word position difference of the main entity word segment to the maximum position difference is calculated to obtain the second difference factor of the main entity word segmentation, wherein the maximum position difference is used to indicate the maximum deviation of the occurrence positions of two entity words in the target question text.
[0048] Specifically, if the main entity segment and its corresponding subordinate entity segment are adjacent in the target question text, the segmentation position difference of the main entity segment is 1. If the main entity segment and its corresponding subordinate entity segment are separated by one entity segment in the target question text, the segmentation position difference of the main entity segment is 2. If the main entity segment and its corresponding subordinate entity segment are separated by two consecutive entity segments in the target question text, the segmentation position difference of the main entity segment is 3, and so on. The maximum position difference mentioned above can be understood as the total number of multiple entity segments minus the value of 1.
[0049] It should be understood that since there are multiple entity segmentations other than the main entity segmentation (i.e., secondary entity segmentations) in multiple entity segmentations, there are also multiple first and second difference factors of the main entity segmentation.
[0050] In some implementations, the steps for obtaining multiple collaborative data for main entity segmentation can be: Among the multiple first difference factors and multiple second difference factors of the main entity segmentation, the product of the first difference factor and the second difference factor associated with the same subordinate entity segmentation is calculated to obtain multiple segmentation difference values of the main entity segmentation. Normalize the multiple segmentation difference values of the main entity word segmentation (such as the maximum-minimum normalization algorithm) to obtain multiple normalized difference values of the main entity word segmentation. Among the multiple normalized difference values of the main entity segmentation, the difference between the value 1 and each normalized difference value is calculated to obtain multiple collaborative data of the main entity segmentation.
[0051] Step S3: Perform data analysis based on the multiple sets of collaborative datasets to obtain the search intensity of multiple libraries.
[0052] The search strength of the multiple libraries corresponds one-to-one with the multiple entity segmentation, and the search strength of the libraries is used to indicate the search depth of the apartment agent in the knowledge base associated with the corresponding entity segmentation.
[0053] In this invention, the greater the search depth, the more text is recalled in its associated knowledge base based on the corresponding entity word segmentation.
[0054] Specifically, the steps of performing data analysis based on the multiple sets of collaborative datasets to obtain the search intensity of multiple libraries include: In multiple collaborative datasets, the numerical intensity proportion of each collaborative dataset is analyzed to obtain multiple out-of-group collaborative intensities; In multiple collaborative datasets, the numerical concentration of multiple collaborative data included in each collaborative dataset is analyzed to obtain the collaborative strength within multiple groups; The search strength of multiple libraries is determined based on the external collaboration strength and the internal collaboration strength of the multiple groups.
[0055] The out-of-group collaboration strength is the ratio of the numerical strength of the corresponding collaboration dataset to the numerical strength of multiple collaboration datasets. The numerical strength is calculated by summing the corresponding multiple collaboration datasets.
[0056] The intra-group collaboration strength is the average of the multiple collaborative datasets included in the corresponding collaborative dataset.
[0057] In the above setup, after obtaining multiple sets of collaborative datasets, not only are the numerical differences between different sets analyzed, but also the degree of concentration of different collaborative data within the same set is analyzed. This allows for a comprehensive assessment of the textual importance of the entity segmentation indicated by each set of collaborative datasets, thereby accurately guiding the apartment agent to search the knowledge base associated with the corresponding entity segmentation.
[0058] The library search intensity is determined based on the product of the corresponding out-of-group synergy intensity and the corresponding in-group synergy intensity.
[0059] Step S4: Control the apartment agent to perform question-and-answer processing based on the word segmentation of the multiple entities and the search intensity of the multiple libraries to obtain the target answer information.
[0060] Specifically, the question-answering process described above is as follows: based on the library search strength of each entity segment, a corresponding number of reference texts are retrieved from the knowledge base corresponding to each entity segment. Then, each entity segment and the reference texts retrieved by each entity segment in its corresponding knowledge base are concatenated to form input information, which is then sent to the apartment agent for processing to obtain the corresponding answer information.
[0061] In practical applications, the aforementioned target answer information can be output to the user through display screens, voice broadcasts, or other means.
[0062] In some embodiments, the present invention also provides a knowledge-based apartment intelligent agent question-answering system, such as... Figure 2 As shown, the system 200 includes: The semantic analysis module 201 is used to perform semantic analysis on multiple entity segments included in the target question text based on historical question information to obtain multiple segmentation key values. The historical question information includes multiple historical question texts, and the multiple segmentation key values correspond one-to-one with the multiple entity segments. The segmentation key values are used to indicate the importance of the corresponding entity segments in the target question text. The association analysis module 202 is used to perform association analysis on any two different entity segments based on the multiple segmentation key values in the multiple entity segmentation to obtain multiple sets of collaborative datasets, wherein the multiple sets of collaborative datasets correspond one-to-one with the multiple entity segments, and the collaborative datasets include multiple collaborative data, which are used to indicate the degree of association between the corresponding two different entity segments; Data analysis module 203 is used to perform data analysis based on the multiple sets of collaborative datasets to obtain multiple library search intensities, wherein the multiple library search intensities correspond one-to-one with the multiple entity word segments, and the library search intensities are used to indicate the search depth of the apartment agent in the knowledge base associated with the corresponding entity word segment; The question-answering module 204 is used to control the apartment agent to perform question-answering processing based on the word segmentation of the multiple entities and the search intensity of the multiple libraries, so as to obtain the target answer information.
[0063] It should be noted that the system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the knowledge base-based apartment intelligent agent question answering system and the knowledge base-based apartment intelligent agent question answering method embodiment provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiment, which will not be repeated here.
[0064] This invention also provides an electronic device. Please refer to [link to relevant documentation]. Figure 3 The electronic device may include a processor 301, a memory 302, and a program 3021 stored in the memory 302 and capable of running on the processor 301.
[0065] When program 3021 is executed by processor 301, it can achieve the following: Figure 1 Any steps in the corresponding method embodiments and the achievement of the same beneficial effects will not be repeated here.
[0066] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by hardware related to program instructions, and the program can be stored in a readable medium.
[0067] This invention also provides a readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described functions. Figure 1 Any step in the corresponding method embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition.
[0068] The computer-readable storage medium of this invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0069] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0070] The program code contained on the storage medium can be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0071] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0072] This invention also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the knowledge base-based apartment intelligent agent question-answering method provided in the above embodiments.
[0073] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A knowledge-based question-answering method for apartment intelligent agents, characterized in that, The method includes: Semantic analysis is performed on multiple entity segments included in the target question text based on historical question information to obtain multiple segmentation key values. The historical question information includes multiple historical question texts, and the multiple segmentation key values correspond one-to-one with the multiple entity segments. The segmentation key values are used to indicate the importance of the corresponding entity segments in the target question text. In the multiple entity segmentation, association analysis is performed on any two different entity segmentations based on the multiple segmentation key values to obtain multiple sets of collaborative datasets. The multiple sets of collaborative datasets correspond one-to-one with the multiple entity segmentations. The collaborative datasets include multiple collaborative data, which are used to indicate the degree of association between the corresponding two different entity segmentations. Data analysis is performed on the multiple collaborative datasets to obtain multiple library search intensities. The multiple library search intensities correspond one-to-one with the multiple entity segmentations. The library search intensities are used to indicate the search depth of the apartment agent in the knowledge base associated with the corresponding entity segmentation. Based on the word segmentation of the multiple entities and the search intensity of the multiple libraries, the apartment agent is controlled to perform question-and-answer processing to obtain the target answer information; The step of performing semantic analysis on multiple entity segments of the target question text based on historical question information to obtain multiple segmentation key values includes: The frequency of occurrence of the target entity segmentation in the historical query information is analyzed to obtain the first key factor of the target entity segmentation, wherein the target entity segmentation is any entity segmentation among the plurality of entity segmentations; The semantic relationships between the target entity segmentation and other entity segments in the plurality of entity segments are analyzed to obtain the second key factor of the target entity segmentation; Based on the first key factor and the second key factor of the target entity word segmentation, determine the word segmentation key value corresponding to the target entity word segmentation; The step of performing association analysis on any two different entity segments based on the multiple segmentation key values to obtain multiple sets of collaborative datasets in the multiple entity segmentation includes: The differences between the key values of the main entity segmentation and the key values of the secondary entity segmentation are analyzed to obtain the first difference factor of the main entity segmentation. The main entity segmentation is any entity segmentation among the plurality of entity segmentations, and the secondary entity segmentation is any entity segmentation among the plurality of entity segmentations that is different from the main entity segmentation. By analyzing the positional differences between main entity segmentation and subordinate entity segmentation in the target question text, a second difference factor of main entity segmentation is obtained; Based on the first and second difference factors of the main entity segmentation, the collaborative data of the main entity segmentation is determined.
2. The knowledge-based apartment intelligent agent question-answering method according to claim 1, characterized in that, The word segmentation key value and the corresponding first key factor are positively correlated, and the word segmentation key value and the corresponding second key factor are positively correlated.
3. The knowledge-based apartment intelligent agent question-answering method according to claim 1, characterized in that, The step of analyzing the semantic relationships between the target entity segment and other entity segments among the plurality of entity segments to obtain the second key factor of the target entity segment includes: The multiple entity word segments are vectorized to obtain multiple word segmentation vectors; Among the multiple word segmentation vectors, the correlation between the word segmentation vector corresponding to the target entity word segmentation and the word segmentation vector corresponding to other entity word segmentation is analyzed to obtain multiple word vector correlation values corresponding to the target entity word segmentation; Analyze the central tendency of the multiple word vector correlation values corresponding to the target entity word segmentation to determine the second key factor of the target entity word segmentation.
4. The knowledge-based apartment intelligent agent question-answering method according to claim 1, characterized in that, The steps for analyzing the positional differences between the main entity segmentation and the subordinate entity segmentation in the target question text to obtain the second difference factor of the main entity segmentation include: The difference in the occurrence positions of the main entity segment and the corresponding subordinate entity segment in the target question text is analyzed to obtain the segmentation position difference of the main entity segment; The ratio of the word position difference of the main entity word segment to the maximum position difference is calculated to obtain the second difference factor of the main entity word segmentation, wherein the maximum position difference is used to indicate the maximum deviation of the occurrence positions of two entity words in the target question text.
5. The knowledge-based apartment intelligent agent question-answering method according to claim 1, characterized in that, The steps to analyze the differences between the key values of the main entity segmentation and the key values of the secondary entity segmentation, and to obtain the first difference factor of the main entity segmentation, include: Calculate the absolute difference between the segmentation key values of the main entity segmentation and the segmentation key values of the secondary entity segmentation to obtain the secondary key difference of the main entity segmentation; The ratio of the difference between the secondary key values of the main entity segmentation and the maximum key difference of the main entity segmentation is calculated to obtain the first difference factor of the main entity segmentation, wherein the maximum key difference is the maximum value among the multiple secondary key differences of the corresponding main entity segmentation.
6. The knowledge-based apartment intelligent agent question-answering method according to claim 1, characterized in that, The steps for analyzing data from the multiple collaborative datasets to obtain the search intensity of multiple libraries include: In multiple collaborative datasets, the numerical intensity proportion of each collaborative dataset is analyzed to obtain multiple out-of-group collaborative intensities; In multiple collaborative datasets, the numerical concentration of multiple collaborative data included in each collaborative dataset is analyzed to obtain the collaborative strength within multiple groups; The search strength of multiple libraries is determined based on the external collaboration strength and the internal collaboration strength of the multiple groups.
7. The knowledge-based apartment intelligent agent question-answering method according to claim 6, characterized in that, The library search strength is determined based on the product of the corresponding out-of-group synergy strength and the corresponding in-group synergy strength.
8. A knowledge-based apartment intelligent agent question-answering system, characterized in that, The system includes: The semantic analysis module is used to perform semantic analysis on multiple entity segments included in the target question text based on historical question information to obtain multiple segmentation key values. The historical question information includes multiple historical question texts, and the multiple segmentation key values correspond one-to-one with the multiple entity segments. The segmentation key values are used to indicate the importance of the corresponding entity segment in the target question text. The association analysis module is used to perform association analysis on any two different entity segments based on the multiple segmentation key values in the multiple entity segmentation to obtain multiple sets of collaborative datasets. The multiple sets of collaborative datasets correspond one-to-one with the multiple entity segments. The collaborative datasets include multiple collaborative data, which are used to indicate the degree of association between the corresponding two different entity segments. The data analysis module is used to perform data analysis based on the multiple sets of collaborative datasets to obtain multiple library search intensities. The multiple library search intensities correspond one-to-one with the multiple entity word segments. The library search intensities are used to indicate the search depth of the apartment agent in the knowledge base associated with the corresponding entity word segment. The question-answering module is used to control the apartment agent to perform question-answering processing based on the word segmentation of the multiple entities and the search intensity of the multiple libraries, so as to obtain the target answer information; The step of performing semantic analysis on multiple entity segments of the target question text based on historical question information to obtain multiple segmentation key values includes: The frequency of occurrence of the target entity segmentation in the historical query information is analyzed to obtain the first key factor of the target entity segmentation, wherein the target entity segmentation is any entity segmentation among the plurality of entity segmentations; The semantic relationships between the target entity segmentation and other entity segments in the plurality of entity segments are analyzed to obtain the second key factor of the target entity segmentation; Based on the first key factor and the second key factor of the target entity word segmentation, determine the word segmentation key value corresponding to the target entity word segmentation; The step of performing association analysis on any two different entity segments based on the multiple segmentation key values to obtain multiple sets of collaborative datasets in the multiple entity segmentation includes: The differences between the key values of the main entity segmentation and the key values of the secondary entity segmentation are analyzed to obtain the first difference factor of the main entity segmentation. The main entity segmentation is any entity segmentation among the plurality of entity segmentations, and the secondary entity segmentation is any entity segmentation among the plurality of entity segmentations that is different from the main entity segmentation. By analyzing the positional differences between main entity segmentation and subordinate entity segmentation in the target question text, a second difference factor of main entity segmentation is obtained; Based on the first and second difference factors of the main entity segmentation, the collaborative data of the main entity segmentation is determined.
Citation Information
Patent Citations
Construction method and device of knowledge base question-answering system, equipment and storage medium
CN119293164A
Intelligent interaction method and device based on customer service question and answer knowledge base
CN120179774A