Information processing method, system and device based on language chain knowledge base and medium

Through the information processing method based on the language chain knowledge base, the problem of low accuracy of information output by the intelligent voice system is solved, personalized emotional companionship and mental health support are realized, and the health level of the elderly is improved.

CN119337925APending Publication Date: 2025-01-21PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411359198.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing intelligent voice systems have low accuracy when outputting information, especially in the fields of emotional companionship and mental health, and cannot achieve personalized companionship and care, resulting in a reduced user experience.

Method used

Using an information processing method based on the language chain knowledge base, the input information of the elderly (including text, voice, pictures, videos, etc.) is obtained, converted into text information, emotional information is extracted, and the preset prompt template is filled in to generate prompts. command, input the Chat-GLM language model combined with the Langchain knowledge base to generate personalized output information for the elderly.

Benefits of technology

It improves the accuracy of the information output by the intelligent voice system, provides personalized emotional companionship and mental health support, and improves the mental and physical health of the elderly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337925A_ABST
    Figure CN119337925A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, in particular to an information processing method and system based on a language chain knowledge base and a related device. The method comprises the following steps: acquiring input information of old people, wherein the input information comprises but is not limited to at least one of character input information, voice input information, picture input information and video input information; converting the input information into text information, and extracting emotion information according to the input information; filling the text information and the emotion information into a preset prompt template to generate a prompt command; and inputting the prompt command into a Chat-GLM language model combined with a Langchain knowledge base to generate output information aiming at the input information of the old people, so as to avoid the problem that the old people are lack of accompanying and nursing and improve the psychological and physical health of the old people.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to an information processing method, system, device, computer equipment and computer-readable storage medium based on a language chain knowledge base. Background Art

[0002] With the trend of social aging, the number of elderly people is gradually increasing. The health management and life care of the elderly have become an increasingly important social issue. Many elderly people may face the problem of lack of companionship and care if they are only children. This situation may lead to problems in the mental and physical health of the elderly.

[0003] In recent years, with the development of artificial intelligence and Internet of Things technologies, intelligent accompanying systems have gradually become an effective solution. These systems can provide comprehensive support and services to the elderly in many aspects by integrating a variety of intelligent devices and technologies. However, there is currently a lack of intelligent voice systems for the elderly on the market, and the accuracy of output information is low, especially systems that focus on emotional companionship and mental health. Ordinary large-model voice systems cannot achieve personalized companionship and care, which reduces the user experience.

[0004] Therefore, how to solve the problem of low accuracy of information output by current intelligent voice systems in order to improve the mental and physical health of the elderly has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The main purpose of the present invention is to provide an information processing method, system and related devices based on a language chain knowledge base, aiming to solve the problem that the accuracy of information output by the current intelligent voice system is low.

[0006] To achieve the above object, the present invention provides an information processing method based on a language chain knowledge base, the information processing method based on a language chain knowledge base comprising the following steps:

[0007] Acquire input information from the elderly, the input information including but not limited to at least one of the following: text input information, voice input information, picture input information, and video input information;

[0008] Converting the input information into text information, and extracting emotional information based on the input information;

[0009] Filling the text information and the emotion information into a preset prompt template to generate a prompt command;

[0010] The prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

[0011] In addition, to achieve the above-mentioned purpose, the present invention further provides an information processing device based on a language chain knowledge base, the information processing device based on a language chain knowledge base comprising:

[0012] An elderly input information acquisition module is used to acquire the elderly input information, wherein the input information includes but is not limited to at least one of the following: text input information, voice input information, picture input information, and video input information;

[0013] An input-to-text module, used to convert the input information into text information;

[0014] An emotional information extraction module, used to extract emotional information according to the input information;

[0015] A prompt command generating module, used for filling the text information and the emotion information into a preset prompt template to generate a prompt command;

[0016] The language model output module is used to input the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

[0017] In addition, to achieve the above-mentioned purpose, the present invention further provides an information processing system based on a language chain knowledge base, the information processing system based on a language chain knowledge base comprising:

