Enterprise group chat message reply method and system

By applying large language models and vector retrieval technology in enterprise group chats, important information in group chats is automatically extracted and replied to, and the problems of information dispersion and low reply efficiency are solved, and efficient and accurate group chat message replies are achieved.

CN120104764AActive Publication Date: 2025-06-06CHANGSHA WATER SHEEP NETWORK TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510578668.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-06-06
Estimated Expiration
2045-05-07

AI Technical Summary

Technical Problem

In corporate group chats, important information and decisions are often scattered in massive chat records, which is time-consuming and labor-intensive to find and is easy to miss key content. The discussions of multiple topics in group chats interfere with each other, resulting in low response efficiency and poor user experience.

Method used

By obtaining historical chat records within the preset historical duration in enterprise group chats, using a large language model for information extraction and storage, vector processing and storage space, and searching vectors when asking questions, generating a reply message and sending it to group chats.

Benefits of technology

It realizes automatic and accurate reply to corporate group chat messages, improves information search efficiency, reduces users' operation time in group chats, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104764A_ABST
    Figure CN120104764A_ABST
Patent Text Reader

Abstract

The invention provides an enterprise group chat message reply method and system, and relates to the technical field of artificial intelligence, and the method comprises the steps: obtaining a historical chat record in a preset historical duration in an enterprise group chat, and processing the historical chat record to obtain a first text; performing information extraction according to the first text by utilizing a preset large language model to obtain first data and second data; storing the first data into a first storage space, and storing the second data and the first text into a second storage space after vectorizing the second data and the first text respectively; obtaining a question text in the enterprise group chat, and vectorizing the question text to obtain a first vector; performing vector retrieval in a second storage space according to the first vector to obtain a second vector; and outputting a reply message by using a preset large language model according to the data stored in the first storage space, the first vector and the second vector, and sending the reply message to the enterprise group chat. According to the invention, automatic and accurate reply of the enterprise group chat message can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and system for replying to enterprise group chat messages. Background Art

[0002] In enterprise group chats, the groups are large and active, and important information and decisions are often scattered in a large number of chat records, which is time-consuming and laborious to find and easy to miss key content. In addition, multiple topics are often discussed at the same time in group chats, just like holding multiple meetings in a conference room at the same time. Discussions on different topics interfere with each other, resulting in unclear directionality of the content of the speech. Users often need to read multiple chat records to accurately determine which question a certain statement is a response to, which undoubtedly greatly reduces the efficiency of response and seriously affects the user experience.

[0003] Therefore, how to achieve automatic and accurate reply to enterprise group chat messages is a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0004] To solve the above technical problems, the present application provides a method for replying to enterprise group chat messages, which can realize automatic and accurate replying to enterprise group chat messages. The present application also provides a system for replying to enterprise group chat messages, which has the same technical effect.

[0005] The first purpose of this application is to provide a method for replying to an enterprise group chat message.

[0006] The above-mentioned application objective 1 of the present application is achieved through the following technical solutions: A method for replying to an enterprise group chat message, comprising: Obtain historical chat records within a preset historical time period in the enterprise group chat, and process the historical chat records to obtain a first text; Using a preset large language model, extracting information from the first text to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information; The first data is stored in a first storage space, and the second data and the first text are vectorized respectively and then stored in a second storage space; Obtaining a question text in the enterprise group chat, and vectorizing the question text to obtain a first vector; According to the first vector, perform vector search in the second storage space to obtain a second vector; Using a preset large language model, a reply message is output according to the data stored in the first storage space, the first vector, and the second vector, and the reply message is sent to the enterprise group chat.

[0007] Preferably, in the enterprise group chat message reply method, the using of a preset large language model to extract information according to the first text to obtain the first data and the second data includes: A pre-constructed first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.

[0008] Preferably, in the enterprise group chat message reply method, the second vector obtained by performing vector retrieval in the second storage space according to the first vector includes: Calculating the similarity between the first vector and each vector stored in the second storage space; According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.

[0009] Preferably, in the enterprise group chat message reply method, the using of a preset large language model to output a reply message according to the data stored in the first storage space, the first vector and the second vector comprises: Acquire a pre-built second prompt word template, and generate a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template; The second prompt word is input into a preset large language model to obtain a reply message output by the large language model.

