A futures knowledge base system based on big data automatic labeling

By adopting big data automated labeling technology and natural language processing technology in the futures knowledge base system, the problem of complex professional concepts affecting understanding in the content of futures text is solved, and multi-dimensional information extraction and automated label classification of futures text are realized, which improves the organization and management efficiency of knowledge base content.

CN118709771BActive Publication Date: 2025-04-04DAYOU FUTURES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410833564.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2025-04-04
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

In the field of futures, complex professional concepts in text content affect the understanding and division of text content.

Method used

Design a futures knowledge base system based on big data automation tags. Through the data collection module, feature extraction module, automated tag module, knowledge base management unit and tag index management unit, combined with natural language processing technology and semantic analysis technology, the text data is extracted physical information and keywords, and automated tag classification is realized through the text classification model.

Benefits of technology

It has achieved comprehensive coverage of multi-dimensional information of complex futures text content, adapted to complex text content, improved the robustness and performance of the model, and can effectively organize and classify massive futures knowledge base content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709771B_ABST
    Figure CN118709771B_ABST
Patent Text Reader

Abstract

The present invention relates to a futures knowledge base system, and more specifically, to a futures knowledge base system based on big data automatic labeling. It includes a data collection module, which is used to collect text data related to the real-time and historical futures markets; a feature extraction module extracts entity information and keywords from text data based on natural language processing technology combined with semantic analysis technology; an automatic labeling module builds and trains a text classification model based on a historical keyword data set, and inputs the extracted entity information and keywords into the text classification model; a knowledge base management unit is used to integrate and store all processed and annotated text data. Natural language processing technology is combined with semantic analysis technology to extract entity information and keywords from text data, thereby achieving comprehensive coverage of multi-dimensional information of the text and adapting to complex text content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a futures knowledge base system, and in particular to a futures knowledge base system based on big data automatic labeling. Background Art

[0002] The futures knowledge base system is an information management and knowledge sharing platform designed specifically for the futures market. It is mainly used to collect, organize, store and retrieve various professional knowledge, data, research reports, regulations and policies, trading strategies, risk management cases and other content related to futures trading. The futures knowledge base system based on big data automatic labeling is a professional knowledge management system that integrates big data technology and information automatic classification technology. It can help institutions and individual investors quickly obtain and update the latest developments and in-depth analysis materials of the futures market, promote the accumulation and inheritance of internal knowledge assets, and improve the quality and efficiency of investment decisions. At the same time, it also helps with training and education, ensuring that all users can grasp the relevant rules and technical points of futures trading in a timely and accurate manner.

[0003] In the process of text content recognition and label classification, especially in the futures field, the existing futures knowledge base system has complex professional concepts in the text content, which will affect the understanding and classification of the text content. Therefore, a futures knowledge base system based on big data automatic labeling is designed. Summary of the invention

[0004] The purpose of the present invention is to provide a futures knowledge base system based on big data automatic labeling to solve the problem raised in the above background technology that complex professional concepts in text content in the futures field affect the understanding and division of text content.

[0005] To achieve the above object, the present invention provides a futures knowledge base system based on big data automatic labeling, comprising:

[0006] A data collection module, the data collection module is used to collect text data related to the real-time and historical futures markets;

[0007] A feature extraction module, which extracts entity information and keywords from text data based on natural language processing technology and semantic analysis technology; it extracts valuable information features such as key entities, events, relationships, and sentiment tendencies through semantic analysis technology;

[0008] Futures research reports, keyword information includes futures products, trading dates, prices, and analyst names;

[0009] An automatic labeling module, which builds and trains a text classification model based on a historical keyword data set, inputs the extracted entity information and keywords into the text classification model, generates keyword labels for the text data, and realizes automatic labeling classification of the text data;

[0010] A knowledge base management unit, which is used to integrate and store all text data that has been processed and automatically labeled and classified;

[0011] The tag index management unit is responsible for constructing an index between text data and tags to support fast tag retrieval operations within the system.

[0012] As a further improvement of the present technical solution, the text data includes futures-related research reports, news announcements, forum discussions and transaction record information.

[0013] As a further improvement of the technical solution, extracting keywords from text data by the feature extraction module involves the following steps:

[0014] S3.1. Preprocess the text data and use the Jieba word segmentation tool to segment the continuous natural language text into phrase units and remove irrelevant characters, numbers and stop words;

[0015] S3.2. Identify entity information in phrase units through natural language processing technology and classify and label them in the form of category labels; entity information includes futures product names, company names, dates, locations and economic indicators;