[0018] An elderly input information acquisition unit, used to acquire the elderly input information, the input information includes but is not limited to at least one of the following: text input information, voice input information, picture input information, video input information;

[0019] An input-to-text unit, used to convert the input information into text information;

[0020] An emotional information extraction unit, used to extract emotional information according to the input information;

[0021] A prompt command generating unit, used for filling the text information and the emotion information into a preset prompt template to generate a prompt command;

[0022] The language model output unit is used to input the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

[0023] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes a processor, a memory, and an information processing program based on a language chain knowledge base stored in the memory and executable by the processor, wherein when the information processing program based on the language chain knowledge base is executed by the processor, the steps of the information processing method based on the language chain knowledge base as described above are implemented.

[0024] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which is stored an information processing program based on a language chain knowledge base, wherein when the information processing program based on the language chain knowledge base is executed by a processor, the steps of the information processing method based on the language chain knowledge base as described above are implemented.

[0025] The present application provides an information processing method, system and related devices based on the Langchain knowledge base, which obtains input information from the elderly, and the input information includes but is not limited to at least one of the following: text input information, voice input information, picture input information, video input information; converts the input information into text information, and extracts emotional information based on the input information; fills the text information and the emotional information into a preset prompt template to generate a prompt command; and inputs the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly. Through the above method, the input information of the elderly can be converted into text information and emotional information can be extracted based on the input information, so as to facilitate the subsequent output information based on the two. Therefore, the output information is output for different emotional information, rather than a general large model output for no specific group of people, so as to provide emotional value for the elderly, so that they can feel the warmth of humanity, get companionship and care, which is conducive to improving the mental and physical health of the elderly; at the same time, the text information and the emotional information are filled into the preset prompt template to generate a prompt command as the Chat-GLM language model combined with the Langchain knowledge base, rather than directly as the input of the Chat-GLM language model combined with the Langchain knowledge base, which can make it more in line with the input rules of the Chat-GLM language model combined with the Langchain knowledge base, so that the output information obtained is more accurate, so as to better take care of the mental and physical health of the elderly based on the output information. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flowchart of the first embodiment of the information processing method based on the language chain knowledge base of the present invention;

[0027] Figure 2 It is a flowchart of a second embodiment of the information processing method based on a language chain knowledge base of the present invention;

[0028] Figure 3 The embodiment of the present application provides a functional module diagram of an information processing device based on a language chain knowledge base;

[0029] Figure 4 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.

[0030] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0032] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0033] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0034] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0035] The gateway platform-based traffic switching method involved in the embodiment of the present invention is mainly applied to computer equipment. The gateway platform-based traffic switching generating device can be a PC, a portable computer, a mobile terminal, or other device with display and processing functions.

[0036] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0037] Reference Figure 1 , Figure 1 It is a flowchart of the first embodiment of the information processing method based on the language chain knowledge base of the present invention.

[0038] like Figure 1 As shown, an embodiment of the present invention provides an information processing method based on a language chain knowledge base. The information processing method based on a language chain knowledge base includes steps S101 to S105.

[0039] In this embodiment, the information processing method based on the language chain knowledge base includes the following steps:

[0040] Step S101, obtaining input information of the elderly, wherein the input information includes but is not limited to at least one of the following: text input information, voice input information, picture input information, and video input information.

[0041] The text input information may be input by the elderly through a text input device. A text input device refers to various hardware devices used to input text into a computer or other electronic device. These devices enable the elderly to input text into the system quickly and easily. Such devices include keyboards, mice, touch screens, handwriting tablets, and touch pads.

[0042] For some elderly people who are illiterate or have physical defects that make it inconvenient for them to directly input text, their input information can also be voice input information, picture input information, video input information, etc., and then the non-text input information can be converted into text information through information conversion technology.

[0043] Step S102: convert the input information into text information.

[0044] In one embodiment of the present application, the input information is voice input information, and the converting the input information into text information includes:

[0045] The voice input information is converted into text information according to automatic voice recognition technology.

