Social event prediction method based on model context protocol

By building a structured event database and using model context protocol technology to configure the interaction protocol between the large language model and the database, the problems of knowledge loss and data access of the large language model when facing real-time changing information are solved, and the accuracy and explainability of social event prediction are improved.

CN120671845APending Publication Date: 2025-09-19UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510830498.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing large language models are prone to outdated and missing knowledge when faced with real-time information, resulting in irrational predictions or the inability to predict future events. Furthermore, the models cannot directly access intranet data and structured data, lacking sufficient reference information, leading to inaccurate predictions.

Method used

By constructing a social event prediction method based on model context protocol, screening and cleaning social event information, building a structured event database, and using model context protocol technology to configure the interaction protocol between the large language model and the database, high-quality event prediction results are generated.

Benefits of technology

It improves the accuracy and explainability of event predictions, solves the problem of knowledge loss in large models when facing real-time changing information, enhances the ability to predict future events, and reduces the risk of sensitive information leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671845A_ABST
    Figure CN120671845A_ABST
Patent Text Reader

Abstract

The invention discloses a social event prediction method based on a model context protocol, belongs to the technical field of event prediction, and solves the problem that knowledge of an existing large model has time limitation. The method comprises the following steps: screening data with consistent social event report time and news report report time from an original data set based on a preset time range, and finishing time sequence alignment; the URL of the social event reported for the first time is extracted and processed; after processing, counting the report frequency of each social event category, screening a URL (Uniform Resource Locator) corresponding to the high-frequency social event based on a preset threshold value, and downloading the associated text to perform document-level cleaning, paragraph-level processing and recombination; constructing a structured event database based on a recombined result; and configuring a model context protocol interface, constructing a standardized questioning template, driving the large language model to call the context protocol interface to interact with the database according to questioning information of a user based on the standardized questioning template, and generating an event prediction result based on interaction. The method is used for social event prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a social event prediction method based on a model context protocol, which is used for social event prediction and belongs to the technical field of event prediction. Background Art

[0002] The goal of event prediction is to model the temporal relationships and evolutionary patterns between events from open, multi-source, heterogeneous texts and predict potential future events. This task is highly valuable in areas such as social relationship modeling, risk monitoring, and emergency response. In recent years, large language models (LLMs) have made significant progress in natural language processing, and a growing number of researchers are exploring how to incorporate large models into event prediction tasks to mine complex semantic information and enhance the model's generalization capabilities. Traditional event prediction methods, which mostly rely on statistical modeling, event knowledge graph reasoning, and deep learning techniques, struggle to fully utilize the contextual information in large texts or suffer from insufficient prediction accuracy. In contrast, large models possess powerful language representation and reasoning capabilities, enabling them to learn and reason based on the semantic structure and evolutionary patterns of events.

[0003] The traditional NL-to-SQL interface uses a large model to convert natural language into SQL statements, and the local machine executes the code on the back end to obtain data. After obtaining the data, the large model needs to be called manually again. The operation process is relatively complex, requiring manual inspection and construction, and the degree of automation is low. There are problems such as SQL statement generation errors, poor understanding of complex statement patterns, lack of permissions and syntax verification mechanisms, and easy generation of dangerous SQL statements (such as deleting data in the database), insufficient understanding of template parameters (such as incorrect generation parameters and inability to call the template), and low reference value of returned content. In addition, the query statements are black boxes with low interpretability and need to be generated separately for each task, which is costly.

[0004] RAG retrieval enhancement technology can provide contextual references, but there are problems with uncontrollable content retrieval and lack of permission control. The long context support retrieved and the large token usage exceed the scope of model understanding. The accuracy of the retrieved content is heavily dependent on semantic retrieval and embedded matching. The logical expression of the retrieved content is relatively weak, the precision is low, the content range is large, and the reference value is not high. The service calls are rigid and lack the ability to dynamically call across services and call a unified model.

[0005] In summary, the existing large models have the following technical problems:

[0006] 1. Because the knowledge of large language models is time-limited, they are prone to outdated facts and missing knowledge when faced with real-time information, resulting in unreasonable prediction results or the inability to predict future event outcomes. Alternatively, the raw data is single, fixed, or in triple form, lacking sufficient expression of event context semantics, leading to sparse input information and insufficient semantic cues.

[0007] 2. LLM cannot directly access private data such as corporate intranet data and structured data. Therefore, large language models make predictions without actual real-world data references. This lack of reference information makes it impossible for large models to accurately predict or analyze specific social situations.