[0010] Preferably, the method for replying to the enterprise group chat message further includes: Determine whether the storage space size of the first storage space is greater than a preset storage upper limit, If yes, extracting the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit; After the excess data is vectorized, it is stored in the second storage space.

[0011] The second objective of this application is to provide a reply system for enterprise group chat messages.

[0012] The second application objective of the present application is achieved through the following technical solutions: A reply system for enterprise group chat messages, comprising: A first acquisition unit is used to acquire historical chat records within a preset historical length in the enterprise group chat, and process the historical chat records to obtain a first text; an extraction unit, configured to extract information from the first text using a preset large language model to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information; A storage unit, used for storing the first data into a first storage space, and vectorizing the second data and the first text respectively and storing them into a second storage space; A second acquisition unit is used to acquire a question text in the enterprise group chat, and vectorize the question text to obtain a first vector; a retrieval unit, configured to perform vector retrieval in the second storage space according to the first vector to obtain a second vector; A reply unit is used to use a preset large language model to output a reply message according to the data stored in the first storage space, the first vector and the second vector, and send the reply message to the group chat.

[0013] Preferably, in the reply system of the enterprise group chat message, when the extraction unit uses the preset large language model to extract information according to the first text to obtain the first data and the second data, it is specifically used to: A pre-constructed first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.

[0014] Preferably, in the enterprise group chat message reply system, the retrieval unit, when performing the vector retrieval in the second storage space according to the first vector to obtain the second vector, is specifically used to: Calculating the similarity between the first vector and each vector stored in the second storage space; According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.

[0015] Preferably, in the reply system for the enterprise group chat message, the reply unit, when executing the method of using the preset large language model to output the reply message according to the data stored in the first storage space, the first vector and the second vector, is specifically used to: Acquire a pre-built second prompt word template, and generate a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template; The second prompt word is input into a preset large language model to obtain a reply message output by the large language model.

[0016] Preferably, in the enterprise group chat message reply system, the storage unit is further used for: Determine whether the storage space size of the first storage space is greater than a preset storage upper limit, If yes, extracting the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit; After the excess data is vectorized, it is stored in the second storage space.

[0017] The above technical solution first obtains historical chat records within a preset historical length in the enterprise group chat, and processes the historical chat records to obtain a first text; uses a preset large language model to extract information based on the first text to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information and financial information, and the second data includes one or more of feedback and suggestion information, news information and conclusive information; stores the first data in a first storage space, and vectorizes the second data and the first text respectively, and stores them in a second storage space; thereby storing the group chat dialogue process to facilitate context association, and at the same time extracts key information that the enterprise group chat members are concerned about and frequently ask about, so as to facilitate the subsequent call of the large language model; Then, the question text in the group chat is obtained, and the question text is vectorized to obtain a first vector; according to the first vector, a vector search is performed in the second storage space to obtain a second vector; using the preset large language model, according to the data stored in the first storage space, the first vector and the second vector, a reply message is output, and the reply message is sent to the group chat. Among them, the data stored in the first storage space can be directly input into the large language model so that the large language model can quickly access and use it; according to the question text processing to obtain the first vector, a vector search is performed in the second storage space to retrieve the second vector that matches the first vector, and then the data stored in the first storage space and the first vector are combined and input into the large language model together, and the input data is comprehensively analyzed using the large language model to output a reply message corresponding to the question text.

[0018] To sum up, the above technical solution can realize automatic and accurate reply to enterprise group chat messages. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart of a method for replying to an enterprise group chat message in an embodiment of the present application; Figure 2 This is a structural diagram of a system for replying to enterprise group chat messages in an embodiment of the present application. DETAILED DESCRIPTION

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

[0022] In the embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described below are merely schematic. For example, the division of units and modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or modules can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0023] In addition, all functional units in the embodiments of the present application may be integrated into one processor, or each unit may be a separate device, or two or more units may be integrated into one device; each functional unit in the embodiments of the present application may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0024] A person skilled in the art can understand that all or part of the steps of the following method embodiments can be completed by program instructions and related hardware. The aforementioned program instructions can be stored in a computer-readable storage medium. When the program instructions are executed, the steps of the following method embodiments are executed; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a magnetic disk or an optical disk, and other media that can store program codes.

[0025] It should be understood that the use of "system", "device", "unit" and / or "module" in this application is only a method for distinguishing different components, elements, parts, parts or assemblies at different levels. However, if other words can achieve the same purpose, the word can be replaced by other expressions.