[0046] Among them, Automatic Speech Recognition (ASR) is a technology that converts human speech into text. The ASR system first receives voice input from a microphone or other recording device, and converts the original audio signal into a feature representation that can be understood and processed by a computer, such as Mel-frequency cepstral coefficients (MFCCs); then uses a statistical acoustic model, such as a hidden Markov model (HMM) or a deep neural network (DNN) to extract features that correspond to sound units (such as phonemes); then uses N-gram models or more complex recurrent neural networks (RNN) and other technologies based on context to improve recognition accuracy; finally, the acoustic model and language model are combined to map the audio features to the corresponding text sequence to complete the conversion of speech to text.

[0047] Step S103: Extract sentiment information based on the input information.

[0048] Specifically, the categories of sentiment information can include positive, negative, or neutral. The extraction of sentiment information based on the input information includes: converting the speech input information into text information according to automatic speech recognition technology; performing word segmentation on the text information to break it down into words or phrases; removing stop words in the words or phrases, such as removing common stop words like "de", "shi", "zai", etc.; restoring the words or short sentences after removing stop words to their basic forms to obtain preprocessed text; extracting features from the preprocessed text. Common feature extraction methods include: Bag of Words (BoW), Term Frequency-Inverse Document Frequency (TF-IDF), Word Embeddings, etc.; selecting a suitable sentiment analysis model for training and prediction based on the extracted features. Common models include: rule-based models, machine learning models, deep learning models, etc.

[0049] Among them, the rule-based model: uses predefined rules and sentiment lexicons; machine learning models: such as Naive Bayes, Support Vector Machine (SVM), etc.; deep learning models: such as Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), etc.

[0050] Step S104: Fill the text information and the sentiment information into a preset prompt template to generate a prompt command.

[0051] Among them, in computer science and natural language processing, a prompt usually refers to an initial prompt or input requirement given to the user to enable the user to perform the next operation.

[0052] Among them, prompt templates refer to text structures used in natural language processing (NLP) and generative AI to guide the model to generate specific types or contents of text. These templates usually contain some fixed formats and variables for users to fill and adjust according to specific needs. Among them, common types of prompt templates can include: descriptive prompt templates, question-and-answer prompt templates, creative prompt templates, summary prompt templates.

[0053] For example, the prompt template can be defined in advance as:

[0054] prompt = PromptTemplate(input_variables=["text"], template = template)

[0055] Among them, text is used to fill in the text information converted according to the input information of the elderly, and template is used to record the emotional information extracted according to the input information.

[0056] The prompt command is a prompt filled in according to the preset prompt template. For example, if the text is "what medicine to take at noon" and the template is "anxious", the prompt command is:

[0057] prompt=PromptTemplate(input_variables=[“What medicine to take at noon”], template=anxious).

[0058] Step S105: input the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

[0059] Specifically, after the prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base, the Chat-GLM language model combined with the Langchain knowledge base can search from the Langchain knowledge base to find a question statement with a high similarity to the prompt command, and then use the answer statement corresponding to the question statement as the output information of the prompt command; it can also be to directly extract information from the Langchain knowledge base as the output information of the prompt command.

[0060] It should be noted that step S102 and step S103 may be performed simultaneously, or step S102 may be performed first and then step S103, or step S103 may be performed first and then step S102, which is not limited here.

[0061] It can be seen that in the embodiment of the present application, by obtaining the input information of the elderly, the input information includes but is not limited to at least one of the following: text input information, voice input information, picture input information, video input information; converting the input information into text information, and extracting emotional information based on the input information; filling the text information and the emotional information into a preset prompt template to generate a prompt command; inputting the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly. Through the above method, the input information of the elderly can be converted into text information and emotional information can be extracted based on the input information, so as to facilitate the subsequent output information based on the two. Therefore, the output information is output for different emotional information, rather than a general large model output for no specific group of people, so as to provide emotional value for the elderly, so that they can feel the warmth of humanity, get companionship and care, which is conducive to improving the mental and physical health of the elderly; at the same time, the text information and the emotional information are filled into the preset prompt template to generate a prompt command as the Chat-GLM language model combined with the Langchain knowledge base, rather than directly as the input of the Chat-GLM language model combined with the Langchain knowledge base, which can make it more in line with the input rules of the Chat-GLM language model combined with the Langchain knowledge base, so that the output information obtained is more accurate and can better take care of the mental and physical health of the elderly.

