Home service support method and device based on large language model, and medium

Through the family service support method based on the large language model, the vectorization processing engine is used to process service documents and user problems, match the document content and generate answers, solving the problems of irregular services and low matching in the existing technology, and achieving high-quality and standardized family service support.

CN119557401APending Publication Date: 2025-03-04LI YANG SHEN ZHOU ZHI NENG KE JI YOU XIAN GONG SI

Patent Information

Application Number
CN202411657181.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing family service support methods are difficult to provide high-quality and standardized services, mainly due to the difficulties of practitioners in obtaining service specifications and standard operations, resulting in irregular services and low matching.

Method used

The home service support method based on the large language model is adopted, and the original service document is processed through the preset vectorization processing engine, a vectorized index table is generated, and user questions are vectorized, matching the corresponding document content, calling the prompt word template, and generating answer data.

Benefits of technology

It improves the storage and retrieval efficiency of document content, achieves more accurate content matching and recommendation, reduces the time and technical threshold for practitioners to query professional knowledge, and improves service quality and standardization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557401A_ABST
    Figure CN119557401A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a home service support method and device based on a large language model, and a medium, is applied to the technical field of smart questions and answers, and is used for solving the problems that the existing answer data query efficiency is low and the matching degree is low. The method comprises the following steps: processing an original service document based on a preset vectorization processing engine to obtain a vectorization index table; processing the problem of the current user through a preset vectorization processing engine, and obtaining document content corresponding to the processed problem of the current user based on the vectorization index table; determining a current home service scene through the corresponding document content so as to call a prompt word template of the current home service scene; and analyzing the corresponding document content and the current user question based on the cue word template, generating a cue word question, inputting the cue word question into a preset large language model, obtaining answer data, and outputting the answer data through a corresponding output template.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present specification relates to the field of intelligent question-answering technology, and in particular to a family service support method, device and medium based on a large language model. Background Art

[0002] As society's demand for the types and quality of family services continues to increase, standardization and professionalization of family services have become an inevitable requirement for service providers and practitioners. However, in practice, due to differences in the quality of practitioners, limitations in training time and scenarios, service provision is often irregular and non-standard, and even at a loss when encountering unfamiliar scenarios, resulting in user needs not being well met and service quality difficult to guarantee. Therefore, in the daily family service process, practitioners need support based on reference content of norms and standard operations to ensure the high-quality completion of family services.

[0003] At present, practitioners generally obtain reference content for family service specifications and standard operations based on pre-edited specific questions and answers, limited-scope text material automatic query systems, and open Internet searches. However, for the above-mentioned pre-edited specific questions and answers, although specific questions can be answered, their number is limited and the content is fixed, making it difficult to adapt to complex service issues. As for the limited-scope text material automatic query system, since the documents to be searched are usually natural language records of some independent standards, rules, and experiences, it is difficult to compare the weights of the documents, resulting in poor matching results and limited help in solving practical problems. In addition, based on the open Internet search method, the answers obtained will be uneven due to the different retrieval methods of practitioners, making it difficult to easily obtain standard content that matches current needs for reference support for service operations. Summary of the invention

[0004] In order to solve the above technical problems, one or more embodiments of this specification provide a family service support method, device and medium based on a large language model.

[0005] One or more embodiments of this specification adopt the following technical solutions:

[0006] One or more embodiments of this specification provide a family service support method based on a large language model, the method comprising:

[0007] Processing the original service document based on a preset vectorization processing engine to obtain a vectorization index table corresponding to the document content of the original service document;

[0008] Processing the current user question by means of the preset vectorization processing engine, and acquiring the document content corresponding to the processed current user question based on the vectorization index table;

[0009] Determine the current home service scenario corresponding to the current user question through the corresponding document content, so as to call the prompt word template of the current home service scenario;

[0010] The corresponding document content and the current user question are parsed based on the prompt word template, a preset large language model for inputting the prompt word question is generated, and answer data is obtained, so that the answer data is output through the corresponding output template.

[0011] Optionally, in one or more embodiments of the present specification, processing the original document based on a preset vectorization processing engine to obtain a vectorization index table corresponding to the document content of the original document specifically includes:

[0012] Preprocessing each of the original documents based on a preset natural language processing technology to obtain word segmentation data corresponding to the document content of each of the original documents;

