Social media processing method, processing apparatus, device, medium and program product

By storing tool outputs as memory chains and performing memory folding in social media tasks, the problem of evidence dilution in long contextual interactions is addressed, improving the accuracy of answers and the reliability of tasks.

CN123048826APending Publication Date: 2026-11-06INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611243428.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing tools call agents to long-context social media tasks, where the interaction history becomes very long, resulting in the dilution of useful evidence and the loss of the details needed to answer the question in the final output, thus failing to provide an accurate final answer.

Method used

The outputs of multiple target tools are stored separately in the evidence storage space, memory records are generated and maintained as memory chains, the interaction history is organized by summary and citation position, the final answer is generated by combining the outputs stored in the evidence storage space, and related records are merged by memory folding operation to reduce redundancy.

Benefits of technology

It effectively overcomes the problem of useful evidence being diluted in long contextual interactions, improves the accuracy and reliability of the final answer, reduces planning difficulty, and enhances the accuracy of task completion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123048826A_ABST
    Figure CN123048826A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, medium, and program product for processing social media, belonging to the field of data processing technology. This invention can organize multi-step tool call history into a concise memory chain and retain the output results as detailed evidence required for the final answer. The use of the memory chain effectively overcomes the problem of useful evidence being diluted in long contextual interactions, while the use of output results in the evidence storage space reduces the problem of the final answer losing the details required for the answer and improves the accuracy of the final answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, medium, and program product for processing social media. Background Technology

[0002] With the development of large language models, agents based on large language models have begun to be used in social media analysis to answer user queries. These agents are essentially a type of tool-invoking agent.

[0003] Most existing tools that call intelligent agents adopt a relatively simple history management method, which is to add each step of thinking, action and tool observation to the prompt in sequence, forming an ever-lengthening interaction history, and let the large language model directly read this complete history when deciding the next step.

[0004] In social media tasks with long contexts, if the above processing method is still used, the interaction history will become very long, which will dilute the useful evidence in the long context interaction. At the same time, the final output answer will lose the details required to answer the question and will not be able to provide an accurate final answer to the query input. Summary of the Invention

[0005] This invention provides a method, apparatus, device, medium, and program product for processing social media, which addresses the shortcomings of existing technologies where tool-calling agents retain tool output as a flat interaction history, resulting in a very long interaction history. This leads to the dilution of useful evidence in long contextual interactions, and the final output answer loses the details needed to answer the question, failing to provide an accurate final answer for the query input.

[0006] This invention provides a method for processing social media, comprising the following steps.

[0007] In response to a query input, the outputs of multiple target tools are stored in an evidence storage space, wherein the target tools are social media processing tools determined based on the query input; A corresponding memory record is generated based on each invocation step of the target tool. The memory record includes a summary determined based on the output of the target tool, the execution action corresponding to the target tool, and a reference location pointing to the storage location of the output of the target tool in the evidence storage space. All the aforementioned memory records are maintained in chronological order to obtain a memory chain; Based on the query input and all the digests in the memory chain, determine the next action to be performed; If the next action is to generate an answer, the final answer is generated based on the query input, the memory chain, and the output results stored in the evidence storage space.

[0008] According to a social media processing method provided by the present invention, determining the next action based on the query input and all summaries in the memory chain includes: Determine whether all the summaries in the memory chain cover the information required to respond to the query input; If it is confirmed that all summaries in the memory chain cover the information required to respond to the query input, the next action to be performed is to generate an answer. If it is confirmed that none of the summaries in the memory chain cover the information required to respond to the query input, the next action is determined to be to invoke a new social media processing tool; Specifically, when a new social media processing tool is invoked, the memory chain and the evidence storage space are updated based on the invocation result.

[0009] According to a social media processing method provided by the present invention, the social media processing method further includes: The summaries in different memory records are compared, and if at least two memory records that meet the merging conditions are detected, the next action to be performed is determined to be a memory folding action. The memory folding action includes: Identify target memory records, which include at least two memory records that meet the merging criteria; A folding operation is performed on the memory record that meets the merging conditions to obtain a folded memory record; In the memory chain, the folded memory record is used to replace the memory record that meets the merging conditions.