[0062] Furthermore, the information processing method based on the language chain knowledge base also includes:

[0063] Extracting voiceprint information according to the voice input information;

[0064] Identifying identity information according to the voiceprint information;

[0065] Determine whether the identity information exists in the database;

[0066] If the identity information exists in the database, the historical records are extracted according to the identity information.

[0067] Inputting the prompt command into the Chat-GLM language model combined with the Langchain knowledge base, the Chat-GLM language model searches the Langchain knowledge base according to the historical records and the prompt command to generate a text answer to the input information of the elderly;

[0068] The text answer is converted into voice output information according to text-to-speech technology.

[0069] Voiceprint information refers to information that identifies or verifies a person's identity by analyzing their voice characteristics. Voiceprint is a unique identifier composed of the physical characteristics of sound, similar to a fingerprint, and can be used as a personal identification. Voiceprint recognition technology confirms the speaker's identity by analyzing the speaker's voice characteristics, such as timbre, pitch, speaking speed, etc.

[0070] Among them, historical records refer to the chat records between individuals and the system, and voiceprint recognition technology can be used to obtain personal information; each conversation will be saved in the database.

[0071] It can be seen that in the embodiment of the present application, voiceprint information is extracted according to voice input information; identity information is identified according to voiceprint information; it is determined whether the identity information exists in the database; if the identity information exists in the database, the historical record is extracted according to the identity information; the prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base, and the Chat-GLM language model searches in the Langchain knowledge base according to the historical record and the prompt command to generate a text answer to the input information of the elderly; the text answer is converted into speech output information according to the text-to-speech technology. The above method makes secondary use of the voice input information, not only identifying the content of its expression, but also identifying the way of its expression, which is conducive to extracting historical records according to the identified identity information, and then the Chat-GLM language model combined with the Langchain knowledge base can generate a text answer to the input information of the elderly according to the extracted historical records and the prompt command. In this way, the Chat-GLM language model combined with the Langchain knowledge base is not only obtained according to the prompt command, but also includes the historical record, which is convenient for connecting the context, and / or generating a text answer to the input information of the elderly according to the previous historical data, so that the generated text answer is more accurate.

[0072] Furthermore, the information processing method based on the language chain knowledge base also includes:

[0073] If the identity information does not exist in the data knowledge base, a new historical record is created in the database, and the emotion information and the identity information are associated and recorded in the newly created historical record;

[0074] The prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base, and the Chat-GLM language model searches the Langchain knowledge base according to the prompt command to generate a text answer to the input information of the elderly.

[0075] It can be seen that in the embodiment of the present application, if there is no identity information in the data knowledge base, the prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base, and the Chat-GLM language model searches the Langchain knowledge base according to the prompt command to generate a text answer to the input information of the elderly. In this way, even in the absence of historical records, a text answer to the input information of the elderly can be generated by the Chat-GLM language model combined with the Langchain knowledge base.

[0076] In addition, if the identity information does not exist in the data knowledge base, a new historical record is created in the database, and the emotional information and the identity information are associated and recorded in the newly created historical record, so that the next time the same elderly person is provided with intelligent companionship, the historical record can be extracted, and the Chat-GLM language model combined with the Langchain knowledge base can be used to extract the historical record based on the identified identity information to generate a text answer to the elderly person's input information. In this way, the Chat-GLM language model combined with the Langchain knowledge base is not only obtained based on the prompt command, but also includes the historical record, which is convenient for connecting the context, and / or generating a text answer to the elderly person's input information based on previous historical data, so that the generated text answer is more accurate.

[0077] Furthermore, before the prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly, the information processing based on the Langchain knowledge base also includes:

[0078] Acquire training data, the training data including but not limited to at least one of the following: books on companionship for the elderly, books on mental health for the elderly, books on nursing care for the elderly, and a collection of real tender dialogues;

[0079] Convert the training data into the Langchain knowledge base document;