[0026] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "multiple" and "several" mean two or more, unless otherwise clearly and specifically defined.

[0027] If a flow chart is used in the present application, the flow chart is used to illustrate the operations performed by the system according to the embodiment of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, each step can be processed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or a certain step or several steps of operations can be removed from these processes.

[0028] It should also be noted that, in this article, terms such as "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that an article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such articles or devices. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the article or device including the above elements.

[0029] The embodiments of the present application are written in a progressive manner.

[0030] like Figure 1 As shown, the embodiment of the present application provides a method for replying to an enterprise group chat message, including: S101. Obtain historical chat records within a preset historical duration in the enterprise group chat, and process the historical chat records to obtain a first text; In S101, specifically, the enterprise group chat includes multiple members, each member corresponds to a user, and each user can send messages to the enterprise group chat on the human-computer interaction interface on the user terminal (such as a mobile phone, computer, tablet, etc.) to conduct a group chat. The type of message sent can be any one or a combination of text, pictures, voice, video, documents, and links. The message sent in the chat room may not be directed to any member, or it may be directed to all members, or some members, or a certain member through a preset method (such as @ method). In the enterprise group chat, the chat record within the preset historical length can be obtained, wherein the preset historical length can be the default historical length, or it can be the length modified by the user to the default historical length, and this application does not make specific restrictions on this. Then, the existing optical character recognition (OCR) technology, automatic speech recognition (ASR) technology, document and web page format conversion and extraction technology, etc. can be used to extract text information from the historical group chat record to obtain the first text, and this application does not make specific restrictions on this.

[0031] S102. Using a preset large language model, extract information from the first text to obtain first data and second data; In S102, specifically, a large language model (LLM) is an artificial intelligence model based on deep learning. By training on large-scale text data, it learns the grammar, semantics and context information of the language, so that it can understand and generate natural language text. In this embodiment, an existing pre-trained large language model can be used, combined with prompt engineering, to extract information from the first text to obtain first data and second data. Among them, prompt engineering refers to improving prompts by structuring text, selecting appropriate vocabulary, grammar and context, etc., so as to guide LLM to output the desired result. It allows the model to complete different types of tasks without updating the model weights.

[0032] Specifically, the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, information information, and conclusion information; Among them, the first data is the key information with high importance, real-time nature and strong relevance in the enterprise group chat. User information can include information of members participating in the group chat, such as name, position, contact information, responsibilities, preferences, personality, etc.; task information can include specific work task information, such as task assignment, progress update, deadline reminder, etc., to ensure that group chat members understand their respective responsibilities and task status; schedule information can include meeting arrangements, activity plans and other information to help group chat members arrange their time reasonably; financial information can include matters related to financial expenditure and income, such as budget allocation, expense reimbursement, income records, etc., to ensure the transparency and accuracy of financial information.

[0033] Among them, the second data is the information frequently asked by members in the enterprise group chat. Feedback and suggestion information may include feedback and suggestions from group chat members on projects, tasks or other matters to promote improvement and optimization; information information may include company announcements, industry news, market trends, etc., to help group chat members understand the latest corporate and industry information; conclusive information may include conclusions or decisions reached by group chat members in the discussion, with specific descriptions of the plans or matters involved, to help group chat members clarify the direction and next steps.

[0034] In some embodiments, one implementation of this step specifically includes: obtaining a pre-constructed first prompt word template, generating a first prompt word according to the first text and the first prompt word template, and inputting the first prompt word into a preset large language model so that the large language model extracts the first data and the second data from the first text.

[0035] Specifically, the prompt template is a structured framework for designing and optimizing prompts. It provides a common format to help users build prompts more efficiently, thereby guiding the LLM model to generate expected output. The prompt template usually contains the following parts: 1. Task: clarify the specific task that the model needs to complete, such as information extraction, answering questions, etc. 2. Context: provide enough background information to help the model understand the background and requirements of the task. 3. Examples: provide a small number of examples to help the model better understand the format and requirements of the task. 4. Role: set the role of the model, such as "information extraction assistant" and "AI secretary assistant", etc., to influence its generation style. 5. Format: specify the format of the output, such as JSON, HTML, plain text, etc. 6. Tone: set the tone of the output, such as formal, humorous, concise, etc. Based on the pre-built first prompt template and the first text, the first prompt for guiding the large language model to extract the first data and the second data can be quickly constructed.