[0008] 3. The context token length of large models is limited, making it impossible to load massive amounts of data at once, which can easily lead to missing key information.

[0009] 4. Traditional methods lack semantic service interfaces for large models, rely on prompt orchestration and manual debugging, have a low degree of automation, lack refined permission control for data access, and are prone to risks such as sensitive data leakage and illegal calls. Summary of the Invention

[0010] In response to the above research problems, the purpose of the present invention is to provide a social event prediction method based on model context protocol to solve the problems of the existing technology that the knowledge of the large language model is time-limited, and facts are easily outdated and knowledge is missing when facing real-time changing information, resulting in unreasonable prediction results or inability to predict future event results, or the original data is single, fixed in structure or in triple form, lacking sufficient expression of event context semantic information, resulting in sparse input information and insufficient semantic prompts.

[0011] In order to achieve the above object, the present invention adopts the following technical solutions:

[0012] A social event prediction method based on model context protocol includes the following steps:

[0013] Step S1: Based on a preset time range, social events whose reporting time is consistent with the news reporting time are selected from the original data set to complete the time series alignment;

[0014] Step S2: based on the URLs of the first reported social events among the aligned social events, remove duplicate and single data, and standardize the retained social events. Single data refers to social events that are reported by only a single news source within a specified time range and have no contextual information support.

[0015] Step S3: Merge the standardized social events, count the reporting frequencies of each social event category, and filter URLs corresponding to high-frequency social events based on a preset threshold and download the associated texts;

[0016] Step S4: Perform document-level cleaning on the downloaded text using a sentence segmentation model;

[0017] Step S5: Using a language recognition model to perform paragraph-level processing on the cleaned text, retaining the target language paragraphs and reorganizing them;

[0018] Step S6: constructing a structured event database based on the result of the reorganization process, and storing the cleaned context fragments in a three-dimensional mapping of event type, participant, and time;

[0019] Step S7: configuring the model context protocol interface, i.e., establishing the interaction protocol parameters between the large language model and the structured event database;

[0020] Step S8: Build a standardized question template, drive the large language model to call the context protocol interface and interact with the structured event database according to the user's question information based on the standardized question template, and generate event prediction results based on the interaction.

[0021] Furthermore, the specific steps of step S1 are:

[0022] Step S1.1: Extract social events from the original data set based on a preset time range, wherein the preset time range is the time to maintain the balance and integrity of the data by excluding abnormal interference events. Each social event includes the date, event type, subject involved in the social event, news source, and reporting time;

[0023] Step S1.2: Standardize and align social events within a preset time range with news reporting times, and retain social events whose reporting times are aligned with corresponding news release times and whose timing is consistent.

[0024] Furthermore, the specific steps of step S2 are:

[0025] Step S2.1: Classify the aligned social events in the order of subject, event type, and date to form subject-event type-date groups. Then, search for the earliest social event based on the date and record the corresponding URL as the first public report of the event.

[0026] Step S2.2: Delete duplicate data and single data of social events based on the recorded URLs, and standardize the retained information of social events.

[0027] Furthermore, the specific steps of step S3 are:

[0028] Step S3.1: Sort the standardized social event data by time, merge the social events after sorting, and group them by event type and date, and count the total number of mentions of each type of social event;

[0029] Step S3.2: Screen the events with a total number of mentions greater than a preset threshold as high-frequency social events, and download the associated text based on the URL corresponding to the high-frequency social event.

[0030] Furthermore, the specific steps of step S4 are:

[0031] Step S4.1: Use the SentencePiece word segmenter model to segment the downloaded associated text, that is, perform word segmentation on the downloaded associated text to form a token sequence, adopt a dynamic threshold judgment mechanism to judge the abnormality of the token sequence, and correct the abnormal tokens. For the uncovered new words, they are decomposed into common word fragments to obtain the final token sequence. The dynamic threshold judgment mechanism refers to setting different thresholds for the repetition rate of different languages, different characters and words in the token sequence. The uncovered new words refer to words that do not exist in the vocabulary used by the SentencePiece word segmenter model and have not been learned by the SentencePiece word segmenter model;