[0016] S3.3, using semantic analysis technology to extract representative keywords from phrase units;

[0017] S3.4. If the text contains specific numerical information, use regular expressions to extract the numerical information as a structured feature vector.

[0018] The use of regular expressions is to define corresponding regular expression patterns for the digital information of price, trading volume, and position size, combine the extracted digital information into a structured feature vector, and integrate the structured feature vector into the entire text analysis process.

[0019] As a further improvement of the technical solution, in S3.2, the entity information in the phrase unit is identified based on natural language processing technology, and the specific steps involved are:

[0020] Establishing entity recognition model based on natural language processing technology:

[0021] State set S = {S1, S2, ..., S N}, where N represents the number of states, defining the possible hidden states in the model, and each state corresponds to a potential entity category;

[0022] Observation set O = {O1, O2, ..., O M}, where M represents the number of observations, the set of external events or symbols observed by the model, corresponding to the observations of the input sequence;

[0023] Initial state probability π={π1,π2,...,π N}, which represents the probability of being in each state when the time step is 0. In the entity recognition task, the initial state probability can specify the model's initial assumptions about different entity categories at the beginning of the sequence;

[0024] State transition probability matrix A = {a ij}, where a ij It represents the probability of transitioning from state i to state j, and defines the probability of transitioning from one state to another. In named entity recognition, the state transition probability matrix represents the possible transition relationship between entity categories in the text;

[0025] Observation probability matrix B = {b ij}, where b ij Represents the probability of observing state j in state i, specifies the probability of observing each observation in each state. In named entity recognition, the observation probability matrix represents the possibility of observing a specific word when a given entity category is given;

[0026] Combine the above parts into a parameter set:

[0027] λ=(A,B,π);

[0028] During model training, these parameters are adjusted through observation sequences so that the model can better capture the relationship between entity categories and the probability distribution of generated observations. During decoding, these parameters are used to calculate the most likely hidden state sequence, which is the result of classifying and labeling the observation sequence.

[0029] Modeling process:

[0030] Define the collection state:

[0031] S={S 公司名 , S 日期 , S 地点 , S 经济指标 , S 期货品种};

[0032] Define the observation set:

[0033] O = {Company name 1, Company name 2, ..., Date 1, Date 2, ..., Location 1, Location 2, ..., Economic indicator 1, Economic indicator 1, ..., Futures product 1, Futures product 2, ...};

[0034] Define the initial probability:

[0035] π={P(S 公司名 ), P(S 日期 ), P(S 地点 ), P(S 经济指标 ), P(S 期货品种 )};

[0036] Define the state transition probability matrix:

[0037] A={a ij}, where a ij =P(S j |S i );

[0038] In the formula, P(S j |S i ) indicates that given the current state S i Next, transfer to the next state S j The conditional probability of

[0039] The transition probability between entity categories is defined, that is, the probability that an entity category at one position transfers to the next position;

[0040] Define the observation probability matrix:

[0041] B = {b ij}, where b ij =P(observation j |S i );

[0042] In the formula, P(observation j |S i ) means that given the current hidden state S i The conditional probability of observing symbol j under

[0043] specifies the probability of observing a word in the text under each entity category;

[0044] The mathematical expression of the entity recognition model is:

[0045] Hidden state sequence Q:

[0046] Q={q1,q1,...,q t};

[0047] In the formula, q t represents the state at time step t;

[0048] Observation sequence O:

[0049] O={o1,o1,....,o t};

[0050] In the formula, o t represents the sign observed at time step t;

[0051] Initial probability distribution:

[0052] π i =P(q1=S i );

[0053] State transition probability:

[0054] a ij =P(q t+1 =S j |q t =S i );

[0055] Observation probability:

[0056] b ij =P(o t =Observation j |q t =S i );

[0057] Model parameter λ:

[0058] λ=(Q,O,π,A,B);

[0059] In the formula, π i Indicates that the initial state probability distribution is in state S i The probability that the system is in state S at time step t = 1 i The probability of P(q1=S i ) indicates that the system is in state S at time step t = 1 i probability.

[0060] As a further improvement of the present technical solution, in S3.3, the semantic analysis technology is combined with the TF-IDF weight and the LDA topic weight to obtain the final keyword weight F G :

[0061]