[0080] The Langchain knowledge base document is passed into the Chat-GLM language model for training to obtain the Chat-GLM language model combined with the Langchain knowledge base. The Chat-GLM language model combined with the Langchain knowledge base focuses on the companionship and care of the elderly.

[0081] It can be seen that in the embodiment of the present application, the training data of the Chat-GLM language model combined with the Langchain knowledge base includes: elderly companion corpus books, elderly mental health books, elderly care books and real tender dialogue sets. This can improve the professionalism of the Chat-GLM language model combined with the Langchain knowledge base and make the answer sentences it outputs more accurate.

[0082] Reference Figure 2 , Figure 2 It is a flowchart of the second embodiment of the information processing method based on the language chain knowledge base of the present invention.

[0083] like Figure 2 As shown, an embodiment of the present invention provides an information processing method based on a language chain knowledge base. The information processing method based on a language chain knowledge base includes steps S201 to S213.

[0084] Step S201, obtaining training data, wherein the training data includes but is not limited to at least one of the following: books on companionship for the elderly, books on mental health for the elderly, books on nursing care for the elderly, and a collection of real tender dialogues.

[0085] Step S202: convert the training data into the Langchain knowledge base document.

[0086] Step S203: pass the Langchain knowledge base document into the Chat-GLM language model for training to obtain the Chat-GLM language model combined with the Langchain knowledge base. The Chat-GLM language model combined with the Langchain knowledge base focuses on the companionship and care of the elderly.

[0087] Step S204: obtaining input information of the elderly, wherein the input information is voice input information.

[0088] Step S205: convert the voice input information into text information according to automatic speech recognition technology.

[0089] Step S206, extracting voiceprint information according to the voice input information.

[0090] Step S207: identifying identity information and extracting emotion information based on the voiceprint information.

[0091] Step S208: Fill the text information and the emotional information into a preset prompt template to generate a prompt command.

[0092] Step S209: Determine whether the identity information exists in the database.

[0093] Step S210: If the identity information exists in the database, extract the historical records according to the identity information.

[0094] Step S211: input the prompt command into the Chat-GLM language model combined with the Langchain knowledge base, and the Chat-GLM language model searches the Langchain knowledge base according to the historical records and the prompt command to generate a text answer to the input information of the elderly.

[0095] Step S212: If the identity information does not exist in the data knowledge base, a new historical record is recorded in the database, and the emotion information and the identity information are associated and recorded in the newly created historical record.

[0096] Step S213: input the prompt command into the Chat-GLM language model combined with the Langchain knowledge base, and the Chat-GLM language model searches the Langchain knowledge base according to the prompt command to generate a text answer to the input information of the elderly.

[0097] Step S214: convert the text answer into voice output information according to text-to-speech technology.

[0098] It should be noted that the model training steps S201 to S203 are performed before the model use steps S211 and S213; the specific implementation method of each step refers to the previous embodiment and will not be repeated here.

[0099] See also Figure 3 , Figure 3 The present invention provides a functional module diagram of an information processing device based on a language chain knowledge base according to an embodiment of the present application.

[0100] like Figure 3 As shown, the information processing device based on the language chain knowledge base includes:

[0101] The elderly input information acquisition module 301 is used to acquire the elderly input information, and the input information includes but is not limited to at least one of the following: text input information, voice input information, picture input information, and video input information;

[0102] An input-to-text module 302 is used to convert the input information into text information;

[0103] The emotion information extraction module 303 is used to extract the emotion information according to the input information;

[0104] A prompt command generating module 304 is used to fill the text information and the emotion information into a preset prompt template to generate a prompt command;

[0105] The language model output module 305 is used to input the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

[0106] Specifically, the input information is voice input information, and the input information is converted into text information, and the input-to-text module 302 is specifically used to:

[0107] The voice input information is converted into text information according to automatic voice recognition technology.

[0108] Furthermore, the information processing method based on the language chain knowledge base also includes:

[0109] The identity information recognition module 306 is used to extract voiceprint information according to the voice input information; recognize identity information according to the voiceprint information; and determine whether the identity information exists in the database;