[0032] Step S4.2: Perform document-level cleaning on the final Token sequence, that is, count the repeated characters and words in the final Token sequence and calculate the repetition rate. Based on the empirical threshold, determine whether it meets the low-quality text requirement. If so, discard or mark it. Otherwise, retain it, remove redundant punctuation, remove source footnotes, clear non-language symbols, and finally reconstruct the preliminary cleaned text content, that is, obtain the cleaned text.

[0033] Furthermore, the specific steps of step S5 are as follows: step S5.1, dividing the cleaned text into paragraphs, and calculating the language confidence of each paragraph using a language detection model, wherein the language identification model is a FastText language identification model;

[0034] Step S5.2: Filter paragraphs according to the preset language list and confidence threshold, and reassemble the filtered paragraphs in the order of the original text.

[0035] Furthermore, the specific steps of step S6 are:

[0036] Step S6.1: Generate detailed information fields for each reorganized social event and convert them into structured data. The detailed information fields include MD5_id, participants, event type, article link, reporting time, title, content, and summary. The structured data is in DataFrame format.

[0037] Step S6.2: Based on the structured data, the participants and event types are classified in turn to form participant-event type groups. Based on the participant-event type groups, social events of the same event type and the same participants are merged and stored in the structured event database, including participant 1, event type, participant 2 and text content.

[0038] Furthermore, the specific steps of step S7 are:

[0039] Step S7.1: Model context protocol integration service technology, i.e., querying the model context protocol of the structured event database and configuring protocol parameters for interacting with the corresponding database, where the database is MySQL, Mongodb, Oracle, or PostgreSQL;

[0040] Step S7.2: Write the corresponding configuration information in the json configuration file to build a structured event database interactive service component, and register it as an external service of the large language model. It will be selected and called when running inference. Writing the corresponding configuration information in the json configuration file to build a structured event database interactive service component refers to a JSON configuration file structure in Python dictionary format. The top-level structure uses a dictionary key-value pair format to represent the basic information of a service component, fill in the MCP service information field, fill in the "args" field to define the parameter list, define the component startup command, and configure the database type and parameters. The MCP service information field includes the service name, service type, service description and target model support metadata, and the "args" field defines the parameter list including the parameter name and parameter type.

[0041] Furthermore, the specific steps of step 8 are:

[0042] Step S8.1: construct a standardized question template to guide users to provide complete and structured question information;

[0043] Step S8.2: The large language model selects question information based on the standardized question template and interacts with the content of the structured event database, and returns fragments in the database to the large language model to form context reference content and generate prediction results for social events.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] First, the present invention constructs semantically rich event context data during data processing, improving prediction results. This solves the problem in existing event prediction tasks where raw data is limited to a single, fixed structure, and triple form (e.g., time, event type, and participants), lacking sufficient expression of event context semantic information, resulting in sparse input information and insufficient semantic cues. The present invention also avoids the problem of knowledge loss caused by the time limitation of knowledge in large language models when facing real-time changing information, further enhancing the ability to predict future events.

[0046] 2. The present invention also uses the model context protocol technology service to obtain high-quality event context content fragments, which solves the problem of insufficient understanding ability and low prediction accuracy of large models (i.e., large language models) in event causal relationship inference and trend prediction when the input lacks fine-grained information.

[0047] 3. This invention strengthens the event reasoning and prediction capabilities of large models, improving the relevance and accuracy of large model event predictions;

[0048] Fourth, the present invention alleviates the problem of large models being unable to process information due to historical memory loading or input content that is too long and has a large span;

[0049] Fifth, the present invention improves the interpretability of large models in the process of reasoning and predicting social events due to the clear information source and the way of splicing context fragments with standardized templates;

[0050] 6. By configuring a variety of different tools and services, this invention facilitates large models to reference and process dynamic fusion information from different data sources, and can dynamically add / replace services (for example, combining structured data, semi-structured data, unstructured data, multilingual data, multimodal data, etc.), greatly improving service collaboration efficiency;

[0051] 7. Since the present invention configures tools / services independently, this method can limit the roles and call scopes of large model access, and finely manage the permissions for external data access, effectively reducing the risk of sensitive information leakage and improving data security and controllability;

[0052] 8. The effectiveness of the large model in predicting events also depends on the prompt. In addition to improving data processing and data acquisition, the present invention also fine-tunes the question template prompt so that the large model can deeply understand the core of the problem and make highly reasonable and accurate predictions. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 The figure is a flow chart of the steps of the method of the present invention. DETAILED DESCRIPTION