[0010] According to a social media processing method provided by the present invention, the merging conditions include: Different memory records point to one or more of the same event, the same entity, the same user, the same assertion, or the same time window; or The information described in the summary in the first memory record is a more detailed description of the information described in the summary in the second memory record; or The information described in the summary of the first memory record is the same as the information described in the summary of the second memory record; Wherein, the first memory record and the second memory record are any two memory records in the memory chain.

[0011] According to a social media processing method provided by the present invention, the step of performing a folding operation based on the memory records that meet the merging conditions to obtain folded memory records includes: Based on the summaries in the memory records that meet the merging criteria, determine the summaries in the folded memory records; Based on the execution actions in the memory records that meet the merging conditions, determine the execution actions in the folded memory records; Based on the reference positions in the memory records that meet the merging conditions, the reference positions in the folded memory records are determined.

[0012] According to a social media processing method provided by the present invention, the social media processing method further includes: The folding operation is cancelled if the memory record that meets the folding conditions contains the latest memory record, or if the memory record that meets the folding conditions exceeds the preset folding boundary.

[0013] According to a social media processing method provided by the present invention, the step of generating a final answer based on the query input, the memory chain, and the output results stored in the evidence storage space includes: The query input, the memory chain, and the output results stored in the evidence storage space are used as inputs to the answer generation function to obtain the final answer output by the answer generation function.

[0014] According to a social media processing method provided by the present invention, the summary includes one or more of the following: At least one of entity information, timestamp, location information, user attributes, candidate assertions, and evidence status.

[0015] The present invention also provides a social media processing apparatus, comprising the following modules: A response module is used to respond to a query input by storing the output results of multiple target tools into an evidence storage space, wherein the target tools are social media processing tools determined based on the query input; The first generation module is used to generate a corresponding memory record according to the calling steps of each target tool. The memory record includes a summary determined according to the output result of the target tool, the execution action corresponding to the target tool, and a reference position for pointing to the storage location of the output result of the target tool in the evidence storage space. The maintenance module is used to maintain all the memory records in chronological order to obtain the memory chain; The determination module is used to determine the next action to be performed based on the query input and all the summaries in the memory chain; The second generation module is used to generate a final answer based on the query input, the memory chain, and the output results stored in the evidence storage space when the next action is to generate an answer.

[0016] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the social media processing method described above.

[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the social media processing method as described above.

[0018] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the social media processing method described above.

[0019] This invention provides a method, apparatus, device, medium, and program product for processing social media. This invention can organize multi-step tool call history into a concise memory chain and retain the output results as detailed evidence required for the final answer. The use of the memory chain effectively overcomes the problem of useful evidence being diluted in long contextual interactions, while the use of the output results in the evidence storage space reduces the problem of the final answer losing the details required for the answer and improves the accuracy of the final answer. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is one of the flowcharts illustrating the social media processing method provided by the present invention.

[0022] Figure 2 This is a schematic block diagram of the long-context social media agent provided by the present invention.

[0023] Figure 3 This is a flowchart illustrating the memory folding action provided by the present invention.

[0024] Figure 4 This is a schematic diagram of the process provided by the present invention, which performs a folding operation on memory records that meet the merging conditions to obtain folded memory records.

[0025] Figure 5 This is a schematic diagram of the structure of the social media processing device provided by the present invention.

[0026] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0028] The social media processing method proposed in this invention is executed by a long-context social media intelligent agent, which includes a tool intelligent agent, a memory intelligent agent, and a planning intelligent agent.

[0029] Among them, the tool agent is responsible for interacting with external tools and obtaining tool outputs, the memory agent is responsible for recording the output of each tool as a concise memory record and performing memory folding when needed, and the planning agent is responsible for reading the maintained memory chain to determine the next action.

[0030] The following is combined with Figures 1 to 6 The present invention describes a method, apparatus, device, medium, and program product for processing social media.

[0031] Figure 1 This is one of the flowcharts illustrating the social media processing method provided by the present invention, such as... Figure 1 As shown, the method includes the following: Step 101: In response to the query input, store the output results of multiple target tools into the evidence storage space respectively. The target tools are social media processing tools determined based on the query input.