[0013] Performing feature extraction on the word segmentation data based on a preset bag-of-words model to determine document features of each of the original documents, and performing vectorization processing on the document features based on a preset vectorization processing engine to obtain a vector representation of the original document;

[0014] The document identifier of each original document and the vector representation of the original document are stored in a preset vectorization index table to determine the vectorization index table corresponding to the document content of the original document;

[0015] Preferably, before the original document is processed based on a preset vectorization processing engine to obtain a vectorization index table corresponding to the document content of the original document, the method further includes:

[0016] The corresponding original documents are collected through the data sources corresponding to each family service scenario; wherein the original documents include: dynamic documents generated based on operation records and static documents recording technical specifications.

[0017] Optionally, in one or more embodiments of the present specification, before processing the current user question by the preset vectorization processing engine and acquiring the document content corresponding to the processed current user question based on the vectorization index table, the method further includes:

[0018] Determine the input method of the current user question; wherein the input method includes: voice input and text input;

[0019] If it is determined that the input mode is voice input, a voice signal is acquired based on a preset acquisition device, and the voice signal is preprocessed to obtain a voice signal to be recognized;

[0020] The voice signal to be recognized is recognized based on a preset conversion engine, and the voice signal to be recognized is converted into the current user question; wherein the preset conversion engine includes: an ASR local engine and a TTL local engine.

[0021] Optionally, in one or more embodiments of the present specification, processing the current user question by the preset vectorization processing engine, and acquiring the document content corresponding to the processed current user question based on the vectorization index table, specifically includes:

[0022] Processing the current user question by the preset vectorization processing engine to obtain a vector representation corresponding to the current user question as the processed current user question;

[0023] Based on the processed current user question, similarity calculation is performed with the vector representation of the original document in the vectorized index table to determine the semantic similarity between the processed current user question and each of the original documents;

[0024] Based on the semantic similarity, the query determines the document content corresponding to the processed current user question.

[0025] Optionally, in one or more embodiments of the present specification, determining the current home service scenario corresponding to the current user question through the corresponding document content to call a prompt word template for the current home service scenario specifically includes:

[0026] Determine the characteristic keywords corresponding to each of the home service scenarios, and perform semantic analysis on the corresponding document content based on a preset natural language processing technology to match the corresponding document content with the characteristic keywords;

[0027] Based on the matching result, determine the current home service scenario corresponding to the current user question; wherein the current home service scenario includes: a business scenario and an operation scenario;

[0028] According to the business scenario and the operation scenario, calling a multi-version prompt word template corresponding to the current family service scenario;

[0029] Determine the timestamp corresponding to the current user question, and filter the multiple versions of prompt word templates based on the timestamp to obtain the prompt word template for the current home service scenario.

[0030] Optionally, in one or more embodiments of the present specification, the corresponding document content and the current user question are parsed based on the prompt word template to generate a prompt word question input preset large language model to obtain answer data, specifically including:

[0031] Parsing the prompt word template to determine the storage location corresponding to each blank storage unit in the prompt word template, and determining the storage attribute corresponding to each storage location in each prompt word template;

[0032] Matching the corresponding document content with the corresponding content of the current user question according to the storage attribute, so as to fill the corresponding content of the document content with the current user question into the prompt word template to obtain an initial prompt word question;

[0033] Determine the remaining corresponding content of the document content and the current user question that is not filled into the prompt word template;

[0034] Acquire the context content of the remaining corresponding content, and if it is determined that the context content is associated with the corresponding content filled into the prompt word template, determine that the remaining corresponding content is the corresponding content to be filled;

[0035] Determine a newly added storage location of the initial prompt word question according to the corresponding content associated with the corresponding content to be filled and the storage attribute corresponding to the corresponding content to be filled, so as to fill the corresponding content to be filled into the newly added storage location to obtain the prompt word question;

[0036] The prompt word question is input into the preset large language model to obtain an answer question based on the preset large language model analysis.

[0037] Optionally, in one or more embodiments of the present specification, the answer data is output through a corresponding output template, specifically including:

[0038] Based on the matching result between the current user question and the answer data and the preset property word library, determine the question type corresponding to the current user question; wherein the question type includes: consultation type, planning type, and help type;