[0036] In a specific embodiment, a specific example of the first prompt word template is as follows: # Role Settings You are an efficient information extraction assistant, focusing on structurally extracting and updating key information from group chat messages. Please strictly follow the following rules for processing: # Time: {current time} # Input format { "User Information": { "username": "", "message": "Current user's chat messages" }, "Instant Message": { "User Information": "Includes information about members participating in the group chat, such as name, position, contact information, responsibilities, preferences, personality, etc.", "Task Information": "Involves specific work tasks, such as task assignments, progress updates, deadline reminders, etc., to ensure that group chat members understand their respective responsibilities and task status.", "Schedule": "Meeting arrangements, activity plans and other information to help group chat members arrange their time reasonably.", "Financial Information": "Matters involving financial expenditures and income, such as budget allocation, expense reimbursement, income records, etc., to ensure the transparency and accuracy of financial information." } } # Output format { "Instant Message": "Update instant messages based on user input, keeping the format consistent with the input.", "Potential Information": { "Feedback and Suggestions": "Group chat members provide feedback and suggestions on projects, tasks or other matters to promote improvement and optimization.", "News information": "Including company announcements, industry news, market trends, etc., to help group chat members understand the latest corporate and industry information.", "Conclusion information": "The conclusions or decisions reached by group chat members during the discussion, with a detailed description of the plans or matters involved, to help group chat members clarify the direction and next steps." } } # Processing rules Information extraction: Extract relevant information from user messages and update instant messages.

[0037] Information Updates: Ensure that the information in the instant message is up to date and make adjustments as needed.

[0038] Specific time conversion: Convert a relative time (such as "next Wednesday") to a specific date (such as "March 5, 2025").

[0039] Financial information update: Dynamically update financial information, including records of expenditures and income, to ensure the accuracy of financial information.

[0040] Potential Information Identification: Identify and extract potential information, such as feedback, suggestions, information, and conclusive information, for further analysis and utilization.

[0041] In a specific embodiment, a specific implementation example of the first prompt word template is as follows: # Input example { "User Information": { "Username": "Zhang San", "Message": "We need to complete the market analysis report by next Wednesday. Li Si is responsible for data collection and Wang Wu is responsible for writing the first draft. The project budget is 5,000 yuan, and 2,000 yuan has been spent on data purchase." }, "Instant Message": { "User information": "Zhang San: Project Manager; Li Si: Data Analyst; Wang Wu: Copywriter.", "Task Information": "The task of market analysis report is in progress.", "Schedule": "There is a project progress meeting on March 5, 2025.", "Financial information": "The project budget is 5,000 yuan, and 2,000 yuan has been spent on data purchase." } } # Output example { "Instant Message": { "User information": "Zhang San: Project Manager; Li Si: Data Analyst; Wang Wu: Copywriter.", "Task Information": "The task of market analysis report is in progress. Li Si is responsible for data collection, Wang Wu is responsible for writing the first draft, and the deadline is March 5, 2025.", "Schedule": "There is a project progress meeting on March 5, 2025.", "Financial information": "The project budget is 5,000 yuan, 2,000 yuan has been spent on data purchase, and the remaining budget is 3,000 yuan." }, "Potential Information": { "Feedback and Suggestions": "None", "News Information": "None", "Concluding information": "Zhang San believes that the plan for the market analysis report is feasible. Li Si is responsible for data collection, and Wang Wu is responsible for writing the first draft. The deadline is March 5, 2025." } } It should be noted that the "instant message" in the above-mentioned first prompt word template may correspond to the above-mentioned first data, and the "potential information" in the above-mentioned first prompt word template may correspond to the above-mentioned second data. The above-mentioned first prompt word template is only an example, and the present application is not limited to this.

[0042] S103. storing the first data in the first storage space, and vectorizing the second data and the first text respectively, and storing them in the second storage space; In S103, specifically, the first data and the second data can be extracted and stored through a preset data interface, wherein the first data is used for direct calling of the subsequent large language model, and is stored in a preset first storage space in text form, wherein the first storage space can use the existing computer memory, and the size of the first storage space can be determined based on the architecture and computing resources of the large language model, and the present application does not impose specific restrictions on this. Wherein, the second data and the first text are used for vector retrieval of the subsequent large language model, and the existing vectorization model (such as open source embedding models such as text2vec) can be used to vectorize them respectively and permanently store them in the preset second storage space, wherein the function of the vectorization model is to map the text to a specific position in the vector space according to its original semantics, so that it has a shorter relative distance with the vector with similar semantics. The second storage space can use the existing vector database (Vector Database), and the size of the second storage space can be determined based on actual application requirements, and the present application does not impose specific restrictions on this. Through the above steps, the group chat dialogue process is stored to facilitate context association, and at the same time, the key information that the enterprise group chat members pay attention to and often ask is extracted from it, which is convenient for the subsequent calling of the large language model.