[0062] Where TF is term frequency; IDF is inverse document frequency; t is a term; d is a document; D is a corpus; P(t|w) is the probability of term t in topic w; P(w|d) is the probability of topic w in document d; W is the total number of all topics; w is a topic; α is a hyperparameter used to control the relative importance of TF-IDF and LDA.

[0063] The final keyword weight F G , used to determine which words in a document are more representative and important. In the application, you can select words with higher weight rankings as keywords, which helps to better understand the topic and content of the document;

[0064] TF-IDF weights can reflect the frequency of words in a document and the importance of the entire corpus, emphasizing the commonness and uniqueness of words; while LDA topic weights can capture the topic structure in a document and reveal potential semantic relationships; combining the two can comprehensively consider word frequency, importance, and topic distribution of documents, thereby capturing text information more comprehensively;

[0065] The same type of text may have great differences in word frequency and semantic structure; combining TF-IDF and LDA can adapt to the characteristics of different text types and improve the robustness of the model; for texts containing a large number of professional terms, TF-IDF weights may be more important; and for texts with complex semantic structures, LDA topic weights may be more critical;

[0066] By adjusting the hyperparameter α, the relative weights of TF-IDF and LDA can be adjusted according to task requirements in practical applications, making the model more flexible, helping to make full use of information such as word frequency and semantic structure in keyword extraction, improving the performance and adaptability of the model, and making the keywords more representative and more in line with the actual context of the text.

[0067] As a further improvement of this technical solution, building and training a text classification model based on a historical keyword dataset involves the following steps:

[0068] S6.1. Entity information and keywords extracted from text data are used as historical keyword datasets;

[0069] S6.2. Construct a text classification model based on a deep learning model through a historical keyword dataset;

[0070] S6.3, using the entity information and keywords obtained by the feature extraction module as input features, training the model to automatically generate relevant label categories for new text data;

[0071] S6.4. The trained model can classify newly input futures-related texts and automatically generate corresponding keyword tags, thereby effectively organizing and categorizing the massive amount of futures knowledge base content.

[0072] As a further improvement of the technical solution, in S6.2, the text classification model based on the deep learning model is specifically:

[0073] For each keyword W in the input text i , which is converted into a vector e through the word embedding model i :

[0074] e i =E(W i );

[0075] Where E is the word embedding matrix;

[0076] Mapping each word into a low-dimensional continuous vector space converts complex vocabulary structures into a form that is easier for computers to understand and process. This not only greatly enhances the model's ability to understand natural language, but also greatly improves the performance and generalization ability of text classification models based on deep learning models.

[0077] Apply convolution kernel K to the sequence after word embedding to perform sliding window convolution and generate feature map C j :

[0078]

[0079] In the formula, n represents the size of the convolution serial port; the symbol · represents the dot product operation; b represents the bias term; K represents the convolution kernel; f represents the activation function ReLU; C j represents an element on the feature map generated after applying the convolution kernel at position j;

[0080] Apply maximum pooling to obtain a fixed-length feature representation:

[0081] p=max(c1,c2,...,c m );

[0082] Where p represents the pooled feature vector, which contains the key information of the entire input text; m represents the number of maximum values ​​of different regions obtained by traversing the entire feature map by the pooling window at a specific step size;

[0083] The pooled features are sent to the fully connected layer to calculate the classification score:

[0084]

[0085] Where W prepresents the weight matrix of the fully connected layer; T represents the transpose operation; b k Represents the bias item of the corresponding category; Z k represents the prediction score of category k;

[0086] Use the softmax function to convert the score into a probability distribution:

[0087]

[0088] In the formula, k is the total number of categories, indicating the number of categories predicted by the model; x represents the input vector; P(y=k|x) represents the conditional probability that the output category y is k when the input vector x is given; Indicates z k Perform exponential operations; Indicates z j Perform exponential operation; z k represents the score for the kth category; z j represents the score for the jth category; Represents the sum of the exponential functions of all class scores.

[0089] As a further improvement of this technical solution, since the exponential function grows very fast, the softmax function is optimized by introducing logarithmic operations and maximum values ​​to reduce the risk of numerical overflow. The optimized softmax function is:

[0090]

[0091] In the formula, max j z j Indicates that for all categories j, the score z is obtained j The maximum value in .

[0092] As a further improvement of the technical solution, the knowledge base management unit includes a data storage module and a historical data set supply module;

[0093] The data storage module is used to store all text data related to the futures market after feature extraction and automatic label classification, and use it as historical text data for the text classification model to call;

[0094] The historical data set supply module is used to provide the text classification model with access and call capabilities for stored futures market historical text data.