[0054] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0055] The present invention proposes a social event prediction method based on the model context protocol. By high-quality screening and cleaning of social event information, it constructs structured data that integrates time, events, participants, and multiple event-related articles, effectively promoting the use of contextual information in large texts. The reference model context protocol technology (MCP) creates a bridge connecting the latest information knowledge with large language model reasoning, effectively expanding the knowledge reference content of the large model. MCP technology unifies the information interaction mode between external tools and AI models, introduces relevant information about the current prediction task in real time, and provides detailed context information perception capabilities for large models. It effectively solves the problem that the context reference fragments of previous large models affect the prediction accuracy, assists the large model to complete event reasoning, improves the accuracy of prediction, and provides an efficient, accurate and widely adaptable social event prediction method.

[0056] See also Figure 1 , the present invention provides a technical solution:

[0057] The present invention provides the following technical solution: a social mediation event prediction method based on a model context protocol. The specific steps of the social mediation event prediction method are as follows:

[0058] Step S1: based on a preset time range, filter data from the original data set whose reporting time of social events is consistent with that of news reports, and complete time series alignment;

[0059] Step S1.1, extract social events from the original data set based on the preset time range. Each recorder contains at least the date of the social event (EventDate), event type (RelName), subject involved in the event (Actor), news source (URL), and reporting time (PublishDate). The preset time range is the time to maintain the balance and integrity of the data by excluding abnormal interference events. For example, according to the preset time range, data with valid time limits are screened out in the original data set. In order to avoid interference from policies or global events and maintain the balance and integrity of the data, information from January 2024 to December 2024 in the social event database is selected.

[0060] Step S1.2, align the social events and news reporting times within the preset time range after standardization, and retain the social events whose reporting time is aligned with the corresponding news reporting time and consistent in time sequence. That is, extract the event reporting time and news reporting time of each social event, and perform field standardization, convert the time in different formats (MM / DD / YYYY, DD-MM-YYYY) into the ISO standard format (YYYY-MM-DD), and strictly ensure that the event reporting time is consistent with the news reporting time it quotes (that is, the reporting time is the same), that is, if EventDate = PublishDate, it is retained, and if it is inconsistent, it is removed. In order to reduce possible information leakage and prevent the large model from being exposed to future information during prediction, the specified time interval data set is aligned with the data time to ensure that the date of the social event is completely consistent with the publication date of its news report, so as to ensure that the problem of "using the future to predict the present" does not occur when making event predictions.

[0061] Step S2: based on the URLs of the first reported social events among the aligned social events, remove duplicate and single data, and standardize the retained social events. Single data refers to social events that are reported by only a single news source within a specified time range and have no contextual information support.

[0062] Step S2.1: Classify the aligned social events by subject (including Actor1 and Actor2), event type (RelName), and date (EventDate) to form subject-event-type-date groups. Then, search for the earliest social event by date and record the corresponding URL as the first public report of the event. This is to improve the quality and uniqueness of social event data and prevent the same event from being counted multiple times, which could contaminate statistical analysis. The article where the event first appeared is recorded here.

[0063] Step S2.2: Based on the recorded URLs, duplicate and unique data for social events are deleted and the retained social event information is standardized. Specifically, duplicate and unique data for social events are deleted, noise is reduced, and the information contained is standardized. Event codes (017->Cooperate) are replaced with easily readable names, and country abbreviations are replaced with their full names (RUS->Russia). Data is then integrated using a combination of code and name (e.g., 017-Cooperate). For example, the original data (2023-01-01, FRA, 020, CHN) becomes (2023-01-01, France, 020-Make an appeal or request, China) after processing.

[0064] Step S3: Merge the standardized social events, count the reporting frequencies of each social event category, and filter URLs corresponding to high-frequency social events based on a preset threshold and download the associated texts;

[0065] Step S3.1: Sort the standardized social event data by time, merge the social events after sorting, and group them by event type (RelName) and date (Date). Count the total number of mentions of each type of social event (SocialEventCode). Also calculate the distribution of the number of social events of each type, that is, how many types of events are mentioned X times per day. This is done to observe the rationality of the predicted distribution of subsequent events, that is, to determine whether the predicted event distribution is generally consistent with the distribution of the original data events.

[0066] Step S3.2: Screen the events with a total number of mentions greater than a preset threshold as high-frequency social events, and download the associated text based on the URL corresponding to the high-frequency social event.

[0067] Step S4: Perform document-level cleaning on the downloaded text using a sentence segmentation model;