[0043] S104. Obtain the question text in the enterprise group chat, and vectorize the question text to obtain a first vector; In S104, specifically, in the enterprise group chat, the question text sent by the group chat member can be obtained, and then the same vectorization model as above is used to vectorize it to obtain a first vector. The above question text can be a question raised by the group chat member during daily conversations with the enterprise group chat. Exemplarily, the content of the above question may include: "Do we have a meeting next Wednesday?" "Project budget?", etc., and the present application is not limited thereto.

[0044] S105. Perform vector retrieval in the second storage space according to the first vector to obtain a second vector; In S105, specifically, the second storage space may use an existing vector database. Vector retrieval is one of the core functions of the vector database, which calculates the similarity between vectors and returns a vector (ie, a second vector) that has a similar relationship to the query vector (ie, the first vector).

[0045] In some embodiments, one implementation of this step specifically includes: calculating the similarity between the first vector and each vector stored in the second storage space; and selecting a second vector having a similar relationship with the first vector from the second storage space according to the calculated similarity and a preset rule.

[0046] Specifically, an existing similarity calculation method, such as a cosine similarity algorithm, can be used to calculate the similarity between the first vector and each vector stored in the second storage space, and then based on a preset rule, a second vector having a similar relationship with the first vector is screened out. The preset rule may specifically be: sorting each vector in the second storage space according to the calculated similarity, and screening out vectors having a similarity higher than a preset threshold, or screening out a preset number of vectors having the highest similarity as the second vector, but the present application is not limited thereto.

[0047] In this step, by performing vector retrieval in the second storage space, the context and key information related to the first vector obtained by vectorizing the current question text are extracted, thereby retaining the semantic coherence between the contexts and effectively filtering out irrelevant information in the context, which is beneficial to improving the accuracy of subsequent large language model responses.

[0048] S106. Utilize the preset large language model, output a reply message according to the data stored in the first storage space, the first vector, and the second vector, and send the reply message to the enterprise group chat.

[0049] In S106, specifically, an existing pre-trained large language model can be used in combination with a prompt word project to comprehensively analyze all data stored in the first storage space, the first vector, and the second vector, output a reply message corresponding to the question text, and send the reply message to the enterprise group chat, thereby realizing automatic and accurate reply to the enterprise group chat message.

[0050] In some embodiments, one implementation method of the step of outputting a reply message based on the data, the first vector, and the second vector stored in the first storage space using a preset large language model specifically includes: obtaining a pre-constructed second prompt word template, and generating a second prompt word based on the data, the first vector, the second vector, and the second prompt word template stored in the first storage space; and inputting the second prompt word into the preset large language model to obtain a reply message output by the large language model.

[0051] Specifically, based on the pre-constructed second prompt word template, as well as all the data, the first vector and the second vector stored in the first storage space, a second prompt word can be quickly constructed to guide the large language model to integrate all input data for automatic reply.

[0052] In a specific embodiment, a specific example of the second prompt word template is as follows: # Role You are an efficient AI secretary assistant, dedicated to group chat scenarios. Your task is to learn and read from the collected group chat summary information, and provide users with answers or relevant suggestions based on the input context information. Please strictly follow the following rules for processing: # Time: {current time} # Input format { "Question content": { "username": "", "Message": "The current user's question message" }, "Instant Message": { "User Information": "Includes information about members participating in the group chat, such as name, position, contact information, responsibilities, preferences, personality, etc.", "Task Information": "Involves specific work tasks, such as task assignments, progress updates, deadline reminders, etc., to ensure that group chat members understand their respective responsibilities and task status.", "Schedule": "Meeting arrangements, activity plans and other information to help group chat members arrange their time reasonably.", "Financial Information": "Matters involving financial expenditures and income, such as budget allocation, expense reimbursement, income records, etc., to ensure the transparency and accuracy of financial information." }, "Potential Information": { "Feedback and Suggestions": "Group chat members provide feedback and suggestions on projects, tasks or other matters to promote improvement and optimization.", "News information": "Including company announcements, industry news, market trends, etc., to help group chat members understand the latest corporate and industry information.", "Conclusion information": "The conclusions or decisions reached by group chat members during the discussion, with a detailed description of the plans or matters involved, to help group chat members clarify the direction and next steps." }, "User Conversation Context": [ {"role": "user", "username": "", "question": ""}, {"role": "AI Secretary", "answer": ""} ] } # Output requirements Accuracy: Make sure the answer is accurate and based on the contextual information provided.