[0095] As a further improvement of the technical solution, the label index management unit includes a label generation module and a label index module;

[0096] The tag generation module is used to map the features of keywords and entity information to corresponding tag categories, and associate the tags obtained from the automatic tagging module with the text data;

[0097] The tag index module is responsible for building and maintaining a tag index to support fast tag retrieval operations.

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

[0099] 1. In this futures knowledge base system based on big data automatic labeling, natural language processing technology is combined with semantic analysis technology to extract entity information and keywords from text data. It is not limited to basic entity extraction, but can also extract representative keywords from massive texts, thereby achieving comprehensive coverage of multi-dimensional information of texts and adapting to complex text content;

[0100] At the same time, the combination of TF-IDF and LDA models can comprehensively consider word frequency, importance, and topic distribution of documents, thereby capturing text information more comprehensively and improving the robustness of the model.

[0101] 2. In this futures knowledge base system based on big data automatic labeling, a text classification model is used to automatically label and classify text data. By introducing a word embedding model, each word is mapped into a low-dimensional continuous vector space, and the complex vocabulary structure is converted into a form that is easier for computers to understand and process. This not only greatly enhances the model's ability to understand natural language, but also greatly improves the performance and generalization ability of the text classification model based on the deep learning model;

[0102] In order to avoid the rapid growth of the exponential function when the text classification model performs output calculations, the softmax function is optimized by introducing logarithmic operations and maximum values ​​to reduce the risk of numerical overflow and stably process large-scale input data, thereby improving the performance and training efficiency of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0103] Figure 1 It is the overall flow chart of the present invention.

[0104] The meaning of each number in the figure is:

[0105] 1. Data collection module; 2. Feature extraction module; 3. Automatic labeling module; 4. Knowledge base management unit; 5. Label index management unit. DETAILED DESCRIPTION

[0106] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0107] Example

[0108] See also Figure 1 As shown, a futures knowledge base system based on big data automatic labeling is provided, including a data collection module 1, the data collection module 1 is used to collect text data related to the real-time and historical futures markets;

[0109] Among them, text data includes futures-related research reports, news announcements, forum discussions, and transaction record information;

[0110] The futures knowledge base system also includes a feature extraction module 2, which extracts entity information and keywords from text data based on natural language processing technology and semantic analysis technology; extracts key entities, events, relationships and sentiment tendency information through semantic analysis technology;

[0111] Among them, the keyword information includes futures products, transaction dates, prices, and analyst names;

[0112] Keyword extraction from text data is performed by feature extraction module 2, involving the following steps:

[0113] S3.1. Preprocess the text data and use the Jieba word segmentation tool to segment the continuous natural language text into phrase units and remove irrelevant characters, numbers and stop words.

[0114] S3.2. Identify entity information in phrase units through natural language processing technology and classify and annotate them in the form of category labels;

[0115] Among them, entity information includes futures product name, company name, date, location and economic indicators;

[0116] In this embodiment, the entity information in the phrase unit is identified based on the natural language processing technology, and the specific steps involved are:

[0117] Establishing entity recognition model based on natural language processing technology:

[0118] State set S = {S1, S2, ..., S N}, where N represents the number of states, defining the possible hidden states in the model, and each state corresponds to a potential entity category;

[0119] Observation set O = {O1, O2, ..., O M}, where M represents the number of observations, the set of external events or symbols observed by the model, corresponding to the observations of the input sequence;

[0120] Initial state probability π={π1,π2,...,π N}, which represents the probability of being in each state when the time step is 0. In the entity recognition task, the initial state probability can specify the model's initial assumptions about different entity categories at the beginning of the sequence;

[0121] State transition probability matrix A = {a ij}, where a ij It represents the probability of transitioning from state i to state j, and defines the probability of transitioning from one state to another. In named entity recognition, the state transition probability matrix represents the possible transition relationship between entity categories in the text;

[0122] Observation probability matrix B = {b ij}, where b ij Represents the probability of observing state j in state i, specifies the probability of observing each observation in each state. In named entity recognition, the observation probability matrix represents the possibility of observing a specific word when a given entity category is given;

[0123] Combine the above parts into a parameter set:

[0124] λ=(A,B,π);

[0125] During model training, these parameters are adjusted through observation sequences so that the model can better capture the relationship between entity categories and the probability distribution of generated observations. During decoding, these parameters are used to calculate the most likely hidden state sequence, which is the result of classifying and labeling the observation sequence.