[0039] An output template corresponding to the answer data is determined according to the question type, so that the answer data is formatted based on the output template and the processed answer data is output.

[0040] Optionally, in one or more embodiments of the present specification, after the answer data is output through a corresponding output template, the method further includes:

[0041] Obtaining an output result output by the output template, so as to construct a new sample pair according to the output result and the current user question;

[0042] The newly added sample pairs are used as newly added samples of the preset large language model and stored in a sample set corresponding to the preset large language model to obtain an updated sample set, so as to iteratively train the preset large language model based on the updated sample set.

[0043] One or more embodiments of this specification provide a family service support device based on a large language model, the device comprising:

[0044] at least one processor; and,

[0045] a memory communicatively connected to the at least one processor; wherein,

[0046] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.

[0047] One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute any of the above-described methods.

[0048] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0049] By converting the original service documents into vectorized index tables, the digitalization and structured representation of the documents are realized, which not only improves the storage and retrieval efficiency of the document content, but also makes the subsequent content matching and recommendation more accurate and efficient. After the user questions are vectorized, they can be efficiently matched with the document content in the vectorized index table, which reduces the time and technical threshold for practitioners in the field of home services to query professional knowledge while ensuring accuracy. By identifying the home service scenario to which the user questions belong, the method can call the corresponding prompt word template more targetedly. This helps to convert user questions into a more specific and easier to understand format, thereby improving the understanding and answering ability of the large language model to the questions. The use of prompt word templates can guide the large language model to understand the core intention of the user questions more accurately, and generate relevant answers based on the document content, so that the answer data can be presented in a way that is easier for users to understand and accept, which helps to improve the quality of practitioners in the field of home services, increase the standardization of various operations, and reduce accidents and disputes caused by lack of corresponding knowledge and blind operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:

[0051] Figure 1 A schematic diagram of a family service support method based on a large language model provided in an embodiment of this specification;

[0052] Figure 2 A schematic diagram of a natural language query in an application scenario provided by an embodiment of this specification;

[0053] Figure 3 A schematic diagram of obtaining answer data in an application scenario provided in an embodiment of this specification;

[0054] Figure 4 A schematic diagram of the architecture of a family service support system based on a large language model provided in an embodiment of this specification;

[0055] Figure 5 A schematic diagram of the device structure of a home service support device based on a large language model provided in an embodiment of this specification;

[0056] Figure 6 A schematic diagram of the structure of a non-volatile storage medium provided in an embodiment of this specification. DETAILED DESCRIPTION

[0057] The embodiments of this specification provide a family service support method, device and medium based on a large language model.

[0058] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0059] like Figure 1 As shown, in the embodiment of this specification, a schematic diagram of a family service support method based on a large language model is provided, which comprises Figure 1 It can be seen that in one or more embodiments of this specification, a family service support method based on a large language model includes:

[0060] S101: Processing an original service document based on a preset vectorization processing engine to obtain a vectorization index table corresponding to the document content of the original service document.

[0061] In order to be able to obtain authoritative and accurate answers to relevant questions encountered in family service practice in a timely and convenient manner, avoid the problems of limited query scope and mismatched reference content in existing methods. In the embodiment of this specification, the original service document will first be processed based on the preset vectorized processing engine to obtain the vectorized index table corresponding to the document content of the original service document. The vectorized index table obtained through this process stores the document content in the original service document in the form of vectors. This storage method optimizes the organization and access path of the data. It is convenient to accelerate the data processing process and reduce data access latency through subsequent vector calculations. In addition, in traditional database queries, data is usually processed in a row-by-row manner, which easily leads to low effective utilization of the CPU and limited query performance. The vectorized processing engine in this specification can save storage space and reduce storage costs by compressing and optimizing storage of data, and it also helps to improve query performance by processing multiple data rows at one time.

[0062] Specifically, in one or more embodiments of the present specification, the original document is processed based on a preset vectorization processing engine to obtain a vectorization index table corresponding to the document content of the original document, which specifically includes the following process:

[0063] First of all, it should be noted that before processing the original document based on the preset vectorization processing engine and obtaining the vectorization index table corresponding to the document content of the original document, it is also necessary to obtain the corresponding original document. That is, through the data source corresponding to each family service scenario, the corresponding original document is collected. Among them, the data source can be obtained through various channels, such as the database of the family service platform, the record system of practitioners, the publication of professional organizations, etc., and in order to ensure the integrity of the original document, the data will be verified and unified. In addition, it should be noted that the original document includes: Figure 2 The dynamic documents generated based on the operation records shown are, for example, the records of practitioners in the actual use process, dynamic content reviewed by experts, and static documents recording technical specifications, for example, authoritative technical standards, operation specifications, and formal teaching materials of the home service industry. In this process, the corresponding original documents are collected through the data source corresponding to the home service scenario as the basis for subsequent analysis, ensuring the richness and accuracy of the original documents. The original documents from multiple sources also avoid the problem of automatic query of text materials within a limited range and the problem of incomplete reference content when querying based on search engines.

[0064] After obtaining the original document, each original document will be preprocessed based on the preset natural language processing technology to obtain the word segmentation data corresponding to the document content of each original document. Then, the word segmentation data can be feature extracted through the preset word bag model to determine the document features of each original document, that is, the document is regarded as an unordered vocabulary set, and the feature vector is constructed by counting the frequency of each word in the document, and the selection of feature words can be determined by evaluating the importance of the vocabulary in the document through word frequency-inverse document frequency. Then, the document features are vectorized based on the preset vectorization processing engine to obtain the vector representation of the original document; wherein, it should be noted that the preset vectorization processing engine can be obtained based on deep learning models such as Word2Vec, BERT, etc., or based on vectorization methods such as cosine similarity, Jaccard similarity, etc. The document identifier of each original document and the vector representation of the original document are then stored in the preset vectorization index table to determine the vectorization index table corresponding to the document content of the original document.

[0065] Through the automated vectorization process of the above process, a large number of original documents can be quickly converted into vector forms that are easy for computers to process, thereby accelerating subsequent information retrieval, classification, clustering and other tasks. In this process, after natural language preprocessing and feature extraction, the original documents can more accurately reflect the essential characteristics of the document content and avoid the semantic ambiguity that may occur in traditional text processing. In addition, through automated processing, the workload of existing practitioners for manual retrieval and screening based on search engines is reduced, reducing labor costs and improving processing speed.

[0066] S102: Processing the current user question by means of the preset vectorization processing engine, and acquiring the document content corresponding to the processed current user question based on the vectorization index table.

[0067] After the vectorized index table corresponding to the document content of the original service document is obtained based on the above step S101, Figure 2 As shown, when practitioners need a standard reference for training or home service, they will raise the current user question, and then process the current user question through the vectorization processing engine, so as to query the document content corresponding to the processed current user question according to the vectorization index table obtained above. That is, this process corresponds to Figure 4 The vector database query module shown, after receiving the query statement from the client, that is, the current user question, will perform vectorization conversion, and then query the vectorization index table in the vector database to obtain document content with similar semantics.

[0068] In this process, the current user question is processed by a preset vectorization processing engine, and it is compared with the document content vector in the vectorization index table, so that the document content most relevant to the user question can be quickly found. This method avoids the large number of irrelevant results that may be brought about by the traditional keyword matching information retrieval method, and improves the retrieval efficiency. In addition, because vectorization processing can capture the semantic relationship between words, based on the above method, even if the expression of the current user question is not completely consistent with the expression in the original document, as long as they are semantically similar, the system can still find relevant document content. This precise matching result helps to improve service quality, quickly find training materials, service standards or operating specifications related to the current user question, and avoids the problem of low and incomplete document content matching obtained by querying based on human experience.

[0069] Furthermore, in one or more embodiments of the present specification, before processing the current user question by the preset vectorization processing engine and obtaining the document content corresponding to the processed current user question based on the vectorization index table, the method further includes the following process:

[0070] First, in order to provide a user-friendly query method for practitioners who are not good at typing, a corresponding method is provided, such as Figure 4 The input modes of the voice and text interaction module shown include: voice input and text input. Therefore, in order to process user questions of different input modes based on different processes, it is necessary to determine the input mode of the current user question. If the input mode is determined to be voice input, a voice signal is obtained based on a preset acquisition device, and the voice signal is preprocessed to obtain a voice signal to be recognized. Then, a preset conversion engine such as an ASR local engine, a TTL local engine, etc. is used to identify the voice signal to be recognized, and the voice signal to be recognized is converted into a text version of the current user question based on the preset conversion engine, so that the text expression of the current user question is sent to the server through the session control function, so that the server can execute the call of the corresponding vectorization processing interface to perform vectorization processing on the current user question through the preset vectorization processing engine, so as to facilitate the query of the document content that matches the semantics of the current user question based on the vectorization index table. In this process, the interaction between the user and the system is made more intuitive and flexible by adding a voice and text interaction module and a corresponding processing flow. The user can directly express his needs through voice, and the system can respond immediately. This instant feedback mechanism enhances the interactivity between the user and the system.

[0071] Specifically, in one or more embodiments of the present specification, the current user question is processed by a preset vectorization processing engine, and the document content corresponding to the processed current user question is obtained based on the vectorization index table, specifically including:

[0072] First, the current user question is processed by a preset vectorization processing engine to obtain a vector representation corresponding to the current user question as the processed current user question. Then, based on the processed current user question, similarity calculation is performed with the vector representation of the original document in the vectorization index table to determine the semantic similarity between the processed current user question and each of the original documents. Based on the semantic similarity, the query determines the document content corresponding to the processed current user question. Based on this process, the document content with high similarity to the processed current user question can be determined based on the semantic similarity as the corresponding document content. This avoids the problem that it is difficult to compare the document weights of independent natural language records in the existing method, resulting in poor matching results. By using the vectorization processing engine, both the user question and the original document are converted into vector representations, so that the semantic similarity can be quantified by calculating the similarity between vectors. This method can better capture the semantic relationship between texts than the traditional keyword matching method, thereby improving the accuracy of the query. And matching based on vector calculation improves the matching speed compared with the existing string matching method, reduces the query time, and effectively improves the response speed of the system. And this process avoids the problem that it is difficult to compare the document weights of independent natural language records in the existing method. Through vectorized representation and similarity calculation, documents can be automatically sorted and selected based on semantic similarity without manually setting weights.

[0073] S103: Determine the current home service scenario corresponding to the current user question through the corresponding document content, so as to call a prompt word template of the current home service scenario.

[0074] After the corresponding document content is obtained based on the above step S102, the current home service scenario corresponding to the current user's question is determined, so as to call out the prompt word template of the current home service scenario. That is, according to different scenarios, targeted prompt word templates are designed, and the corresponding classification models are trained to select different templates to more effectively exert the capabilities of the large language model, thereby obtaining answers that are more targeted to the problem scenario, which helps to meet the problem needs of different types of users in different scenarios.

[0075] Specifically, in one or more embodiments of the present specification, the current home service scenario corresponding to the current user question is determined through the corresponding document content to call the prompt word template of the current home service scenario, which specifically includes the following process:

[0076] Determine the characteristic keywords corresponding to each family service scenario, and perform semantic analysis on the corresponding document content based on the preset natural language processing technology to match the corresponding document content with the characteristic keywords. Then, based on the matching results, determine the current family service scenario corresponding to the current user question. It should be noted that the current family service scenario includes: business scenario and operation scenario. Then, Figure 3 As shown, in the prompt word template library, according to the business scenario and the operation scenario, the multi-version prompt word template corresponding to the current home service scenario is called. The timestamp corresponding to the current user's question is determined, and the multi-version prompt word template is filtered according to the timestamp to obtain the prompt word template of the current home service scenario. For example, assume a home service scenario, such as "information query" (such as querying weather and schedule), "troubleshooting" (such as diagnosis when the device does not work properly), etc. Each scenario has its own specific prompt word template to guide users to express their needs more clearly or provide solutions. Keywords for business scenario information query: weather, time, schedule, keywords for troubleshooting: fault, non-working, repair; operation scenario: bedroom keywords: bedroom, bed, bedside lamp, living room keywords: living room, TV, sofa, air conditioner. If the current user question is "Why is the air conditioner in the living room not running?", the key information in the document content is analyzed through the preset natural language processing technology: "living room", "air conditioner", "non-operating". The analyzed key information is matched with the predefined feature keywords. "Living room" is matched to "living room" in the operation scenario. "Air conditioning" and "not running" match "equipment" and "troubleshooting" in the business scenario. At this time, based on the comprehensive matching results, it is determined that the home service scenario corresponding to the current user's question is "equipment troubleshooting" under "living room". According to the determined business scenarios and operation scenarios, the corresponding multi-version prompt word templates are called. For example, for "bedroom equipment troubleshooting", there may be multiple versions of prompt word templates, such as "Please check whether the XX device in the bedroom is powered on", "Try to restart the XX device in the bedroom", etc. Assuming that the system records the effective time or version update time of each prompt word template, and determines the timestamp of the user's question, such as "2024-10-0514:30", then filter out the latest or most appropriate prompt word template based on the timestamp.