[0032] Step 102: Generate a corresponding memory record based on the invocation steps of each target tool. The memory record includes a summary determined based on the output of the target tool, the execution action corresponding to the target tool, and a reference location pointing to the storage location of the output of the target tool in the evidence storage space.

[0033] Step 103: Maintain all memory records in chronological order to obtain the memory chain.

[0034] In some embodiments, the memory record generated for each tool invocation step is represented as follows: m t ={s t at r t}; Among them, a t Indicates the action performed, r t It refers to the output of the target tool. t The reference location, s t It is based on o t The generated summary. The summary `st` captures task-related information for the current step, while `r`... t This enables planning agents to recover complete tool observations when detailed evidence is required.

[0035] In practice, abstracts t Written as a task-oriented record rather than a general natural language compression, it describes the purpose of the action, the useful evidence discovered by the tool, and any remaining uncertainties introduced by the observation. For social media tasks, when such information is available from the tool output, the record may include key entities, timestamps, locations, user attributes, candidate arguments, or evidence states. The memory record is not intended to replace the original output but rather to provide a readable index into the evidence store, enabling subsequent planning to reason about the current state without repeatedly processing long tool observations. The memory record is maintained chronologically as a memory chain, expressed as follows: M t ={m1, m2, ..., m t}; Thus, this invention is summarized in the abstract s t Maintain a tight textual trajectory while preserving access to the target tool's output through its evidentiary citations.

[0036] Step 104: Based on the query input and all summaries in the memory chain, determine the next action to be performed.

[0037] Step 105: If the next action is to generate an answer, generate the final answer based on the query input, the memory chain, and the output results stored in the evidence storage space.

