Individual stock risk early warning method and system based on artificial intelligence

CN119887392APending Publication Date: 2025-04-25HANGZHOU ZHONGZHUO INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510370427.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Traditional risk assessment methods are difficult to effectively capture nonlinear changes and real-time events in the market, especially the lack of effective analytical tools when processing unstructured data, resulting in inaccurate risk warning results.

Method used

The risk warning method of individual stocks based on artificial intelligence is used to identify related stocks through knowledge graph search, combine natural language processing technology and neural network models to analyze information, calculate negative tendency scores, and calculate the risk assessment scores of individual stocks through weighted averages.

Benefits of technology

It realizes the comprehensiveness, intelligence and timeliness of risk assessment, accurately identify risk signals, improves the accuracy and comprehensiveness of risk warning, and can provide personalized risk warning services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887392A_ABST
    Figure CN119887392A_ABST
Patent Text Reader

Abstract

The invention provides an individual stock risk early warning method and system based on artificial intelligence. The method comprises the following steps: querying an individual stock to be evaluated and an individual stock bin; searching associated stocks associated with the individual stocks to be evaluated through the knowledge graph, and calculating to obtain an association coefficient between the associated stocks and the individual stocks to be evaluated; generating a keyword list and an information acquisition rule; obtaining associated information related to the individual stock to be evaluated and the associated stock; utilizing a natural language processing technology and a neural network model to analyze the interest influence of the associated information on the individual share to be evaluated and the associated stock, and calculating to obtain an interest tendency score; calculating to obtain a first risk score corresponding to the individual share to be evaluated; comprehensively calculating to obtain a second risk score corresponding to the associated stock; and finally calculating an individual share risk assessment score of the individual share to be assessed, and if the individual share risk assessment score exceeds a preset risk score threshold, sending early warning information to the customer. The method has the effect of quickly and accurately predicting the individual stock risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of big data analysis, and specifically relates to an individual stock risk early warning method and system based on artificial intelligence. Background Art

[0002] The complexity of financial markets provides a broad application space for risk assessment technology. Today's financial markets have formed a highly interconnected financial network, and the linkage between markets in various industries is increasing. However, traditional risk assessment mainly relies on fundamental analysis and technical analysis. Although these methods have their value, they are often too dependent on historical data and established patterns, and it is difficult to effectively capture nonlinear changes and real-time events in the market. Especially when dealing with unstructured data (such as news reports, social media comments, etc.), traditional methods lack effective analysis tools and it is difficult to extract valuable risk signals from these data, resulting in inaccurate risk warning results. Summary of the invention

[0003] The present invention provides an individual stock risk warning method and system based on artificial intelligence to solve the problem of inaccurate risk warning.

[0004] In a first aspect, the present invention provides an individual stock risk early warning method based on artificial intelligence, the method comprising the following steps:

[0005] Query the stocks to be evaluated and the stock positions of the stocks to be evaluated held by the customer;

[0006] Retrieve the associated stocks related to the stock to be evaluated through the preset knowledge graph, and calculate the correlation coefficient between the associated stocks and the stock to be evaluated according to the correlation degree;

[0007] Generate a keyword list and information acquisition rules based on the stock information of the individual stocks to be evaluated and the related stocks;

[0008] Based on the keyword list and using information acquisition rules, related information about the stocks to be evaluated and related stocks is obtained;

[0009] Use natural language processing technology and neural network models to analyze the negative impact of related information on the individual stocks to be evaluated and related stocks, and calculate the negative tendency score;

[0010] The first risk score is calculated by combining the negative tendency score corresponding to the individual stock to be evaluated and the individual stock position;

[0011] The second risk score is calculated by combining the negative tendency score corresponding to the associated stock and the correlation coefficient between the associated stock and the individual stock to be evaluated;

[0012] The first risk score and the second risk score are weighted averaged to obtain the risk assessment score of the individual stock to be assessed. If the risk assessment score of the individual stock exceeds the preset risk score threshold, a warning message is sent to the customer.

[0013] Optionally, the retrieving related stocks associated with the individual stock to be evaluated through a preset knowledge graph includes the following steps:

[0014] Obtaining comprehensive information of the stocks to be evaluated, including the industry attributes, main business and upstream and downstream enterprise information of the enterprise corresponding to the stocks to be evaluated;

[0015] Based on the comprehensive information of individual stocks and through the preset knowledge graph, target stocks that are associated with the stocks to be evaluated are retrieved and marked;

[0016] Perform graph cluster analysis on target stocks according to different types of association relationships, and calculate the multi-dimensional association strength value between each target stock and the stocks to be evaluated based on the graph cluster analysis results;

[0017] Target stocks whose multi-dimensional correlation strength values ​​exceed a preset correlation strength threshold are screened out as associated stocks.

[0018] Optionally, the types of relationships include industrial chain relationships, equity penetration relationships, and technology dependency relationships.

[0019] Optionally, the step of calculating the correlation coefficient between the associated stock and the individual stock to be evaluated according to the correlation degree includes the following steps:

[0020] Allocate dynamic weight coefficients to associated stocks according to their associated relationship types;

[0021] By introducing a time decay factor to correct the influence of historical data in the multi-dimensional association strength value, a corrected target association strength value is obtained;

[0022] The target correlation strength value and the dynamic weight coefficient are nonlinearly superimposed to obtain the correlation coefficient between the associated stock and the individual stock to be evaluated.

[0023] Optionally, the step of analyzing the negative impact of related information on the to-be-evaluated stock and related stocks by using natural language processing technology and a neural network model, and calculating a negative impact tendency score comprises the following steps:

[0024] Preprocessing the acquired related information;

[0025] Use natural language processing technology to convert the pre-processed related information into information word vectors;

[0026] Input the information word vector into the pre-configured neural network model to obtain the information semantic representation of the associated news information;

[0027] The information semantic representation is analyzed through the sentiment analysis model to obtain the sentiment polarity and sentiment intensity of the related information;

[0028] The negative tendency score of the related information on the evaluated stock and related stocks is calculated by combining the sentiment polarity and sentiment intensity.

[0029] Optionally, analyzing the information semantic representation by a sentiment analysis model to obtain the sentiment polarity and sentiment intensity of the associated news information comprises the following steps:

[0030] Build a sentiment analysis model based on the Transformer encoder that captures long-range dependencies;

[0031] Add financial domain sentiment dictionary and financial domain semantic rule base to sentiment analysis model;

[0032] Configure a hierarchical attention mechanism in the sentiment analysis model for key information fragments related to the individual stock to be evaluated and the related stocks in the semantic representation;

[0033] The semantic representation of information is input into the sentiment analysis model, and the sentiment analysis model outputs the sentiment polarity and sentiment intensity of the corresponding related information.

[0034] Optionally, the step of combining the sentiment polarity and the sentiment intensity to calculate the negative tendency score of the associated information information on the individual stock to be evaluated and the associated stocks comprises the following steps:

[0035] Determine the base of the negative impact of the related information on the individual stock to be evaluated and the related stocks according to the information attributes of the related information;

[0036] Using the time decay function and according to the time window in which the related information is located, the negative impact weight is assigned to the related information;

[0037] The negative impact coefficient of the related information is calculated by combining the negative impact base and the negative impact weight;

[0038] The negative tendency score of the related information on the evaluated stock and related stocks is calculated by combining the sentiment polarity, sentiment intensity and negative impact coefficient.

[0039] Optionally, information attributes include information timeliness, information content richness, and information source credibility.

[0040] Optionally, the step of comprehensively calculating the second risk score by combining the negative tendency score corresponding to the associated stock and the correlation coefficient between the associated stock and the individual stock to be evaluated comprises the following steps:

[0041] For each associated stock, the corresponding negative tendency score and the correlation coefficient with the stock to be evaluated are multiplied to calculate the associated risk score;

[0042] The average value of the associated risk scores corresponding to all associated stocks is calculated to obtain a second risk score.

[0043] In a second aspect, the present invention further provides an individual stock risk warning system based on artificial intelligence, 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 individual stock risk warning method based on artificial intelligence as described in the first aspect is implemented.

[0044] The beneficial effects of the present invention are:

[0045] Compared with traditional technologies, the present invention has significant beneficial effects. By introducing an individual stock risk warning method based on artificial intelligence, a qualitative leap in the comprehensiveness, intelligence and timeliness of risk assessment is achieved. The present invention not only focuses on the risk factors of the individual stocks to be evaluated, but also identifies related stocks and quantifies their degree of association through knowledge graph technology, thereby constructing a complete risk transmission network, effectively making up for the defect that the traditional method only focuses on a single target and ignores the associated risk. At the same time, the present invention uses intelligent information acquisition technology based on dynamically generated keyword lists and acquisition rules to realize the automatic collection of massive information, and conducts in-depth analysis of these information through advanced natural language processing technology and neural network models, accurately identifies the negative information contained therein and its degree of influence, and greatly improves the accuracy and comprehensiveness of risk identification. In addition, the present invention forms a comprehensive risk assessment score by weighted calculation of the individual stock's own risk and associated risk, and provides personalized risk warning services based on the actual position of the customer, so that the risk assessment results are more in line with the actual needs of investors. This risk warning method based on artificial intelligence not only improves the efficiency and accuracy of risk assessment, but also realizes the real-time and initiative of risk warning, provides investors with a more comprehensive and accurate risk management tool, and effectively helps investors avoid potential losses. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flow chart of an individual stock risk warning method based on artificial intelligence in one of the implementation modes of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0048] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0049] The user data and other data involved in this application have been obtained with full consent and authorization, and the collection, use and processing of relevant information comply with the relevant laws, regulations and standards of relevant countries and regions.

[0050] Figure 1 FIG. 1 is a flow chart of an individual stock risk warning method based on artificial intelligence in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps in the above method may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps. Figure 1 As shown, the individual stock risk warning method based on artificial intelligence disclosed in the present invention specifically includes the following steps:

[0051] S101. Query the stocks to be evaluated and the stock positions of the stocks to be evaluated held by the client.

[0052] The core of this step is to obtain the position information of specific stocks in the customer's investment portfolio, including key data such as stock code, number of positions, and holding cost. During implementation, the customer's position information can be automatically extracted by connecting data with the securities trading system or the customer investment management platform. For example, a customer holds a certain stock A, the number of positions is 1,000 shares, and the holding cost is 10 yuan per share. These data will be used for subsequent risk assessment calculations. Through this step, the customer's shareholding situation can be accurately grasped, providing data support for subsequent risk analysis.

[0053] S103. Retrieve related stocks associated with the individual stock to be evaluated through a preset knowledge graph, and calculate the correlation coefficient between the related stocks and the individual stock to be evaluated based on the degree of correlation.