[0126] Modeling process:

[0127] Define the collection state:

[0128] S={S 公司名 , S 日期 , S 地点 , S 经济指标 , S 期货品种};

[0129] Define the observation set:

[0130] O = {Company name 1, Company name 2, ..., Date 1, Date 2, ..., Location 1, Location 2, ..., Economic indicator 1, Economic indicator 1, ..., Futures product 1, Futures product 2, ...};

[0131] Define the initial probability:

[0132] π={P(S 公司名 ), P(S 日期 ), P(S 地点 ), P(S 经济指标 ), P(S 期货品种 )};

[0133] Define the state transition probability matrix:

[0134] A={a ij}, where a ij =P(S j |S i );

[0135] In the formula, P(S j |S i ) indicates that given the current state S i Next, transfer to the next state S j The conditional probability of

[0136] The transition probability between entity categories is defined, that is, the probability that an entity category at one position transfers to the next position;

[0137] Define the observation probability matrix:

[0138] B = {b ij}, where b ij =P(observation j |S i );

[0139] In the formula, P(observation j |S i ) means that given the current hidden state S i The conditional probability of observing symbol j under

[0140] specifies the probability of observing a word in the text under each entity category;

[0141] The mathematical expression of the entity recognition model is:

[0142] Hidden state sequence Q:

[0143] Q = {q1, q1, ..., qt};

[0144] In the formula, qt represents the state at time step t;

[0145] Observation sequence O:

[0146] O = {o1, o1, ..., o t};

[0147] In the formula, o t represents the sign observed at time step t;

[0148] Initial probability distribution:

[0149] π i =P(q1=S i );

[0150] State transition probability:

[0151] a ij =P(q t+1 =S j |q t =S i );

[0152] Observation probability:

[0153] b ij =P(o t =Observation j |q t =S i );

[0154] Model parameter λ:

[0155] λ=(Q,O,π,A,B);

[0156] In the formula, π i Indicates that the initial state probability distribution is in state S i The probability that the system is in state S at time step t = 1 i The probability of P(q1=S i ) indicates that the system is in state S at time step t = 1 i probability.

[0157] Solve the problem based on the above entity recognition model:

[0158] Calculate the probability of an observation sequence given model parameters and observation sequence to perform evaluation problems;

[0159] Find the most likely hidden state sequence for a given model parameter and observation sequence, that is, the category label sequence that classifies and annotates the observation sequence, to complete the decoding problem;

[0160] Furthermore, the result of the decoding problem is a sequence of category labels that classify and annotate the observation sequence. The category label sequence represents the entity categories that the model believes exist in the text. By observing the category label sequence obtained by decoding, the entity information in the phrase unit can be identified, because each category label corresponds to an entity category, thereby determining the entity type and position in the text.

[0161] S3.3, using semantic analysis technology to extract representative keywords from phrase units;

[0162] The calculation formula of TF-IDF is:

[0163] TF-IDF(t,d,D)=TF(t,d)×IDF(t,D);

[0164] Among them, TF means term frequency, IDF means inverse document frequency;

[0165]

[0166] In the formula, t represents a word; d represents a document; D represents a corpus; L represents the number of occurrences of word t in document d; M represents the total number of words in document d; N represents the total number of documents in corpus D; K represents the number of documents containing word t;

[0167] The LDA topic model is:

[0168]

[0169] Where P(t|d) represents the probability of word t in document d; P(t|w) represents the probability of word t in topic w; P(w|d) represents the probability of topic w in document d; W represents the total number of all topics; w represents the topic;

[0170] In this embodiment, the semantic analysis technology combines the TF-IDF weight and the LDA topic weight to obtain the final keyword weight F G :

[0171]

[0172] Where TF is term frequency, IDF is inverse document frequency, t is a term, d is a document, D is a corpus, P(t|w) is the probability of term t in topic w, P(w|d) is the probability of topic w in document d, W is the total number of all topics, w is a topic, and α is a hyperparameter used to control the relative importance of TF-IDF and LDA.

[0173] The final keyword weight F G , used to determine which words in a document are more representative and important. In the application, you can select words with higher weight rankings as keywords, which helps to better understand the topic and content of the document;

[0174] In this embodiment, the TF-IDF weight can reflect the frequency of a word in a document and its importance in the entire corpus, emphasizing the commonness and uniqueness of a word; while the LDA topic weight can capture the topic structure in a document and reveal potential semantic relationships; combining the two can comprehensively consider the word frequency, importance, and topic distribution of a document, thereby capturing text information more comprehensively;