[0038] Specifically, given a user query q, a long-context social media agent and a toolkit T = {T1, T2, ..., T} K The tool agent interacts and produces the final answer y. In step t, the tool agent selects an action a. t This action can invoke external tools, such as post retrieval, user profile analysis, social search, or content analysis. Once the target tool is executed, its output is returned. t This may include posts, user profiles, comments, search results, or intermediate analytics results; tThe data is stored unmodified in the evidence storage space, thus preserving the detailed information generated by the tool. The tool usage trajectory up to step t is denoted as τ. t ={(a i o i (i from 1 to t), the tool calls the agent based on the accumulated trajectory τ t Make the next decision: a t+1 =π(q,τ t ); Here, π represents the planning agent used to select the next action. In long-context social media tasks, directly using the complete trajectory as the inference state can obscure useful evidence and affect subsequent decisions.

[0039] Therefore, this invention no longer directly reuses the accumulated original trajectory, but converts each tool call step into a concise memory record and maintains it as a memory chain in chronological order. The summary view of the memory chain serves as a concise state for intermediate decisions, while the output results of the target tool are retained in the evidence storage space as detailed evidence for the final answer. This ensures that the historical conciseness is maintained without losing the details required for the answer.

[0040] Specifically, such as Figure 2 As shown, by obtaining user query input and having the tool agent call the target tool to obtain the target tool's output, the memory agent converts each target tool call step into a memory record and maintains it as a memory chain, while saving the target tool's output to the evidence storage space. Then, the planning agent reads the summary of the memory chain as the decision state to determine the next action. Finally, when the next action is to generate the answer, the final answer is generated by combining the memory chain and the output in the evidence storage space.

[0041] In this process, two roles that are often intertwined in tool-calling agents are separated: one is the memory chain, which is the concise description of checked and still uncertain content required by the planning role; the other is the output results stored in the evidence storage space, which is the answer anchoring role, requiring access to detailed posts, profiles, comments, reports, or search results returned by the tool. This invention can organize multi-step tool-calling history into a concise memory chain and retain the output results as detailed evidence needed for the final answer. The use of the memory chain effectively overcomes the problem of diluted useful evidence in long contextual interactions, while the use of output results in the evidence storage space reduces the loss of details needed for the final answer, thus improving the accuracy of the final answer.

[0042] At the same time, it reduces the planning difficulty of long context interactions and improves the reliability of tool calls and the accuracy of task completion.

[0043] In some embodiments, determining the next action based on the query input and all summaries in the memory chain includes: determining whether all summaries in the memory chain cover the information required to respond to the query input; if it is confirmed that all summaries in the memory chain cover the information required to respond to the query input, determining the next action to generate an answer; if it is confirmed that all summaries in the memory chain do not cover the information required to respond to the query input, determining the next action to invoke a new social media processing tool; wherein, if invoking a new social media processing tool is performed, the memory chain and evidence storage space are updated based on the invocation result.

[0044] In this embodiment, the planning agent does not base its planning on the complete output of the target tool, but instead reads the summary S of all memory records in the current memory chain. t And the user inputs 'q' to determine the next action, that is: a t+1 =π(q,S t ); Among them, a t+1 For the action at step t+1, this action can be a new tool call, further analysis, memory folding, or generating the final answer.

[0045] Specifically, before terminating, the planning agent checks whether the current memory trajectory covers the information required for the query. For example, an event detection query may require event content, location, and time; a misinformation detection query may require both assertions and external evidence; and a user-centric query may require profile-level information in addition to recent posts.

[0046] By making such missing information visible in the memory trajectory, the likelihood of the planning agent stopping when only partial evidence has been collected is reduced. If the selected next action is a tool invocation, the planning agent executes the corresponding tool and returns a new memory record as the output; if the selected action is memory folding, memory folding updates the memory chain by merging related records.

[0047] In some embodiments, the social media processing method further includes: comparing summaries in different memory records, and determining the next action to be a memory folding action if at least two memory records that meet the merging criteria are detected.

[0048] like Figure 3 As shown, the memory folding action includes: Step 301: Identify the target memory record, which includes at least two memory records that meet the merging criteria.

[0049] Step 302: Perform a folding operation on the memory records that meet the merging conditions to obtain folded memory records.

[0050] Step 303: In the memory chain, replace the memory record that meets the merging conditions with a folded memory record.

[0051] In some embodiments, the merging conditions include: Different memory records point to one or more of the same event, the same entity, the same user, the same assertion, or the same time window; or The information described in the summary of the first memory record is a more detailed description of the information described in the summary of the second memory record; or The information described in the summary of the first memory record is the same as the information described in the summary of the second memory record; Among them, the first memory record and the second memory record are any two memory records in the memory chain.

[0052] Specifically, as interactions proceed, the memory chain may contain records describing overlapping, repetitive, or closely related information. Retaining these records individually would unnecessarily lengthen the memory chain and potentially affect subsequent reasoning. Therefore, this invention introduces memory folding to merge related memory records. Given a memory chain M... t First, read the summary field of all memory records: S t ={s1,s2,…,s t}; Among them, S t This represents all the summaries in the memory chain, where t is the number of memory records in the memory chain.

[0053] Based on S t The memory agent determines whether there are memory records that should be folded. Folding is considered when multiple memory records point to the same event, entity, user, assertion, or time window, or when subsequent observations refine previous candidate findings; folding is also useful when several records only provide repetitive background information and can be represented by a shorter memory. If no relevant records are found, the memory chain remains unchanged; otherwise, a subset C of the memory records is selected. C={m i m j ,…},m i m j Belongs to M t .

[0054] In this context, subset C is the set consisting of at least two memory records that meet the merging criteria.

[0055] For a subset C of memory records, by performing a folding operation, the resulting folded memory records are expressed in m... C This means, that is: m C ={s Ca C R C}; Among them, s C It is a rewritten summary of shared task-related information, i.e., a summary in the folded memory record. C This indicates the action involved, specifically the action performed in the folded memory record, R. C The storage location of the detailed tool output for the selected record, i.e., the reference location in the folded memory record.

[0056] In this embodiment, folding shortens the memory chain but does not overwrite the output of the original target tool, reducing the risk of losing details during compression: if the final answer requires exact post content, profile attributes, or report evidence, it can still be obtained through R. C Retrieve the original output. This reduces repetitive memorization while preserving the information needed for subsequent reasoning and verification.

[0057] In some embodiments, such as Figure 4 As shown, a folding operation is performed on memory records that meet the merging criteria to obtain folded memory records, including: Step 401: Based on the summaries in the memory records that meet the merging criteria, determine the summaries in the folded memory records; Step 402: Based on the execution actions in the memory records that meet the merging conditions, determine the execution actions in the folded memory records; Step 403: Determine the reference position in the folded memory record based on the reference position in the memory record that meets the merging conditions.

[0058] In some embodiments, summaries in memory records that meet the merging criteria are summarized as summaries in folded memory records, execution actions based on memory records that meet the merging criteria are counted as execution actions in folded memory records, and reference positions in memory records that meet the merging criteria are counted as reference positions in folded memory records.

[0059] In some embodiments, the social media processing method further includes: If a memory record that meets the merging criteria contains the latest memory record, or if a memory record that meets the merging criteria exceeds a preset folding boundary, the folding operation will be canceled.

[0060] In this embodiment, canceling the current folding operation can be understood as skipping the folding operation of the selected memory records that meet the merging conditions.

[0061] This process allows the most recent memory records to remain visible when planning the next action, ensuring that the memory chain is maintained and the final answer is generated.

[0062] In some embodiments, a fold boundary can be understood as the summary in a memory record that meets the merging conditions containing at least one of pre-set entity information, timestamps, location information, user attributes, candidate arguments, and evidence status.

[0063] In some embodiments, a final answer is generated based on the query input, the memory chain, and the output stored in the evidence storage space, including: The query input, the memory chain, and the output stored in the evidence storage space are used as inputs to the answer generation function to obtain the final answer output by the answer generation function.

[0064] The answer generation function is represented as follows: y=g(q,M t O t ); Here, g represents the answer generation function. In this process, the query input and the memo chain are used as inputs, so that the answer generation function can generate a plan based on these two parts. At the same time, the output results stored in the evidence storage space are also used as inputs to the answer generation function, so that the answer generation function avoids repeatedly reading the lengthy output results. When generating a detailed response, the output results stored in the evidence storage space can still be consulted to ensure the accuracy of the final answer.

[0065] In some embodiments, the summary includes one or more of the following: At least one of entity information, timestamp, location information, user attributes, candidate assertions, and evidence status.

[0066] In some embodiments, experiments were conducted on the SoMe benchmark for social media agents using a large language model. This benchmark comprises 9,164,284 posts, 6,591 user profiles, 25,686 external reports, and 17,869 labeled task queries, providing eight tasks for evaluation: Real-time Event Detection (RED), Streaming Event Summarization (SES), Misinformation Detection (MID), User Behavior Prediction (UBP), User Sentiment Analysis (UEA), User Comment Simulation (UCS), Media Content Recommendation (MCR), and Social Media Question Answering (SMQ). These tasks require the agent to collect information across multiple tool invocations, making them suitable for evaluating memory management and planning within long contexts. We adopted GLM-4-9B-0414 as the base agent strategy, running both the original tool-invocation agent and the agent employing the method of this invention under the same task inputs, toolset, and evaluation protocol.

[0067] For RED, SES, and SMQ, the score is based on a semantic comparison between the generated response and the truth value; for MID, UBP, UEA, UCS, and MCR, the final answer is extracted and evaluated according to its accuracy with the truth value; the average score is the average of the eight tasks, and the relative improvement is the average score relative to the corresponding original agent line.

[0068] To verify the function of each module, two ablation variants were set up: this method (defolding) removes memory folds and retains all memory records separately; this method (deplanning) retains memory records and folds, but does not use memory trajectories to explicitly determine the next action.

[0069] Table 1 shows the results of answering questions on eight social media agent tasks with different settings. The task column represents the score for the corresponding task, the average column represents the average score of the eight tasks, and the relative improvement column represents the relative improvement of the average score compared to the original agent.

[0070] Table 1

[0071] As can be seen from Table 1, the processing method proposed in this embodiment is significantly better than the original tool calling the intelligent agent in eight tasks.

[0072] Specifically, this method improves the average score from 37.51 to 43.73, a relative improvement of 16.6%. The gains are most significant on tasks requiring evidence maintenance across multiple rounds, such as increasing RED from 14.42 to 28.18 and SMQ from 46.48 to 67.51. The defolded variant achieves an average score of 42.33 (a relative improvement of 12.8%), indicating that recording tool outputs as explicit memory records and planning on the trajectory has beneficial effects. The full method further improves to 43.73, demonstrating that folding relevant memories helps reduce redundant history and exposes a clearer state to the planner. The deplanning variant only achieves an average score of 38.77 (a relative improvement of 3.4%), significantly lower than the full method, indicating that memory management alone is insufficient; the agent must also utilize the maintained trajectory to decide whether to continue retrieval, repair failed toolchains, merge relevant evidence, or stop and generate the final answer.

[0073] Furthermore, regarding the number of interaction rounds, across the eight tasks, the original agent used an average of 5.24 rounds, while the visible memory exposed to the planner after folding contained only 4.36 records, equivalent to reducing the context the planner needed to read by 16.75%. Meanwhile, the actual execution with folding enabled averaged 5.40 rounds, only 3.02% more than the original agent, indicating that folding, while presenting a shorter and clearer memory state to the planner, did not significantly alter the tool interaction process. Longer tasks benefited more from folding; for example, RED had the longest interaction length, with 8.60 rounds for the original agent, 9.24 rounds for the actual folded execution, and the visible memory reduced to 5.40 records after folding, a reduction of 37.26% relative to the original agent rounds and 41.60% relative to the actual folded execution rounds. Regarding the reliability of tool usage, in the Social Media Question Answering (SMQ) task, the original agent succeeded on 65.95% of queries, while our method increased the success rate to 90.75%. The main reliability gain comes from the reduction of tool invocation errors, which decreased from 30.15% in the original agent to 5.15% in our method. This indicates that the maintained memory trajectory helps the agent select effective tool actions in multi-step question answering.

[0074] The social media processing apparatus provided by the present invention will be described below. The social media processing apparatus described below can be referred to in correspondence with the social media processing method described above.

[0075] like Figure 5 As shown, the present invention proposes a social media processing apparatus, comprising: The response module 501 is used to respond to the query input and store the output results of multiple target tools into the evidence storage space respectively. The target tools are social media processing tools determined based on the query input. The first generation module 502 is used to generate a corresponding memory record according to the calling steps of each target tool. The memory record includes a summary determined according to the output result of the target tool, the execution action corresponding to the target tool, and a reference position for pointing to the storage location of the output result of the target tool in the evidence storage space. Maintenance module 503 is used to maintain all memory records in chronological order to obtain a memory chain; The determination module 504 is used to determine the next action to be performed based on the query input and all summaries in the memory chain; The second generation module 505 is used to generate the final answer based on the query input, the memory chain, and the output results stored in the evidence storage space when the next action is to generate an answer.

[0076] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device may include a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a social media processing method. This method includes: in response to a query input, storing the output results of multiple target tools into an evidence storage space, where the target tools are social media processing tools determined based on the query input; generating a corresponding memory record according to the calling steps of each target tool, the memory record including a summary determined based on the output results of the target tool, the execution action corresponding to the target tool, and a reference location pointing to the storage location of the target tool's output results in the evidence storage space; maintaining all memory records in chronological order to obtain a memory chain; determining the next execution action based on the query input and all summaries in the memory chain; and generating a final answer based on the query input, the memory chain, and the output results stored in the evidence storage space when the next execution action is an answer generation action.

[0077] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0078] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the social media processing methods provided by the above methods. The method includes: in response to a query input, storing the output results of multiple target tools into an evidence storage space, wherein the target tools are social media processing tools determined based on the query input; generating a corresponding memory record according to the invocation steps of each target tool, wherein the memory record includes a summary determined based on the output results of the target tool, an execution action corresponding to the target tool, and a reference position for pointing to the storage location of the output results of the target tool in the evidence storage space; maintaining all memory records in chronological order to obtain a memory chain; determining the next execution action based on the query input and all summaries in the memory chain; and generating a final answer based on the query input, the memory chain, and the output results stored in the evidence storage space when the next execution action is an answer generation action.

[0079] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the social media processing methods provided by the above methods. The method includes: in response to a query input, storing the output results of multiple target tools into an evidence storage space, wherein the target tools are social media processing tools determined based on the query input; generating a corresponding memory record according to the invocation steps of each target tool, the memory record including a summary determined based on the output results of the target tool, an execution action corresponding to the target tool, and a reference location pointing to the storage location of the target tool's output results in the evidence storage space; maintaining all memory records in chronological order to obtain a memory chain; determining the next execution action based on the query input and all summaries in the memory chain; and generating a final answer based on the query input, the memory chain, and the output results stored in the evidence storage space when the next execution action is an answer generation action.

[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0081] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for processing social media, characterized in that, include: In response to a query input, the outputs of multiple target tools are stored in an evidence storage space, wherein the target tools are social media processing tools determined based on the query input; A corresponding memory record is generated based on each invocation step of the target tool. The memory record includes a summary determined based on the output of the target tool, the execution action corresponding to the target tool, and a reference location pointing to the storage location of the output of the target tool in the evidence storage space. All the aforementioned memory records are maintained in chronological order to obtain a memory chain; Based on the query input and all the digests in the memory chain, determine the next action to be performed; If the next action is to generate an answer, the final answer is generated based on the query input, the memory chain, and the output results stored in the evidence storage space.

2. The social media processing method according to claim 1, characterized in that, The step of determining the next action based on the query input and all digests in the memory chain includes: Determine whether all the summaries in the memory chain cover the information required to respond to the query input; If it is confirmed that all summaries in the memory chain cover the information required to respond to the query input, the next action to be performed is to generate an answer. If it is confirmed that none of the summaries in the memory chain cover the information required to respond to the query input, the next action is determined to be to invoke a new social media processing tool; Specifically, when a new social media processing tool is invoked, the memory chain and the evidence storage space are updated based on the invocation result.

3. The social media processing method according to claim 1, characterized in that, The social media processing methods also include: The summaries in different memory records are compared, and if at least two memory records that meet the merging conditions are detected, the next action to be performed is determined to be a memory folding action. The memory folding action includes: Identify target memory records, which include at least two memory records that meet the merging criteria; A folding operation is performed on the memory record that meets the merging conditions to obtain a folded memory record; In the memory chain, the folded memory record is used to replace the memory record that meets the merging conditions.

4. The social media processing method according to claim 3, characterized in that, The merging conditions include: Different memory records point to one or more of the same event, the same entity, the same user, the same assertion, or the same time window; or The information described in the summary in the first memory record is a more detailed description of the information described in the summary in the second memory record; or The information described in the summary of the first memory record is the same as the information described in the summary of the second memory record; Wherein, the first memory record and the second memory record are any two memory records in the memory chain.

5. The social media processing method according to claim 3, characterized in that, The folding operation performed on the memory records that meet the merging conditions yields folded memory records, including: Based on the summaries in the memory records that meet the merging criteria, determine the summaries in the folded memory records; Based on the execution actions in the memory records that meet the merging conditions, determine the execution actions in the folded memory records; Based on the reference positions in the memory records that meet the merging conditions, the reference positions in the folded memory records are determined.

6. The social media processing method according to claim 3, characterized in that, The social media processing methods also include: The folding operation is cancelled if the memory record that meets the folding conditions contains the latest memory record, or if the memory record that meets the folding conditions exceeds the preset folding boundary.

7. The method for processing social media according to any one of claims 1 to 6, characterized in that, The process of generating the final answer based on the query input, the memory chain, and the output results stored in the evidence storage space includes: The query input, the memory chain, and the output results stored in the evidence storage space are used as inputs to the answer generation function to obtain the final answer output by the answer generation function.

8. The social media processing method according to claim 1, characterized in that, The abstract includes one or more of the following: At least one of entity information, timestamp, location information, user attributes, candidate assertions, and evidence status.

9. A social media processing device, characterized in that, include: A response module is used to respond to a query input by storing the output results of multiple target tools into an evidence storage space, wherein the target tools are social media processing tools determined based on the query input; The first generation module is used to generate a corresponding memory record according to the calling steps of each target tool. The memory record includes a summary determined according to the output result of the target tool, the execution action corresponding to the target tool, and a reference position for pointing to the storage location of the output result of the target tool in the evidence storage space. The maintenance module is used to maintain all the memory records in chronological order to obtain the memory chain; The determination module is used to determine the next action to be performed based on the query input and all the summaries in the memory chain; The second generation module is used to generate a final answer based on the query input, the memory chain, and the output results stored in the evidence storage space when the next action is to generate an answer.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the social media processing method as described in any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the social media processing method as described in any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the social media processing method as described in any one of claims 1 to 8.