[0053] Specific time conversion: Convert a relative time (such as "next Wednesday") to a specific date (such as "March 5, 2025").

[0054] Clarity: Be specific in your answer and avoid being vague.

[0055] Conciseness: Answers should be brief and to the point, avoiding lengthy responses.

[0056] Relevance: Answers should be highly relevant to the user's question and provide useful advice or information.

[0057] Courtesy: Maintain a professional and polite tone.

[0058] Actionable: Provide specific suggestions or steps for action, if possible.

[0059] Personalization: Based on user information and preferences, personalize answers to improve user experience.

[0060] In a specific embodiment, a specific implementation example of the second prompt word template is as follows: # Input: { "Question content": { "Username": "Zhang Wei", "Message": "Do we have a meeting next Wednesday?" }, "Instant Message": { "User Information": "Zhang Wei, Project Manager, Contact: 123456789, Preference: Likes concise and clear information.", "Task Information": "The progress update of Project A needs to be completed before next Wednesday.", "Schedule": "There will be a progress meeting for Project A at 10am next Wednesday (March 5, 2025).", "Financial Information": "No relevant information." }, "Potential Information": { "Feedback and suggestions": "The team suggested discussing the risk management of Project A in the meeting.", "News Information": "The company will release a new marketing strategy next week.", "Concluding message": "The progress meeting for Project A will determine resource allocation for the next phase." }, "User Conversation Context": [ {"role": "user", "user name": "Zhang Wei", "question": "Do we have a meeting next Wednesday?"}, {"role": "AI Secretary", "answer": ""} ] } # Output: "Hello, Zhang Wei! According to your schedule, you have a progress meeting on Project A at 10am next Wednesday (March 5, 2025). It is recommended that you prepare relevant progress updates and discuss the project's risk management considering the team's suggestions. If you need further assistance, please feel free to let me know." It should be noted that the "question content" in the above-mentioned second prompt word template may correspond to the above-mentioned question text, the "instant message" in the above-mentioned second prompt word template may correspond to the above-mentioned first data, the "potential information" in the above-mentioned second prompt word template may correspond to the above-mentioned second data, and the "user conversation context" in the above-mentioned second prompt word template may correspond to the above-mentioned first text. The above-mentioned second prompt word template is only an example, and the present application is not limited to this.

[0061] Currently, in enterprise group chats, the groups are large and active, and important information and decisions are often scattered in a large number of chat records, which is time-consuming and laborious to find and easy to miss key content. In addition, multiple topics are often discussed at the same time in group chats, just like holding multiple meetings in a conference room at the same time. Discussions on different topics interfere with each other, resulting in unclear directionality of the content of the speech. Users often need to read multiple chat records to accurately determine which question a certain statement is a response to, which undoubtedly greatly reduces the efficiency of response and seriously affects the user experience.

[0062] In the above embodiment, historical chat records within a preset historical length in the enterprise group chat are first obtained, and the historical chat records are processed to obtain a first text; using a preset large language model, information is extracted according to the first text to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information and financial information, and the second data includes one or more of feedback and suggestion information, news information and conclusive information; the first data is stored in a first storage space, and the second data and the first text are vectorized respectively and then stored in a second storage space; in this way, the group chat dialogue process is stored to facilitate context association, and at the same time, key information that the enterprise group chat members are concerned about and frequently ask is extracted from it, which is convenient for the subsequent call of the large language model; then the question text in the group chat is obtained, and the question text is vectorized to obtain a first vector; according to the first vector, a vector search is performed in the second storage space to obtain a second vector; using the preset large language model, according to the data stored in the first storage space, the first vector and the second vector, a reply message is output, and the reply message is sent to the group chat. The data stored in the first storage space can be directly input into the large language model so that the large language model can quickly access and use it; the first vector is obtained according to the question text processing, and the vector search is performed in the second storage space to retrieve the second vector that matches the first vector, and then the data stored in the first storage space and the first vector are combined and input into the large language model together, and the input data is comprehensively analyzed using the large language model to output a reply message corresponding to the question text. In summary, the above embodiment can realize automatic and accurate reply to enterprise group chat messages.