[0175] The same type of text may have great differences in word frequency and semantic structure. Combining TF-IDF and LDA can adapt to the characteristics of different text types and improve the robustness of the model. For texts containing a large number of professional terms, TF-IDF weights may be more important; and for texts with complex semantic structures, LDA topic weights may be more critical.

[0176] By adjusting the hyperparameter α, the relative weights of TF-IDF and LDA can be adjusted according to task requirements in actual applications, making the model more flexible and helping to make full use of information such as word frequency and semantic structure in keyword extraction, improving the performance and adaptability of the model, and making the keywords more representative and more in line with the actual context of the text;

[0177] S3.4. If the text contains specific numerical information, use regular expressions to extract the numerical information as a structured feature vector, where the numerical information includes price, transaction volume, and position size.

[0178] The use of regular expressions is to define corresponding regular expression patterns for the digital information of price, trading volume, and position size, combine the extracted digital information into a structured feature vector, and integrate the structured feature vector into the entire text analysis process.

[0179] The futures knowledge base system also includes an automatic labeling module 3, which builds and trains a text classification model based on a historical keyword data set, inputs the extracted entity information and keywords into the text classification model, generates keyword labels for text data, and realizes automatic label classification of text data, such as taking "corn futures", "arbitrage strategy", and "macroeconomic impact" as label categories;

[0180] In this embodiment, building and training a text classification model based on a historical keyword dataset involves the following steps:

[0181] S6.1. Entity information and keywords extracted from text data are used as historical keyword datasets;

[0182] S6.2. Construct a text classification model based on a deep learning model through a historical keyword dataset;

[0183] Among them, the text classification model based on the deep learning model is specifically:

[0184] For each keyword W in the input text i , which is converted into a vector e through the word embedding model i :

[0185] e i =E(W i );

[0186] Where E is the word embedding matrix;

[0187] The BERT word embedding model is used to map each word into a low-dimensional continuous vector space, converting complex vocabulary structures into a form that is easier for computers to understand and process. This not only greatly enhances the model's ability to understand natural language, but also greatly improves the performance and generalization ability of text classification models based on deep learning models.

[0188] Apply convolution kernel K to the sequence after word embedding to perform sliding window convolution and generate feature map C j :

[0189]

[0190] In the formula, n represents the size of the convolution serial port; the symbol · represents the dot product operation; b represents the bias term; K represents the convolution kernel; f represents the activation function ReLU; C j represents an element on the feature map generated after applying the convolution kernel at position j;

[0191] Apply maximum pooling to obtain a fixed-length feature representation:

[0192] p=max(c1,c2,...,c m );

[0193] Where p represents the pooled feature vector, which contains the key information of the entire input text; m represents the number of maximum values ​​of different regions obtained by traversing the entire feature map by the pooling window at a specific step size;

[0194] The pooled features are sent to the fully connected layer to calculate the classification score:

[0195]

[0196] Where W p represents the weight matrix of the fully connected layer; T represents the transpose operation; b k Represents the bias item of the corresponding category; Z k represents the prediction score of category k;

[0197] Use the softmax function to convert the score into a probability distribution:

[0198]

[0199] In the formula, k is the total number of categories, indicating the number of categories predicted by the model; x represents the input vector; P(y=k|x) represents the conditional probability that the output category y is k when the input vector x is given; Indicates z k Perform exponential operations; Indicates z j Perform exponential operation; z k represents the score for the kth category; z j represents the score for the jth category; represents the sum of the exponential functions of all category scores;

[0200] The scores of each label category are converted into probability distribution, where the label category corresponding to the highest probability value is the label category automatically predicted by the model for the new input text.

[0201] By building a text classification model, the model can automatically extract key information from the input text data and assign appropriate category labels to the text based on this information;

[0202] When calculating the output of the text classification model, since the exponential function grows very fast, the softmax function is optimized by introducing logarithmic operations and maximum values ​​to reduce the risk of numerical overflow. The optimized softmax function is:

[0203]

[0204] In the formula, max j z j Indicates that for all categories j, the score z is obtained j The maximum value in .

[0205] By subtracting the maximum value, the numerical overflow problem in exponential calculation is effectively avoided, and the stability of numerical calculation is improved. By logarithmic operation, the original large range of values ​​is transformed into a smaller range, which helps to reduce the numerical range of calculation, can stably process large-scale input data, and can better reflect the relative differences of various categories, thereby improving the performance and training efficiency of the model and reducing the instability of numerical calculation;