[0068] Step S4.1: Use the SentencePiece word segmenter model to segment the downloaded associated text, that is, perform word segmentation on the downloaded associated text to form a token sequence, adopt a dynamic threshold judgment mechanism to judge the abnormality of the token sequence, and correct the abnormal tokens. For the uncovered new words, they are decomposed into common word fragments to obtain the final token sequence. The dynamic threshold judgment mechanism refers to setting different thresholds for the repetition rate of different languages, different characters and words in the token sequence. The uncovered new words refer to words that do not exist in the vocabulary used by the SentencePiece word segmenter model and have not been learned by the SentencePiece word segmenter model;

[0069] For example, the original data: [Breaking News] Company A and Company B [Company B] finally reached an "agrement" after 3 years of tense negotiations! Visit: https: / / fake-news-link.com...

[0070] According to an insider, "This negotiation was hosted by a third party, and the two sides have achieved initial results in sharing intellectual property rights."

[0071] (Writing by Ingrid Melander; Editing by Andrew Cawthorne)

[0072] After processing the data in step S4.1, we get: ['_[', 'Breaking', '_News', ']', '_Company', '_A', '_&', '_Co', '.', '_and', '公司', 'B', '

', 'Company', '_B', 'Ltd', '.', '

[0073] Step S4.2: Perform document-level cleaning on the final Token sequence, that is, count the repeated characters and words in the final Token sequence and calculate the repetition rate, and judge whether it meets the low-quality text based on the empirical threshold. If so, discard or mark it, otherwise keep it, remove redundant punctuation (such as: _(,), _-, ;), remove source endnotes (such as: (Writing by...)), clear non-linguistic symbols, and finally reconstruct the preliminary cleaned text content, that is, obtain the cleaned text.

[0074] After processing the data in step S4.2, we get: Breaking News Company A and公司B Company Bfinally reached an agrement after 3 years of tense negotiations……

[0075] 据内部人士透露本次协商由第三方主持双方在知识产权共享方面取得了初步成果……

[0076] Step S5: Use a language recognition model to perform paragraph-level processing on the cleaned text, retain the target language paragraphs and reorganize them;

[0077] Step S5.1: Segment the cleaned text into paragraphs and calculate the language confidence of each paragraph using a language detection model. The language recognition model is the FastText language recognition model. This involves segmenting the news into paragraph-level formats, integrating the different paragraphs, processing each paragraph separately, and selecting the FastText language recognition model to detect the paragraph data. The configurable recognition confidence threshold is used to determine whether the detected paragraph needs to be retained, and the paragraphs are language-filtered (paragraph one: en 0.98; paragraph two: zh 0.97). The filtered paragraphs (for example, articles identified as en in the selected language) are then reorganized in the original text order to complete paragraph-level data cleaning.

[0078] Step S5.2: Filter paragraphs according to the preset language list and confidence threshold, and reassemble the filtered paragraphs in the order of the original text.

[0079] Data after processing in step S5: Breaking News Company A and Company B finally reached an agrement after 3 years of tense negotiations...

[0080] Step S6: constructing a structured event database based on the result of the reorganization process, and storing the cleaned context fragments in a three-dimensional mapping of event type, participant, and time;

[0081] Step S6.1: Generate detailed information fields for each reorganized social event and convert them into structured data. The detailed information fields include MD5_id, participants, event type, article link, reporting time, title, content, and summary. The structured data is in DataFrame format.

[0082] Step S6.2: Based on the structured data, the participants and event types are classified in turn to form participant-event type groups. Based on the participant-event type groups, social events of the same event type and the same participants are merged and stored in the database, including participant 1, event type, participant 2 and text content (the table field is Actor1-Relname-Actor2, and its content is text).

[0083] Step S7: configuring the model context protocol interface, i.e., establishing the interaction protocol parameters between the large language model and the database;

[0084] Step S7.1: Model context protocol integration service technology, i.e., querying the model context protocol of the structured event database and configuring protocol parameters for interacting with the corresponding database, where the database is MySQL, Mongodb, Oracle, or PostgreSQL;

[0085] Step S7.2: Write the corresponding configuration information in the JSON configuration file to build a structured event database interaction service component. Register it as an external service of the large language model, and select and call it during inference. Writing the corresponding configuration information in the JSON configuration file to build a structured event database interaction service component refers to using a JSON configuration file structure in Python dictionary format. The top-level structure uses dictionary key-value pairs to represent the basic information of a service component. Fill in the MCP service information field, fill in the "args" field to define the parameter list, define the component startup command, and configure the database type and parameters. The MCP service information field includes the service name, service type, service description, and target model support metadata. The "args" field defines the parameter list, including parameter name and parameter type.

[0086] Step S8: Build a standardized question template, drive the large language model to call the context protocol interface and interact with the structured event database according to the user's question information based on the standardized question template, and generate event prediction results based on the interaction.

[0087] Step S8.1: Construct a standardized question template to guide users to provide complete and structured question information, thereby guiding users to provide complete and structured question information and standardizing user questions;

[0088] for example:(

[0089] System Prompt: You are an expert in predicting future events based on historical data. Events are presented in the form of (EventDate, subject (Actor1), event (Relname), object (Actor2), Context), and your task is to predict future events between two entities in a given query. To make reasonable predictions, you should think and reason based on your background knowledge aswell as the knowledge in the database.

[0090] Human Prompt: Based on your knowledge up to{current_date}, predict therelations between{actor1}and{actor2}on{current_date}.

[0091] Human Prompt: Based on your knowledge upto June 2, 2025, predict therelations between Company A and Company B on June 2, 2025.

[0092] ).

[0093] Step S8.2: The large language model selects the question information based on the standardized question template and interacts with the content of the structured event database, and returns the fragments in the database to the large language model to form the context reference content and generate the prediction results of social events. For example:

[0094] Prediction: On June 2, 2025, Company A and Company B are likely to enter a new strategic partnership, building on their history of collaboration and recent dispute resolution.}.

