Information recommendation device based on large model role switching

By switching roles in the language model and embedding recommendation information in the answers, the problem of user distraction is solved, information recommendations that are closer to natural language are achieved, and user experience is improved.

CN119066162AActive Publication Date: 2024-12-03MINJIANG UNIVERSITY +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411012545.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-12-03
Estimated Expiration
2044-07-26

Smart Images

  • Figure CN119066162A_ABST
    Figure CN119066162A_ABST
Patent Text Reader

Abstract

The invention discloses an information recommendation device based on large model role switching. The information recommendation device comprises a client, a large model unit, a question and answer control unit, a role storage unit and a keyword storage unit, initial role information of the client is pre-stored in the role storage unit; triggering keyword information related to information recommendation is pre-stored in the keyword storage unit; a context question and answer character set is input into the large model unit in advance, and different reply roles are distinguished in the context question and answer character set. According to the method, the reply information can be returned to the user after being answered again according to the information recommendation role, and the reply information is replied after being summarized by the large model, so that the large model outputs the answer containing the recommendation information and is replied by adopting the information recommendation role, the reply content is closer to the information recommendation role, and the user experience is improved. Therefore, the mode of directly adding the recommendation information is avoided, the reply of the large model is closer to the natural language, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data big model devices, and in particular to an information recommendation device based on big model role switching. Background Art

[0002] A large model generally refers to a language model, which can answer questions input by users in natural language, such as the GPT language model. By controlling the input of the language model, the role of the model can be set, and different roles of the model can be used to answer user questions, so as to simulate communication between people and improve the user experience. Especially in customer service systems, it is more meaningful to set different roles. In the language model reply, the language model provider also hopes to provide users with recommended additional information, such as advertising information or information of concern, so as to encourage users to pay attention to these important information. The current practice is generally to detect the output of the large model, match keywords, and then highlight the keyword position to provide information prompts, or add a prompt message to prompt, so that users feel that it is additional information, and the user's attention may still be focused on the answer of the language model, while ignoring the prompt message. Summary of the invention

[0003] To this end, it is necessary to provide an information recommendation device based on large model role switching to solve the problem that the existing language big data model uses additional information for prompting when recommending information.

[0004] To achieve the above-mentioned object, the present invention provides an information recommendation device based on large model role switching, comprising a client, a large model unit, a question and answer control unit, a role storage unit and a keyword storage unit; the role storage unit pre-stores the initial role information of the client; the keyword storage unit pre-stores the trigger keyword information related to the information recommendation;

[0005] The large model unit is pre-input with a context question and answer text set, the context question and answer text set is distinguished by different reply roles, and the large model unit summarizes the context question and answer text set and replies according to the input text information; the large model unit is pre-set with recommendation information, trigger keyword information and corresponding mark character information, and the large model unit is used to add the mark character information in the result after detecting the trigger keyword information and output the recommendation information;

[0006] The question-answer control unit obtains question text information input by the client; sends the question text information to the large model unit with the initial role information of the role storage unit and obtains the returned answer result;

[0007] The question and answer control unit obtains whether the returned answer result contains the marked character information;

[0008] If the role information in the role storage unit is the initial role information and the returned answer result does not contain the marking character information, the question and answer control unit sends the returned answer result to the client;

[0009] If the role information in the role storage unit is the initial role information and the returned answer result contains the marked character information, the question and answer control unit changes the role information in the role storage unit to the information recommended role, modifies the question text information to include the information recommended role, sends it to the large model unit, obtains the returned answer result, removes the marked character information from the returned answer result, and sends it to the client;

[0010] If the role information in the role storage unit is an information recommended role and the returned answer result does not contain the marked character information, the question and answer control unit changes the role information in the role storage unit to the initial role information, modifies the question text information to include the initial role information, sends it to the large model unit, obtains the returned answer result, and removes the marked character information from the returned answer result and sends it to the client;

[0011] If the role information in the role storage unit is an information recommended role and the returned answer result contains the marked character information, the question and answer control unit removes the marked character information from the returned answer result and sends it to the client.