[0063] In addition, the above-mentioned embodiment can automatically and intelligently identify small talk and work content without changing existing communication habits, ensuring that work efficiency is not disturbed; it can dynamically update the latest information through group chat records, and intelligently extract and integrate message content to ensure that group chat members always have the latest developments; it can provide automatic and accurate replies based on the historical messages of group chat members, thereby improving user experience and satisfaction.

[0064] In other embodiments of the present application, the above-mentioned enterprise group chat message reply method further includes: S201. Determine whether the storage space size of the first storage space is greater than the preset storage limit, if so, execute S202; In S201, specifically, a token is a basic unit used to represent a natural language text in a large language model. A large language model usually has an upper limit on the number of tokens input and output. When the number of tokens input or output exceeds the limit of the large language model, the problem of "token over limit" will occur. For example, if the input text is too long and exceeds the context length limit of the large language model, the large language model will not be able to process it. The data in the first storage space will be fully input into the large language model. Based on this, the preset storage upper limit of the first storage space can be pre-determined according to the upper limit of the number of tokens input by the large language model to avoid the problem of "token over limit" as much as possible. By detecting the size of the stored space of the first storage space in real time and judging whether the size of the stored space of the first storage space is greater than the preset storage upper limit, when the size of the stored space is greater than the preset storage upper limit, S202 is executed to take out part of the data in the first storage space; when the size of the stored space is less than or equal to the preset storage upper limit, the first storage space can continue to store data.

[0065] S202. According to the difference between the stored space size and the preset storage upper limit, the corresponding excess data is extracted from the first storage space, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit; In S202, specifically, when the size of the stored space is greater than the preset storage upper limit, the preset storage upper limit is subtracted from the size of the stored space to obtain a difference, and then the excess data of equal size or greater than the difference is extracted from the first storage space, so that the size of the stored space of the first storage space after extraction is less than or equal to the preset storage upper limit. When extracting excess data, the data stored earlier can be extracted first according to the time sequence of the data stored in the first storage space, and this application does not impose specific restrictions on this.

[0066] S203. Vectorize the excess data and store it in the second storage space.

[0067] In S203, specifically, an existing vectorization model may be used to vectorize the excess data and permanently store the vectorized data in a preset second storage space, so that the vectorized data can be continuously called when the large language model is subsequently used for vector retrieval.

[0068] In this embodiment, in order to avoid the problem of "tokens exceeding the limit" as much as possible, the excess data in the first storage space is taken out, vectorized and stored in the second storage space so that the large language model can call it at any time. In addition, the data in the first storage space and the second storage space can be dynamically updated. This design breaks through the contextual restrictions and is conducive to the large language model to continuously provide high-quality and high-efficiency answers.

[0069] like Figure 2 As shown, in another embodiment of the present application, a reply system for an enterprise group chat message is also provided, including: A first acquisition unit 10 is used to acquire historical chat records within a preset historical length in the enterprise group chat, and process the historical chat records to obtain a first text; An extraction unit 11 is used to extract information from the first text using a preset large language model to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information; The storage unit 12 is used to store the first data into the first storage space, and vectorize the second data and the first text respectively and store them into the second storage space; A second acquisition unit 13 is used to acquire a question text in the enterprise group chat, and vectorize the question text to obtain a first vector; A retrieval unit 14, configured to perform a vector search in a second storage space according to the first vector to obtain a second vector; The reply unit 15 is used to use the preset large language model to output a reply message according to the data stored in the first storage space, the first vector and the second vector, and send the reply message to the group chat.

[0070] In other embodiments of the present application, in the above-mentioned enterprise group chat message reply system, the extraction unit 11, when performing information extraction based on the first text using a preset large language model to obtain the first data and the second data, is specifically used to: A pre-constructed first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.

[0071] In other embodiments of the present application, in the above-mentioned enterprise group chat message reply system, the retrieval unit 14, when performing a vector search in the second storage space according to the first vector to obtain the second vector, is specifically used to: Calculating the similarity between the first vector and each vector stored in the second storage space; According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.