[0095] A social event prediction method based on model context protocol includes a specified time window event data alignment module, a data standardization module, a document-level data cleaning module, a paragraph-level data cleaning module, and a model context protocol (MCP) and large model (LLM) interaction module. Specifically:

[0096] Select the original data set within the specified time range and filter out the time-consistent data based on the event reporting time and the news reporting time;

[0097] Standardize the fields of data information, adjust the data using code and name replacement strategies, and integrate the data in the form of code + name;

[0098] Use document-level data cleaning to filter out noisy data and remove low-quality text;

[0099] Use paragraph-level data cleaning, test each paragraph individually, and filter data based on the target language;

[0100] The Model Context Protocol (MCP) interacts with the Large Language Model (LLM). Using Model Context Protocol technology, the protocol parameters for interacting with the target database are configured, and a database interaction service is built for the Large Language Model to call. Furthermore, prompts are designed to standardize user questioning methods, guiding the Large Language Model to interact with the response service based on the question content. The content of relevant table fields in the database is extracted as contextual reference fragments, and historical information is combined to predict event outcomes.

[0101] The above are only representative embodiments of the present invention in many specific application scopes and do not constitute any limitation on the protection scope of the present invention. Any technical solutions formed by transformation or equivalent replacement fall within the scope of protection of the present invention.

Claims

1. A social event prediction method based on model context protocol, characterized in that: The steps include: Step S1: Based on a preset time range, social events whose reporting time is consistent with the news reporting time are selected from the original data set to complete the time series alignment; Step S2: based on the URLs of the first reported social events among the aligned social events, remove duplicate and single data, and standardize the retained social events. Single data refers to social events that are reported by only a single news source within a specified time range and have no contextual information support. Step S3: Merge the standardized social events, count the reporting frequencies of each social event category, and filter URLs corresponding to high-frequency social events based on a preset threshold and download the associated texts; Step S4: Perform document-level cleaning on the downloaded text using a sentence segmentation model; Step S5: Using a language recognition model to perform paragraph-level processing on the cleaned text, retaining the target language paragraphs and reorganizing them; Step S6: constructing a structured event database based on the result of the reorganization process, and storing the cleaned context fragments in a three-dimensional mapping of event type, participant, and time; Step S7: configuring the model context protocol interface, i.e., establishing the interaction protocol parameters between the large language model and the structured event database; Step S8: Build a standardized question template, drive the large language model to call the context protocol interface and interact with the structured event database according to the user's question information based on the standardized question template, and generate event prediction results based on the interaction.

2. A social event prediction method based on model context protocol according to claim 1, characterized in that: The specific steps of step S1 are: Step S1.1: Extract social events from the original data set based on a preset time range, wherein the preset time range is the time to maintain the balance and integrity of the data by excluding abnormal interference events. Each social event includes the date, event type, subject involved in the social event, news source, and reporting time; Step S1.2: Standardize and align social events within a preset time range with news reporting times, and retain social events whose reporting times are aligned with corresponding news release times and whose timing is consistent.