[0012] Furthermore, it also includes constructing a prohibited role change text set, the large model unit pre-inputs the prohibited role change text set and the corresponding prohibited detection identifier, and the question and answer control unit also determines whether the prohibited detection identifier is included after obtaining the returned answer result. If it is detected that the returned answer result contains the prohibited detection identifier, the role information in the role storage unit is switched to the initial role information, the role switching is prohibited, and the role storage unit is marked. If the marked character information is detected subsequently, the question text information is added with no recommendation information and sent to the large model unit, and then the answer of the large model unit is sent to the client. If it does not contain the prohibited detection identifier, the role information in the role storage unit and the returned answer result are checked to see if they contain the marked character information.

[0013] Furthermore, the marking in the role storage unit includes marking a disabled time limit, and after the time limit expires, the question and answer control unit cancels the disabled time limit.

[0014] Furthermore, the question-and-answer control unit establishes an association relationship between the ID logged in by the client and the set role information in the role storage unit, and different IDs logged in by the client contain the set role information corresponding thereto.

[0015] Furthermore, the contextual question and answer text set is obtained by inputting the original text into the large model unit for summarization.

[0016] Furthermore, the original text is obtained by OCR to obtain text in the image.

[0017] Furthermore, the client is also used to obtain an input image of the client, obtain text in the input image through OCR, and use the text in the image as question text information.

[0018] Furthermore, the recommendation information is recommended product information.

[0019] Furthermore, the recommended product information includes the ID, name and function introduction of the recommended product.

[0020] Furthermore, the client includes a mobile client, a WEB client or a computer client.

[0021] Different from the prior art, the above technical solution can answer different roles according to the input text questions by pre-inputting a contextual question and answer text set with different reply roles in the large model unit. The initial role information words or information recommendation role words are input into the large model unit through the question and answer control unit, and the large model unit generates answers based on different roles to achieve more humanized answers. Then the large model can answer the user's input and mark the answer result so that the result contains the marking information. The present invention can detect the marked result and control whether to switch to the information recommendation role. After switching, the large model unit will answer again according to the information recommendation role and return it to the user. Such reply information is replied after being summarized by the large model, so that the large model outputs an answer containing recommended information, and uses the information recommendation role to reply. The content of the reply is closer to the information recommendation role, thereby avoiding the method of directly adding recommended information. The reply of the large model is closer to natural language, improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A structural diagram of a device according to an embodiment of the present invention;

[0023] Figure 2 The present invention is a method flow chart of another embodiment of the present invention.

[0024] Description of reference numerals:

[0025] 1. Client;

[0026] 2. Large model unit;

[0027] 3. Question and answer control unit;

[0028] 4. Role storage unit;

[0029] 5. Keyword storage unit. DETAILED DESCRIPTION

[0030] In order to explain the technical content, structural features, achieved objectives and effects of the technical solution in detail, the following is a detailed description in conjunction with specific embodiments and accompanying drawings.

[0031] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.

[0032] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.

[0033] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.

[0034] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.

[0035] Without further limitations, in this application, the words "include", "comprises", "has" or other similar expressions used in the sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.

[0036] Similar to the understanding in the Patent Examination Guidelines, in this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.

[0037] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.

[0038] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms such as "install", "connect", "connect", "fix", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For technicians in the technical field to which the present application belongs, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0039] See also Figure 1 to Figure 2 The present invention provides an information recommendation device based on large model role switching, including a client 1, a large model unit 2, a question and answer control unit 3, a role storage unit 4 and a keyword storage unit 5; the role storage unit 4 pre-stores the initial role information of the client 1; the keyword storage unit 5 pre-stores the trigger keyword information related to information recommendation. The client 1 includes a mobile client, a WEB client or a computer client, the mobile client is an Android client or an Apple client, the WEB client is a browser client, and the computer client is a window installation client.