[0110] The history record extraction module 307 is configured to extract history records according to the identity information if the identity information exists in the database.

[0111] Furthermore, the history record extraction module 307 is also used for:

[0112] If the identity information does not exist in the data knowledge base, a new historical record is created in the database, and the emotion information and the identity information are associated and recorded in the newly created historical record.

[0113] Specifically, the prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly. The language model output module 305 is specifically used for:

[0114] Inputting the prompt command into the Chat-GLM language model combined with the Langchain knowledge base, the Chat-GLM language model searches the Langchain knowledge base according to the historical records and the prompt command to generate a text answer to the input information of the elderly;

[0115] The text answer is converted into voice output information according to text-to-speech technology.

[0116] Furthermore, before the prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly, the information processing based on the Langchain knowledge base also includes:

[0117] The training data acquisition module 308 is used to acquire training data, wherein the training data includes but is not limited to at least one of the following: books on companionship of the elderly, books on mental health of the elderly, books on nursing care of the elderly, and a collection of real tender dialogues; and convert the training data into the Langchain knowledge base document;

[0118] The model training module 309 is used to pass the Langchain knowledge base document into the Chat-GLM language model for training to obtain the Chat-GLM language model combined with the Langchain knowledge base. The Chat-GLM language model combined with the Langchain knowledge base focuses on the companionship and care of the elderly.

[0119] See also Figure 4 , Figure 4 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0120] See also Figure 4 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0121] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any information processing method based on the language chain knowledge base.

[0122] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0123] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any information processing method based on the language chain knowledge base.

[0124] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0125] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0126] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0127] Acquire input information from the elderly, the input information including but not limited to at least one of the following: text input information, voice input information, picture input information, and video input information;

[0128] Converting the input information into text information, and extracting emotional information based on the input information;

[0129] Filling the text information and the emotion information into a preset prompt template to generate a prompt command;

[0130] The prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

[0131] In one embodiment, the input information is voice input information, and when converting the input information into text information, the processor is used to run a computer program stored in a memory to implement the following steps:

[0132] The voice input information is converted into text information according to automatic voice recognition technology.

[0133] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0134] Extracting voiceprint information according to the voice input information;

[0135] Identifying identity information according to the voiceprint information;

[0136] Determine whether the identity information exists in the database;

[0137] If the identity information exists in the database, the historical records are extracted according to the identity information.

[0138] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0139] If the identity information does not exist in the data knowledge base, a new historical record is created in the database, and the emotion information and the identity information are associated and recorded in the newly created historical record.

[0140] In one embodiment, when the prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly, the processor is used to run a computer program stored in the memory to implement the following steps:

[0141] Inputting the prompt command into the Chat-GLM language model combined with the Langchain knowledge base, the Chat-GLM language model searches the Langchain knowledge base according to the historical records and the prompt command to generate a text answer to the input information of the elderly;

[0142] The text answer is converted into voice output information according to text-to-speech technology.

[0143] In one embodiment, before inputting the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly, the processor is used to run a computer program stored in the memory to implement the following steps:

[0144] Acquire training data, the training data including but not limited to at least one of the following: books on companionship for the elderly, books on mental health for the elderly, books on nursing care for the elderly, and a collection of real tender dialogues;

[0145] Convert the training data into the Langchain knowledge base document;

[0146] The Langchain knowledge base document is passed into the Chat-GLM language model for training to obtain the Chat-GLM language model combined with the Langchain knowledge base. The Chat-GLM language model combined with the Langchain knowledge base focuses on the companionship and care of the elderly.

[0147] An embodiment of the present application further provides an information processing system based on a language chain knowledge base, the information processing system based on a language chain knowledge base comprising:

[0148] An elderly input information acquisition unit, used to acquire the elderly input information, the input information includes but is not limited to at least one of the following: text input information, voice input information, picture input information, video input information;

[0149] An input-to-text unit, used to convert the input information into text information;

[0150] An emotional information extraction unit, used to extract emotional information according to the input information;

[0151] A prompt command generating unit, used for filling the text information and the emotion information into a preset prompt template to generate a prompt command;

