News recommendation method, device and equipment based on LLM big language model and medium
Through a news recommendation method based on the LLM large language model, combined with the BERT model and collaborative filtering technology, the accuracy problem of the traditional insurance news recommendation model in cold start scenarios is solved, and personalized, secure and high-quality news recommendations are achieved.
Patent Information
- Application Number
- CN202510849256.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-10-10
AI Technical Summary
Traditional insurance news recommendation models rely on user historical behavior data, resulting in inaccurate recommendation results in cold start scenarios.
A news recommendation method based on the LLM large language model is adopted. By obtaining initial and historical recommended news data, user portraits are constructed, and the semantic relevance is calculated using the BERT model. Combined with collaborative filtering and LLM reranking, personalized news content is generated.
It achieves more accurate news recommendations that meet users' real-time preferences and interests, improves user experience, and ensures the accuracy and security of information through a quality inspection module.
Smart Images

Figure CN120763392A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent financial evaluation, and particularly relates to a news recommendation method and device based on an LLM large language model, equipment and a medium. BACKGROUND
[0002] There are many types of insurance products, including medical insurance, health insurance, property insurance, travel insurance, etc., and insurance news can help insurance companies cultivate user mind and help users choose more suitable insurance products. The traditional insurance news recommendation method mainly has the following problems: the traditional recommendation model relies on user historical behavior data, so the news recommendation scene belongs to cold start, and the traditional recommendation model cannot give a more accurate recommendation result. SUMMARY
[0003] The present application provides a news recommendation method and device based on an LLM large language model, computer equipment and a medium to solve the technical problem that the traditional recommendation model relies on user historical behavior data, so the news recommendation scene belongs to cold start, and the traditional recommendation model cannot give a more accurate recommendation result.
[0004] In a first aspect, a news recommendation method based on an LLM large language model is provided, comprising:
[0005] Obtaining initial recommended news data and historical recommended news data to provide a basic data set for subsequent analysis;
[0006] Extracting user interaction data on historical news from the historical recommended news data and constructing a historical interaction database of users and historical news, wherein the historical interaction database records user historical behavior preferences;
[0007] Synchronously extracting user basic information, interest labels and financial risks to construct a user database and form a structured user portrait;
[0008] Inputting the initial recommended news data and the historical recommended news data into a BERT model to determine the semantic relevance of the initial recommended news data and the historical recommended news data through cosine similarity calculation after embedding coding, and obtaining a quantitative similarity score;
[0009] Based on the similarity score, the historical recommended news with the highest similarity to the initial recommended news data is selected and set as target recommended news data, and based on the historical interaction database, an interaction behavior matrix of the target recommended news data and the user is constructed to quantify the historical interaction intensity of the user on similar news;
[0010] Based on the collaborative filtering model and the interaction behavior matrix, the matching degree between users and target recommended news data is analyzed, and the target recommended news data that best matches the current user preferences is selected and mapped back to the initial recommended news data set to complete the initial recall.
[0011] Based on the LLM large language model, the priority of user portraits is re-ranked according to the recall results, and the news content of the initial recommended news data is rewritten according to the re-ranked user portrait weights. The rewritten news content is output as the final recommended news data. Among them, the recommendation priority of the news content is matched with the interest level of the interest tags, ensuring that the final recommended news data is highly consistent with the user's real-time preferences.
[0012] In a second aspect, a news recommendation device based on an LLM large language model is provided, comprising:
[0013] The acquisition module is used to obtain the initial recommended news data and historical recommended news data to provide a basic data set for subsequent analysis;
[0014] An interaction module is used to extract user interaction data on historical news from historical recommended news data and build a historical interaction database between users and historical news, wherein the historical interaction database records user historical behavior preferences;
[0015] The structured module is used to simultaneously extract basic user information, interest tags, and financial risks, build a user database, and form a structured user profile;
[0016] A similarity calculation module is used to input the initial recommended news data and the historical recommended news data into the BERT model, determine the semantic relevance between the initial recommended news data and the historical recommended news data through cosine similarity calculation after embedding encoding, and obtain a quantitative similarity score;
[0017] The screening module is used to select the historical recommended news with the highest similarity to the initial recommended news data based on the similarity score, and set it as the target recommended news data. Based on the historical interaction database, it constructs the interaction behavior matrix between the target recommended news data and the user, and quantifies the historical interaction intensity of users for similar news.
[0018] The filtering module is used to analyze the matching degree between users and target recommended news data based on the collaborative filtering model and the interaction behavior matrix, filter out the target recommended news data that best matches the current user's preferences, and map it back to the initial recommended news data set to complete the initial recall;
[0019] The rearrangement module is configured to reorder the priority of the user portrait based on the LLM large language model according to the recall result, rewrite the news content of the initial recommended news data according to the rearranged user portrait weight, and output the rewritten news content as the final recommended news data, wherein the recommendation priority of the news content matches the interest degree of the interest label, and the final recommended news data is highly consistent with the real-time preference of the user.
[0020] In a third aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned news recommendation method based on the LLM large language model when executing the computer program.
[0021] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the steps of the above-mentioned news recommendation method based on the LLM large language model when executed by a processor.
[0022] In the scheme implemented by the above-mentioned news recommendation method, device, computer equipment and storage medium based on the LLM large language model, the basic data set can be provided for subsequent analysis by obtaining the initial recommended news data and the historical recommended news data; the user's interaction data on historical news is extracted from the historical recommended news data, and a historical interaction database of users and historical news is constructed, wherein the historical interaction database records the user's historical behavior preferences; the user's basic information, interest tags and financial risks are simultaneously extracted to construct a user database to form a structured user portrait; the initial recommended news data and the historical recommended news data are input into the BERT model, and the semantic relevance between the initial recommended news data and the historical recommended news data is determined by the cosine similarity calculation after embedding encoding to obtain a quantitative similarity score; based on the similarity score, the news data similar to the initial recommended news data are screened out. The historical recommended news with the highest degree of preference is selected and set as the target recommended news data. Based on the historical interaction database, an interaction behavior matrix between the target recommended news data and the user is constructed to quantify the historical interaction intensity of the user for similar news. Based on the collaborative filtering model, the matching degree between the user and the target recommended news data is analyzed based on the interaction behavior matrix, and the target recommended news data that best matches the current user preference is screened out. The target recommended news data is mapped back to the initial recommended news data set to complete the preliminary recall. Based on the LLM large language model, the priority of the user portrait is re-sorted according to the recall result, and the news content of the initial recommended news data is rewritten according to the re-sorted user portrait weight, and the rewritten news content is output as the final recommended news data. Among them, the recommendation priority of the news content matches the interest degree of the interest tag, ensuring that the final recommended news data is highly consistent with the user's real-time preferences. The present invention leverages LLM's powerful contextual understanding capabilities to better capture the nuances of news content and users' specific needs, making recommendations more intelligent. The present invention also leverages LLM's content rewriting and personalized generation capabilities, making recommended news more aligned with users' reading habits and interests, enhancing user experience. Furthermore, LLM uses in-depth analysis of users' basic information, insurance mentality, and historical behavioral data to generate more detailed user profiles, thereby providing more personalized news recommendations. Furthermore, multi-dimensional quality control utilizes a quality control module that enables real-time evaluation of the factuality and toxicity of generated content during the recommendation process, ensuring the accuracy and security of the information users receive. Therefore, the present method can provide both higher-quality and more accurate recommendation results and personalized recommendations tailored to users' reading habits and interests, thereby improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 1 is a schematic diagram of an application environment of a news recommendation method based on an LLM large language model in one embodiment of the present invention;
[0025] Figure 2 This is a flow chart of a news recommendation method based on the LLM large language model in one embodiment of the present invention;
[0026] Figure 3 1 is a structural diagram of a news recommendation device based on the LLM large language model in one embodiment of the present invention;
[0027] Figure 4 is a structural diagram of a computer device in one embodiment of the present invention;
[0028] Figure 5 FIG. 2 is another structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0030] The news recommendation method based on the LLM large language model provided by the embodiment of the present invention can be applied in the following areas: Figure 1In the application environment, the client obtains the initial recommended news data and the historical recommended news data to provide a basic data set for subsequent analysis; extracts the user's interaction data on historical news from the historical recommended news data, and builds a historical interaction database between the user and the historical news, wherein the historical interaction database records the user's historical behavior preferences; simultaneously extracts the user's basic information, interest tags and financial risks, builds a user database, and forms a structured user portrait; inputs the initial recommended news data and the historical recommended news data into the BERT model, and determines the semantic relevance between the initial recommended news data and the historical recommended news data through the cosine similarity calculation after embedding encoding, and obtains a quantitative similarity score; based on the similarity score, screens out the historical recommended news with the highest similarity to the initial recommended news data, and sets it as For target recommended news data, based on the historical interaction database, an interaction behavior matrix between target recommended news data and users is constructed to quantify the historical interaction intensity of users on similar news. Based on the collaborative filtering model, the matching degree between users and target recommended news data is analyzed based on the interaction behavior matrix, and the target recommended news data that best matches the current user preferences is screened out. The target recommended news data is mapped back to the initial recommended news data set to complete the initial recall. Based on the LLM large language model, the priority of user portraits is re-sorted according to the recall results, and the news content of the initial recommended news data is rewritten according to the re-sorted user portrait weights. The rewritten news content is output as the final recommended news data, where the recommendation priority of the news content matches the interest level of the interest tags to ensure that the final recommended news data is highly consistent with the user's real-time preferences. The present invention leverages the powerful contextual understanding capabilities of LLM to better capture the nuances of news content and specific user needs, making recommendations more intelligent. Content rewriting capabilities: LLM is used to rewrite and personalize news content, making recommended news more aligned with users' reading habits and interests, enhancing the user experience. More precise personalization: LLM deeply analyzes users' basic information, insurance mentality, and historical behavior data to generate more detailed user profiles, thereby providing more personalized news recommendations. Multi-dimensional quality control: The introduction of a quality control module enables real-time evaluation of the factuality and toxicity of generated content during the recommendation process, ensuring that the information users receive is accurate and secure. Therefore, this method can provide higher-quality and more accurate recommendation results, as well as personalized recommendations tailored to users' reading habits and interests, thereby improving user satisfaction. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented as a standalone server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.
[0031] See also Figure 2 As shown, Figure 2A flowchart of a news recommendation method based on the LLM large language model provided in an embodiment of the present invention includes the following steps:
[0032] S10: Obtain initial recommended news data and historical recommended news data to provide a basic data set for subsequent analysis;
[0033] The core goal of the data acquisition phase is to provide the recommendation system with a multi-dimensional, high-quality basic dataset to support subsequent user profiling, news similarity calculation, and recommendation strategy optimization. Initial recommended news data refers to the set of candidate news items to be recommended to users. It typically comes from a content platform's real-time update pool or a specific topic aggregation library (such as hot news or personalized recommendation candidate pools). This data comprises news text (title, body, summary), metadata (publishing time, source media, classification tags, keywords, etc.), multimedia information (images, video links), and basic quality metrics (number of reads, likes, comments, etc.). Historical recommended news data refers to the set of recommended news items that users have previously received, recording the recommendation system's historical decision-making results and raw user feedback. In addition to containing the same basic information as the initial recommended news, this data also includes a recommendation timestamp (recording the specific time the news item was pushed to the user) and recommendation scenario tags (such as homepage recommendations, related recommendations on the details page, and notification bar push notifications). This data is used to analyze the timeliness and scenario adaptability of the recommendation strategy.
[0034] The real-time collection channel synchronizes the news update stream of the content platform in real time through API interfaces and message queues (such as Kafka), ensuring the timeliness of the initial recommended news data (for example, updating the candidate pool every 5 minutes). Historical data storage and reading are mainly based on historical recommended news data, which is usually stored in distributed databases (such as HBase, MongoDB) or data warehouses (such as Hive). It is read in batches according to time dimensions (such as the past 30 days or the past year) through SQL queries or ETL tools (such as Airflow) to ensure data integrity.
[0035] The obtained news data needs to be cleaned and preprocessed. First, missing values should be processed. News metadata (such as missing classification labels) should be filled with rules (such as default classification based on keyword matching) or model prediction (such as random forest filling). Historical news with missing interaction data should be marked as "non-interaction" instead of being directly deleted to avoid data bias. Secondly, the format should be standardized, and the news text encoding (such as UTF-8), timestamp format (such as ISO 8601) and label system (such as using a unified classification dictionary) should be unified to eliminate format differences between different data sources. Finally, outliers should be filtered, mainly through statistical methods (such as the 3σ principle) to eliminate abnormal data of indicators such as reading volume and number of likes (such as the reading volume of a single news article exceeds 10 times the mean) to avoid noise data affecting subsequent analysis.
[0036] In the subsequent step, the initial recommended news data provides the target sample to be matched for "news similarity calculation", and its metadata (such as classification tags, keywords) directly affect the embedding coding quality of the BERT model; the recommended time stamp and scene label in the historical recommended news data provide time dimension weight (such as the interaction data in the past week is higher than that three months ago) and scene preference analysis (such as users prefer short information in the commuting scenario) for "interaction behavior matrix construction".
[0037] Before data acquisition, pre-checking is performed, the first checking integrity, checking the coverage of the initial recommended news data (such as whether to cover all categories such as technology and finance), and the user coverage of the historical recommended news data (such as whether to include the historical records of more than 90% active users); the second checking timeliness ensures that the update frequency of the initial recommended news data is not lower than the refresh period of the recommendation system (such as the recommendation system is updated every hour, and the data collection needs to be synchronized at least every 30 minutes); the third checking compliance filters the sensitive words in the news content, and ensures that the collection of user historical interaction data complies with privacy protection regulations (such as GDPR, only anonymized user behavior data is stored).
[0038] The expansion scenario and optimization direction of data acquisition, first, through multi-source data fusion, in addition to the content platform's own data, third-party data sources (such as social media public opinion data, industry authoritative database) can be accessed, and the dimensions of the initial recommended news (such as adjusting the priority of news combined with public opinion heat) can be enriched; incremental acquisition strategy, incremental update method is adopted for historical recommended news data (only new data is acquired instead of full refresh), which reduces data storage cost and computing resource consumption; cold start data preparation, for the "cold start" problem of new users or new online news, pre-load public hot data (such as hot search news on the network) or high-quality content annotated by domain experts as the initial recommended guaranteed data set.
[0039] Through the above multi-dimensional data collection, cleaning and checking, the data acquisition stage lays a structured and standardized data source foundation for the recommendation system, and the logical rigor directly affects the accuracy of the subsequent user portrait construction and the effectiveness of the recommendation strategy.
[0040] S20: Extracting user interaction data on historical news from historical recommended news data, and constructing a historical interaction database of users and historical news, wherein the historical interaction database records user historical behavior preferences;
[0041] Historical interaction data refers to the explicit and implicit feedback behavior data of users on historical recommended news, and is the core basis for characterizing user interests and preferences. Specifically, it includes: 1. Explicit interaction, quantifiable behaviors actively implemented by users, such as clicking to read, collecting, sharing, commenting, and rating (such as 1-5 star rating); 2. Implicit interaction, preferences indirectly reflected through behavioral trajectories, such as reading time (staying for more than 60 seconds is considered in-depth reading), scrolling depth (browsing more than 70% of the text), and bounce rate (closing within 5 seconds after opening).
[0042] Through the time series of interactive behaviors (for example, users frequently clicked on technology news last week, but turned to finance this week), we can capture the evolution of interests and characterize dynamic interests; different interactive behaviors correspond to different weights (for example, the weight of collections is greater than that of clicks, and the weight of comments is greater than that of shares), forming a user's preference score for news and quantifying the intensity of preference; through historical interaction data, we can trace the effectiveness of recommendation strategies (for example, if the click-through rate of a certain type of news is significantly lower than the average, it suggests that the recommendation logic needs to be adjusted) to verify the recommendation effect.
[0043] In data processing, we first extract interaction data, mainly from raw logs into structured fields. We parse server logs using tools such as Flume and Logstash to extract raw fields such as user ID, news ID, interaction type, interaction time, and device information (such as mobile phone / PC). We then map different forms of interaction behaviors into a unified code to standardize the behaviors. For example:
[0044]
[0045] The interaction time is uniformly converted into a UTC timestamp with millisecond accuracy to facilitate subsequent time dimension analysis (such as the reading peak at 8 pm on weekdays) and standardize the timestamp.
[0046] Secondly, an interaction database is constructed. The data model design uses a star model to construct a three-dimensional user-news-interaction database. The core table structure includes: user interaction fact table: stores user ID, news ID, interaction code, interaction time, and weight score; news dimension table: stores news ID, title, category, keyword and other metadata; user dimension table: stores user ID and basic information (linked with the user database). Storage technology selection: Hot data (interactions in the past 30 days): Use Redis or MongoDB to support high-concurrency queries; Cold data (historical interactions): Store in HDFS or HBase, and cooperate with Spark for batch analysis. Incremental update mechanism: Synchronize the interaction data of the previous 24 hours through ETL tasks every morning, and use zipper table technology to record multiple interactions of the same user on the same news (such as users click first and then collect), and retain the trajectory of behavioral evolution.
[0047] During data cleaning, we filter abnormal behaviors and remove data generated by machines (e.g., the same IP address clicks on 100 news articles within 10 minutes); filter invalid interactions (e.g., reading time less than 3 seconds is considered as false touch); and perform time decay processing by introducing a decay factor f(t) = e -λ(t-t0) , where t is the current time, t0 is the interaction time, and λ is the decay coefficient (for example, news scenarios are usually set to 0.01 / day), so that recent interactions receive higher weights; feature aggregation, aggregates interaction features by time window (such as 7 days, 30 days), and generates statistical indicators such as "user-news category-interaction frequency / total weight". For example: User A clicked on science and technology news 5 times and collected it 2 times in the past 7 days, with a total weight of 5×1+2×3=11; clicked on finance news 3 times and read it in depth once, with a total weight of 3×1+1×2=5.
[0048] In subsequent steps, basic user information (such as age and region) is obtained from the user database and cross-analyzed with the interaction data (for example, users aged 25-30 in Beijing, Shanghai, Guangzhou and Shenzhen prefer financial news); interest tags extracted from the interaction data (such as "artificial intelligence" and "new energy vehicles") are reversely supplemented to the user database to dynamically update the user portrait.
[0049] To support similarity calculation, news features (such as categories and keywords) in historical interaction data are used as training samples for the BERT model to improve the accuracy of news semantic encoding; the interaction weight score is used to adjust the priority of similarity calculation (for example, the weight of news categories that users have collected will be increased by 20% during similarity matching).
[0050] The impact on the screening of target recommended news. The construction of the interaction behavior matrix directly depends on the structured results of historical interaction data. The values in the matrix represent the "historical interaction intensity of users on the target recommended news", providing a quantitative basis for collaborative filtering; the scene labels in the interaction data (such as "reading during commuting time") affect the scene adaptability screening of the target recommended news (such as recommending in-depth long articles in the evening and recommending short information during commuting).
[0051] In addition to text interaction, multimodal interaction fusion accesses audio / video news playback data (such as playback progress and pause position) to enrich the interaction dimension; combined with eye tracking data (such as user attention hotspots in laboratory scenarios), content preference focus can be more accurately identified.
[0052] Utilization of negative feedback data: explicit negative feedback: users actively mark "not interested" and "block this type of news"; implicit negative feedback: long-term non-clicking of certain types of news and repeated rapid pop-ups of the same type of content are modeled as negative weights through algorithms; building a "negative feedback news library" to actively avoid similar content when recommending.
[0053] Cross-platform interaction integration, integrating user interaction data on APP, PC, and other multi-terminal platforms, merging behavior trajectories through user unique identification (such as encrypted device ID); associating social media interactions (such as user comments after sharing news on Weibo), and mining deep interest preferences (such as sharing technology news and commenting "AI recommended most affordable insurance", which can extract "AI recommended insurance" as a sub-label). Historical interaction data processing converts fragmented user behavior into structured preference models, providing a key bridge from data to insight for the recommendation system. Its processing accuracy directly affects the accuracy of subsequent interest label rearrangement, news content rewriting, and other links, and is the core technical fulcrum for realizing personalized recommendation.
[0054] S30: Synchronize extraction of user basic information, interest labels, and financial risks, build user database, and form structured user portrait;
[0055] The user portrait consists of static basic information and dynamic interest labels, forming a two-axis system: static dimensions include user inherent attributes with low update frequency, including: basic identification: user ID, registration time, device ID (encrypted); demographic characteristics: age, gender, region (province / city / district), occupation, education level; environmental attributes: terminal type (mobile / PC), network environment (4G / WiFi), usage time preference (such as reading from 7-9 am).
[0056] Dynamic dimensions are mainly interest preferences updated in real time based on behavior data, including: primary labels: news categories (technology, finance, entertainment, sports, etc.); secondary labels: sub-fields (such as "technology" under "artificial intelligence" "blockchain"); tertiary labels: specific themes (such as "artificial intelligence" under "large language models" "autonomous driving"); scenario labels: reading scenario preferences (commuting, bedtime, work breaks), content formats (text, video, long-form).
[0057] Data source matrix
[0058]
[0059] The technical process and algorithm implementation of portrait construction are as follows: First, structure the basic information and fill in missing values: when age is missing, infer through interaction behavior (such as frequently reading "college student employment" news, and infer to be 20-25 years old); when the region is missing, complete it based on IP address library (such as MaxMind) or device GPS information (with user authorization). Data standardization: occupation label mapping to a unified classification system (such as "internet practitioner" "financial practitioner"); regional hierarchical processing (country→province→city→district, facilitating regional recommendation).
[0060] Interest tag extraction includes at least the following contents: original behavior data, feature engineering layer, explicit features, implicit features, keyword extraction, classification tag mapping, temporal pattern analysis, semantic vector representation, rule engine tag generation, machine learning tag prediction, tag weight calculation, user interest vector space, original behavior data, feature engineering layer, explicit features, implicit features, keyword extraction, classification tag mapping, temporal pattern analysis, semantic vector representation, rule engine tag generation, machine learning tag prediction, tag weight calculation, user interest vector space.
[0061] In the rule engine layer, regular expressions are used to extract high-frequency words (such as "Tesla" and "Federal Reserve") in news titles / texts for keyword matching; users are directly assigned corresponding interests based on news category labels (for example, if they read three "new energy vehicle" news articles, they will be marked as users interested in this category) for classification mapping.
[0062] In the machine learning layer, FastText is used to convert news content into word vectors for text vectorization, and the semantic clustering center of user interaction content is calculated; the LSTM network analyzes the evolution of user interests over time and constructs a time series model.
[0063] In the weight calculation model, the interest intensity formula based on the TF-IDF idea is: ω i,j =Interaction frequency i,j×behavior weight j×f(t) where ω i,j is the user's weight for tag i, behavior weight j is such as favorite = 3, click = 1, and f(t) is the time decay function (same as historical interaction data processing).
[0064] Dynamic tags are mainly generated based on short-term strong interactions (for example, if a user reads "World Cup" news for two consecutive days, a temporary tag "2024 World Cup" is generated, which will automatically decay if not updated after 30 days); potential interest tags are mined through association rules (for example, 80% of users who read "ChatGPT" news also read "AI Ethics", inferring "AI Ethics" as a potential interest).
[0065] In order to ensure the dynamic update mechanism and real-time performance of the portrait, the trigger conditions need to be updated, mainly through scheduled updates, full updates every morning, and recalculation of all label weights; real-time updates when users have key interactions (such as immediately increasing the corresponding label weight after collecting news); when the frequency of a certain type of interaction exceeds the threshold (such as clicking on 5 financial news articles within 24 hours), the portrait recalculation is actively triggered.
[0066] Incremental learning technology is implemented, using Flink or Spark Streaming to process interaction logs in real time, implementing an online learning framework and updating interest vectors using the SGD (stochastic gradient descent) algorithm. An "exploitation-exploitation" strategy (Epsilon-Greedy) is adopted for the first 10 interactions of new users, gradually accumulating sufficient data before generating an accurate profile, followed by cold start optimization. The cosine similarity between the current interest vector and the vector from seven days ago is calculated. If the similarity is less than 0.6, it is determined to be interest drift, triggering the reconstruction of the label system to detect interest drift.
[0067] Bidirectional mapping with the historical interaction database: Interaction data provides original behavioral evidence for the portrait, and the portrait label reacts to the weight calculation of the interaction data (for example, the interaction behavior corresponding to the high-weight label is given an additional 20% weight). For example: If user A’s "artificial intelligence" label has a high weight, then his reading time for this type of news will be given a higher preference score.
[0068] Semantic support for similarity calculation: interest tags in the portrait serve as semantic constraints for the BERT model (for example, when calculating news similarity, the semantic space of users' high-weight tags is prioritized); a "user interest-news feature" association matrix is constructed to accelerate similar news retrieval (for example, user interest tags are converted into vectors and quickly inner product operations are performed with news vectors).
[0069] Input support for LLM's rearrangement of interest tags: The tag weight sequence in the portrait is directly used as the input prompt of LLM (such as "User interest tag weight ranking: artificial intelligence (0.8) > new energy vehicles (0.6) >..."); when LLM performs semantic reconstruction of news content based on tag weights, it will give priority to strengthening content paragraphs related to high-weight tags (such as expanding the technical details of the "big language model" in science and technology news).
[0070] Multimodal portrait fusion combines users' voice search keywords and video viewing behaviors (such as skipping ads and repeatedly watching a certain clip) to generate cross-modal interest tags. For example, a user watches the "AI painting tutorial" video multiple times and performs a voice search for "how to use Midjourney", generating the "AI art creation" segmentation tag.
[0071] Sentiment analysis uses NLP to extract the sentiment polarity in comments (e.g., "This financial analysis is amazing!" → positive sentiment, increasing the corresponding tag weight); and constructs a two-dimensional "interest-emotion" matrix (e.g., if the "positive sentiment index" under the "technology" tag reaches 0.7, similar positive content will be recommended first).
[0072] Data desensitization: Basic information is obscured (e.g., age is changed to age group, region to city area). Federated learning: User profiles are updated through distributed training without sharing original data (e.g., when collaborating across platforms, each platform only retains encrypted feature vectors). User profile construction transforms fragmented data into structured interest models, achieving a leap from "user behavior" to "cognitive understanding." Its core value lies not only in accurate recommendations but also in providing users with information services that align with their dynamic interests. It is the key hub for recommendation systems to achieve both "personalization" and "intelligence."
[0073] In this embodiment, the extracted data features also include user mindset. User mindset in the insurance field refers to a comprehensive reflection of users' cognition, attitudes, needs, and decision-making logic regarding insurance products, services, and the industry. Because insurance involves risk transfer, long-term commitments, and financial attributes, its mindset characteristics encompass both general consumer psychology and industry-specific characteristics.
[0074] The basic cognitive characteristics of users regarding insurance are mainly characterized by a low correlation between risk perception and insurance functions. Most users only realize the importance of insurance after a specific event (such as illness or accident) occurs, and their awareness of daily risk prevention is weak. For example, healthy people are less willing to purchase critical illness insurance than sub-healthy people. Some users view insurance as a "probability game," believing that "buying it doesn't guarantee using it," and even associate insurance with negative labels such as "insurance fraud" and "routine," stemming from a lack of understanding of the complexity of the terms.
[0075] Consequently, users face significant information barriers to understanding insurance products. For example, specialized terms like exemptions, waiting periods, and payout ratios in insurance contracts can easily lead to misunderstandings. Users may overlook the specific criteria for defining a critical illness under insurance policies, mistakenly believing that "payment is guaranteed upon diagnosis." Faced with differences between different companies and insurance types (such as life, medical, and annuities), users lack a framework for comparison and often struggle to make a decision.
[0076] Furthermore, trust in the industry is polarized. Traditional channels rely on users who rely on recommendations from acquaintances (such as insurance agents) and have a higher level of trust in brand insurance companies (such as Ping An and China Life). Internet insurance faces trust challenges: online insured users may be skeptical due to "inability to communicate face to face" and "opaque claims process", and their recognition of small and medium-sized insurance companies is particularly low.
[0077] Analyzing users' core needs, such as the need for a sense of security through risk protection, reveals the following scenarios: the breadwinner of a family prioritizes term life insurance (covering mortgages, children's education, and other responsibilities); families with children prioritize children's critical illness and medical insurance; and the elderly prioritize accident insurance (for fracture prevention) over other insurance types. Implicit motivations include using insurance to mitigate "unbearable financial losses," such as the cost of treating a major illness or the financial shortfall in a family's financial future following a death.
[0078] For example, the demand for certainty in financial planning and investment-type insurance, mainly for high-income groups who prefer annuity insurance and dividend insurance, and use insurance as a long-term financial management tool (such as children's education funds and pension planning), and value "capital preservation + stable returns"; tax / asset inheritance needs: high-net-worth users use whole life insurance and large policies to achieve wealth inheritance and reduce the impact of inheritance tax.
[0079] For example, the demand for a sense of control over the future, and the act of insurance itself can alleviate anxiety about unknown risks. Especially after the epidemic, users' emotional demand for "health protection" has increased significantly; some users regard the purchase of high-end medical insurance and global accident insurance as a symbol of "quality life."
[0080] Key factors influencing the user decision-making process, including information acquisition and the decision-making path, are as follows: the traditional path: recommendation by an acquaintance (accounting for over 40%) → explanation by an agent → comparison of terms → purchase; the online path: information search (e.g., "How to choose critical illness insurance") → self-media reviews (e.g., platforms like "Shenlanbao") → online consultation (with intelligent customer service / agents) → online purchase. The pain point in decision-making is the lack of ability to independently verify terms and conditions, making them susceptible to sales pitches (e.g., "end of sale countdown" promotional tactics).
[0081] For budget-sensitive users, it is better to choose consumption-type critical illness insurance (low premiums and short coverage period) rather than return-type products; Misconception: Some users ignore the adequacy of the coverage in order to "save premiums" (for example, a coverage of 300,000 critical illness insurance is difficult to cover treatment costs in first-tier cities).
[0082] Brand premium acceptance: users are willing to pay a 10%-20% premium for products from large companies, believing that "claims are more reliable"; among the service touchpoints, claims efficiency (such as "30 minutes to arrive") and customer service response speed are key factors affecting repurchase and recommendations.
[0083] Financial risk refers to the possibility that, in financial activities, asset values, returns, or cash flows may deviate from expectations due to various uncertainties. Insurance risk, as a key subset of financial risk, possesses both common attributes of financial risk and unique characteristics due to the insurance industry's core function of "risk transfer." The essence of financial risk lies in the uncertainty of future outcomes, which can lead to asset losses, fluctuating returns, or reduced ability to fulfill obligations. The transmission of financial risk can have a "domino effect," meaning that risks at individual financial institutions can escalate into systemic risk (as exemplified by the 2008 subprime mortgage crisis).
[0084] Insurance risk refers to the various uncertainties faced by insurance companies during their operations, particularly underwriting risk (the possibility that actual claims payments will exceed expectations). Insurance risk is unique in that it disperses individual risks through the "law of large numbers," but can also accumulate systemic risks (e.g., widespread claims resulting from catastrophic events).
[0085] S40: Input the initial recommended news data and the historical recommended news data into the BERT model, calculate the semantic relevance between the initial recommended news data and the historical recommended news data through cosine similarity after embedding encoding, and obtain a quantitative similarity score;
[0086] The core goal of news similarity calculation is to measure the semantic relevance between initial recommended news and historically recommended news through semantic-level text representation and similarity calculation, providing a quantitative basis for subsequent recommendation strategies. Technical framework: Text encoding based on the BERT pre-trained language model, cosine similarity measurement, and similarity score quantification system.
[0087] News text preprocessing and feature extraction, initial recommended news data, and the collection of news texts to be recommended require preprocessing such as cleaning (denoising, formatting standardization) and word segmentation. Historically recommended news data, news texts already pushed to users, require text content extracted from a historical interaction database. Text vectorization preprocessing involves word segmentation, stop word removal, and punctuation standardization to form a sequence suitable for BERT model input. WordPiece and other word segmentation methods are used to split text into subword units (e.g., "新闻" is split into "新" and "闻"), allowing the model to capture semantic details.
[0088] As a bidirectional Transformer model, the BERT model can learn deep semantic representations of text through pre-training, solving the problem that traditional bag-of-words models (such as TF-IDF) cannot capture semantic context. Model input: The pre-processed news text is converted into the input format required by BERT (such as token ID, segment embedding, position embedding), and input into the pre-trained BERT model. The BERT model extracts features from the text through a multi-layer Transformer encoder, and ultimately outputs a semantic vector for each text (i.e., "sentence embedding," such as a 768-dimensional or 1024-dimensional vector). The semantic vector contains the overall semantic information of the text, such as the news topic, sentiment, keyword associations, etc.
[0089] Specifically, BERT input format conversion is first performed. The input format is constructed using a BERT-specific tokenizer (e.g., WordPiece) to segment the text into subword units (e.g., "American President" → "United States" "President"), generating a sequence of token IDs. A positional encoding (identifying word order) is added to each token. For multi-text comparison tasks, segment embeddings are added to distinguish between different text sources. The text length is standardized to the model's maximum input length (e.g., 512 characters). Short texts are padded with [PAD], and long texts are truncated. The processed token ID, segment embedding, and position embedding are combined into a triplet for input.
[0090] BERT feature extraction and semantic vector generation: First, the multi-layer Transformer encoding process and the self-attention mechanism: Each layer of Transformer calculates the dependencies between words through Query-Key-Value (for example, the association weight between "central bank" and "interest rate cut" in "central bank cuts interest rates") to capture long-distance semantic dependencies; bidirectional feature fusion: BERT uses bidirectional Transformers to simultaneously consider contextual information (for example, in "policies affect the market", the semantics of "policies" must be combined with "affecting the market").
[0091] Secondly, the semantic vector output takes the output of the first token [CLS] of the input sequence as the overall semantic vector of the text. This vector integrates the features of the entire text and is often used for text classification and similarity calculation. The pre-trained BERT-base model outputs a 768-dimensional vector, and BERT-large outputs a 1024-dimensional vector. The dimensionality value reflects the complexity of the semantic features.
[0092] Cosine similarity measures the directional similarity of two vectors by calculating the cosine value of the angle between them. The formula is:
[0093]
[0094] The value range is [-1, 1]. The closer the value is to 1, the more similar the semantics are. The calculation method includes the following steps: Get the encoding vector: Extract the initial recommended news (recorded as vector )) and historical recommended news (recorded as vector ) BERT encoding; Vector normalization: L2 normalization is performed on the vector to prevent the vector length from affecting the similarity calculation results; Batch calculation: The cosine similarity of the initial news and all historical news is calculated in batches through matrix operations to obtain the similarity matrix Among them, sim ij It represents the similarity between the i-th initial news and the j-th historical news.
[0095] BERT code extraction, first extract the initial recommended news code, input the pre-trained BERT model into the pre-processed initial news text, obtain the CLS vector (768 dimensions or 1024 dimensions) of each text, and form the initial code matrix Α∈R m*d (m is the number of initial news, d is the vector dimension). Historical recommended news encoding extraction, similarly processing historical news text, generates encoding matrix B∈R n×d (n is the number of historical news) and is associated with the news ID in the historical interaction data to ensure that the coding is traceable.
[0096] Vector normalization eliminates the interference of length on similarity, L2 normalization formula, for each vector in matrix A and B Calculate its L2 norm and normalize it: After normalization, the vector modulus is 1, so that the cosine similarity only reflects the direction difference, avoiding the calculation deviation caused by the length of the text (for example, the vector modulus of long texts is larger).
[0097] Matrix operations and cosine similarity batch calculation, vector inner product calculation is mainly to normalize the initial matrix A norm With the historical matrix B norm Perform matrix multiplication: Sim = A norm ×B T norm , the resulting matrix Sim∈R m×n Element Sim i,j It represents the cosine similarity between the i-th initial news and the j-th historical news.
[0098] The mathematical essence of cosine similarity is equivalent to: Because the vector has been normalized and the denominator is 1, the actual calculation is simplified to the vector dot product. Matrix operations are accelerated by GPU / TPU, improving the efficiency of large-scale data processing (for example, the similarity calculation of millions of news items can be completed in seconds).
[0099] Similarity scores are quantified and filtered, mapping cosine similarity results to the [0, 1] range (negative values are adjusted to 0), forming a unified similarity scoring system. A Top-N filtering strategy sorts historical news in descending order based on similarity scores, selecting the top N highest-scoring historical news (e.g., N = 100) as "high-similarity historical news" for subsequent target news recommendations. The business significance of the scores is that higher similarity scores indicate a stronger semantic relevance between the initial news and the historical news, and a higher probability of user interaction.
[0100] Cosine similarity mapping and score normalization. The original cosine similarity value range is [-1, 1], which needs to be mapped to the [0, 1] interval for business understanding: negative values (semantically opposite) are directly set to 0 (considered "dissimilar"); positive values are normalized according to the linear transformation formula: For example, a cosine similarity of 0.8 is converted to a score of 0.9, and -0.3 is converted to 0. Scores can be weighted based on the characteristics of the news domain (e.g., financial news has higher requirements for keyword matching, so the similarity score is multiplied by 1.2), or filtered based on user profiles to filter news with low relevance (e.g., if a user does not have the "sports" tag, the corresponding news score is multiplied by 0.5).
[0101] For each initial news item, all historical news items are sorted in descending order by similarity score. The K items with the highest scores (K is a preset value, such as K=100) are quickly located through indexing to form a "high-similarity historical news collection." Of course, in addition to the fixed number K, a similarity threshold (such as a score ≥ 0.7) can be added to ensure the quality of the screening results. If all historical news items for a particular initial news item fall below the threshold, the screening scope is expanded or a cold start strategy (such as recommending popular news) is triggered.
[0102] Highly similar news serves as the foundation of the target recommendation pool. This is then further filtered based on user interaction data (e.g., clicks, saves), avoiding biased recommendations based on similar content but lacking user interest. Each recommended news item can be accompanied by a similarity score and matching criteria (e.g., "92% similar to the article XXX you previously read") to enhance user trust.
[0103] The similarity score will be directly used to screen the "target recommended news data" (i.e., select the historical news most similar to the initial news as a reference), and by constructing an interactive behavior matrix, provide the collaborative filtering model with a quantitative relationship of user-news interaction, forming a dual recommendation basis of "semantic matching + user behavior".
[0104] Compared to traditional word frequency matching (such as TF-IDF), BERT encoding captures the deeper semantics of text (such as synonyms and contextual associations), avoiding similarity miscalculations caused by "polysemy" or "multiple meanings." Similarity scores can be used as a quantitative basis for recommendation reasons (e.g., "This news item is recommended because it is 92% similar to the article "XXX" you clicked on"). The BERT model can be fine-tuned to adapt to news text in specific fields (such as finance and technology), improving the accuracy of similarity calculations.
[0105] S50: Based on the similarity score, the historical recommended news with the highest similarity to the initial recommended news data is selected and set as the target recommended news data. Based on the historical interaction database, an interaction behavior matrix between the target recommended news data and the user is constructed to quantify the historical interaction intensity of the user for similar news.
[0106] Based on news similarity scores and historical user interaction data, we filter out target news recommendations from historically recommended news, identifying those that are semantically relevant to the initial recommended news and best match user preferences. We then map this filtering logic back to the initial recommended news set to form a candidate recommendation pool. Technical framework: Similarity sorting + interaction behavior matrix construction + collaborative filtering model screening + initial news mapping and recall.
[0107] Initially screen historical news based on similarity scores. Obtain a similarity score matrix between the initial recommended news and the historical recommended news from the "News Similarity Calculation" step. For each initial news item, sort the historical news items in descending order by score. Set a similarity threshold (e.g., score ≥ 0.7) or directly select the top N historical news items (e.g., top 50) to form a "highly similar historical news collection." For example, if the similarity scores between initial news A and historical news items B, C, and D are 0.85, 0.78, and 0.65, respectively, then B and C are prioritized for inclusion in the candidate pool.
[0108] Construct an interaction matrix between the target recommended news and the user, including the selected target recommended news (historical news); user identification or user grouping (e.g., clustering results based on user profiles); and the intensity of user interaction with historical news (e.g., number of clicks, reading time, favorites / likes, etc., standardized to the [0, 1] range). Extract user interaction records with historical news from the historical interaction database constructed in the "Historical Interaction Data Processing" step, assigning different weights based on behavior type (e.g., favorite weight > click weight).
[0109] Based on the collaborative filtering model, the target recommendation news matching and screening uses the assumption that "similar users like similar items" to identify "neighboring users" with similar behavior patterns to the current user through the user-news interaction matrix. The current user's interest is then predicted based on the neighboring users' preferences for the target recommended news. Using the Pearson correlation coefficient or cosine similarity, the similarity between the current user and other users in the interaction behavior matrix is calculated, and the K most similar users (e.g., K = 20) are selected. Interest prediction: For each target recommended news item, the predicted interest value of the current user is calculated based on the interaction intensity and similarity of the neighboring users. The formula is:
[0110] Arrange the target recommended news in descending order according to the predicted interest value, and select the M pieces with the highest scores (e.g., M=10) as the "most matching target recommended news."
[0111] The mapping recall of target recommended news to initial recommended news. The target recommended news is essentially historical recommended news. It needs to be associated with the initial recommended news to determine the candidate set in the initial recommended news. One-to-one mapping: Each target recommended news (historical news) corresponds to the initial news with the highest similarity (that is, the initial news A when calculating the similarity in step 1). Recall set construction: Collect the initial news corresponding to all selected target recommended news, and form a "recall initial news set" after deduplication. If an initial news corresponds to multiple target recommended news, its recommendation priority can be weighted and summarized according to the predicted interest value of the target recommended news. Example: Target recommended news H001 corresponds to initial news A (similarity 0.85), H002 corresponds to initial news B (similarity 0.78), then recall A and B into the initial recommendation candidate pool.
[0112] Among them, based on the similarity score, the similarity score matrix between the initial recommended news data and the historical recommended news data is obtained, and the historical recommended news data is arranged in descending order according to the score; a preset number of historical recommended news data are selected and set as a high-similarity historical news set, and set as the target recommended news data; the interaction records of users on the historical recommended news data in the historical interaction database are extracted, and different weights are assigned according to the behavior type; based on the cosine similarity, the similarity between the current user and other users in the interaction behavior matrix is calculated, and a preset number of most similar users are screened out; the predicted interest value of the current user is calculated based on the interaction intensity and similarity of neighbor users, the target recommended news data are arranged in descending order according to the predicted interest value, and the preset number of target recommended news data with the highest score are selected as the most matching target recommended news data.
[0113] S60: Based on the collaborative filtering model and the interaction behavior matrix, the matching degree between the user and the target recommended news data is analyzed, the target recommended news data that best matches the current user's preferences is selected, and the target recommended news data is mapped back to the initial recommended news data set to complete the initial recall;
[0114] Collaborative filtering is primarily based on the assumption that similar users have similar preferences. By analyzing historical interactions among user groups, it predicts the target user's interest in items, thereby enabling personalized recommendations. Its role in targeted news filtering for recommendation: It bridges the gap between historical interaction data processing and targeted news filtering, leveraging the user-news interaction matrix to uncover group behavior patterns and supplement personalization beyond content similarity.
[0115] The interaction behavior matrix is constructed: rows: users (U1, U2, ..., Un), columns: historical news (H1, H2, ..., Hm), and the value is the user's interaction intensity with the news (such as click = 1, collection = 3, and reading time is standardized to [0, 1]).
[0116] Data preprocessing: For news that users have not interacted with, fill it with 0 or the mean, or predict missing values through matrix decomposition. Standardization: Normalize different types of interactive behaviors (clicks, favorites, shares) by weight (e.g., favorite weight = 3, click weight = 1). The formula is:
[0117] User similarity calculation (core algorithm) Common similarity measurement methods: cosine similarity, $\text{sim}(u,v)=\frac{u\cdot v}{; Pearson correlation coefficient, Eliminate user rating bias (such as some people generally give high scores); adjust cosine similarity, Combining the advantages of the first two, it is suitable for scenarios with rating bias. Calculation example: If user A's interaction value for news H1 and H3 is [0.5, 0.8], and user B's interaction value for H1 and H is [0.3, 0.6], then the cosine similarity is:
[0118]
[0119] Neighbor user screening: For the target user U, calculate the similarity between it and all other users. Keep the K users with the highest positive similarity (e.g., K = 20) to form the "neighbor user set." Users with negative similarity (opposite interests) can be ignored to avoid interference in prediction. Interest prediction model, weighted summation formula: For each target recommended news item H, the predicted interest value of target user U in H is the weighted average of the neighbor users' interaction value and similarity with H: Among them, N(U) is the set of neighbor users, r υ,H is the interaction value of neighbor user v to news H. Example calculation: The interaction values of neighbor users V1 and V2 of target user U to news H are 0.7 and 0.9, and the similarities are 0.8 and 0.6, then:
[0120]
[0121] Target recommended news sorting and filtering: Arrange all target recommended news in descending order by predicted interest value Pred(U,H), and select the top M (e.g., M = 10) as recommendation candidates. Filtering strategy: Exclude news that the user has interacted with (to avoid duplicate recommendations); set a prediction threshold (e.g., Pred ≥ 0.6) to filter out news with low interest values.
[0122] Optimization strategies for collaborative filtering matching, matrix decomposition (such as SVD): decompose the high-dimensional interaction matrix into a user latent factor matrix and a news latent factor matrix, reduce the dimension and predict missing values; item-based collaborative filtering: when user data is sparse, calculate the similarity between news and recommend other news similar to the news that the user has interacted with (i.e., "Item-Based CF").
[0123] Cold start mitigation: For user cold starts, we match new users with similar profiles based on their initial profile (such as the interest tags selected during registration) and leverage their neighbor data. For news cold starts, we link new news to existing high-interaction news based on content similarity and leverage their neighbor data.
[0124] Reduce computational complexity: Divide users into groups and only calculate the similarity of users within the group. Alternatively, use an approximate algorithm: Use Locality Sensitive Hashing (LSH) to quickly find similar users and reduce the total computation.
[0125] Combining collaborative filtering with content filtering: Collaborative filtering captures user group preferences, while content filtering (such as TF-IDF and BERT) captures news semantic features. Combining the two can avoid "recommendation islands" (such as only recommending content within the user's historical interests, limiting exploration).
[0126] Combining collaborative filtering with deep learning: Neural Collaborative Filtering (NCF): Using neural networks to replace traditional similarity calculations, it learns the nonlinear interaction patterns between users and news. For example, input: embedding vectors of user ID and news ID. Output: predicted interaction probability (between 0 and 1).
[0127] Combining collaborative filtering with user portraits: Using user portrait tags (such as age, region, and interest categories) as auxiliary features for collaborative filtering can enhance the accuracy of recommendations for niche user groups.
[0128] A standardized user-news interaction matrix is obtained from "Historical Interaction Data Processing." Basic user attributes are obtained from "User Profile Construction" to assist in neighbor screening during cold start. Output Application: The generated target recommended news ranking results are input into the "Target Recommended News Screening" step and combined with similarity scores to determine the final candidate pool. The predicted interest value is used as a weighting factor in the LLM large language model re-ranking to optimize recommendation priority.
[0129] S70: Based on the LLM large language model, the priority of user portraits is re-sorted according to the recall results, and the news content of the initial recommended news data is rewritten according to the rearranged user portrait weights, and the rewritten news content is output as the final recommended news data. Among them, the recommendation priority of the news content is matched with the interest level of the interest tag, ensuring that the final recommended news data is highly consistent with the user's real-time preferences.
[0130] Based on the dynamic weighting of user interest tags and the targeted recommended news results, the LLM large language model is used to reorder interest tags and rewrite news content, ensuring that recommendations are highly aligned with users' real-time preferences while ensuring a strong correlation between news priority and interest tag weighting. Technical Logic: Using collaborative filtering matching results as input, the LLM analyzes the importance of user interest tags and dynamically adjusts the focus of news content, achieving a closed-loop optimization of "tag weight → content semantics → recommendation priority."
[0131] During the interest tag re-ranking process, tag weight data is integrated, obtaining the base weights of user interest tags from the "User Profile Construction" step (e.g., a weight of 0.8 for the "Artificial Intelligence" tag and 0.6 for the "Finance" tag). Combined with the results of "Collaborative Filtering Matching," the user's predicted interest in the target recommended news is extracted as a supplementary basis for tag weights (e.g., if the target recommended news is mostly technology-related, the weight of the "Technology" tag is temporarily increased by 20%). Weight fusion formula: Final weight = α × profile weight + (1-α) × collaborative filtering weight, where α is a balancing coefficient (e.g., 0.7, which can be optimized through A / B testing) used to adjust the contribution of the two weights.
[0132] Construct the input prompt of the LLM in the following format: user interest tags and weights (descending order): artificial intelligence (0.8), finance (0.6), sports (0.3); target recommended news topic: the latest progress of large language models; task: reorder tags according to news topics and tag weights, and output a priority list.
[0133] LLM uses semantic understanding to analyze the relevance of news topics and interest tags and dynamically adjusts the tag order. For example, if the news focuses on "Large Language Model," the "Artificial Intelligence" tag will be prioritized at the top, and the "Finance" tag will be moved to the back. Output example: Rearranged tag priority: Artificial Intelligence (0.8), Sports (0.3), Finance (0.6) (Note: The values remain unchanged; only the order is adjusted to reflect news relevance)
[0134] The technical approach to news content rewriting is to highlight content paragraphs related to high-weight interest tags for tag guidance; when adjusting the focus of content, ensure the integrity of the core information of the news for semantic consistency; rewrite the language style to fit the user portrait (such as using lively expressions for young users and rigorous terminology for professionals) to highlight user-friendliness.
[0135] Input construction: The original news text and the rearranged interest tag list are used as LLM input. Example prompt: News original text: [Insert news text here]; Interest tag priority: Artificial Intelligence (0.8), Sports (0.3), Finance (0.6); Task: Rewrite the news content according to the tag priority, highlighting the content related to high-weight tags and maintaining semantic integrity.
[0136] Model processing steps: LLM identifies the overlapping parts of keywords and interest tags in news texts (such as the association between "ChatGPT" and the "artificial intelligence" tag mentioned in the news) and performs semantic analysis; adds detailed descriptions to paragraphs related to high-weight tags (such as expanding the technical principles of the "large language model"), and appropriately simplifies the content related to low-weight tags to strengthen the content; adjusts the expression method to make the rewritten content more directly associated with the user's interest tags (such as changing "AI technology application" to "how artificial intelligence technology changes the industry") to perform language optimization.
[0137] Output verification: The ROUGE indicator is used to evaluate the semantic similarity of the content before and after rewriting to ensure that the rewritten content does not deviate from the original text; BERTScore is used to verify the semantic match between the rewritten content and the interest tags. If the score is lower than the threshold (such as 0.8), a second rewrite is triggered.
[0138] The recommendation priority is matched with the interest tags, and the rearranged interest tag weights are mapped to the news recommendation priority (for example, a weight of 0.8 corresponds to the highest priority, and 0.3 corresponds to the medium priority), and the priority is quantified; for news of the same category, it is further sorted according to the matching degree between the rewritten content and the high-weight tags (for example, for two science and technology news articles, the news with a high semantic matching degree with the "artificial intelligence" tag will be recommended first).
[0139] By introducing a reinforcement learning mechanism, the LLM's rewriting strategy is optimized through actual user interaction feedback (such as click-through rate and dwell time). For example, if users have a higher click-through rate for news rewritten in a certain style, the weight of that style will be increased. For multilingual news, the cross-language capabilities of the LLM are used to achieve semantically consistent multilingual rewriting; combined with multimedia content such as images, text, and videos, recommended materials adapted to different modalities are generated (such as generating subtitles that match interest tags for video news). During the rewriting process, sensitive words are filtered through regular expressions or NLP models; the rewritten content is fact-checked (such as citing authoritative data sources to verify the accuracy of news data) to prevent the spread of false information.
[0140] The target recommended news list and the user's predicted interest value are obtained from "Collaborative Filtering and Matching." The basic weights of interest tags and user attributes are obtained from "User Profile Construction." The original content of the initial recommended news is obtained from "Target Recommended News Screening." Output: The rearranged interest tags are fed back to the user profile module to update the user's real-time preferences. The rewritten news content and priority information are transmitted to the recommendation system front-end to generate a personalized recommendation list.
[0141] Through interest tag rearrangement and content rewriting, the recommendation system not only realizes the upgrade from "data-based recommendation" to "semantic understanding-based recommendation", but also significantly improves user experience through dynamic content optimization, forming a virtuous cycle of "data-driven → model optimization → user feedback → strategy iteration".
[0142] The basic weight of the user interest tag is obtained, and the predicted interest value of the user for the target recommended news data is extracted as a supplementary basis for the basic weight; based on the semantic understanding ability of the LLM large language model, the relevance of news topics, interest tags, and financial risks is analyzed, and the order of user interest tags is dynamically adjusted; based on the LLM large language model, the overlapping part of the keywords in the news text and the interest tags is identified; the details of the paragraphs related to high-weight tags are increased, and the content related to low-weight tags is appropriately simplified; the expression mode is adjusted, and the rewritten content is associated with the user interest tags.
[0143] The initial weight of the interest tag is extracted from the user portrait module (such as "insurance product" weight 0.8, "financial investment" weight 0.6), reflecting the user's long-term preference. Dynamic weight supplement: combined with the predicted interest value of the user for the target recommended news (such as the predicted interest value for a certain insurance news 0.9), the maximum weight is dynamically adjusted according to the formula maximum weight = α × basic weight + (1-α) × predicted interest value (α is a verification coefficient, such as 0.7).
[0144] After interest tag rearrangement based on LLM, semantic relevance analysis: input the news topic (such as "interpretation of new rules of critical illness insurance") and the fused weight of interest tags into LLM, instruction example: news topic: interpretation of new rules of critical illness insurance; interest tags and weight: insurance product (0.85), financial investment (0.6), health management (0.7); task: analyze relevance, reorder tags and output priority list. Dynamic priority adjustment: LLM adjusts the order of tags according to semantic relevance (such as placing "insurance product" at the top and "health management" next), generating a tag sequence that adapts to the news content.
[0145] News content rewriting and tag enhancement, keyword matching: LLM identifies keywords in the news text (such as "light symptom payout ratio"), and performs semantic matching with rearranged interest tags (such as "insurance product") to locate content-related paragraphs. Content focus adjustment: for "insurance product" related paragraphs, increase details (such as "new rules of light symptom payout from 20% to 30%") to enhance high-weight tags; for "financial investment" related content, shorten the expression to simplify low-weight tags and avoid overshadowing. Expression optimization: rewrite news sentences into expressions that fit user interests, such as changing "insurance clause update" to "changes in critical illness insurance payouts that you need to pay attention to", enhancing recommendation relevance.
[0146] In this embodiment, the method further includes: using the LLM large language model to determine whether the generated final recommended news data changes the factuality of the original news; and calculating the toxicity score of the final recommended news data based on the open source toxicity model.
[0147] Factual consistency judgment logic: Input construction: Compare the original news text with the recommended news text rewritten by the LLM, and input it into the LLM for factual verification. Example command: Original text: [The central bank announced a 0.25 percentage point interest rate cut], rewritten text: [The central bank today lowered deposit and loan rates by 0.25 percentage points to boost market confidence]. Task: Determine whether the rewriting changes the original facts and output "consistent" or "inconsistent." Semantic matching technology: Use the LLM to calculate the semantic similarity between the two texts (such as using BERTScore), focusing on the consistency of key elements such as time, numbers, and subject behavior (for example, whether "0.25 percentage point interest rate cut" has been tampered with).
[0148] The factual error handling mechanism sets a similarity threshold (such as 0.8). If it is lower than the threshold, manual review or secondary rewriting will be triggered; regular expression verification is performed on key data (such as economic indicators and policy terms) to ensure that the values, units, etc. have not been tampered with.
[0149] The open-source toxicity model's news toxicity score covers risks such as false information, hate speech, and misleading content. For example, insurance news claiming "guaranteed returns 100%" could be considered a financial fraud risk. Typical open-source model applications include the DaSH model, which takes text as input and outputs a "toxicity probability" (0-1), focusing on detecting false claims and extreme speech. The Toxigen model identifies toxic language (such as discriminatory terms and inflammatory expressions) in text and outputs detailed toxicity categories (such as "financial misleading" and "hate").
[0150] The scoring calculation process involves recommending news text, preprocessing the text (word segmentation and denoising), inputting the open source toxicity model, calculating the toxicity score, outputting a total score and risk category, recommending news text, preprocessing the text (word segmentation and denoising), inputting the open source toxicity model, calculating the toxicity score, and outputting a total score and risk category. Example output: "Toxicity score 0.32, risk category: Mild financial misleading (including phrases such as "guaranteed profit without loss")." News with a score ≥0.7 is blocked; news with a score between 0.3 and 0.7 has the trigger keyword highlighted (e.g., "guaranteed profit without loss" is highlighted in red) and a risk warning is added.
[0151] It can be seen that, in the above scheme, for insurance scene news recommendation, first, the initial recommended news data and the historical recommended news data are obtained to provide a basic data set for subsequent analysis; the user's interaction data with the historical news is extracted from the historical recommended news data, and a historical interaction database of the user and the historical news is constructed, wherein the historical interaction database records the user's historical behavior preference; the user's basic information, interest label and financial risk are synchronously extracted to construct a user database and form a structured user portrait; the initial recommended news data and the historical recommended news data are input into the BERT model, the semantic correlation of the initial recommended news data and the historical recommended news data is determined by the cosine similarity calculation after embedding coding, and a quantitative similarity score is obtained; based on the similarity score, the historical recommended news with the highest similarity with the initial recommended news data is selected as the target recommended news data, the interaction behavior matrix of the target recommended news data and the user is constructed based on the historical interaction database, and the historical interaction intensity of the user with the same type of news is quantified; based on the collaborative filtering model, the matching degree of the user and the target recommended news data is analyzed based on the interaction behavior matrix, the target recommended news data most suitable for the current user preference is selected, and it is mapped back to the initial recommended news data set to complete the preliminary recall; based on the LLM large language model, the priority of the user portrait is reordered according to the recall result, and the news content of the initial recommended news data is rewritten according to the rearranged user portrait weight, and the rewritten news content is output as the final recommended news data, wherein the recommendation priority of the news content matches the interest degree of the interest label, and the final recommended news data is highly consistent with the real-time preference of the user. The present application can better capture the subtle differences of news content and the specific needs of users through the powerful context understanding ability of LLM, making the recommendation more intelligent; content rewriting ability: using LLM to rewrite and personalize news content makes the recommended news more in line with the reading habits and interests of users, improving user experience; personalized and more accurate: through the deep analysis of user basic information, insurance mentality and historical behavior data by LLM, a more detailed user portrait can be generated, thereby providing more personalized news recommendation; multidimensional quality inspection: the introduction of the quality inspection module can real-time evaluate the factuality and toxicity of the generated content during the recommendation process, ensuring that the information received by the user is accurate and safe. Therefore, the present method can not only provide higher quality and more accurate recommendation results, but also provide personalized recommendation results in line with the reading habits and interests of users, thereby improving user satisfaction.
[0152] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0153] In one embodiment, a news recommendation device based on the LLM large language model is provided. The news recommendation device based on the LLM large language model corresponds to the news recommendation method based on the LLM large language model in the above embodiment. Figure 3 As shown, the news recommendation device based on the LLM large language model includes a pre-acquisition module 101, an interaction module 102, a structuring module 103, a similarity calculation module 104, a screening module 105, a filtering module 106, and a rearrangement module 107. The functional modules are described in detail as follows:
[0154] Acquisition module 101, used to acquire initial recommended news data and historical recommended news data to provide a basic data set for subsequent analysis;
[0155] Interaction module 102, for extracting user interaction data on historical news from historical recommended news data and building a historical interaction database between users and historical news, wherein the historical interaction database records user historical behavior preferences;
[0156] Structuring module 103, used to simultaneously extract user basic information, interest tags, and financial risks, build a user database, and form a structured user portrait;
[0157] Similarity calculation module 104, for inputting the initial recommended news data and the historical recommended news data into the BERT model, determining the semantic relevance between the initial recommended news data and the historical recommended news data by calculating the cosine similarity after embedding encoding, and obtaining a quantitative similarity score;
[0158] The screening module 105 is used to screen out the historical recommended news with the highest similarity to the initial recommended news data based on the similarity score, and set it as the target recommended news data. Based on the historical interaction database, it constructs an interaction behavior matrix between the target recommended news data and the user, and quantifies the historical interaction intensity of the user for similar news;
[0159] Filtering module 106 is used to analyze the matching degree between the user and the target recommended news data based on the collaborative filtering model and the interaction behavior matrix, filter out the target recommended news data that best matches the current user's preferences, and map it back to the initial recommended news data set to complete the initial recall;
[0160] The rearrangement module 107 is used to reorder the priorities of user portraits according to the recall results based on the LLM large language model, rewrite the news content of the initial recommended news data according to the rearranged user portrait weights, and output the rewritten news content as the final recommended news data, wherein the recommendation priority of the news content matches the interest level of the interest tag, ensuring that the final recommended news data is highly consistent with the user's real-time preferences.
[0161] In one embodiment, the similarity calculation module 104 is specifically configured to:
[0162] Preprocessing news texts of initial recommended news data and news texts in historical recommended news data;
[0163] Convert the preprocessed news text into the input format required by the BERT model, and input the preprocessed news text into the pre-trained BERT model based on the input format matching;
[0164] The pre-processed news text is subjected to feature extraction through a multi-layer Transformer encoder, and the semantic vector of each pre-processed news text is finally output;
[0165] Extract the BERT encoding of the initial recommended news data and the BERT encoding of the historical recommended news data respectively;
[0166] Normalize the BERT encoding of the initial recommended news data and the BERT encoding of the historical recommended news data;
[0167] Based on matrix operations, the cosine similarity between the initial recommended news data and all historical recommended news data is calculated in batches to obtain a similarity matrix.
[0168] Map cosine similarity and construct similarity score;
[0169] Based on the similarity score, the historical recommended news data are arranged in descending order, and a preset number of data with the highest scores are selected as the high-similarity historical recommended news data.
[0170] In one embodiment, the screening module 105 is further configured to:
[0171] Based on the similarity scores, obtain the similarity score matrix between the initial recommended news data and the historical recommended news data, and sort the historical recommended news data in descending order of scores;
[0172] Selecting a preset number of historical recommended news data as a high-similarity historical news set, and setting it as target recommended news data;
[0173] Extract the user's interaction records on the historical recommended news data from the historical interaction database and assign different weights according to the behavior type;
[0174] Based on cosine similarity, calculate the similarity between the current user and other users in the interaction behavior matrix, and filter out a preset number of most similar users;
[0175] The predicted interest value of the current user is calculated based on the interaction intensity and similarity of neighbor users, the target recommended news data are sorted in descending order according to the predicted interest value, and a preset number of target recommended news data with the highest scores are selected as the most matching target recommended news data.
[0176] In one embodiment, the rearrangement module 107 is specifically configured to:
[0177] Obtain the basic weights of the user's interest tags and extract the user's predicted interest value for the target recommended news data as a supplementary basis for the basic weights;
[0178] Based on the semantic understanding capability of the LLM large language model, the correlation between news topics, interest tags, and financial risks is analyzed, and the order of user interest tags is dynamically adjusted;
[0179] Identify the overlapping parts of keywords and interest tags in news texts based on the LLM large language model;
[0180] Add detailed descriptions of paragraphs related to high-weight tags and appropriately streamline content related to low-weight tags;
[0181] Adjust the expression and associate the rewritten content with user interest tags.
[0182] In one embodiment, the device is further configured to:
[0183] Use the LLM large language model to determine whether the generated final recommended news data changes the factuality of the original news;
[0184] Based on the open source toxicity model, the final toxicity score of recommended news data is calculated.
[0185] The present invention provides a news recommendation device based on the LLM large language model. By obtaining initial recommended news data and historical recommended news data, a basic data set is provided for subsequent analysis; user interaction data on historical news is extracted from the historical recommended news data, and a historical interaction database between users and historical news is constructed, wherein the historical interaction database records user historical behavior preferences; user basic information, interest tags and financial risks are simultaneously extracted to construct a user database and form a structured user portrait; the initial recommended news data and historical recommended news data are input into the BERT model, and the semantic relevance between the initial recommended news data and the historical recommended news data is determined by calculating the cosine similarity after embedding encoding to obtain a quantitative similarity score; based on the similarity score, the historical recommended news data with the highest similarity to the initial recommended news data is screened out. News is collected and set as the target recommended news data. Based on the historical interaction database, an interaction behavior matrix between the target recommended news data and the user is constructed to quantify the historical interaction intensity of the user on similar news. Based on the collaborative filtering model, the matching degree between the user and the target recommended news data is analyzed based on the interaction behavior matrix, and the target recommended news data that best matches the current user preference is screened out. The target recommended news data is mapped back to the initial recommended news data set to complete the preliminary recall. Based on the LLM large language model, the priority of the user portrait is re-sorted according to the recall result, and the news content of the initial recommended news data is rewritten according to the rearranged user portrait weight, and the rewritten news content is output as the final recommended news data. Among them, the recommendation priority of the news content matches the interest degree of the interest tag, ensuring that the final recommended news data is highly consistent with the user's real-time preferences. The present invention leverages LLM's powerful contextual understanding capabilities to better capture the nuances of news content and users' specific needs, making recommendations more intelligent. The present invention also leverages LLM's content rewriting and personalized generation capabilities, making recommended news more aligned with users' reading habits and interests, enhancing user experience. Furthermore, LLM uses in-depth analysis of users' basic information, insurance mentality, and historical behavioral data to generate more detailed user profiles, thereby providing more personalized news recommendations. Furthermore, multi-dimensional quality control utilizes a quality control module that enables real-time evaluation of the factuality and toxicity of generated content during the recommendation process, ensuring the accuracy and security of the information users receive. Therefore, the present method can provide both higher-quality and more accurate recommendation results and personalized recommendations tailored to users' reading habits and interests, thereby improving user satisfaction.
[0186] For the specific limitations of the news recommendation device based on the LLM large language model, please refer to the limitations of the news recommendation method based on the LLM large language model above, and will not be repeated here. The various modules in the above-mentioned news recommendation device based on the LLM large language model can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0187] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of a news recommendation method based on an LLM large language model.
[0188] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the client side of a news recommendation method based on an LLM large language model.
[0189] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed:
[0190] Obtain initial recommended news data and historical recommended news data to provide a basic data set for subsequent analysis;
[0191] Extracting user interaction data on historical news from historical recommended news data and building a historical interaction database between users and historical news, where the historical interaction database records users' historical behavior preferences;
[0192] Synchronously extract user basic information, interest tags, and financial risks, build a user database, and form a structured user profile;
[0193] Input the initial recommended news data and historical recommended news data into the BERT model, and calculate the semantic relevance between the initial recommended news data and historical recommended news data through cosine similarity calculation after embedding encoding to obtain a quantitative similarity score;
[0194] Based on the similarity score, the historical recommended news with the highest similarity to the initial recommended news data is selected and set as the target recommended news data. Based on the historical interaction database, an interaction behavior matrix between the target recommended news data and users is constructed to quantify the historical interaction intensity of users for similar news.
[0195] Based on the collaborative filtering model and the interaction behavior matrix, the matching degree between users and target recommended news data is analyzed, and the target recommended news data that best matches the current user preferences is selected and mapped back to the initial recommended news data set to complete the initial recall.
[0196] Based on the LLM large language model, the priority of user portraits is re-sorted according to the recall results, and the news content of the initial recommended news data is rewritten according to the re-sorted user portrait weights. The rewritten news content is output as the final recommended news data. Among them, the recommendation priority of the news content is matched with the interest level of the interest tags, ensuring that the final recommended news data is highly consistent with the user's real-time preferences.
[0197] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0198] Obtain initial recommended news data and historical recommended news data to provide a basic data set for subsequent analysis;
[0199] Extracting user interaction data on historical news from historical recommended news data and building a historical interaction database between users and historical news, where the historical interaction database records users' historical behavior preferences;
[0200] Synchronously extract user basic information, interest tags, and financial risks, build a user database, and form a structured user profile;
[0201] The initial recommended news data and the historical recommended news data are input into the BERT model, the semantic relevance of the initial recommended news data and the historical recommended news data is determined through cosine similarity calculation after embedding coding, and a quantized similarity score is obtained;
[0202] Based on the similarity score, the historical recommended news with the highest similarity to the initial recommended news data is filtered out and set as the target recommended news data, an interaction behavior matrix of the target recommended news data and the user is constructed based on the historical interaction database, and the historical interaction intensity of the user to the same type of news is quantized;
[0203] Based on the collaborative filtering model, the matching degree of the user and the target recommended news data is analyzed based on the interaction behavior matrix, the target recommended news data most suitable for the current user preference is filtered out, and is mapped back to the initial recommended news data set to complete the preliminary recall;
[0204] Based on the LLM large language model, the priority of the user portrait is reordered according to the recall result, the news content of the initial recommended news data is rewritten according to the rearranged user portrait weight, and the rewritten news content is output as the final recommended news data, wherein the recommendation priority of the news content matches the interest degree of the interest label, and the final recommended news data is ensured to be highly consistent with the real-time preference of the user.
[0205] It should be noted that the functions or steps that the computer readable storage medium or the computer device can implement correspond to the related descriptions of the server side and the client side in the foregoing method embodiments, and to avoid repetition, they will not be described one by one here.
[0206] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0207] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0208] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A news recommendation method based on LLM large language model, characterized by: include: Obtain initial recommended news data and historical recommended news data to provide a basic data set for subsequent analysis; Extracting user interaction data on historical news from historical recommended news data and building a historical interaction database between users and historical news, where the historical interaction database records users' historical behavior preferences; Synchronously extract user basic information, interest tags, and financial risks, build a user database, and form a structured user profile; Input the initial recommended news data and historical recommended news data into the BERT model, and calculate the semantic relevance between the initial recommended news data and historical recommended news data through cosine similarity calculation after embedding encoding to obtain a quantitative similarity score; Based on the similarity score, the historical recommended news with the highest similarity to the initial recommended news data is selected and set as the target recommended news data. Based on the historical interaction database, an interaction behavior matrix between the target recommended news data and users is constructed to quantify the historical interaction intensity of users for similar news. Based on the collaborative filtering model and the interaction behavior matrix, the matching degree between users and target recommended news data is analyzed, and the target recommended news data that best matches the current user preferences is selected and mapped back to the initial recommended news data set to complete the initial recall. Based on the LLM large language model, the priority of user portraits is re-ranked according to the recall results, and the news content of the initial recommended news data is rewritten according to the re-ranked user portrait weights. The rewritten news content is output as the final recommended news data. Among them, the recommendation priority of the news content is matched with the interest level of the interest tags, ensuring that the final recommended news data is highly consistent with the user's real-time preferences.
2. The news recommendation method based on the LLM large language model according to claim 1, characterized in that: The steps of inputting the initial recommended news data and the historical recommended news data into the BERT model, determining the semantic relevance between the initial recommended news data and the historical recommended news data by calculating the cosine similarity after embedding encoding, and obtaining a quantitative similarity score include: Preprocessing news texts of initial recommended news data and news texts in historical recommended news data; Convert the preprocessed news text into the input format required by the BERT model, and input the preprocessed news text into the pre-trained BERT model based on the input format matching; The preprocessed news text is subjected to feature extraction through a multi-layer Transformer encoder, and the semantic vector of each preprocessed news text is finally output.
3. The news recommendation method based on the LLM large language model according to claim 2, characterized in that: After the step of extracting features from the preprocessed news text using a multi-layer Transformer encoder and finally outputting a semantic vector for each preprocessed news text, the method further includes: Extract the BERT encoding of the initial recommended news data and the BERT encoding of the historical recommended news data respectively; Normalize the BERT encoding of the initial recommended news data and the BERT encoding of the historical recommended news data; Based on matrix operations, the cosine similarity between the initial recommended news data and all historical recommended news data is calculated in batches to obtain a similarity matrix.
4. The news recommendation method based on the LLM large language model according to claim 3, characterized in that: After the step of batch calculating the cosine similarities between the initial recommended news data and all historical recommended news data through matrix operations to obtain a similarity matrix, the method further includes: Map cosine similarity and construct similarity score; Based on the similarity score, the historical recommended news data are arranged in descending order, and a preset number of data with the highest scores are selected as the high-similarity historical recommended news data.
5. The news recommendation method based on the LLM large language model according to claim 1, characterized in that: The steps of screening out historical recommended news with the highest similarity to the initial recommended news data based on the similarity score and setting it as target recommended news data, constructing an interaction behavior matrix between the target recommended news data and the user based on the historical interaction database, and quantifying the historical interaction intensity of the user for similar news include: Based on the similarity scores, obtain the similarity score matrix between the initial recommended news data and the historical recommended news data, and sort the historical recommended news data in descending order of scores; Selecting a preset number of historical recommended news data as a high-similarity historical news set, and setting it as target recommended news data; Extract the user's interaction records on the historical recommended news data from the historical interaction database and assign different weights according to the behavior type; Based on cosine similarity, calculate the similarity between the current user and other users in the interaction behavior matrix, and filter out a preset number of most similar users; The predicted interest value of the current user is calculated based on the interaction intensity and similarity of neighbor users, the target recommended news data are sorted in descending order according to the predicted interest value, and a preset number of target recommended news data with the highest scores are selected as the most matching target recommended news data.
6. The news recommendation method based on the LLM large language model according to claim 1, characterized in that: The steps of reordering the priorities of user profiles based on the recall results based on the LLM large language model and rewriting the news content of the initial recommended news data based on the reordered user profile weights, wherein the recommendation priority of the news content matches the interest level of the interest tags to ensure that the recommended content is highly consistent with the user's real-time preferences, include: Obtain the basic weights of the user's interest tags and extract the user's predicted interest value for the target recommended news data as a supplementary basis for the basic weights; Based on the semantic understanding capability of the LLM large language model, the correlation between news topics, interest tags, and financial risks is analyzed, and the order of user interest tags is dynamically adjusted; Identify the overlapping parts of keywords and interest tags in news texts based on the LLM large language model; Add detailed descriptions of paragraphs related to high-weight tags and appropriately streamline content related to low-weight tags; Adjust the expression and associate the rewritten content with user interest tags.
7. The news recommendation method based on the LLM large language model according to claim 1, characterized in that: After the steps of reordering the priorities of user portraits based on the recall results based on the LLM large language model, rewriting the news content of the initial recommended news data based on the reordered user portrait weights, and outputting the rewritten news content as the final recommended news data, wherein the recommendation priority of the news content matches the interest level of the interest tags to ensure that the final recommended news data is highly consistent with the user's real-time preferences, the method further includes: Use the LLM large language model to determine whether the generated final recommended news data changes the factuality of the original news; Based on the open source toxicity model, the final toxicity score of recommended news data is calculated.
8. A news recommendation device based on the LLM large language model, characterized in that: include: The acquisition module is used to obtain the initial recommended news data and historical recommended news data to provide a basic data set for subsequent analysis; An interaction module is used to extract user interaction data on historical news from historical recommended news data and build a historical interaction database between users and historical news, wherein the historical interaction database records user historical behavior preferences; The structured module is used to simultaneously extract basic user information, interest tags, and financial risks, build a user database, and form a structured user profile; A similarity calculation module is used to input the initial recommended news data and the historical recommended news data into the BERT model, determine the semantic relevance between the initial recommended news data and the historical recommended news data through cosine similarity calculation after embedding encoding, and obtain a quantitative similarity score; The screening module is used to select the historical recommended news with the highest similarity to the initial recommended news data based on the similarity score, and set it as the target recommended news data. Based on the historical interaction database, it constructs the interaction behavior matrix between the target recommended news data and the user, and quantifies the historical interaction intensity of users for similar news. The filtering module is used to analyze the matching degree between users and target recommended news data based on the collaborative filtering model and the interaction behavior matrix, filter out the target recommended news data that best matches the current user's preferences, and map it back to the initial recommended news data set to complete the initial recall; The rearrangement module is used to re-order the priority of user portraits based on the recall results based on the LLM large language model, rewrite the news content of the initial recommended news data according to the rearranged user portrait weights, and output the rewritten news content as the final recommended news data. Among them, the recommendation priority of the news content is matched with the interest level of the interest tags, ensuring that the final recommended news data is highly consistent with the user's real-time preferences.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the news recommendation method based on the LLM large language model are implemented as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the news recommendation method based on the LLM large language model are implemented as described in any one of claims 1 to 7.
Citation Information
Cited By
Video shot recommendation method based on multi-modal large model
CN121301609A
Resource recommendation method and device, electronic equipment and medium
CN121597910A
Scientific and technological achievement recommendation method, equipment, medium and system based on business behavior chain
CN122087167A