[0040] The large model unit 2 is pre-input with a contextual question and answer text set, which includes questions and corresponding answers. The source of this can be collected from the customer service system. The large model unit can summarize the questions and answers, and if there are similar questions, they can be used as corresponding answers. The contextual question and answer text set distinguishes different reply roles, that is, the answer contains reply role information, and different answers can be distinguished by reply role information. Here, the reply role can be an initialized normal question and answer role and an information recommendation role for recommending information. The present invention can also have more roles, such as including third role information. If the limited text for the reply role is added to the question of the large model unit, the large model unit can summarize and reply according to the answer of the corresponding role in the contextual question and answer text. The large model unit 2 summarizes the contextual question and answer text set and replies according to the input text information; the large model unit 2 is pre-set with recommended information, trigger keyword information and corresponding mark character information, and the large model unit 2 is used to add mark character information in the result after detecting the trigger keyword information and output the recommended information. The trigger keyword information here is the question text information input by the customer, the recommended information can be advertising information, and the marking character information is a special character (such as %@%@%), which is used for the question and answer control unit 3 to detect.

[0041] The question and answer control unit 3 obtains the question text information input by the client 1; sends the question text information to the large model unit 2 with the initial role information of the role storage unit 4 and obtains the returned answer result; the question and answer control unit 3 obtains whether the returned answer result contains the marked character information.

[0042] If the role information in the role storage unit 4 is the initial role information and the returned answer result does not contain the marking character information, the question and answer control unit 3 sends the returned answer result to the client 1, that is, directly replies.

[0043] If the role information in the role storage unit 4 is the initial role information and the returned answer result contains the marked character information, the question and answer control unit 3 changes the role information in the role storage unit 4 to the information recommendation role. The role change and answer interception are realized here. After the question text information is modified to include the information recommendation role, it is sent to the large model unit 2 and the returned answer result is obtained (the answer at this time is answered with the information recommendation role, and contains the recommended information and marked character information), and the returned answer result is removed from the marked character information and sent to the client 1. The role change and the use of the corresponding role in the answer are realized here, and the recommended information is included.

[0044] If the role information in the role storage unit 4 is the information recommended role and the returned answer result does not contain the marked character information, the question and answer control unit 3 changes the role information in the role storage unit 4 to the initial role information, modifies the question text information to include the initial role information, sends it to the large model unit 2, obtains the returned answer result, and removes the marked character information from the returned answer result and sends it to the client 1. The present invention can restore to the initial role to reply here, ensuring normal communication.

[0045] If the role information in the role storage unit 4 is an information recommendation role and the returned answer result contains the marked character information, the question and answer control unit 3 removes the marked character information from the returned answer result and sends it to the client 1. If it is already an information recommendation role, the mark is directly removed and the answer is returned to the client. This realizes question and answer for different clients.

[0046] The present invention can provide answers of different roles according to the input text questions by pre-inputting a contextual question and answer text set with different reply roles in the large model unit. The initial role information words or information recommendation role words are input into the large model unit through the question and answer control unit, and the large model unit generates answers based on different roles to achieve more anthropomorphic answers. Then the large model can answer the user's input and mark the answer result so that the result contains the marking information. The present invention can detect the marked result and control whether to switch to the information recommendation role. After switching, the large model unit will answer again according to the information recommendation role and return it to the user. Such reply information is replied after being summarized by the large model, so that the large model outputs an answer containing recommended information, and uses the information recommendation role to reply. The content of the reply is closer to the information recommendation role, thereby avoiding the method of directly adding recommended information. The reply of the large model is closer to natural language, improving the user experience.