[0206] S6.3, using the entity information and keywords obtained by the feature extraction module 2 as input features, training the model to automatically generate relevant label categories for new text data;

[0207] S6.4. The trained model can classify newly input futures-related texts and automatically generate corresponding keyword tags, thereby effectively organizing and categorizing the massive amount of futures knowledge base content.

[0208] Specifically, the futures knowledge base system also includes a knowledge base management unit 4, which is used to integrate and store all processed and annotated text data;

[0209] The knowledge base management unit 4 includes a data storage module and a historical data set supply module;

[0210] The data storage module is used to store all text data related to the futures market after feature extraction and automatic label classification, and use it as historical text data for the text classification model to call;

[0211] The historical data set supply module is used to provide the text classification model with access and call capabilities for stored futures market historical text data.

[0212] Furthermore, the futures knowledge base system also includes a label index management unit 5, which is responsible for constructing an index between text data and labels to support fast label retrieval operations within the system.

[0213] The label index management unit 5 includes a label generation module and a label index module;

[0214] The tag generation module is used to map the features of keywords and entity information to corresponding tag categories, and associate the tags obtained from the automatic tag module 3 with the text data;

[0215] The tag index module is responsible for building and maintaining tag indexes to support fast tag retrieval operations.

[0216] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A futures knowledge base system based on big data automated labeling, characterized by: include A data collection module (1), the data collection module (1) is used to collect text data related to the real-time and historical futures markets; A feature extraction module (2), wherein the feature extraction module (2) extracts entity information and keywords from text data based on natural language processing technology and combined with semantic analysis technology; An automatic labeling module (3), wherein the automatic labeling module (3) constructs and trains a text classification model based on a historical keyword data set, inputs the extracted entity information and keywords into the text classification model, generates keyword labels for the text data, and realizes automatic labeling classification of the text data; A knowledge base management unit (4), the knowledge base management unit (4) is used to integrate and store all text data that have been processed and automatically labeled and classified; A tag index management unit (5), the tag index management unit (5) is responsible for constructing an index between text data and tags to support a fast tag search operation within the system; Extracting keywords from text data by the feature extraction module (2) involves the following steps: S3.

1. Preprocess the text data and use the Jieba word segmentation tool to segment the continuous natural language text into phrase units and remove irrelevant characters, numbers and stop words. S3.

2. Identify entity information in phrase units through natural language processing technology and classify and annotate them in the form of category labels; S3.3, using semantic analysis technology to extract representative keywords from phrase units; S3.

4. If the text contains specific numeric information, use regular expressions to extract the numeric information as a structured feature vector; Building and training a text classification model based on a historical keyword dataset involves the following steps: S6.

1. Entity information and keywords extracted from text data are used as historical keyword datasets; S6.

2. Construct a text classification model based on a deep learning model through a historical keyword dataset; S6.3, using the entity information and keywords obtained by the feature extraction module (2) as input features, training the model to automatically generate relevant label categories for new text data; S6.

4. The trained model can classify newly input futures-related texts and automatically generate corresponding keyword tags, thereby effectively organizing and categorizing the massive amount of futures knowledge base content.

2. The futures knowledge base system based on big data automated labeling according to claim 1 is characterized by: The text data includes futures-related research reports, news announcements, forum discussions and transaction record information.