[0152] The language model output unit is used to input the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

[0153] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program. The computer program includes program instructions. The processor executes the program instructions to implement any information processing method based on a language chain knowledge base provided in an embodiment of the present application.

[0154] The computer-readable storage medium may be an internal storage unit of the computer device described in the above embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device.

[0155] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. An information processing method based on a language chain knowledge base, characterized in that: The information processing method based on the language chain knowledge base comprises the following steps: Acquire input information from the elderly, the input information including but not limited to at least one of the following: text input information, voice input information, picture input information, and video input information; Converting the input information into text information, and extracting emotional information based on the input information; Filling the text information and the emotion information into a preset prompt template to generate a prompt command; The prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

2. The information processing method based on the language chain knowledge base according to claim 1, characterized in that: The input information is voice input information, and the converting the input information into text information includes: The voice input information is converted into text information according to automatic voice recognition technology.

3. The information processing method based on the language chain knowledge base according to claim 2, characterized in that: The information processing method based on the language chain knowledge base also includes: Extracting voiceprint information according to the voice input information; Identifying identity information according to the voiceprint information; Determine whether the identity information exists in the database; If the identity information exists in the database, the historical records are extracted according to the identity information.

4. The information processing method based on the language chain knowledge base according to claim 3 is characterized in that: The information processing method based on the language chain knowledge base also includes: If the identity information does not exist in the data knowledge base, a new historical record is created in the database, and the emotion information and the identity information are associated and recorded in the newly created historical record.

5. The information processing method based on the language chain knowledge base according to claim 3, characterized in that: The prompt command is input into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly, including: Inputting the prompt command into the Chat-GLM language model combined with the Langchain knowledge base, the Chat-GLM language model searches the Langchain knowledge base according to the historical records and the prompt command to generate a text answer to the input information of the elderly; The text answer is converted into voice output information according to text-to-speech technology.

6. The information processing method based on the language chain knowledge base according to claim 1, characterized in that: Before inputting the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly, the information processing method based on the Langchain knowledge base also includes: Acquire training data, the training data including but not limited to at least one of the following: books on companionship for the elderly, books on mental health for the elderly, books on nursing care for the elderly, and a collection of real tender dialogues; Convert the training data into the Langchain knowledge base document; The Langchain knowledge base document is passed into the Chat-GLM language model for training to obtain the Chat-GLM language model combined with the Langchain knowledge base. The Chat-GLM language model combined with the Langchain knowledge base focuses on the companionship and care of the elderly.

7. An information processing device based on a language chain knowledge base, characterized in that: The information processing device based on the language chain knowledge base includes: An elderly input information acquisition module is used to acquire the elderly input information, wherein the input information includes but is not limited to at least one of the following: text input information, voice input information, picture input information, and video input information; An input-to-text module, used to convert the input information into text information; An emotional information extraction module, used to extract emotional information according to the input information; A prompt command generating module, used for filling the text information and the emotion information into a preset prompt template to generate a prompt command; The language model output module is used to input the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

8. An information processing system based on a language chain knowledge base, characterized in that: The information processing system based on the language chain knowledge base includes: An elderly input information acquisition unit, used to acquire the elderly input information, the input information includes but is not limited to at least one of the following: text input information, voice input information, picture input information, video input information; An input-to-text unit, used to convert the input information into text information; An emotional information extraction unit, used to extract emotional information according to the input information; A prompt command generating unit, used for filling the text information and the emotion information into a preset prompt template to generate a prompt command; The language model output unit is used to input the prompt command into the Chat-GLM language model combined with the Langchain knowledge base to generate output information for the input information of the elderly.

9. A computer device, characterized in that: The computer device includes a processor, a memory, and an information processing program based on a language chain knowledge base stored in the memory and executable by the processor, wherein when the information processing program based on the language chain knowledge base is executed by the processor, the steps of the information processing method based on a language chain knowledge base as described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an information processing program based on a language chain knowledge base, wherein when the information processing program based on a language chain knowledge base is executed by a processor, the steps of the information processing method based on a language chain knowledge base according to any one of claims 1 to 6 are implemented.