[0047] In order to detect the disgust of customers when they obtain the recommended information and improve the customer experience, the present invention also includes constructing a prohibited role change text set, the large model unit 2 pre-enters the prohibited role change text set and the corresponding prohibited detection identifier (such as %%¥¥), where the prohibited role change text is text that expresses the user's disgust, such as the user inputting "I don't like the content you recommend" "Don't recommend it to me" and other related text content, that is, expressing the situation that the role change is not desired. After obtaining the returned answer result, the question and answer control unit 3 enters step S201 to determine whether it contains a prohibited detection identifier. If it is detected that the returned answer result contains a prohibited detection identifier, it enters step S202 to switch the role information in the role storage unit 4 to the initial role information and prohibit role switching and mark it in the role storage unit 4 (marked as a non-switchable state). If the marked character information is detected later, the question text information is added with no recommendation information (such as adding text such as "do not recommend information", and the large language model can not recommend information based on this information) and then sent to the large model unit, and then the answer of the large model unit is sent to the client 1. If it does not contain a prohibited detection identifier, it enters step S203 to detect whether the role information in the role storage unit 4 and the returned answer result contain the marked character information, that is, the detection is performed normally. In this way, when the user's input is semantically the same as the content in the prohibited role change text set, it will enter the disabled switching state to avoid switching roles and recommending information, thereby avoiding user disgust.

[0048] Furthermore, the marking in the role storage unit 4 includes a time limit for marking the disabled, and after the time limit is reached, the question and answer control unit 3 cancels the disabled time limit. If the time limit is 24 hours, the current time plus 24 hours is disabled. It can be re-enabled after this time. In some embodiments, a switch enable value can also be introduced, and the switch enable value is turned on after the role switching is prohibited, and then it is detected whether the returned answer result contains the marked character information. If so, the switch enable value is increased by one. When the switch enable value reaches a preset number of times, step S104 is restarted to perform detection and role switching. In this way, the role switching can be restarted after the user actively mentions it many times, so as to achieve information recommendation.

[0049] In some embodiments, the question-answer control unit 3 establishes an association between the ID logged in by the client 1 and the set role information in the role storage unit 4, and different IDs logged in by the client 1 contain the set role information corresponding thereto. In this way, targeted role replies can be implemented based on the user login information, and the replies can continue even if the user switches clients.

[0050] Furthermore, the contextual question and answer text set is obtained by inputting the original text into the large model unit 2 for summarization. By inputting the original text into the large model for summarization and extracting key contextual questions and answers from the summary, the key information and background knowledge of the original text can be effectively captured. Some irrelevant or repeated information can also be filtered out, thereby improving the accuracy and quality of the generated text.

[0051] Furthermore, the original text is processed by OCR to obtain the text in the image. This image may be a medical test report, and OCR (optical character recognition) can reduce the workload, and then summarize it through a large model to generate a more accurate contextual question and answer text set.

[0052] Furthermore, the client 1 is also used to obtain the input picture of the client 1, obtain the text in the input picture through OCR, and use the text in the picture as the question text information. The user's input can also be optical character recognition, so that after the user uploads the picture, the system can reply according to the picture content.

[0053] Furthermore, the recommended information is recommended product information, so that users can understand and purchase product information, thereby increasing the conversion rate of information recommendation.

[0054] Furthermore, the recommended product information includes the ID, name and function introduction of the recommended product. Through the ID, the background can record the information that the user knows. The name and introduction can give the user more information. Then, according to the ID of the product, a hyperlink can be attached to the information, and the user can enter the corresponding product page by clicking the hyperlink to realize the conversion of the recommended information.

[0055] Furthermore, the large model unit 2 is a language large model unit 2. For example, it can be a GPT language large model, a BERT language large model, or a Pangu language large model. Using an existing language large model can make the response closer to natural language and realize anthropomorphic dialogue.

[0056] It should be noted that, although the above embodiments have been described in this article, the patent protection scope of the present invention is not limited thereby. Therefore, based on the innovative concept of the present invention, changes and modifications made to the embodiments described herein, or equivalent structures or equivalent process changes made using the contents of the present invention specification and drawings, directly or indirectly applying the above technical solutions to other related technical fields, are all included in the patent protection scope of the present invention.

Claims