[0077] In the above process, by matching the characteristic keywords with the document content, the home service scenarios of the user's questions, including business scenarios and operation scenarios, can be more accurately identified. This precise matching ensures that the system can call the prompt word template that best meets the user's needs, thereby providing more accurate services. Using multiple versions of prompt word templates and filtering according to timestamps can ensure that the user receives the latest and most current prompt information. This not only improves the timeliness of the service, but also enables users to understand and solve problems more easily, thereby enhancing the user experience. In addition, it should be noted that the method provided in the embodiments of this specification can support dialects and expression terms and methods with domain characteristics in different regions through different prompt word templates, and actively confirm problems such as unclear expression and inaccurate understanding such as repeated content and too many function words to clarify the user's intention; for complex scenarios and problems, it supports multiple rounds of questions and answers that maintain context.

[0078] S104: parsing the corresponding document content and the current user question based on the prompt word template, generating a preset large language model for inputting the prompt word question, obtaining answer data, and outputting the answer data through a corresponding output template.

[0079] According to the prompt word template, the corresponding document content and the current user question are parsed, and the prompt word question is generated and input into the preset large language model to obtain the answer data, and then the answer data is output through the corresponding output template. In this process, the prompt word template can be flexibly adjusted according to different user questions and document contents, so that the preset large language model can accurately capture the core points of the user question based on the prompt word generated by the prompt word template, give the correct answer to the current user question, and improve the accuracy and reliability of the answer data.

[0080] Specifically, in one or more embodiments of the present specification, the corresponding document content and the current user question are parsed based on the prompt word template, a prompt word question is generated, a preset large language model is input, and answer data is obtained, which specifically includes the following process:

[0081] First, the prompt word template is parsed to determine the storage position corresponding to each blank storage unit in the prompt word template, and the storage attribute corresponding to each storage position in each prompt word template is determined. Then, the corresponding document content and the corresponding content of the current user question are matched according to the storage attribute, so that the corresponding content of the document content and the current user question are filled into the prompt word template to obtain the initial prompt word question. In this process, the prompt word template is parsed to clarify the position and storage attribute of each blank storage unit, so that the information extracted from the document content and the current user question is more accurate. This helps to ensure that the information input into the preset large language model is accurate and relevant, thereby improving the accuracy of answering questions. Then, the remaining corresponding content that is not filled into the prompt word template in the corresponding content of the document content and the current user question is determined. The context content of the remaining corresponding content is obtained. If it is determined that the context content is associated with the corresponding content filled into the prompt word template, the remaining corresponding content is determined to be the corresponding content to be filled. Then, according to the corresponding content associated with the corresponding content to be filled and the storage attribute corresponding to the corresponding content to be filled, the newly added storage position of the initial prompt word question is determined, so that the corresponding content to be filled is filled into the newly added storage position to obtain the prompt word question. The prompt word question is input into the preset large language model, and the answer question is obtained according to the preset large language model analysis. In this process, not only the direct corresponding content in the prompt word template is filled, but also the remaining corresponding content and its context are considered. By judging the relevance of the context content and the filled content, the content to be filled is determined, and the new storage location is added accordingly, thereby enhancing the completeness and coherence of the question. This helps the preset large language model better understand the question context and give a more comprehensive answer.

[0082] Specifically, in one or more embodiments of the present specification, the answer data is output through a corresponding output template, which specifically includes the following process:

[0083] First, the type of question corresponding to the current user question is determined by matching the current user question and answer data with the preset nature word library. The preset nature word library contains various keywords, phrases or patterns related to the user question, which are used to identify the nature or type of the user question. The question types include: consultation type, planning type, and help type. Then, the output template corresponding to the answer data is determined according to the question type, so that the answer data is formatted based on the output template, and the processed answer data is output. It can be understood that the output template is preset and is used to format the answer data into a specific form so that the user can more easily understand and use the information. Different output templates may have different characteristics and format requirements to adapt to different types of questions and answers. For example, the answer of the consultation type may focus more on providing detailed information and explanations; the answer of the planning type may need to show a clear step or plan; and the answer of the help type may need to emphasize solutions or action suggestions. After selecting a suitable output template, the system will format the answer data according to the requirements of the template. The formatted answer data will eventually be output to the user. By presetting multiple output templates in this process, the system can flexibly adapt to different types of questions and answer requirements, which helps to improve the system's scalability and ability to deal with complex problems.

[0084] In addition, in order to continuously increase the base class of professional data through continuous use and iteration, in one or more embodiments of the present specification, after the answer data is output through the corresponding output template, the method further includes the following process:

[0085] The output result output by the above output template is obtained, so as to construct a new sample pair according to the output result and the current user question. Then, the new sample pair is used as a new sample of the preset large language model, and is stored in the sample set corresponding to the preset large language model to obtain an updated sample set, so as to iteratively train the preset large language model based on the updated sample set. Through this process, the preset large language model can be updated in a closed loop, thereby improving the reliability and accuracy of the answer data. In this process, by presetting a variety of output templates, the system can flexibly adapt to different types of questions and answer requirements. This helps to improve the scalability of the system and its ability to deal with complex problems. And as the sample set is continuously updated and expanded, the preset large language model can be exposed to more diverse user questions and answer data. This helps the model learn more patterns and features, thereby improving its generalization ability.

[0086] like Figure 5 As shown, the embodiment of this specification provides a schematic diagram of the structure of a home service support device based on a large language model. Figure 5It can be seen that in one or more embodiments of this specification, a family service support device based on a large language model includes:

[0087] at least one processor; and,

[0088] a memory communicatively connected to the at least one processor; wherein,

[0089] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.

[0090] like Figure 6 As shown, the embodiment of this specification provides a schematic diagram of a non-volatile storage medium structure, which is composed of Figure 6 It can be seen that in one or more embodiments of the present specification, a non-volatile storage medium stores computer-executable instructions, and the computer-executable instructions can: execute any of the methods described above.

[0091] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0092] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0093] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.

Claims

1. A family service support method based on a large language model, characterized in that: The method comprises: Processing the original service document based on a preset vectorization processing engine to obtain a vectorization index table corresponding to the document content of the original service document; Processing the current user question by means of the preset vectorization processing engine, and acquiring the document content corresponding to the processed current user question based on the vectorization index table; Determine the current home service scenario corresponding to the current user question through the corresponding document content, so as to call the prompt word template of the current home service scenario; The corresponding document content and the current user question are parsed based on the prompt word template, a preset large language model for inputting the prompt word question is generated, and answer data is obtained, so that the answer data is output through the corresponding output template.

2. A family service support method based on a large language model according to claim 1, characterized in that: The processing of the original document based on the preset vectorization processing engine to obtain a vectorization index table corresponding to the document content of the original document specifically includes: Preprocessing each of the original documents based on a preset natural language processing technology to obtain word segmentation data corresponding to the document content of each of the original documents; Performing feature extraction on the word segmentation data based on a preset bag-of-words model to determine document features of each of the original documents, and performing vectorization processing on the document features based on a preset vectorization processing engine to obtain a vector representation of the original document; The document identifier of each original document and the vector representation of the original document are stored in a preset vectorization index table to determine the vectorization index table corresponding to the document content of the original document; Preferably, before the original document is processed based on a preset vectorization processing engine to obtain a vectorization index table corresponding to the document content of the original document, the method further includes: The corresponding original documents are collected through the data sources corresponding to each family service scenario; wherein the original documents include: dynamic documents generated based on operation records and static documents recording technical specifications.