[0054] Among them, the knowledge graph is a structured knowledge representation method that can store and query entities such as stocks, companies, industries, and industrial chains and their relationships in the form of a graph. The preset knowledge graph in this step is constructed using a graph database (such as Neo4j), which contains two major elements: nodes (representing corporate entities) and edges (representing associations). First, the system obtains comprehensive information about the stocks to be evaluated, including the attributes of the industry to which the enterprise belongs (such as according to industry classification standards), the main business of the enterprise (extracted from the enterprise's financial statements), and upstream and downstream enterprise information (obtained through the supply chain database). In the process of knowledge graph retrieval, the system uses a graph traversal algorithm (such as breadth-first search or depth-first search) to start with the individual stocks to be evaluated and explore target stocks that have associations with them. The associations are mainly divided into three categories: industrial chain associations (upstream and downstream suppliers, customer relationships), equity penetration associations (shareholder overlap, cross-holdings, etc.), and technology dependency associations (patent licensing, technical cooperation, etc.).

[0055] During implementation, first obtain the comprehensive information of the individual stocks to be evaluated, including the industry to which the company belongs, the main business, upstream and downstream enterprises, etc. Then, based on this information, retrieve the target stocks that have an association relationship with it in the knowledge graph. For example, stock A belongs to the technology industry, its upstream supplier is stock B, and its downstream customer is stock C. These stocks all have an industrial chain association relationship with stock A. Then, according to different types of association relationships (such as industrial chain association, equity penetration association, and technology dependency association), the target stocks are subjected to graph clustering analysis to calculate the multi-dimensional association strength value. Finally, the target stocks whose association strength values ​​exceed the preset threshold are selected as associated stocks, and the correlation coefficient between them and the individual stocks to be evaluated is calculated.

[0056] S103. Generate a keyword list and information acquisition rules based on the stock information of the individual stock to be evaluated and the related stocks.

[0057] Among them, based on the information of the individual stocks to be evaluated and the identified related stocks, it is necessary to build an accurate keyword list and information acquisition rules in order to obtain relevant information later. The keyword list generation adopts a multi-level structured method, including three levels: core keywords, extended keywords and qualifiers. The core keywords are directly extracted from the basic information of the stock, including the company name (full name and abbreviation in Chinese and English), stock code, main product name and core business field; extended keywords are extracted from company announcements, research reports and news through semantic expansion algorithms, including the names of company executives, names of key projects, core technical terms, etc.; qualifiers are used to improve search accuracy, including risk-related words such as "risk", "decline", "loss", "penalty", etc.

[0058] Information acquisition rules are a set of structured instructions that define specific methods for obtaining information from and in what ways. The rules include the following key components: a list of information sources (such as financial websites, official announcement platforms, social media, etc.), acquisition frequency settings (setting different acquisition intervals based on the update frequency and importance of the information source), content filtering conditions (such as the article release time range, minimum word count requirements, source credibility rating, etc.), and URL pattern matching rules (using regular expressions to define the URL format that meets the conditions). The generation of information acquisition rules adopts a combination of templates and dynamic adjustment methods. First, the basic acquisition templates for different types of information sources are preset, and then the parameters are dynamically adjusted according to the industry characteristics and market attention of the individual stocks to be evaluated. For example, for high-tech stocks, the acquisition weight of technical blogs and patent announcements can be increased; for cyclical industry stocks, the attention to macroeconomic data and industrial policies will be increased.

[0059] S104. Based on the keyword list and through information acquisition rules, related information information related to the individual stock to be evaluated and related stocks is obtained.

[0060] Among them, information acquisition is the key data collection link, and efficient and stable information acquisition is achieved through a distributed information acquisition architecture. The information acquisition system adopts a master-slave architecture, which consists of a scheduler, an information acquisition work node, a data processing module, and a storage module. The scheduler is responsible for task allocation and monitoring. According to the keyword list and acquisition rules generated in the previous step, the acquisition task is assigned to multiple information acquisition work nodes; the information acquisition work node is responsible for actual web page requests and content extraction; the data processing module is responsible for content cleaning, deduplication, and preliminary screening; the storage module saves the processed information to a distributed database. The acquisition process follows the strategy of "breadth first, importance sorting". First, the system will classify the information sources, and set the highest priority for high-credibility sources such as official announcements, authoritative financial media, and professional research institutions; followed by mainstream financial websites and industry portals; and then social media and forums. For each information source, the system will perform scheduled acquisition according to the preset acquisition frequency (such as important information sources are acquired once an hour, and general information sources are acquired once a day).

[0061] In order to improve the acquisition efficiency, the system adopts a number of technical measures: dynamic IP pool technology (rotating IP addresses through proxy servers), request header randomization (simulating different browsers and devices), access frequency control (randomized access intervals) and distributed acquisition (distributing tasks to multiple nodes). For example, when obtaining news about Alibaba from a financial website, the system randomly selects an IP address from the IP pool, sets a request header that simulates the Chrome browser, and adds a random delay of 3 to 7 seconds between each request. Content extraction uses a combination of DOM parsing and regular expressions to design special parsing rules for the page structure of different websites to extract key information such as title, text, release time, author, and number of comments. For content with a low degree of structure (such as social media posts), natural language processing technology is used for content identification and extraction. The acquired information will undergo preliminary screening, including keyword matching score (calculating the frequency and position importance of keywords in the article), timeliness evaluation (giving priority to retaining the latest published content) and content quality evaluation (based on factors such as article length and structural integrity). Only information that meets all three criteria will be saved in the database for subsequent analysis.

[0062] S105. Use natural language processing technology and neural network models to analyze the negative impact of related information on the evaluated stocks and related stocks, and calculate the negative tendency score.

[0063] Among them, the core of this step is to extract information that may have a negative impact on stocks from the information content through advanced text analysis technology. When implementing, the acquired information is first preprocessed, including word segmentation, removal of stop words, part-of-speech tagging, etc. Then, the preprocessed information is converted into information word vectors using natural language processing technology, that is, the text information is converted into a numerical form that can be processed by the computer. Next, the information word vector is input into a pre-configured neural network model to obtain the semantic representation of the information. The neural network model can capture the complex semantic relationships in the information. For example, the information "Stock A's performance has declined due to supply chain problems" will be identified as negative information. Finally, the semantic representation is analyzed through the sentiment analysis model to obtain the sentiment polarity and sentiment intensity of the information. Sentiment polarity indicates the positive or negative tendency of the information, and sentiment intensity indicates the intensity of this tendency. For example, a news title is "Stock A's performance has declined sharply due to supply chain problems", and its sentiment polarity is negative and its sentiment intensity is high. Combining sentiment polarity and sentiment intensity, the negative tendency score of the information information for the individual stock to be evaluated and the related stocks is calculated.

[0064] S106. Calculate a first risk score by combining the negative trend score corresponding to the individual stock to be evaluated and the individual stock position.

[0065] Among them, the calculation of the first risk score is a comprehensive evaluation process based on the negative propensity score of the individual stock to be evaluated and the position of the individual stock held by the customer. Specifically, the negative propensity score reflects the potential impact of negative information extracted from massive information through natural language processing and sentiment analysis technology on individual stocks, while the position of individual stocks represents the proportion of funds held by the customer on the stock. The combination of these two factors can more accurately reflect the actual impact of individual stock risks on the customer's investment portfolio. When calculating the first risk score, the negative propensity score is first standardized and mapped to the range of 0-100 for subsequent calculation and understanding. The standardization process adopts the Min-Max normalization method, that is, standardized negative propensity score = (original negative propensity score-minimum negative propensity score) / (maximum negative propensity score-minimum negative propensity score)×100. The scores processed in this way are more comparable and convenient for fusion calculation with other indicators.

[0066] Next, consider the factor of individual stock positions. Individual stock positions are usually expressed as the percentage of the customer's investment amount in the stock to the total investment portfolio. In order to reflect the nonlinear effect of position on risk (that is, the larger the position, the faster the risk grows), the position adjustment coefficient is introduced: position adjustment coefficient = 1 + log (1 + individual stock position percentage). This logarithmic transformation can reasonably amplify the risk impact of high positions, while the risk impact on low positions is relatively mild. The final calculation formula for the first risk score is: first risk score = standardized bearish tendency score × position adjustment coefficient. For example, if the standardized bearish tendency score of a stock is 75 points, and the customer holds a 20% position in the stock, the position adjustment coefficient is 1 + log (1 + 20%) ≈ 1.176, and the final first risk score is 75 × 1.176 ≈ 88.2 points.

[0067] In addition, in order to improve the accuracy of risk scoring, a time decay factor can be introduced to give recent negative information a higher weight. The time decay factor can be expressed as: (-λ*t) , where t represents the number of days since the information was released. is the attenuation parameter (usually between 0.05 and 0.2). In this way, the real-time risk status of individual stocks can be more reasonably evaluated, avoiding excessive influence of historical information on current risk assessment. The calculation of the first risk score realizes the organic combination of the risk of individual stocks and the customer's position exposure, providing an important basis for subsequent comprehensive risk assessment.

[0068] S107. A second risk score is obtained by comprehensively calculating the negative tendency score corresponding to the associated stock and the correlation coefficient between the associated stock and the individual stock to be evaluated.

[0069] Among them, the calculation of the second risk score aims to capture the risk transmission effect of related stocks, which is a dimension often overlooked by traditional risk assessment models. In the financial market, there is a complex network of associations between stocks, and the risk of a stock is often transmitted to other related stocks through channels such as industrial chain associations, equity penetration associations, or technology dependency associations. The second risk score provides a more comprehensive risk assessment for the individual stocks to be evaluated by quantifying this risk transmission effect. The calculation process first needs to obtain the negative tendency score of each related stock, which is extracted from the related information through the aforementioned natural language processing and sentiment analysis technology. At the same time, it is also necessary to obtain the correlation coefficient between each related stock and the individual stock to be evaluated. This coefficient reflects the closeness of the relationship between the two stocks. It is obtained through knowledge graph retrieval and corrected by the dynamic weight coefficient and time decay factor.

[0070] For each associated stock, the formula for calculating its associated risk score is: associated risk score = negative tendency score of the associated stock × correlation coefficient. For example, if the negative tendency score of an associated stock A is 80 points, and the correlation coefficient with the stock to be evaluated is 0.6, then the associated risk score of A for the stock to be evaluated is 80 × 0.6 = 48 points. This means that the negative situation of associated stock A contributes 48 points to the risk of the stock to be evaluated. In practical applications, the calculation of the correlation coefficient needs to consider the type of association relationship. For example, for industrial chain associations, the association strength can be calculated based on the proportion of upstream and downstream transaction amounts; for equity penetration associations, the association strength can be calculated based on the direct or indirect shareholding ratio; for technology dependency associations, the association strength can be calculated based on technology licensing agreements or patent citation relationships. Different types of associations will be assigned different dynamic weight coefficients to reflect their changing importance in different market environments.

[0071] After calculating the associated risk scores of all associated stocks, take their arithmetic mean as the second risk score: Second risk score = (Associated risk score of associated stock 1 + Associated risk score of associated stock 2 + ... + Associated risk score of associated stock n) / n. This average calculation method can smooth the extreme risks of individual associated stocks and provide more stable risk assessment results. In order to further improve the assessment accuracy, importance weighted average can be introduced, that is, different weights are assigned according to the market value, trading activity or degree of association of the associated stocks with the individual stocks to be assessed. The calculation of the second risk score effectively incorporates the risk transmission effect of associated stocks into the assessment system, and can capture potential risks transmitted through the association relationship in advance.

[0072] S108. Calculate the weighted average of the first risk score and the second risk score to obtain the individual stock risk assessment score of the individual stock to be assessed. If the individual stock risk assessment score exceeds the preset risk score threshold, send a warning message to the customer.

[0073] The final calculation of the risk assessment score of individual stocks is to take the weighted average of the first risk score and the second risk score mentioned above. This step integrates the assessment results of the two dimensions of the risk of the individual stock itself and the risk transmission of related stocks to form a more comprehensive and accurate risk assessment system. The calculation formula of the weighted average is: ; in is the weight coefficient, ranging from 0 to 1.

[0074] Weight coefficient The setting of is crucial, as it determines the relative importance of own risk and associated risk in the final score. The value can be set between 0.6-0.8, indicating that the risk of the individual stock itself dominates the assessment, but the associated risk also has a significant impact. The value can be adjusted dynamically: During the market stability period, the risks of individual stocks are relatively independent. The value can be set higher; during market turbulence, the risk transmission effect is enhanced. The value can be appropriately reduced to increase the weight of the associated risk.

[0075] After calculating the risk assessment score of individual stocks, it is necessary to compare it with the preset risk score threshold. The risk score threshold is usually based on historical data analysis and risk preference settings, and can be divided into multiple levels, such as low risk (0-30 points), medium-low risk (30-50 points), medium risk (50-70 points), medium-high risk (70-85 points) and high risk (85-100 points). When the risk assessment score of an individual stock exceeds a specific threshold (such as 70 points), the system will trigger the risk warning mechanism. The sending of risk warning information needs to consider the timeliness, accuracy and operability of the information. The warning information should include the following elements: risk level identification (such as red warning icon), basic information of individual stocks (stock code, name), risk assessment score, overview of major risk factors (such as "related company financial risk", "industry policy changes"), key information summary of risk sources, and possible risk response suggestions (such as "recommendation to pay attention to xxx announcement", "consider reducing the proportion of holdings"). In addition, the sending channels of warning information should also be diversified, and can be through APP push notifications, SMS, emails or investment advisory phone reminders to ensure that customers can receive risk warning information in a timely manner. For high-risk level warnings, an early warning upgrade mechanism can also be set up, such as upgrading the system's automatic warning to the investment advisor proactively contacting the client to issue a risk warning.

[0076] In one embodiment, searching for related stocks associated with the stock to be evaluated through a preset knowledge graph includes the following steps:

[0077] Obtaining comprehensive information of the stocks to be evaluated, including the industry attributes, main business and upstream and downstream enterprise information of the enterprise corresponding to the stocks to be evaluated;

[0078] Based on the comprehensive information of individual stocks and through the preset knowledge graph, target stocks that are associated with the stocks to be evaluated are retrieved and marked;

[0079] Perform graph cluster analysis on target stocks according to different types of association relationships, and calculate the multi-dimensional association strength value between each target stock and the stocks to be evaluated based on the graph cluster analysis results;

[0080] Target stocks whose multi-dimensional correlation strength values ​​exceed a preset correlation strength threshold are screened out as associated stocks.

[0081] In this embodiment, the comprehensive information of individual stocks mainly includes three core dimensions: the attributes of the industry to which the enterprise belongs, the main business of the enterprise, and the information of upstream and downstream enterprises. These information together constitute the basic data layer that is indispensable for assessing the risk of individual stocks. The acquisition of the attributes of the industry to which the enterprise belongs is first based on the national economic industry classification standard, and the enterprise is accurately classified into four levels: category, major category, medium category and minor category. At the same time, in order to adapt to the characteristics of the capital market, various industry classification systems such as industry classification and Shenwan industry classification will be referred to to form multi-dimensional industry attribution labels. The accurate identification of industry attributes will help the subsequent analysis of the risk sensitivity of the individual stock in a specific industry environment. The acquisition of the main business information of the enterprise is achieved through the structured extraction of public information such as corporate financial reports, announcements, and official websites. Specifically, natural language processing technology is used to perform text analysis on the "main business situation" section in the annual report of the enterprise to extract key business areas and their revenue share. At the same time, combined with product keyword extraction technology, the core product and service types of the enterprise are identified. The acquisition of upstream and downstream enterprise information is achieved through the industrial chain analysis framework. First, based on the industry chain knowledge base, determine the standard structure of the industry chain in which the individual stocks to be evaluated are located, including upstream raw material suppliers, midstream manufacturers, and downstream distributors / end users. Then, through various channels such as supplier management system data, inter-enterprise transaction data, and bidding information, identify upstream and downstream companies that have actual business dealings with the individual stocks to be evaluated. For example, for a lithium battery manufacturer, its upstream may include lithium mining companies, electrolyte suppliers, etc., and its downstream may include new energy vehicle manufacturers, consumer electronics companies, etc.

[0082] Identification of the types of association relationships is an important part of obtaining comprehensive information on individual stocks, and mainly includes three types: industrial chain association relationships, equity penetration association relationships, and technology dependency association relationships. Industrial chain association relationships are identified through supply chain databases and inter-enterprise transaction data, focusing on important suppliers or customers whose transaction amounts account for more than 5%; equity penetration association relationships are obtained through channels such as industrial and commercial registration data, shareholder registers, and corporate annual reports, focusing not only on direct shareholding relationships, but also on identifying multi-level indirect shareholding relationships through recursive algorithms; technology dependency association relationships are determined through information sources such as patent citation networks, technology licensing agreements, and R&D cooperation projects, focusing on identifying companies that have dependencies on core technologies. Through the above process, a panoramic information portrait of the individual stocks to be evaluated can be constructed, laying a solid data foundation for subsequent identification of related stocks and risk transmission analysis, and significantly improving the accuracy and comprehensiveness of risk assessment.

[0083] Based on the comprehensive information of individual stocks obtained, in-depth retrieval and association analysis are performed through the preset financial knowledge graph to identify and mark target stocks that have various associations with the individual stocks to be evaluated. The core of this step is to use the semantic network structure of the knowledge graph to mine the explicit and implicit associations between stocks, thereby building a complete stock association network. The financial knowledge graph is a special semantic network database that stores various entities and their relationships in the financial market in the form of entity-relationship-entity triples. In this knowledge graph, nodes represent various entities (such as listed companies, industries, products, technologies, etc.), and edges represent various relationships between entities (such as supply, shareholding, technology authorization, etc.). The construction of the knowledge graph integrates multi-source heterogeneous data, including corporate financial reports, industrial and commercial registration information, patent databases, news information, research reports, etc. Through technologies such as entity recognition, relationship extraction and knowledge fusion, a large-scale financial knowledge network containing millions of nodes and tens of millions of relationships is formed.

[0084] The retrieval process starts with the individual stock to be evaluated as the central node, and multi-hop relationship exploration is performed through the efficient query language of the graph database (such as Cypher or SPARQL). Specifically, the retrieval strategy adopts a breadth-first search algorithm, sets the maximum number of hops (usually 3 hops), and sequentially explores the first-order nodes directly connected to the central node, the second-order nodes connected to the first-order nodes, and the third-order nodes connected to the second-order nodes. For example, for a mobile phone manufacturer A, the first-order relationship may include its direct supplier B (screen manufacturer); the second-order relationship may include B's supplier C (glass substrate manufacturer); the third-order relationship may include C's technology licensor D (special glass technology company). During the retrieval process, different path patterns are used for matching for different types of associations. For industrial chain relationships, the search path mode is "company-supply / purchase-company" or "company-production-product-use-company"; for equity penetration relationships, the search path mode is "company-holding-company" or "company-holding-company-holding-company"; for technology dependency relationships, the search path mode is "company-ownership-technology-authorization-company" or "company-application-patent-citation-patent-ownership-company". The search results need to be marked, adding association type labels and association path information to each identified target stock.

[0085] After obtaining the target stock set, it is necessary to further analyze the structural characteristics and strength distribution of the association relationship between these stocks and the stocks to be evaluated. Graph cluster analysis is an advanced analysis method based on network topology, which can reveal the community structure and key nodes in complex networks and provide a scientific basis for the accurate calculation of multi-dimensional association strength. Graph cluster analysis first needs to build an association network graph model. In this model, nodes represent stocks (including stocks to be evaluated and all target stocks), edges represent the association relationship between stocks, and the weight of the edge represents the initial strength of the association relationship. Considering the heterogeneity of different types of association relationships, a multilayer network structure is adopted to construct the industrial chain association, equity association, and technology association into three sub-network layers respectively. Each node may have different connection patterns and centrality in different layers.

[0086] For the industrial chain-related subnetwork, the edge weight is calculated based on the proportion of supply chain transaction volume. Specifically, if the annual supply of enterprise A to enterprise B accounts for p% of B's ​​total purchases, the edge weight from A to B is set to p / 100; similarly, if the annual supply of B to A accounts for q% of A's total purchases, the edge weight from B to A is set to q / 100. This two-way weighting method can reflect the degree of interdependence in the supply chain. For the equity-related subnetwork, the edge weight is calculated based on the direct and indirect shareholding ratios. The edge weight of the direct shareholding relationship is equal to the shareholding ratio; the indirect shareholding relationship is calculated by multiplying the shareholding ratios of each link in the shareholding chain. For the technology-related subnetwork, the edge weight is calculated based on the degree of technology dependence. The degree of technology dependence can be comprehensively evaluated through multiple indicators such as patent citation relationships, technology licensing agreements, and R&D cooperation projects. For example, if the core patents of enterprise A are widely cited by enterprise B, or A licenses key technologies to B, the technology dependence edge weight from A to B is relatively high; if the two companies have joint R&D projects, the weights of both bidirectional technology dependence edges are relatively high.

[0087] After building a multi-layer network, apply the community discovery algorithm to each layer of the network to identify closely related stock groups. Commonly used community discovery algorithms include the Louvain algorithm, the Infomap algorithm, and the spectral clustering algorithm. Taking the Louvain algorithm as an example, it optimizes the modularity index and iteratively merges nodes to form communities until the modularity is no longer significantly improved. After the community discovery is completed, the association strength between each target stock and the stock to be evaluated in each layer of the network is calculated. The association strength calculation takes into account the following factors:

[0088] 1. Direct connection strength: If the target stock is directly connected to the stock to be evaluated, the edge weight is directly used as the basic strength.

[0089] 2. Path connection strength: If the two are not directly connected, calculate the strength of all connection paths and take the maximum value. The strength of a single path is the geometric mean of the weights of each edge on the path. The calculation formula is: Path strength = (w1 × w2 ×... × wn)^(1 / n), where w1 to wn are the weights of each edge on the path, and n is the path length. The geometric mean can better reflect the "short board effect" in the path, that is, weak connections in any link of the path will significantly reduce the overall path strength.

[0090] 3. Community affiliation impact: If the target stock and the stock to be evaluated belong to the same community, the association strength will receive an additional bonus. The bonus coefficient is proportional to the density of connections within the community, and the calculation formula is: community bonus coefficient = 1 + λ × (internal edge density of the community / average edge density of the network - 1), where λ is a tuning parameter, usually with a value of 0.2-0.5.

[0091] 4. Node centrality influence: Nodes with higher centrality play a more important role in the network and have greater associated influence. Common centrality indicators include degree centrality, betweenness centrality, and eigenvector centrality.

[0092] Taking the above factors into consideration, in each sub-network layer, the calculation formula for the correlation strength between the target stock and the stock to be evaluated is: ; in, represents the association strength between stocks i and j in the k-th layer network, D(i,j) represents the direct connection strength, P(i,j) represents the path connection strength, C(i,j) represents the community belonging bonus, EC(i) and EC(j) represent the eigenvector centrality of nodes i and j respectively, , and is the weight coefficient. After calculating the association strength of each layer of the network, the association strength of the three dimensions needs to be integrated into a multi-dimensional association strength vector. The multi-dimensional association strength vector is expressed as: ; Through graph clustering analysis and multi-dimensional correlation strength calculation, the degree of correlation between the target stock and the individual stocks to be evaluated can be accurately quantified, taking into account not only direct correlations, but also indirect correlations and systematic effects generated through network structures. Compared with traditional correlation coefficient-based methods, this method of calculating correlation strength based on network topology can better reflect the complex dependencies and risk transmission mechanisms in the financial market, and provide a scientific basis for subsequent screening of related stocks. At the same time, the multi-dimensional correlation strength vector retains the differential information of different types of correlations, which helps to conduct more detailed risk decomposition and transmission path analysis.

[0093] After completing the calculation of multi-dimensional correlation strength, it is necessary to screen out stocks with truly significant correlations from a large number of target stocks through a scientifically set threshold screening mechanism as the final set of correlated stocks. The core of this step is to establish a reasonable threshold judgment standard, which can not only effectively identify important correlations, but also control the number of correlated stocks within a manageable range, avoiding the reduction of analysis efficiency caused by "correlation generalization". By setting the correlation strength threshold, target stocks whose multi-dimensional correlation strength values ​​exceed the preset correlation strength threshold can be screened out as the final correlated stocks.

[0094] In one embodiment, calculating the correlation coefficient between the associated stock and the stock to be evaluated according to the correlation degree includes the following steps:

[0095] Allocate dynamic weight coefficients to associated stocks according to their associated relationship types;

[0096] By introducing a time decay factor to correct the influence of historical data in the multi-dimensional association strength value, a corrected target association strength value is obtained;

[0097] The target correlation strength value and the dynamic weight coefficient are nonlinearly superimposed to obtain the correlation coefficient between the associated stock and the individual stock to be evaluated.

[0098] In this embodiment, when dynamic weight coefficients are assigned to associated stocks according to the type of association relationship of associated stocks, it is first necessary to identify the difference in the contribution of different association types to stock price synergy. The dynamic weight coefficient calculation adopts an adaptive weighting mechanism based on three key factors: the importance of association type, market environment sensitivity and historical verification effectiveness. The basic weight of the importance of association type is determined by the hierarchical analysis method. The basic value of the industrial chain association weight is 0.4, the equity association is 0.35, and the technical association is 0.25. The market environment sensitivity is adjusted by introducing market status indicators. In a high volatility market, the industrial chain association weight increases by 15%, the equity association decreases by 5%, and the technical association decreases by 10%; in a low volatility market, the opposite adjustment is made. The historical verification effectiveness calculates the prediction accuracy of each association type through backtesting. If the historical prediction accuracy of the industrial chain association is 85%, its weight adjustment coefficient is 0.85 / 0.75=1.13 (assuming an average accuracy of 75%). The dynamic weight coefficient is updated once a week to ensure that the weight allocation can timely reflect the changes in market status and the relative importance of different association types, significantly improving the adaptability of the association coefficient to changes in the market environment.

[0099] By introducing the time decay factor to correct the historical data impact in the multi-dimensional association strength value, the corrected target association strength value is obtained, which mainly solves the timeliness problem of historical data. The time decay factor is designed based on the exponential decay function, and the calculation formula is: ,in represents the current time, t represents the time point of historical data, is the characteristic time scale (usually set to 180 days, about half a year), is the decay rate parameter (different values ​​are set according to different association types: industrial chain association λ=0.8, equity association λ=0.5, technology association λ=0.3). Finally, the target association strength value is nonlinearly superimposed with the dynamic weight coefficient to obtain the correlation coefficient between the associated stocks and the individual stocks to be evaluated. Specifically, nonlinear functions can be used to process multidimensional association data to avoid the limitations of simple linear combinations. The final correlation coefficient needs to be normalized to ensure that the value range is within the interval [0,1]. The nonlinear superposition method can more accurately capture the synergy and dominant effects of different association types, significantly improve the ability of the correlation coefficient to express complex market relationships, and provide a more accurate quantitative basis for subsequent risk assessment and investment decisions.

[0100] In one embodiment, using natural language processing technology and a neural network model to analyze the negative impact of related information on the to-be-assessed stock and related stocks, and calculating the negative impact tendency score includes the following steps:

[0101] Preprocessing the acquired related information;

[0102] Use natural language processing technology to convert the pre-processed related information into information word vectors;

[0103] Input the information word vector into the pre-configured neural network model to obtain the information semantic representation of the associated news information;

[0104] The information semantic representation is analyzed through the sentiment analysis model to obtain the sentiment polarity and sentiment intensity of the related information;

[0105] The negative tendency score of the related information on the evaluated stock and related stocks is calculated by combining the sentiment polarity and sentiment intensity.

[0106] In this embodiment, preprocessing the acquired related information is the basic link of the entire analysis process, which mainly includes five key steps: data cleaning, text standardization, deduplication processing, time tagging and information classification. The data cleaning stage first removes web page elements such as HTML tags, JavaScript codes and CSS styles. For example, The company's performance fell by 30% "Convert to plain text"Company performance declined by 30%"; then remove special characters and meaningless symbols, such as emoticons, extra spaces, etc.; finally correct obvious typos and punctuation errors, such as correcting "Declining profit margins..." to "Declining profit margins." ". Text standardization includes converting traditional Chinese characters to simplified Chinese characters, converting full-width characters to half-width characters, and unifying date and number formats. Deduplication uses the local sensitive hashing algorithm (LSH) to calculate text similarity, merges or deletes duplicates with similarity exceeding 85%, and retains the latest version. The time tag extracts the information release time through regular expressions and converts it to the "YYYY-MM-DD HH:MM:SS" format. For information with missing time, its release time is inferred based on the acquisition time and context. Information classification is labeled according to the source of information (such as official announcements, media reports, analyst comments) and information type (such as financial reports, industry trends, policies and regulations) to facilitate subsequent analysis. The pre-processed information is stored in a structured JSON format, including fields such as the cleaned text content, release time, source type, and information type, which greatly improves the accuracy and efficiency of subsequent processing and lays a solid foundation for information vectorization.

[0107] The pre-processed related information is converted into information word vectors using natural language processing technology, and a multi-level semantic representation method is adopted, including four main links: word segmentation and part-of-speech tagging, named entity recognition, word vector generation, and sentence vector construction. First, the text is segmented using a word segmentation system optimized for the financial field. The system is based on a two-way maximum matching algorithm and combined with a financial professional dictionary to accurately identify professional terms. At the same time, part-of-speech tagging is performed to mark nouns, verbs, adjectives, etc., to provide grammatical structure information for subsequent analysis. Secondly, the company name, person name, place name, time, currency amount and other entities in the text are identified by named entity recognition technology. Specifically, the BiLSTM-CRF model can be used. Third, each word is converted into a 300-dimensional word vector using a pre-trained financial field word vector model. The model is based on the Word2Vec algorithm and is trained using more than 100GB of financial news and announcements. It can accurately capture the semantic relationship between financial terms. For example, "profit" and "profit" are close in the vector space, while "profit" and "loss" are far apart. Finally, the sentence vector is constructed by weighted average method, and the weight is calculated based on the TF-IDF value. The formula is: ; in is the word vector, is the TF-IDF value of the word. This method enables keywords to obtain higher weights in sentence representation, effectively extracts the core semantics of the text, and provides high-quality input features for subsequent neural network processing.

[0108] The information word vector is input into the pre-configured neural network model to obtain the information semantic representation of the associated information. A deep learning architecture (BiLSTM-Attention) combining a bidirectional long short-term memory network and an attention mechanism is used. The neural network model consists of four layers: input layer, BiLSTM layer, attention layer, and output layer. The input layer receives a word vector sequence with a dimension of 300. Each piece of information text is represented as ,in is the vector representation of the i-th word, and n is the length of the text. The BiLSTM layer consists of a forward LSTM and a backward LSTM, which can capture the contextual dependencies of the text. For each word vector, BiLSTM calculates the hidden state ,in and They are the outputs of the forward and backward LSTMs, respectively, with a dimension of 256. The attention layer calculates the importance weight of each word, and the formula is: ; in and is a learnable parameter. Then, the semantic representation of the text is obtained by weighted summation: The output layer maps the semantic representation s to a 512-dimensional vector space through a fully connected layer to obtain the final information semantic representation The model is pre-trained using more than 500,000 annotated financial news and announcements, and fine-tuned for stock-related information. The model can effectively capture long-distance dependencies and key information in financial texts, extract the core information that truly affects stock prices, and provide an accurate semantic basis for subsequent sentiment analysis.

[0109] The sentiment analysis model is used to analyze the semantic representation of information, and the sentiment polarity and sentiment intensity of the associated information are obtained. The financial field sentiment analysis model under the multi-task learning framework is adopted. The model performs two tasks, sentiment polarity classification and sentiment intensity regression, and consists of three main components: feature enhancement layer, sentiment classifier, and intensity regressor. The feature enhancement layer first fuses the 512-dimensional semantic representation output by the neural network with specific features in the financial field. These features include: financial sentiment dictionary matching results, financial numerical features, and market reaction features. The fused feature vector is recorded as , with a dimension of 700.

[0110] The sentiment classifier uses a softmax classification layer to map the fused features into three types of sentiment polarity: positive (1), neutral (0), and negative (-1). The calculation formula is: ,in and is the classifier parameter. The intensity regressor maps the feature to the sentiment intensity value in the interval [0,1] through the fully connected layer. The calculation formula is: ,in is the sigmoid function, and is the regressor parameter. A sentiment intensity value close to 1 indicates a very strong sentiment, and a value close to 0 indicates a weak sentiment. The model training uses a multi-task loss function: ,in is the cross entropy loss, is the mean square error loss, and is the weight coefficient to balance the two tasks.

[0111] Combined with the sentiment polarity and sentiment intensity, the negative tendency score of the related information on the evaluated stocks and related stocks is calculated. A multi-factor weighted scoring mechanism is adopted, which comprehensively considers the four dimensions of sentiment analysis results, relevance, timeliness and information reliability. First, the basic sentiment score is calculated based on the sentiment polarity and intensity. The formula is: , where P is the sentiment polarity (values ​​are 1, 0, -1) and I is the sentiment intensity (value range is [0,1]). For example, information with a negative polarity (-1) and an intensity of 0.8 has a basic sentiment score of -0.8. This method can accurately quantify the degree of negative impact of information on stocks.

[0112] In one embodiment, analyzing the information semantic representation by a sentiment analysis model to obtain the sentiment polarity and sentiment intensity of the associated news information includes the following steps:

[0113] Build a sentiment analysis model based on the Transformer encoder that captures long-range dependencies;

[0114] Add financial domain sentiment dictionary and financial domain semantic rule base to sentiment analysis model;

[0115] Configure a hierarchical attention mechanism in the sentiment analysis model for key information fragments related to the individual stock to be evaluated and the related stocks in the semantic representation;

[0116] The semantic representation of information is input into the sentiment analysis model, and the sentiment analysis model outputs the sentiment polarity and sentiment intensity of the corresponding related information.

[0117] In this embodiment, a sentiment analysis model is constructed based on a Transformer encoder that captures long-distance dependencies, and a multi-layer self-attention mechanism architecture is adopted, which can effectively handle complex semantic relationships in financial texts. The model consists of five core components: an input embedding layer, a position encoding layer, a multi-head self-attention layer, a feedforward neural network layer, and an output layer. The input embedding layer converts each word in the text into a 768-dimensional vector representation and is initialized using a pre-trained financial field BERT model, which has been trained on more than 200GB of financial text corpus and can accurately express the semantics of financial terms. The position encoding layer generates position vectors through sine and cosine functions. The multi-head self-attention layer is the core of the Transformer, which captures long-distance dependencies by calculating the degree of association between each word in the text and all other words. The model uses 8 attention heads, each of which focuses on a different semantic space, and finally splices the results and transforms them linearly. The feedforward neural network layer independently applies two layers of fully connected networks to each position, introducing nonlinear transformations: , enhancing the model's expressiveness. The output layer maps the output of the Transformer encoder to the sentiment space and predicts the sentiment polarity and intensity. The model performs well in the task of sentiment analysis of financial texts, and can accurately understand complex statements with transitional relationships such as "Although quarterly revenue grew by 15%, the decline in profit margins caused the market to worry about future profitability", capturing the key factors that truly affect sentiment.

[0118] Add the financial domain sentiment dictionary and financial domain semantic rule base to the sentiment analysis model, and improve the model's ability to understand financial specific expressions through knowledge enhancement. The financial domain sentiment dictionary contains three levels: general sentiment vocabulary (such as "growth", "decline"), financial professional sentiment vocabulary (such as "impairment", "break", "exceed expectations"), and industry-specific sentiment vocabulary (such as "patent litigation" in the technology industry and "clinical failure" in the pharmaceutical industry). Each entry in the dictionary contains four attributes: the word itself, sentiment polarity (a five-level scale of -2 to +2), applicable industry label, and confidence. For example, "revenue growth" is represented in the dictionary as {word: "revenue growth", polarity: +1, industry: "general", confidence: 0.9}. The sentiment dictionary is integrated with the Transformer model through feature fusion. The specific method is to calculate the weighted score of the sentiment words appearing in the text. The formula is: ,in is the word frequency weight, It is the emotional polarity. is the confidence level. The semantic rule base in the financial field contains more than 200 semantic parsing rules for financial texts, mainly covering four types of rules: numerical change rules (such as "year-on-year growth of X%" is positive, "month-on-month decrease of Y%" is negative), conditional transition rules (such as "although A, but B" has a higher weight than A), expected comparison rules (such as "lower than market expectations" is negative, "exceeding analysts' forecasts" is positive) and specific event rules (such as "being investigated" and "receiving a ticket" are negative). The rule base is integrated with the Transformer model through attention mechanism adjustment. When the text matches a rule, the corresponding word or phrase will receive a higher attention weight. This knowledge enhancement method enables the model to correctly identify the negative sentiment tendency when dealing with statements such as "the company's revenue increased by 5% year-on-year, but lower than the market's general expectation of 8%" that require professional knowledge to understand.

[0119] A hierarchical attention mechanism is configured in the sentiment analysis model for key information fragments related to the individual stocks to be evaluated and related stocks in the semantic representation. A three-layer cascaded attention structure is adopted: word-level attention, sentence-level attention, and entity-related attention. The word-level attention mechanism first calculates the importance of each word in the text to the sentiment expression. The formula is: ; in is the hidden state of the tth word in the ith sentence, , and is a learnable parameter. In this way, sentiment words and key financial terms are given higher weights, such as "loss", "growth", "exceeding expectations", etc. The sentence-level attention mechanism evaluates the contribution of each sentence to the overall sentiment, and the calculation formula is:

[0120] ; in It is a sentence representation, , and is a learnable parameter. This enables the model to identify sentences containing key information, such as changes in financial data, announcements of major events, etc. The entity association attention mechanism is the most critical innovation, which dynamically adjusts the attention allocation based on the association between the entities mentioned in the text and the target stock. First, we build an entity association graph , where the node V includes the stocks to be evaluated, related stocks and all entities mentioned in the text, and the edge E represents the relationship between entities (such as suppliers, competitors, industry associations, etc.).

[0121] Then calculate the relevance score for each entity: ,in is the shortest path length from entity j to target stock t, is the attenuation factor (usually set to 0.7), and Z is the normalization constant. Finally, the attention weight is adjusted according to the entity relevance: ,in is the set of entities related to the tth word in the ith sentence. This hierarchical attention mechanism enables the model to accurately locate key pieces of information directly or indirectly related to the target stock.

[0122] The information semantic representation is input into the sentiment analysis model, and the sentiment analysis model outputs the sentiment polarity and sentiment intensity of the corresponding related information. A multi-task learning framework is adopted to simultaneously predict two related but not completely consistent goals: sentiment polarity and sentiment intensity. The sentiment analysis model receives a 512-dimensional information semantic representation vector as input, which contains high-level semantic features of the text. The model first processes the input vector through a shared feature extraction layer, and then the model is divided into two parallel branches: sentiment polarity classification branch and sentiment intensity regression branch. The sentiment polarity classification branch maps the hidden representation to three types of sentiment polarity (positive, neutral, and negative) through a fully connected layer and a softmax function. The sentiment intensity regression branch predicts the sentiment intensity value (ranging from 0 to 1) through another fully connected layer and a sigmoid activation function. The model training adopts a joint loss function, including the cross entropy loss for polarity classification and the mean square error loss for intensity prediction. The sentiment polarity and sentiment intensity output by the model together constitute the sentiment representation of the information. For example, for information such as "a company's quarterly loss exceeded market expectations, and its stock price fell sharply", the model may output negative polarity (-1) and sentiment intensity of 0.85, indicating that this is a strong negative news. In practical applications, the model can accurately capture the subtle emotional expressions in financial texts, such as distinguishing the intensity difference between "slightly below expectations" and "much below expectations", and identifying negative signals in "performance in line with expectations but guidance downgraded".

[0123] In one embodiment, combining sentiment polarity and sentiment intensity to calculate the negative tendency score of the associated information information on the individual stock to be evaluated and the associated stocks includes the following steps:

[0124] Determine the base of the negative impact of the related information on the individual stock to be evaluated and the related stocks according to the information attributes of the related information;

[0125] Using the time decay function and according to the time window in which the related information is located, the negative impact weight is assigned to the related information;

[0126] The negative impact coefficient of the related information is calculated by combining the negative impact base and the negative impact weight;

[0127] The negative tendency score of the related information on the evaluated stock and related stocks is calculated by combining the sentiment polarity, sentiment intensity and negative impact coefficient.

[0128] In this embodiment, the base of the negative impact of the associated information on the individual stocks to be evaluated and the associated stocks is determined based on the information attributes of the associated information, mainly considering the three key dimensions (i.e., information attributes) of information timeliness, information content richness, and information source credibility. Information timeliness evaluates the freshness of information, using a five-level scoring system: real-time information (such as the first disclosure of a major event) is 5 points, information on the same day is 4 points, information in the past three days is 3 points, information within a week is 2 points, and information over a week is 1 point. Information content richness measures the completeness and detailedness of information, and also uses a five-level scoring system: 5 points for complete facts, data, and professional analysis, 4 points for main facts and partial data, 3 points for only basic facts, 2 points for information fragments, and 1 point for vague mentions.

[0129] The credibility of the information source is quantified based on the authority of the publisher: official channels (such as announcements from listed companies and regulatory agencies) are 5 points, authoritative financial media are 4 points, general media are 3 points, industry analysts' opinions are 2 points, and social media and forums are 1 point. The calculation formula for the negative impact base is: , where B is the base of negative impact, T is the score of information timeliness, C is the score of content richness, R is the score of information source credibility, α, β, and γ are the weight coefficients of the three dimensions, usually set to α=0.25, β=0.35, and γ=0.4, reflecting that the credibility of information sources and the richness of content are slightly more important to negative impact than timeliness. This multi-dimensional evaluation method can fully reflect the quality characteristics of information, provide a reliable basis for subsequent negative tendency analysis, and ensure that high-quality and highly credible information obtains a higher impact base.

[0130] Using the time decay function and assigning negative impact weights to related information according to the time window in which the related information is located reflects the objective law that the influence of information in the financial market weakens over time. The time decay function uses an exponential decay model to calculate the weight based on the interval between the information release time and the current evaluation time. The basic formula is: , where W(t) is the time decay weight, is the attenuation coefficient, The number of days between the information release time and the current time. In order to accurately reflect the impact characteristics of different time windows, the time window is divided into five intervals: immediate window (0-1 day), ultra-short term (2-3 days), short term (4-7 days), medium term (8-30 days) and long term (31-90 days), and the corresponding attenuation coefficient is The values ​​are 0.1, 0.08, 0.05, 0.02 and 0.01 respectively. In addition, considering the characteristics of market transactions, only the time interval of trading days is calculated, and non-trading days are not included in the decay calculation. This multi-level decay mechanism based on time windows can accurately simulate the changes in the market's sensitivity to different types of information over time, ensuring that the evaluation results are more in line with the actual market reaction law.

[0131] The negative impact coefficient of the related information is calculated by combining the negative impact base and the negative impact weight. The weighted product model is adopted and multiple adjustment factors are introduced to fully capture the actual influence of information in a specific market environment. The basic calculation formula for the negative impact coefficient is: , where IC is the negative impact coefficient, and B is the negative impact base calculated in the previous article. is the time decay weight. To improve the adaptability and accuracy of the model, three key adjustment factors are introduced: market environment adjustment factor (M), information accumulation effect factor (A) and correlation adjustment factor (R). The market environment adjustment factor is dynamically adjusted according to the overall sentiment of the current market: M=0.8 in a bull market environment (the influence of negative information is weakened), M=1.0 in a volatile market (neutral impact), and M=1.2 in a bear market environment (the influence of negative information is amplified). The market environment is judged based on the comprehensive score of the recent trend of the market index, technical indicators and market sentiment index.

[0132] The information cumulative effect factor reflects the cumulative effect of multiple related negative information in a short period of time: , where n is the number of relevant negative information in the past 5 trading days. The correlation adjustment factor measures the degree of correlation between the information and the target stock: direct correlation (information directly mentions the target stock) R=1.0, first-level correlation (mentioning the target company's direct competitors, suppliers or customers) R=0.8, second-level correlation (mentioning other companies in the same industry) R=0.6, and third-level correlation (mentioning related industries) R=0.4. Taking the above factors into consideration, the complete negative impact coefficient calculation formula is: For example, for a piece of information with a negative impact base of 4.0 and a time decay weight of 0.84, in a bear market environment (M=1.2), there are 2 related negative information (A=1.2) recently, and they are first-level correlation (R=0.8), and its negative impact coefficient is calculated as: This multi-factor comprehensive evaluation method can dynamically reflect the actual influence of information in a specific market environment and information background, and provide accurate input for the final calculation of the negative tendency score.

[0133] The negative tendency score of the related information on the evaluated stocks and related stocks is calculated by combining sentiment polarity, sentiment intensity and negative impact coefficient. A comprehensive scoring model is adopted to organically combine the qualitative sentiment analysis results with the quantitative impact coefficient. First, the sentiment analysis of the information content is carried out through natural language processing technology to extract two key indicators: sentiment polarity and sentiment intensity. Sentiment polarity is divided into five levels: strongly negative (-2), slightly negative (-1), neutral (0), slightly positive (+1) and strongly positive (+2). The sentiment intensity value ranges from 0 to 1, indicating the degree of certainty of the sentiment judgment. The basic calculation formula for the negative tendency score is: , where S_base is the basic negative tendency score, P is the sentiment polarity value, I is the sentiment intensity, and IC is the negative impact coefficient. Note that the sentiment polarity takes a negative value because negative sentiment corresponds to a positive negative tendency. In order to enhance the robustness of the model, the industry sensitivity adjustment factor (E) is introduced to reflect the sensitivity of different industries to negative information: highly sensitive industries (such as finance and medicine) E=1.2, medium sensitive industries (such as consumption and technology) E=1.0, and low sensitive industries (such as utilities) E=0.8. The adjusted calculation formula is: Finally, to make the scores more interpretable, the results are normalized to a standard range of 0-100: , where the tanh function is used to compress extreme values ​​and 6 is the scaling factor. The final interpretation standard of the bearish tendency score is: 0-20 points indicate a strong bullish signal, 21-40 points indicate a mild bullish signal, 41-60 points indicate a neutral signal, 61-80 points indicate a mild bearish signal, and 81-100 points indicate a strong bearish signal. For example, for a piece of financial industry information with a sentiment polarity of mildly negative (-1), a sentiment intensity of 0.85, and a bearish impact coefficient of 3.87, its bearish tendency score is calculated as: ; The calculation result of the example is a "mild bearish signal". This comprehensive scoring method can integrate complex multi-dimensional information into an intuitive single indicator, providing a scientific and quantitative reference for investment decisions.

[0134] The present invention also discloses an individual stock risk warning system based on artificial intelligence, 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, it implements the individual stock risk warning method based on artificial intelligence disclosed in any one of the above-mentioned embodiments.

[0135] Among them, the processor can adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.

[0136] Among them, the memory can be an internal storage unit of a computer device, such as a hard disk or memory of a computer device, or an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital card (SD) or a flash memory card (FC) equipped on the computer device, and the memory can also be a combination of an internal storage unit and an external storage device of a computer device. The memory is used to store computer programs and other programs and data required by the computer device. The memory can also be used to temporarily store data that has been output or is to be output, and this application does not impose any restrictions on this.

[0137] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0138] One or more embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application should be included in the protection scope of the present application.

Claims

1. An individual stock risk warning method based on artificial intelligence, characterized in that: The steps include: Query the stocks to be evaluated and the stock positions of the stocks to be evaluated held by the customer; Retrieve the associated stocks related to the stock to be evaluated through the preset knowledge graph, and calculate the correlation coefficient between the associated stocks and the stock to be evaluated according to the correlation degree; Generate a keyword list and information acquisition rules based on the stock information of the stocks to be evaluated and related stocks; Based on the keyword list and using information acquisition rules, related information about the stocks to be evaluated and related stocks is obtained; Use natural language processing technology and neural network models to analyze the negative impact of related information on the individual stocks to be evaluated and related stocks, and calculate the negative tendency score; The first risk score is calculated by combining the negative tendency score corresponding to the individual stock to be evaluated and the individual stock position; The second risk score is calculated by combining the negative tendency score corresponding to the associated stock and the correlation coefficient between the associated stock and the individual stock to be evaluated; The first risk score and the second risk score are weighted averaged to obtain the risk assessment score of the individual stock to be assessed. If the risk assessment score of the individual stock exceeds the preset risk score threshold, a warning message is sent to the customer.

2. The method for early warning of individual stock risks based on artificial intelligence according to claim 1 is characterized in that: The step of retrieving the associated stocks associated with the individual stock to be evaluated through the preset knowledge graph includes the following steps: Obtaining comprehensive information of the stocks to be evaluated, including the industry attributes, main business and upstream and downstream enterprise information of the enterprise corresponding to the stocks to be evaluated; Based on the comprehensive information of individual stocks and through the preset knowledge graph, target stocks that are associated with the stocks to be evaluated are retrieved and marked; Perform graph cluster analysis on target stocks according to different types of association relationships, and calculate the multi-dimensional association strength value between each target stock and the stocks to be evaluated based on the graph cluster analysis results; Target stocks whose multi-dimensional correlation strength values ​​exceed a preset correlation strength threshold are screened out as associated stocks.

3. The method for early warning of individual stock risks based on artificial intelligence according to claim 2 is characterized in that: The types of related relationships include industrial chain related relationships, equity penetration related relationships and technology dependence related relationships.

4. The method for early warning of individual stock risks based on artificial intelligence according to claim 2 is characterized in that: The step of calculating the correlation coefficient between the associated stock and the individual stock to be evaluated according to the correlation degree includes the following steps: Allocate dynamic weight coefficients to associated stocks according to their associated relationship types; By introducing a time decay factor to correct the historical data influence in the multi-dimensional association strength value, a corrected target association strength value is obtained; The target correlation strength value and the dynamic weight coefficient are nonlinearly superimposed to obtain the correlation coefficient between the associated stocks and the individual stocks to be evaluated.

5. The method for early warning of individual stock risks based on artificial intelligence according to claim 1 is characterized in that: The method of using natural language processing technology and a neural network model to analyze the negative impact of related information on the to-be-assessed stock and related stocks, and calculating the negative impact tendency score includes the following steps: Preprocessing the acquired related information; Use natural language processing technology to convert the pre-processed related information into information word vectors; Input the information word vector into the pre-configured neural network model to obtain the information semantic representation of the associated news information; The information semantic representation is analyzed through the sentiment analysis model to obtain the sentiment polarity and sentiment intensity of the related information; The negative tendency score of the related information on the evaluated stock and related stocks is calculated by combining the sentiment polarity and sentiment intensity.

6. The method for early warning of individual stock risks based on artificial intelligence according to claim 5 is characterized in that: The analysis of the information semantic representation by the sentiment analysis model to obtain the sentiment polarity and sentiment intensity of the associated information includes the following steps: Build a sentiment analysis model based on the Transformer encoder that captures long-range dependencies; Add financial domain sentiment dictionary and financial domain semantic rule base to sentiment analysis model; Configure a hierarchical attention mechanism in the sentiment analysis model for key information fragments related to the individual stock to be evaluated and the related stocks in the semantic representation; The semantic representation of information is input into the sentiment analysis model, and the sentiment analysis model outputs the sentiment polarity and sentiment intensity of the corresponding related information.

7. The method for early warning of individual stock risks based on artificial intelligence according to claim 5 is characterized in that: The method of combining sentiment polarity and sentiment intensity to calculate the negative tendency score of the associated information information on the individual stock to be evaluated and the associated stocks comprises the following steps: Determine the base of the negative impact of the related information on the individual stock to be evaluated and the related stocks according to the information attributes of the related information; Using the time decay function and according to the time window in which the related information is located, the negative impact weight is assigned to the related information; The negative impact coefficient of the related information is calculated by combining the negative impact base and the negative impact weight; The negative tendency score of the related information on the evaluated stocks and related stocks is calculated by combining the sentiment polarity, sentiment intensity and negative impact coefficient.

8. The method for early warning of individual stock risks based on artificial intelligence according to claim 7 is characterized in that: Information attributes include information timeliness, information content richness and information source credibility.

9. The method for early warning of individual stock risks based on artificial intelligence according to claim 1, characterized in that: The method of comprehensively calculating the second risk score by combining the negative tendency score corresponding to the associated stock and the correlation coefficient between the associated stock and the individual stock to be evaluated comprises the following steps: For each associated stock, the corresponding negative tendency score and the correlation coefficient with the stock to be evaluated are multiplied to calculate the associated risk score; The average value of the associated risk scores corresponding to all associated stocks is calculated to obtain a second risk score.

10. An individual stock risk early warning system based on artificial intelligence, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the individual stock risk warning method based on artificial intelligence as described in any one of claims 1 to 9 is implemented.

Citation Information

Cited By

  • Business system building method and system

    CN120669958A