[0072] In other embodiments of the present application, in the above-mentioned enterprise group chat message reply system, the reply unit 15, when executing the preset large language model and outputting the reply message according to the data stored in the first storage space, the first vector and the second vector, is specifically used to: Obtain a pre-constructed second prompt word template, and generate a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template; The second prompt word is input into a preset large language model to obtain a reply message output by the large language model.

[0073] In other embodiments of the present application, in the above-mentioned enterprise group chat message reply system, the storage unit 12 is further used to: Determine whether the storage space size of the first storage space is greater than a preset storage upper limit, If yes, extract the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after the extraction is less than or equal to the preset storage upper limit; After the excess data is vectorized, it is stored in the second storage space.

[0074] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for replying to an enterprise group chat message, characterized in that: include: Obtain historical chat records within a preset historical time period in the enterprise group chat, and process the historical chat records to obtain a first text; Using a preset large language model, extracting information from the first text to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information; The first data is stored in a first storage space, and the second data and the first text are vectorized respectively and then stored in a second storage space; Obtaining a question text in the enterprise group chat, and vectorizing the question text to obtain a first vector; According to the first vector, perform vector search in the second storage space to obtain a second vector; Using a preset large language model, a reply message is output according to the data stored in the first storage space, the first vector, and the second vector, and the reply message is sent to the enterprise group chat.

2. The method according to claim 1, characterized in that The method of using a preset large language model to extract information according to the first text to obtain first data and second data includes: A pre-constructed first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.

3. The method according to claim 1, characterized in that The second vector obtained by performing vector retrieval in the second storage space according to the first vector includes: Calculating the similarity between the first vector and each vector stored in the second storage space; According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.

4. The method according to claim 1, characterized in that The using a preset large language model to output a reply message according to the data stored in the first storage space, the first vector, and the second vector includes: Acquire a pre-built second prompt word template, and generate a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template; The second prompt word is input into a preset large language model to obtain a reply message output by the large language model.

5. The method according to claim 1, characterized in that Also includes: Determine whether the storage space size of the first storage space is greater than a preset storage upper limit, If yes, extracting the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit; After the excess data is vectorized, it is stored in the second storage space.

6. A reply system for enterprise group chat messages, characterized in that: include: A first acquisition unit is used to acquire historical chat records within a preset historical length in the enterprise group chat, and process the historical chat records to obtain a first text; an extraction unit, configured to extract information from the first text using a preset large language model to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information; A storage unit, used for storing the first data into a first storage space, and vectorizing the second data and the first text respectively and storing them into a second storage space; A second acquisition unit is used to acquire a question text in the enterprise group chat, and vectorize the question text to obtain a first vector; a retrieval unit, configured to perform vector retrieval in the second storage space according to the first vector to obtain a second vector; A reply unit is used to use a preset large language model to output a reply message according to the data stored in the first storage space, the first vector and the second vector, and send the reply message to the group chat.

7. The system as claimed in claim 6, characterized in that The extraction unit, when performing the information extraction based on the first text using the preset large language model to obtain the first data and the second data, is specifically used to: A pre-constructed first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.

8. The system as claimed in claim 6, characterized in that The retrieval unit, when performing the vector retrieval in the second storage space according to the first vector to obtain the second vector, is specifically used to: Calculating the similarity between the first vector and each vector stored in the second storage space; According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.

9. The system as claimed in claim 6, characterized in that The reply unit, when executing the step of outputting a reply message by using the preset large language model according to the data stored in the first storage space, the first vector, and the second vector, is specifically configured to: Acquire a pre-built second prompt word template, and generate a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template; The second prompt word is input into a preset large language model to obtain a reply message output by the large language model.

10. The system as claimed in claim 6, characterized in that The storage unit is further used for: Determine whether the storage space size of the first storage space is greater than a preset storage upper limit, If yes, extracting the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit; After the excess data is vectorized, it is stored in the second storage space.

Citation Information

Patent Citations

  • Token optimization method for large-model multi-round dialogues based on vector technology

    CN117993502A

  • Automatic reply method of group chat message and related equipment

    CN118233420A

  • Question reply method and device based on AI big language model, equipment and medium

    CN118350465A

  • Context-based big language model dialogue processing method and apparatus, and electronic device

    CN119831045A

  • Method and device for constructing warehouse management intelligent customer service based on local LLM

    CN119884326A