3. A family service support method based on a large language model according to claim 1, characterized in that: Before processing the current user question by the preset vectorization processing engine and acquiring the document content corresponding to the processed current user question based on the vectorization index table, the method further includes: Determine the input method of the current user question; wherein the input method includes: voice input and text input; If it is determined that the input mode is voice input, a voice signal is acquired based on a preset acquisition device, and the voice signal is preprocessed to obtain a voice signal to be recognized; The voice signal to be recognized is recognized based on a preset conversion engine, and the voice signal to be recognized is converted into the current user question; wherein the preset conversion engine includes: an ASR local engine and a TTL local engine.

4. A family service support method based on a large language model according to claim 2, characterized in that: Processing the current user question by the preset vectorization processing engine, and acquiring the document content corresponding to the processed current user question based on the vectorization index table, specifically includes: Processing the current user question by the preset vectorization processing engine to obtain a vector representation corresponding to the current user question as the processed current user question; Based on the processed current user question, similarity calculation is performed with the vector representation of the original document in the vectorized index table to determine the semantic similarity between the processed current user question and each of the original documents; Based on the semantic similarity, the query determines the document content corresponding to the processed current user question.

5. A family service support method based on a large language model according to claim 1, characterized in that: Determining the current home service scenario corresponding to the current user question through the corresponding document content to call the prompt word template of the current home service scenario specifically includes: Determine the characteristic keywords corresponding to each of the family service scenarios, and perform semantic analysis on the corresponding document content based on a preset natural language processing technology to match the corresponding document content with the characteristic keywords; Based on the matching result, determine the current home service scenario corresponding to the current user question; wherein the current home service scenario includes: a business scenario and an operation scenario; According to the business scenario and the operation scenario, calling a multi-version prompt word template corresponding to the current family service scenario; Determine the timestamp corresponding to the current user question, and filter the multiple versions of prompt word templates based on the timestamp to obtain the prompt word template for the current home service scenario.

6. A family service support method based on a large language model according to claim 1, characterized in that: Parsing the corresponding document content and the current user question based on the prompt word template, generating a prompt word question input preset large language model, and obtaining answer data specifically includes: Parsing the prompt word template to determine the storage location corresponding to each blank storage unit in the prompt word template, and determining the storage attribute corresponding to each storage location in each prompt word template; Matching the corresponding document content with the corresponding content of the current user question according to the storage attribute, so as to fill the corresponding content of the document content with the current user question into the prompt word template to obtain an initial prompt word question; Determine the remaining corresponding content of the document content and the current user question that is not filled into the prompt word template; Acquire the context content of the remaining corresponding content, and if it is determined that the context content is associated with the corresponding content filled into the prompt word template, determine that the remaining corresponding content is the corresponding content to be filled; Determine a newly added storage location of the initial prompt word question according to the corresponding content associated with the corresponding content to be filled and the storage attribute corresponding to the corresponding content to be filled, so as to fill the corresponding content to be filled into the newly added storage location to obtain the prompt word question; The prompt word question is input into the preset large language model to obtain an answer question based on the preset large language model analysis.

7. A family service support method based on a large language model according to claim 1, characterized in that: Outputting the answer data through the corresponding output template specifically includes: Based on the matching result between the current user question and the answer data and the preset property word library, determine the question type corresponding to the current user question; wherein the question type includes: consultation type, planning type, and help type; An output template corresponding to the answer data is determined according to the question type, so that the answer data is formatted based on the output template and the processed answer data is output.

8. The family service support method based on a large language model according to claim 1, characterized in that: After outputting the answer data through the corresponding output template, the method further includes: Obtaining an output result output by the output template, so as to construct a new sample pair according to the output result and the current user question; The newly added sample pairs are used as newly added samples of the preset large language model and stored in a sample set corresponding to the preset large language model to obtain an updated sample set, so as to iteratively train the preset large language model based on the updated sample set.

9. A family service support device based on a large language model, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: execute any of the methods described in claims 1-8.

10. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions can: execute the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Document generation system, method and equipment based on knowledge base and large model and medium

    CN117556010A

  • Intelligent document implementation method and device based on large model, equipment and medium

    CN117573857A

  • Policy question and answer method and system based on large language model and knowledge graph technology

    CN117725170A

  • Vector database retrieval method and device based on large model, terminal and medium

    CN118312594A

  • Dam emergency response rule question and answer recommendation system construction method based on large language model

    CN118332076A

Cited By

  • Synthetic data set construction method and electronic equipment

    CN120975247A