3. The futures knowledge base system based on big data automated labeling according to claim 1 is characterized by: In S3.2, the entity information in the phrase unit is identified based on natural language processing technology, and the specific steps involved are: Establishing entity recognition model based on natural language processing technology: State set S = {S1, S2, ..., S N }, where N represents the number of states; Observation set O = {O1, O2, ..., O M }, where M represents the number of observations; Initial state probability π={π1,π2,…,π N }, indicating the probability of being in each state when the time step is 0; State transition probability matrix A = {a ij }, where a ij represents the probability of transitioning from state i to state j; Observation probability matrix B = {b ij }, where b ij represents the probability of observing state j in state i; Combine the above parts into a parameter set: λ=(A,B,π); Modeling process: Define the collection state: S={S 公司名 ,S 日期 ,S 地点 ,S 经济指标 ,S 期货品种 }; Define the observation set: O = {Company Name 1, Company Name 2, ..., Date 1, Date 2, ..., Location 1, Location 2, ..., economic indicator 1, economic indicator 1, ..., futures product 1, futures product 2, ...}; Define the initial probability: π={P(S 公司名 ), P(S 日期 ), P(S 地点 ), P(S 经济指标 ), P(S 期货品种 )}; Define the state transition probability matrix: A={a ij }, inside, a ij =P(S j |S i ) ; In the formula, P(S j |S i ) indicates that given the current state S i Next, transfer to the next state S j The conditional probability of ; define the observation probability matrix: B = {b ij }, where b ij =P(observation j |S i ); In the formula, P(observation j |S i ) means that given the current hidden state S i The conditional probability of observing symbol j under the condition; the mathematical expression of the entity recognition model is: Hidden state sequence Q: Q={q1,q1,...,q t }; In the formula, q t represents the state at time step t; Observation sequence O: O={o1,o1,...,o t }; In the formula, o t represents the sign observed at time step t; Initial probability distribution: π i =P(q1=S i ); State transition probability: a ij =P(q t+1 =S j |q t =S i ); Observation probability: b ij =P(o t =Observation j |q t =S i ); Model parameter λ: λ=(Q,O,π,A,B); In the formula, π i Indicates that the initial state probability distribution is in state S i The probability of P(q1=S i ) indicates that the system is in state S at time step t = 1 i probability.

4. The futures knowledge base system based on big data automated labeling according to claim 1 is characterized by: In S3.3, the semantic analysis technology combines the TF-IDF weight and the LDA topic weight to obtain the final keyword weight F G : Where TF is term frequency, IDF is inverse document frequency, t is a term, d is a document, D is a corpus, P(t|w) is the probability of term t in topic w, P(w|d) is the probability of topic w in document d, W is the total number of all topics, w is a topic, and α is a hyperparameter.

5. The futures knowledge base system based on big data automatic labeling according to claim 1 is characterized by: In S6.2, the text classification model based on the deep learning model is specifically: For each keyword W in the input text i , which is converted into a vector e through the word embedding model i : have been i =E(W i ); Where E is the word embedding matrix; Apply convolution kernel K to the sequence after word embedding to perform sliding window convolution and generate feature map C j : In the formula, n represents the size of the convolution serial port; the symbol · represents the dot product operation; b represents the bias term; K represents the convolution kernel; f represents the activation function ReLU; C j represents an element on the feature map generated after applying the convolution kernel at position j; Apply maximum pooling to obtain a fixed-length feature representation: p=max(c1,c2,...,c m ); Where p represents the feature vector after pooling; m represents the number of maximum values ​​of different regions obtained by traversing the entire feature map when the pooling window traverses the entire feature map at a specific step size; The pooled features are sent to the fully connected layer to calculate the classification score: Where W p represents the weight matrix of the fully connected layer; T represents the transpose operation; b k Represents the bias item of the corresponding category; Z k represents the prediction score of category k; Use the softmax function to convert the score into a probability distribution: Where k is the total number of categories; x represents the input vector; P(y=k|x) represents the conditional probability that the output category y is k when the input vector x is given; Indicates z k Perform exponential operations; Indicates z j Perform exponential operation; z k represents the score for the kth category; z j represents the score for the jth category; Represents the sum of the exponential functions of all class scores.

6. The futures knowledge base system based on big data automatic labeling according to claim 5 is characterized by: Since the exponential function grows very fast, the softmax function is optimized by introducing logarithmic operations and maximum values ​​to reduce the risk of numerical overflow. The optimized softmax function is: In the formula, max j z j For all categories j, the score z is obtained j The maximum value in .

7. The futures knowledge base system based on big data automatic labeling according to claim 1 is characterized by: The knowledge base management unit (4) comprises a data storage module and a historical data set supply module; The data storage module is used to store all text data related to the futures market after feature extraction and automatic label classification, and use it as historical text data for the text classification model to call; The historical data set supply module is used to provide the text classification model with access and call capabilities for stored futures market historical text data.

8. The futures knowledge base system based on big data automated labeling according to claim 1 is characterized by: The label index management unit (5) comprises a label generation module and a label index module; The tag generation module is used to map the features of keywords and entity information to corresponding tag categories, and associate the tags obtained from the automatic tagging module (3) with the text data; The tag index module is responsible for building and maintaining a tag index to support fast tag retrieval operations.

Citation Information

Patent Citations

  • Text analysis method based on dynamic knowledge graph

    CN114254073A

  • Short video content label knowledge base quick retrieval method based on natural language processing

    CN117009461A