1. An information recommendation device based on large model role switching, characterized in that: It includes a client, a large model unit, a question-answer control unit, a role storage unit and a keyword storage unit; the role storage unit pre-stores the initial role information of the client; the keyword storage unit pre-stores the trigger keyword information related to information recommendation; The large model unit is pre-input with a context question and answer text set, wherein the context question and answer text set is distinguished by different reply roles, and the large model unit summarizes the context question and answer text set and replies according to the input text information; The large model unit is pre-set with recommendation information, trigger keyword information and corresponding mark character information, and the large model unit is used to add the mark character information in the result and output the recommendation information after detecting the trigger keyword information; The question and answer control unit obtains question text information input by the client; Sending the question text information to the large model unit with the initial role information of the role storage unit and obtaining the returned answer result; The question and answer control unit obtains whether the returned answer result contains the marked character information; If the role information in the role storage unit is the initial role information and the returned answer result does not contain the marking character information, the question and answer control unit sends the returned answer result to the client; If the role information in the role storage unit is the initial role information and the returned answer result contains the marked character information, the question and answer control unit changes the role information in the role storage unit to the information recommended role, modifies the question text information to include the information recommended role, sends it to the large model unit, obtains the returned answer result, removes the marked character information from the returned answer result, and sends it to the client; If the role information in the role storage unit is an information recommended role and the returned answer result does not contain the marked character information, the question and answer control unit changes the role information in the role storage unit to the initial role information, modifies the question text information to include the initial role information, sends it to the large model unit, obtains the returned answer result, and removes the marked character information from the returned answer result and sends it to the client; If the role information in the role storage unit is an information recommended role and the returned answer result contains the marked character information, the question and answer control unit removes the marked character information from the returned answer result and sends it to the client.

2. The information recommendation device based on large model role switching according to claim 1 is characterized in that: It also includes constructing a prohibited role change text set, the large model unit pre-inputs the prohibited role change text set and the corresponding prohibited detection identifier, and the question and answer control unit determines whether the prohibited detection identifier is included after obtaining the returned answer result. If it is detected that the returned answer result contains the prohibited detection identifier, the role information in the role storage unit is switched to the initial role information, the role switching is prohibited, and the role storage unit is marked. If the marked character information is detected later, the question text information is added with no recommendation information and sent to the large model unit, and then the answer of the large model unit is sent to the client. If it does not contain the prohibited detection identifier, the role information in the role storage unit and the returned answer result are checked to see if they contain the marked character information.

3. The information recommendation device based on large model role switching according to claim 2 is characterized in that: The marking in the role storage unit includes marking a time limit for disabling, and after the time limit is reached, the question and answer control unit cancels the time limit for disabling.

4. The information recommendation device based on large model role switching according to claim 1, characterized in that: The question-and-answer control unit establishes an association relationship between the ID logged in by the client and the set role information in the role storage unit, and different IDs logged in by the client contain the set role information corresponding thereto.

5. The information recommendation device based on large model role switching according to claim 1 is characterized in that: The contextual question and answer text set is obtained by inputting the original text into the large model unit for summarization.

6. The information recommendation device based on large model role switching according to claim 5 is characterized in that: The original text is obtained by OCR to obtain the text in the image.

7. The information recommendation device based on large model role switching according to claim 1 is characterized in that: The client is also used to obtain an input image of the client, obtain text in the input image through OCR, and use the text in the image as question text information.

8. The information recommendation device based on large model role switching according to claim 1 is characterized in that: The recommendation information is recommended product information.

9. The information recommendation device based on large model role switching according to claim 8, characterized in that: The recommended product information includes the ID, name and function introduction of the recommended product.

10. The information recommendation device based on large model role switching according to any one of claims 1 to 9, characterized in that: The client includes a mobile client, a WEB client or a computer client.

Citation Information

Patent Citations

  • Intelligent customer service information generation system and method based on keyword extraction

    CN116628173A

  • Dialogue processing method and device based on large language model and electronic equipment

    CN117251552A

  • Interaction method and device, computer equipment and storage medium

    CN117453871A

  • Method and system for realizing e-commerce commodity information interaction by using large language model

    CN117592489A

  • Large language model human setting privatization method and related device

    CN118228829A