3. A social event prediction method based on model context protocol according to claim 2, characterized in that: The specific steps of step S2 are: Step S2.1: Classify the aligned social events in the order of subject, event type, and date to form subject-event type-date groups. Then, search for the earliest social event based on the date and record the corresponding URL as the first public report of the event. Step S2.2: Delete duplicate data and single data of social events based on the recorded URLs, and standardize the retained information of social events.

4. A social event prediction method based on model context protocol according to claim 3, characterized in that: The specific steps of step S3 are: Step S3.1: Sort the standardized social event data by time, merge the social events after sorting, and group them by event type and date, and count the total number of mentions of each type of social event; Step S3.2: Screen the events with a total number of mentions greater than a preset threshold as high-frequency social events, and download the associated text based on the URL corresponding to the high-frequency social event.

5. The social event prediction method based on model context protocol according to claim 4 is characterized in that: The specific steps of step S4 are: Step S4.1: Use the SentencePiece word segmenter model to segment the downloaded associated text, that is, perform word segmentation on the downloaded associated text to form a token sequence, adopt a dynamic threshold judgment mechanism to judge the abnormality of the token sequence, and correct the abnormal tokens. For the uncovered new words, they are decomposed into common word fragments to obtain the final token sequence. The dynamic threshold judgment mechanism refers to setting different thresholds for the repetition rate of different languages, different characters and words in the token sequence. The uncovered new words refer to words that do not exist in the vocabulary used by the SentencePiece word segmenter model and have not been learned by the SentencePiece word segmenter model; Step S4.2: Perform document-level cleaning on the final Token sequence, that is, count the repeated characters and words in the final Token sequence and calculate the repetition rate. Based on the empirical threshold, determine whether it meets the low-quality text requirement. If so, discard or mark it. Otherwise, retain it, remove redundant punctuation, remove source footnotes, clear non-language symbols, and finally reconstruct the preliminary cleaned text content, that is, obtain the cleaned text.

6. A social event prediction method based on model context protocol according to claim 5, characterized in that: The specific steps of step S5 are as follows: step S5.1, dividing the cleaned text into paragraphs, and calculating the language confidence of each paragraph using a language detection model, wherein the language identification model is a FastText language identification model; Step S5.2: Filter paragraphs according to the preset language list and confidence threshold, and reassemble the filtered paragraphs in the order of the original text.

7. A social event prediction method based on model context protocol according to claim 6, characterized in that: The specific steps of step S6 are: Step S6.1: Generate detailed information fields for each reorganized social event and convert them into structured data. The detailed information fields include MD5_id, participants, event type, article link, reporting time, title, content, and summary. The structured data is in DataFrame format. Step S6.2: Based on the structured data, the participants and event types are classified in turn to form participant-event type groups. Based on the participant-event type groups, social events of the same event type and the same participants are merged and stored in the structured event database, including participant 1, event type, participant 2 and text content.

8. The social event prediction method based on model context protocol according to claim 7, characterized in that: The specific steps of step S7 are: Step S7.1: Model context protocol integration service technology, i.e., querying the model context protocol of the structured event database and configuring protocol parameters for interacting with the corresponding database, where the database is MySQL, Mongodb, Oracle, or PostgreSQL; Step S7.2: Write the corresponding configuration information in the JSON configuration file to build a structured event database interaction service component, and register it as an external service of the large language model. It will be selected and called when running inference. Writing the corresponding configuration information in the JSON configuration file to build a structured event database interaction service component refers to a JSON configuration file structure in Python dictionary format. The top-level structure uses dictionary key-value pairs to represent the basic information of a service component. Fill in the MCP service information field, fill in the "args" field to define the parameter list, define the component startup command, and configure the database type and parameters. The MCP service information field includes the service name, service type, service description, and target model support metadata. The "args" field defines the parameter list, including the parameter name and parameter type.

9. The social event prediction method based on model context protocol according to claim 8, characterized in that: The specific steps of step 8 are: Step S8.1: construct a standardized question template to guide users to provide complete and structured question information; Step S8.2: The large language model selects question information based on the standardized question template and interacts with the content of the structured event database, and returns fragments in the database to the large language model to form context reference content and generate prediction results for social events.