Policy text interpretation method and device
By extracting the core sentences of the policy text and using the core sentence comparison model for quantitative evaluation of value calculations, the problems of low accuracy and low efficiency of policy text interpretation in the existing technology are solved, and more efficient and accurate policy text interpretation is achieved.
Patent Information
- Application Number
- CN202411742946.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The quantitative interpretation of existing policy texts has problems of poor accuracy and low efficiency, especially in the case of small samples, the training data annotation of deep learning models is difficult and time-consuming.
By extracting core sentences from the policy text to be analyzed and inputting them with the core sentences of the historical policy text as reasoning comparison data into the pre-trained core sentence comparison model, predicting and calculating quantitative evaluation value, a core sentence comparison model is established to improve interpretation accuracy.
It improves the accuracy and efficiency of policy text interpretation, overcomes the problem of low model accuracy under small sample data, and can more accurately capture the differences between the changing attitudes of policy influence and the core sentences.
Smart Images

Figure CN119740568A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a policy text interpretation method and device. Background Art
[0002] In the prior art, policy texts have a strong guiding significance for the tightness of subsequent operations. For example, financial policy texts (including meetings and speeches) issued by financial regulatory agencies have a strong forward-looking significance for subsequent financial operations. More specifically, the monetary policies issued by central banks of various countries have a strong forward-looking guiding role for other countries' subsequent monetary policies, whether they are raising or lowering interest rates. There are two popular approaches in academia: the first is to screen the keywords in the policy text and then quantify them through a cumulative scoring model; the second is to use machine learning algorithms to split the policy documents into sentences, and then label each sentence in three categories: positive, negative or neutral.
[0003] Taking the interpretation of the monetary policy document as an example, after classifying each sentence, the quantitative score of this monetary policy report is: Quantitative score = (#number of positive sentences - #number of negative sentences) / #total number of sentences.
[0004] This score is between [-1,1]. If the quantitative score is 0, it means that the central bank's attitude is neutral; if the quantitative score is 1, it means that the central bank's attitude is very tight (positive classification), and it may be necessary to significantly increase interest rates; if the score is -1, it means that the central bank's attitude is very loose (negative), and it may be necessary to significantly cut interest rates.
[0005] Existing technical solutions give the same weight to hundreds of sentences in the report, which include a lot of insignificant policy texts. This "rough reading" of all sentences in the report and then performing three-classification does not have a high upper limit on the precision of the quantitative score, and is easily affected by the distribution of sentences in the report. In addition, this quantification method does not combine the actual actions after the policy is released, and there is a problem that the quantitative score does not match the actual situation.
[0006] In addition, since the amount of text in some policy texts is not rich, it is difficult to build a reasonable modeling method on a small sample to perform quantitative interpretation. The existing keyword scoring model is not accurate enough, and deep learning requires a large amount of training data, which is a labor-intensive and difficult to label task. Summary of the invention
[0007] The present invention is used to solve the problems of poor accuracy and low efficiency in the quantitative interpretation of existing policy texts.
[0008] In order to solve the above technical problems, the first aspect of the present invention provides a policy text interpretation method, comprising:
[0009] Extract the core sentences to be analyzed from the policy text to be analyzed;
[0010] The core sentence to be analyzed and the historical core sentences of each historical policy text are input into the pre-trained core sentence comparison model as a set of inference comparison data, and the classification of the inference comparison data is predicted;
[0011] Calculating the quantitative evaluation value of the core sentence to be analyzed according to the classification of the reasoning comparison data and the quantitative evaluation value of the historical core sentence in the reasoning comparison data;
[0012] Among them, the core sentence comparison model is obtained by training a comparison deep learning network model using historical comparison data consisting of historical core sentences of every two historical policy texts and the classification labels of the historical comparison data; the classification labels of the historical comparison data are determined according to the difference in quantitative evaluation values of the two historical core sentences in the historical comparison data, and the quantitative evaluation value of the core sentence reflects the tightness of the policy adjustment action.
[0013] As a further embodiment of the present invention, extracting a core sentence to be analyzed from the policy text to be analyzed includes:
[0014] Split the policy text to be analyzed into multiple sentences;
[0015] Input each sentence into a pre-trained binary classification model to obtain classification results for each sentence; wherein the binary classification model is trained using each sentence in the historical policy text and each sentence label, and the label includes a core sentence label and a non-core sentence label;
[0016] According to the classification results, the core sentences to be analyzed are determined.
[0017] As a further embodiment of the present invention, the core sentence comparison model establishment process includes:
[0018] Extract historical core sentences from various historical policy texts;
[0019] Collect the action indicator values after each historical policy text is released;
[0020] Calculate the quantitative evaluation value of each historical core sentence based on the action index value after the release of each historical policy text;
[0021] Taking every two historical core sentences as a historical comparison data, determining the classification label of each group of historical comparison data according to the difference in the quantitative evaluation values of the two historical core sentences in each group of historical comparison data;
[0022] A deep learning network model is trained and compared based on the historical comparison data and the classification labels of the historical comparison data to obtain a core sentence comparison model.
[0023] As a further embodiment of the present invention, the deep learning network model includes: a Bert pre-training model and a classifier;
[0024] The Bert pre-training model is used to extract semantic vectors in core sentences;
[0025] The classifier is used for classifying according to the semantic vector of the core sentence.
[0026] As a further embodiment of the present invention, according to the action index value after each historical policy text is released, the quantitative evaluation value of each historical core sentence is calculated, including:
[0027] According to the values of each action indicator after the release of all historical policy texts, the normalized values of each action indicator after the release of each historical policy text are calculated;
[0028] For each historical policy text, the normalized values of all action indicators of the historical policy text are averaged to obtain the quantitative evaluation value of the historical core sentence of the historical policy text.
[0029] As a further embodiment of the present invention, according to the values of the action indicators after all the historical policy texts are released, the normalized values of the action indicators after the release of each historical policy text are calculated, including:
[0030] The following formula is used to calculate the normalized value of each action indicator after the release of each historical policy text:
[0031]
[0032] v· is the normalized action index value, v is the action index value after the historical policy text is released, is the median of the positive action indicator values in all historical policy texts, is the median of the negative action indicator values in all historical policy texts.
[0033] As a further embodiment of the present invention, the classification label of each group of historical comparison data is determined according to the difference in the quantitative evaluation values of two historical core sentences in each group of historical comparison data, including:
[0034] Use the following formula to determine the classification label of historical comparison data:
[0035]
[0036] Among them, (a, b) is the historical comparison data, a and b are historical core sentences, (a, b)Label is the label of the historical comparison data (a, b), and ε is the tolerance value.
[0037] As a further embodiment of the present invention, according to the classification of the reasoning comparison data and the quantitative evaluation value of the historical core sentences in the reasoning comparison data, the quantitative evaluation value of the core sentence to be analyzed is calculated, including:
[0038] Filtering out the reasoning comparison data of a preset category from all the reasoning comparison data, wherein the preset category indicates that the degree of tightness corresponding to the core sentences in the reasoning comparison data is similar;
[0039] The quantitative evaluation values of the historical core sentences in the screened reasoning comparison data are weighted and averaged to obtain the quantitative evaluation values of the core sentences of the policy text to be analyzed.
[0040] As a further embodiment of the present invention, the policy text interpretation method further includes:
[0041] According to the quantitative evaluation value of the core sentence to be analyzed, the estimated adjustment range of the policy text to be analyzed is calculated by reverse normalization.
[0042] A second aspect of the present invention provides a policy text interpretation device, comprising:
[0043] A core sentence extraction unit is used to extract the core sentences to be analyzed from the policy text to be analyzed;
[0044] A comparison prediction unit, used for inputting the core sentence to be analyzed and the historical core sentences of each historical policy text as a set of inference comparison data into the pre-trained core sentence comparison model, and predicting the classification of the inference comparison data;
[0045] An evaluation unit, used to calculate the quantitative evaluation value of the core sentence to be analyzed according to the classification of the reasoning comparison data and the quantitative evaluation value of the historical core sentence in the reasoning comparison data;
[0046] Among them, the core sentence comparison model is obtained by training a comparison deep learning network model using historical comparison data consisting of historical core sentences of every two historical policy texts and the classification labels of the historical comparison data; the classification labels of the historical comparison data are determined according to the difference in quantitative evaluation values of the two historical core sentences in the historical comparison data, and the quantitative evaluation value of the core sentence reflects the tightness of the policy adjustment action.
[0047] A third aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any of the foregoing embodiments when executing the computer program.
[0048] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of a computer device, the method described in any of the above embodiments is implemented.
[0049] A fifth aspect of the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a processor of a computer device, the method described in any of the above embodiments is implemented.
[0050] The policy text interpretation method and device provided by the present invention take into account that in practice, the core sentences in the policy text are used to express the subsequent position and attitude, thereby affecting the policy adjustment action. Based on this, the core sentences to be analyzed are extracted from the policy text to be analyzed, and the policy text is interpreted based on the core sentences, which can simplify the processing amount of the text to be analyzed and improve the processing efficiency. By forming historical comparison data with the historical core sentences of every two historical policy texts, and determining the classification labels of the historical comparison data according to the difference in the quantitative evaluation values of the two historical core sentences in the historical comparison data, sample data enhancement can be achieved, and then a comparison deep learning training model can be implemented on a small sample. Training the core sentence comparison model based on the historical comparison data and its classification labels can more accurately grasp the changing attitude of the policy impact, dig out the intrinsic correlation between the two core sentences and the difference in the quantitative evaluation values of the two core sentences, improve the accuracy and efficiency of the quantitative evaluation of the policy text to be analyzed, and then improve the accuracy of the prediction of the tightness of the policy text to be analyzed.
[0051] In summary, the present invention can perform data enhancement through the comparison mode through the core sentence extraction + comparison mode quantitative evaluation method, overcome the problem of low accuracy of the core sentence comparison model caused by small samples, and through modeling based on the interactive self-control mechanism of two core sentences, the differences between the core sentences can be accurately captured, thereby improving the accuracy of the policy text analysis to be analyzed.
[0052] In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 A flowchart showing a process of establishing a core sentence comparison model according to an embodiment of the present invention is shown;
[0055] Figure 2 A structural diagram showing a comparison of a deep learning network model in an embodiment of the present invention;
[0056] Figure 3 A schematic diagram of allocation of training sets and test sets according to an embodiment of the present invention is shown;
[0057] Figure 4 A first flow chart of the policy text interpretation method according to an embodiment of the present invention is shown;
[0058] Figure 5 A flowchart showing a core sentence extraction process according to an embodiment of the present invention is shown;
[0059] Figure 6 A flowchart showing a process for calculating a quantitative evaluation value of a core sentence to be analyzed according to an embodiment of the present invention is shown;
[0060] Figure 7 A second flow chart of the policy text interpretation method according to an embodiment of the present invention is shown;
[0061] Figure 8 A structural diagram of a policy text interpretation device according to an embodiment of the present invention is shown;
[0062] Fig. 9 A structural diagram of a computer device according to an embodiment of the present invention is shown.
[0063] Description of the accompanying symbols:
[0064] 201. Bert pre-training model;
[0065] 202, classifier;
[0066] 801, core sentence extraction unit;
[0067] 802, comparison prediction unit;
[0068] 803, evaluation unit;
[0069] 804, reverse normalization unit;
[0070] 902. Computer equipment;
[0071] 904, processor;
[0072] 906. Memory;
[0073] 908, driving mechanism;
[0074] 910, input / output module;
[0075] 912. Input device;
[0076] 914. Output device;
[0077] 916. Presentation equipment;
[0078] 918. Graphical user interface;
[0079] 920, network interface;
[0080] 922, communication link;
[0081] 924. Communication bus. DETAILED DESCRIPTION
[0082] 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.
[0083] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0084] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the system or device product is executed in practice, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel.
[0085] It should be noted that the policy text interpretation method and device of the present invention can be used for financial policy texts (such as monetary policy texts) issued in the financial field, and can also be used for policy documents and meeting minutes issued by any government regulatory agency with obvious core paragraphs (i.e., expressing attitudes and positions) other than the financial field. The present invention does not limit the specific field of policy texts.
[0086] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the acquisition, transmission, storage, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0087] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0088] In the prior art, the interpretation of policy documents is mainly achieved through keyword matching quantification and sentence-by-sentence interpretation. Existing solutions have problems of poor accuracy and low efficiency.
[0089] In addition, after research, the inventors of the present application found that some policy texts contain descriptions that can express the core policy stance (referred to as core sentences), and after the policy text is released, these core sentences will affect subsequent action indicators. These action indicators comprehensively reflect the degree of policy tightness. For example, the action indicators corresponding to the financial policy text include the reserve ratio of large banks and small and medium-sized banks, the one-year medium-term lending facility MLF rate, and the 7-day and 14-day reverse repurchase rates. These five indicators can reflect whether the central bank's monetary policy is relaxed or tightened.
[0090] And considering that the existing policy texts are small sample events, such as financial policy texts, if the network model is directly established using the core sentences of the policy texts and the degree of tightness of the policy texts, it will affect the accuracy of the model.
[0091] In order to solve the problems of poor accuracy and low efficiency in solving existing policy texts in the prior art and the above-mentioned technical problems discovered by the inventors of this application during the research and development process, the present invention first establishes a core sentence comparison model, and then interprets the policy text based on the core sentence comparison model.
[0092] In one embodiment of the present invention, Figure 1 As shown in Figure 2, the process of establishing the core sentence comparison model includes:
[0093] Step 101, extracting historical core sentences from each historical policy text.
[0094] In this step, the historical policy text is a policy document in various formats for a certain thing, such as a monetary policy document in PDF, Word and other formats, which can be obtained from the central bank's website. The specific transaction is determined according to the actual application scenario, and the present invention does not limit the specific content of the policy text.
[0095] When implemented, the core sentence generally mentions future positions and trends, and the historical core sentences can be manually extracted from various historical policy texts. In some real-time methods, the historical core sentences include multiple consecutive sentences.
[0096] For example, the core sentence in the historical monetary policy text for the second quarter of 2023 is "A prudent monetary policy must be precise and powerful, better play the dual functions of the aggregate and structure of monetary policy tools, and firmly support the recovery and development of the real economy. Comprehensively use a variety of monetary policy tools to maintain a reasonable level of liquidity and keep the growth rate of money supply and social financing scale basically in line with the nominal economic growth rate."
[0097] Step 102, collecting the action indicator values after each historical policy text is released.
[0098] The action indicators in this step are indicators that affect the degree of tightness and are obtained based on data statistics after the release of the policy text. For example, for the monetary and financial policy text, the corresponding action indicators include the reserve ratio of large banks and small and medium-sized banks, the one-year medium-term lending facility MLF rate, and the 7-day and 14-day reverse repurchase rates.
[0099] In detail, the action indicator values collected in this step are action indicator values within a predetermined time period after the historical policy text is released, for example, action indicator values three months after the policy text is released.
[0100] Step 103, calculating the quantitative evaluation value of each historical core sentence according to the action index value after each historical policy text is released.
[0101] When implementing this step, first calculate the normalized value of each action indicator after the release of each historical policy text based on the values of each action indicator after the release of all historical policy texts. Then, for each historical policy text, average the normalized values of all action indicators of the historical policy text to obtain the quantitative evaluation value of the historical core sentence of the historical policy text.
[0102] Specifically, the following formula can be used to calculate the normalized value of each action indicator after the release of each historical policy text:
[0103]
[0104] Among them, v· is the normalized action index value, v is the action index value after the release of the historical policy text, is the median of the positive action indicator values in all historical policy texts, is the median of the negative action indicator values in all historical policy texts.
[0105] Through the above formula, each action indicator can be normalized to between [-1,1]. For the example in step 103, if the maximum value of the historical interest rate cut indicator is 75BP, the median of the interest rate cut range is 50BP, and the interest rate cut in the current time interval is 25BP, then the normalized score is max(-1,-0.25), that is, -0.25.
[0106] For the example in step 103, for the above five indicators, each indicator has a positive action median and a negative action median. After normalizing the values of each action indicator, the normalized values of the five indicators within the same time interval can be averaged, and the average value is used as the quantitative evaluation value of the historical core sentence.
[0107] The quantitative evaluation value of the historical core sentences comprehensively reflects the comprehensive impact of the core sentences on various action indicators after the historical policy text is released. For example, the monetary policy document will express the subsequent stance and attitude through the core sentences. The quantitative evaluation value of the core sentences in the monetary policy document is determined based on the actual operation of the central bank, which can reflect the position of the regulatory agency and, to a large extent, indicate what actions will be taken in the future.
[0108] Step 104 , taking every two historical core sentences as a historical comparison data, and determining the classification label of each group of historical comparison data according to the difference in the quantitative evaluation values of the two historical core sentences in each group of historical comparison data.
[0109] Assuming that a total of 87 historical core sentences are obtained, this step will result in 87*87, or 7569 historical comparison data, corresponding to 87*87 classification labels. For example, the classification label of the historical comparison data can be expressed as C i,j , where i and j are the labels of historical comparison data, the classification labels of all historical comparison data can be expressed as:
[0110]
[0111] Among them, N is the total number of historical core sentences.
[0112] In some implementations, determining the classification label of each set of historical comparison data according to the difference in the quantitative evaluation values of two historical core sentences in each set of historical comparison data includes:
[0113] Use the following formula to determine the classification label of historical comparison data:
[0114]
[0115] Among them, (a, b) is the historical comparison data, a and b are the historical core sentences, (a, b)Label is the label of the historical comparison data (a, b), and ε is the tolerance value. In some implementations, it can be set to 0.1. During specific implementation, it can be set according to actual needs, and the present invention does not limit its specific value.
[0116] When the label of the historical comparison data (a, b) is 1, it means that the core sentence a (the resulting policy action) is tighter than the core sentence b (the resulting policy action). When the Label is -1, it means that the core sentence a (the resulting policy action) is more relaxed than the core sentence b (the resulting policy action). When the Label is 0, the two core sentences a (the resulting policy action) are similar in degree of tightness to the core sentence b (the resulting policy action).
[0117] Step 105 , training a comparison deep learning network model based on the historical comparison data and the classification labels of the historical comparison data to obtain a core sentence comparison model.
[0118] The core sentence comparison model established in this embodiment can more accurately grasp the changing attitude of policy impact, explore the intrinsic correlation between the two core sentences and the differences in the quantitative evaluation values of the two core sentences, improve the accuracy of the quantitative evaluation of the policy text to be analyzed, and further improve the accuracy of the prediction of the degree of tightness that will be caused by the policy text to be analyzed.
[0119] In one embodiment of the present invention, before executing step 101, the above step further includes: parsing and sentence splitting of historical policy texts. Specifically, all historical policy texts are synchronously acquired, and the acquired texts are parsed, and according to the structure of the text, a processing scheme such as policy expressions is adopted to perform structured chapter, paragraph, and sentence splitting, and special styles such as columns, summaries, and icons are standardized.
[0120] Taking a monetary policy document as an example, the document may include chapters, summaries, charts, columns, etc. Since the formats of policy text reports issued by different government regulatory agencies are different, this embodiment develops a targeted parsing algorithm for the format of a specific report, which can improve the parsing efficiency of the policy text.
[0121] In one embodiment of the present invention, Figure 2 As shown, the comparison deep learning network model includes: a Bert pre-training model 201 and a classifier 202.
[0122] The Bert pre-training model 201 is used to extract the semantic vector in the core sentence. The classifier 202 is used to classify according to the semantic vector of the core sentence. Specifically, the classifier 202 is implemented using an attention mechanism.
[0123] The comparative deep learning network model of this embodiment adopts the open source sentence-transformer, which is an algorithm framework based on Google's open source Transformer and Bert algorithms, and is specifically used to fine-tune the semantic vector of the sentence. Compared with the representation-based sentence vector semantic representation, we use a more accurate interaction-based training framework. This framework can simultaneously accept two sentences separated by SEP, and use the self-attention mechanism to accurately capture the subtle differences between the two sentences.
[0124] In one embodiment of the present invention, in order to improve the efficiency of subsequent core sentence extraction, after determining the historical core sentences of the historical policy text in the above step 102, a binary classification model for core sentence recognition is also established. Specifically, the binary classification model is trained using each sentence in the historical policy text and each sentence annotation label, and the annotation label includes a core sentence label and a non-core sentence label.
[0125] In a specific example of the present invention, there are 89 monetary policy reports from 2001 to the first quarter of 2023, based on which 89 core sentences are extracted. We mark all non-core sentences in the 89 reports as "non-core sentences", and 89 core sentences as "core sentences", and then train a binary classification model for core sentences by fine-tuning the Bert model. Based on this binary classification model, the core sentences of future monetary policy reports can be extracted.
[0126] This embodiment trains a binary classification model for core sentence recognition based on manually extracted core sentences, which can improve the efficiency of extracting core sentences in subsequent policy documents.
[0127] In a specific embodiment of the present invention, the above Figure 1When the method shown is applied to the monetary policy text, a core sentence comparison model can be established between the core sentences of the monetary policy text and the actual monetary policy operation (such as interest rate hikes and interest rate cuts) of the central bank after the monetary policy text is released, based on which the quantitative evaluation of the future monetary policy text and the future adjustment direction and amplitude can be predicted. The release interval of the monetary policy report is generally about three months. For example, the central bank generally releases the monetary policy report for the fourth quarter of the previous year in February and the monetary policy report for the first quarter of the current year in May. This embodiment takes the central bank's actions during this period as the main observation indicators, such as reducing the reserve ratio by 0.5 percentage points, reducing interest rates by 25BP, etc. In specific implementation, the following five indicators, namely, the reserve ratio of large banks and small and medium-sized banks, the one-year medium-term lending facility MLF interest rate, and the 7-day and 14-day reverse repurchase rates, are mainly detected to judge whether the central bank's monetary policy (operation) is relaxed or tightened. The selection basis of these five indicators is: the reserve ratio affects the long-term liquidity of the market by directly controlling the bank's lending capacity; the medium-term lending facility adjusts the medium-term liquidity of the bank and provides a relatively flexible financing method; and the reverse repurchase rate affects the short-term market interest rate and is suitable for quickly adjusting the short-term capital supply. The central bank generally uses these three policy tools to adjust its long-, medium- and short-term policy stance.
[0128] Since there is no standard practice for merging multiple indicators into one indicator, this embodiment first takes the change range of the central bank's action indicator within the three-month period between the release of each monetary policy report and the release of the next report as the initial variable (for example, a 25BP interest rate cut). Then, the above normalization formula is used to normalize the change range of each action indicator, and the value of the change range of each action indicator can be normalized to between [-1,1]. Finally, the average of the normalized values of the five indicators in the current time interval is taken as the final quantitative evaluation value of the current monetary policy core sentence.
[0129] From 2001 to the first quarter of 2023, a total of 89 monetary policy texts were sampled. Excluding two special scenarios in 2008, every two core sentences were used as historical comparison data, and the core sentences in the historical comparison data were cross-labeled to form an 87*87 label matrix, which is 7569 training samples. Each training sample includes two core sentences and their corresponding labels.
[0130] The label matrix looks like this:
[0131]
[0132] The labels of the contrasting pairs of two core sentences (sentence a, sentence b) need to be calculated by the following formula
[0133]
[0134] ε is the tolerance value, which we set to 0.1. When the label is 1, it means that sentence a is tighter than sentence b, when the label is -1, it means that sentence a is looser than sentence b, and when the label is 0, the two sentences have similar tightness.
[0135] The labeling formula may refer to the aforementioned embodiment.
[0136] For the split of training set and validation set, in order to ensure that the core sentence comparison model has never seen the core sentences in the test set during training, we use Figure 3 The first 78 core sentences were compared with each other to form the training set. The 79th to 87th core sentences were compared with other sentences to form the test set.
[0137] Finally, our training and test data are shown in Table 1 below:
[0138] Table 1
[0139]
[0140] Training with training set Figure 2 The core sentence comparison model is obtained by comparing the neural network model shown in FIG. The accuracy of the core sentence comparison model is tested using the test set. If the accuracy is not met, the structure of the comparison neural network model is adjusted and retrained.
[0141] Based on the establishment of the core sentence comparison model, the interpretation of the policy text can be performed, such as Figure 4 As shown, the methods for interpreting policy texts include:
[0142] Step 401: extract the core sentences to be analyzed from the policy text to be analyzed.
[0143] Step 402 , input the core sentence to be analyzed and the historical core sentences of each historical policy text as a group of inference comparison data into the pre-trained core sentence comparison model, and predict the classification of the inference comparison data.
[0144] Taking the monetary policy text as an example, there are 87 historical core sentences, so we will get 87 inference comparison data and classifications of 87 inference comparison data.
[0145] The classification of inference comparison data includes three categories, represented by -1, 1, and 0 respectively. -1 means that the action after the release of the core sentence of the policy text to be analyzed is more relaxed than the action after the release of the historical core sentence (abbreviated as more relaxed), 1 means that the action after the release of the core sentence of the policy text to be analyzed is tighter than the action after the release of the historical core sentence (abbreviated as tighter), and 0 means that the action after the release of the core sentence of the policy text to be analyzed is similar in tightness to the action after the release of the historical core sentence (abbreviated as similar tightness).
[0146] Step 403, calculating the quantitative evaluation value of the core sentence to be analyzed according to the classification of the reasoning comparison data and the quantitative evaluation value of the historical core sentence in the reasoning comparison data.
[0147] Among them, the core sentence comparison model is obtained by training a comparison deep learning network model using historical comparison data consisting of historical core sentences of every two historical policy texts and the classification labels of the historical comparison data; the classification labels of the historical comparison data are determined according to the difference in quantitative evaluation values of the two historical core sentences in the historical comparison data, and the quantitative evaluation value of the core sentence reflects the tightness of the policy adjustment action.
[0148] This embodiment is based on a core sentence comparison model, which can improve the efficiency and accuracy of interpreting the policy text to be analyzed.
[0149] In one embodiment of the present invention, Figure 5 As shown, the above step 401 extracts the core sentences to be analyzed from the policy text to be analyzed, including:
[0150] Step 501, split the policy text to be analyzed into multiple sentences.
[0151] When implementing this step, regular expressions and other processing methods can be used to perform structured chapter, paragraph and sentence splitting based on the structure of the policy text.
[0152] Step 502: input each sentence into a pre-trained binary classification model to obtain a classification result for each sentence.
[0153] The binary classification model is trained using each sentence in the historical policy text and each sentence label, and the label includes a core sentence label and a non-core sentence label. The training process of the binary classification model can refer to the above embodiment and will not be described in detail here.
[0154] Step 503: Determine the core sentence to be analyzed according to the sentence whose classification result is the core sentence label.
[0155] In this step, adjacent sentences with multiple consecutive classification results as core sentence labels are determined as core sentences to be analyzed. If there is a sentence with a non-core sentence label between two sentences with classification labels as core sentences, the sentence is also set as a core sentence label.
[0156] This embodiment can improve the efficiency of identifying core sentences of the policy text to be analyzed by setting a binary classification model.
[0157] In one embodiment of the present invention, Figure 6 As shown, the above step 403 calculates the quantitative evaluation value of the core sentence to be analyzed according to the classification of the reasoning comparison data and the quantitative evaluation value of the historical core sentence in the reasoning comparison data, including:
[0158] Step 601, from all the reasoning comparison data, filter out the reasoning comparison data of a preset category, wherein the preset category indicates that the degree of tightness corresponding to the core sentences in the reasoning comparison data is similar, for example, the reasoning comparison data with a label of 0 in the above embodiment.
[0159] Step 602, weighted averaging is performed on the quantitative evaluation values of the historical core sentences in the screened reasoning comparison data to obtain the quantitative evaluation values of the core sentences of the policy text to be analyzed.
[0160] In some implementations, the quantitative score of the core sentence in the policy text to be analyzed may also be determined in the following manner:
[0161] Assume that the quantitative score of the core sentence in the policy text to be analyzed is x, and the value range of x is [-1, 1]. Enumerate all possible values in the range of [-1, 1], such as -1, -0.99. -0.98…1. Which enumeration value is most consistent with the strength comparison of the score of the historical core sentence and the -1, 0, 1 strong and weak labels predicted by the algorithm (the same ratio is the highest), then take this enumeration value as the final score.
[0162] In one embodiment of the present invention, Figure 7 As shown, the policy text interpretation method includes, in addition to the above steps 401 to 403, further comprising:
[0163] Step 404, based on the quantitative evaluation value of the core sentence to be analyzed, reverse normalization is performed to calculate the estimated adjustment range of the policy text to be analyzed.
[0164] This step calculates the estimated adjustment amount according to the following formula:
[0165] Estimated adjustment range = historical median action indicator * 2 * quantitative evaluation value of the core sentence to be analyzed.
[0166] The quantitative evaluation value of the core sentence to be analyzed can be understood as a degree ratio. If it is 0.5, it is the historical median. If it is 0.9, it is 1.8 times the historical median.
[0167] For example, the quantitative evaluation value of the core sentence to be analyzed is -0.3, which means there is a possibility of a rate cut. According to the algorithm mentioned in the third step of the training phase, "Constructing the quantitative evaluation value of the core sentence", assuming that the median of the rate cut range is 50BP, then the rate cut is reversely calculated from the single indicator of the rate cut, and the predicted rate cut in the next three months is 50BP*2*0.3=30BP, which means that the rate will be cut by 30BP.
[0168] When the present invention is applied to the monetary policy text scenario, on the training set, the F1 of the deep learning algorithm is about 0.8. Considering the complexity of predicting the central bank's loosening and tightening actions in 90 days, this indicator has a good application effect. In the third quarter of 2023, this algorithm was deployed to the production environment. In the central bank's loosening and tightening prediction scenarios in the subsequent three quarters, the accuracy rate reached 100% in the direction of the central bank's loosening and tightening actions, and the accuracy rate reached about 70% in the prediction of the loosening and tightening range. The present invention can provide the accuracy of policy text classification, quantitative analysis, and adjustment range prediction.
[0169] Based on the same inventive concept, the present invention also provides a policy text interpretation device, as described in the following embodiments. Since the principle of the policy text interpretation device to solve the problem is similar to that of the policy text interpretation method, the implementation of the device can refer to the policy text interpretation method, and the repeated parts will not be repeated.
[0170] Specifically, Figure 8 As shown, the policy text interpretation device includes:
[0171] The core sentence extraction unit 801 is used to extract the core sentence to be analyzed from the policy text to be analyzed.
[0172] The comparison prediction unit 802 is used to input the core sentence to be analyzed and the historical core sentences of each historical policy text as a group of inference comparison data into the pre-trained core sentence comparison model, and predict the classification of the inference comparison data.
[0173] The evaluation unit 803 is used to calculate the quantitative evaluation value of the core sentence to be analyzed according to the classification of the reasoning comparison data and the quantitative evaluation value of the historical core sentence in the reasoning comparison data.
[0174] Among them, the core sentence comparison model is obtained by training a comparison deep learning network model using historical comparison data consisting of historical core sentences of every two historical policy texts and the classification labels of the historical comparison data; the classification labels of the historical comparison data are determined according to the difference in quantitative evaluation values of the two historical core sentences in the historical comparison data, and the quantitative evaluation value of the core sentence reflects the tightness of the policy adjustment action.
[0175] Furthermore, it also includes: a reverse normalization unit 804, which is used to reversely normalize and calculate the estimated adjustment range of the policy text to be analyzed based on the quantitative evaluation value of the core sentence to be analyzed.
[0176] This embodiment can more accurately grasp the changing attitude of policy impact, explore the intrinsic correlation between the two core sentences and the differences in the quantitative evaluation values of the two core sentences, improve the accuracy of the quantitative evaluation of the policy text to be analyzed, and further improve the accuracy of the prediction of the degree of tightness of the policy text to be analyzed.
[0177] The policy text interpretation method and device of this embodiment can be applied to the financial policy text scenario. The present invention adopts core sentence extraction + contrast mode quantitative scoring to interpret and quantify financial policies. Under this contrast learning framework, not only can data enhancement be performed through contrast mode to overcome the problem of small samples, but also the keywords of slight changes in policy positions can be accurately grasped.
[0178] Since the speech texts of financial regulatory agencies are generally based on the templates of past core sentences with a small amount of word adjustments, the expression patterns of policy core sentences are very similar, and the differences in some core words are of great significance. The comparison algorithm of the present invention can accurately capture this difference value by modeling the interactive self-control mechanism based on two core sentences to perform quantitative modeling and prediction of financial policies.
[0179] In summary, existing technologies generally focus on treating all sentences in policies equally, without identifying the core policy semantic sentences. Moreover, in terms of modeling, they can only be quantified based on the frequency of keywords or the number of occurrences of sentence categories, and the upper limit of accuracy is not high.
[0180] On the basis of extracting core sentences, the present invention innovatively adopts a core sentence comparison deep learning framework, which can achieve the following technical effects: 1) It can overcome the bottleneck of data scarcity and achieve data enhancement by making a matrix-style comparison expansion of sentence pairs through N*N; 2) Our comparative deep learning is equivalent to "intensive reading". Combined with Google's Transformer self-attention mechanism, the core sentences are deeply compared and quantified, which can accurately grasp the changing trends of policy dynamics.
[0181] In one embodiment of the present invention, a computer device is also provided, such as Fig. 9As shown, the computer device 902 may include one or more processors 904, such as one or more central processing units (CPUs), each of which may implement one or more hardware threads. The computer device 902 may also include any memory 906, which is used to store any kind of information such as code, settings, data, etc. Non-limitingly, for example, the memory 906 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 902. In one case, when the processor 904 executes an associated instruction stored in any memory or a combination of memories, the computer device 902 may perform any operation of the associated instruction. The computer device 902 also includes one or more drive mechanisms 908 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0182] The computer device 902 may also include an input / output module 910 (I / O) for receiving various inputs (via input devices 912) and for providing various outputs (via output devices 914). A specific output mechanism may include a presentation device 916 and an associated graphical user interface 918 (GUI). In other embodiments, the input / output module 910 (I / O), input device 912, and output device 914 may not be included, and the computer device 902 may be used as a computer device in a network. The computer device 902 may also include one or more network interfaces 920 for exchanging data with other devices via one or more communication links 922. One or more communication buses 924 couple the components described above together.
[0183] The communication link 922 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 922 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0184] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are executed.
[0185] An embodiment of the present invention further provides a computer-readable instruction, wherein when a processor executes the instruction, the program therein causes the processor to execute the method described in any of the aforementioned embodiments.
[0186] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0187] It should also be understood that in the embodiments of the present invention, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0188] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0189] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0190] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0191] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0192] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0193] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0194] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A policy text interpretation method, characterized in that: include: Extract the core sentences to be analyzed from the policy text to be analyzed; The core sentence to be analyzed and the historical core sentences of each historical policy text are input into the pre-trained core sentence comparison model as a set of inference comparison data, and the classification of the inference comparison data is predicted; Calculating the quantitative evaluation value of the core sentence to be analyzed according to the classification of the reasoning comparison data and the quantitative evaluation value of the historical core sentence in the reasoning comparison data; Among them, the core sentence comparison model is obtained by training a comparison deep learning network model using historical comparison data consisting of historical core sentences of every two historical policy texts and the classification labels of the historical comparison data; the classification labels of the historical comparison data are determined according to the difference in quantitative evaluation values of the two historical core sentences in the historical comparison data, and the quantitative evaluation value of the core sentence reflects the tightness of the policy adjustment action.
2. The method according to claim 1, characterized in that Extract the core sentences to be analyzed from the policy text to be analyzed, including: Split the policy text to be analyzed into multiple sentences; Input each sentence into a pre-trained binary classification model to obtain classification results for each sentence; wherein the binary classification model is trained using each sentence in the historical policy text and each sentence label, and the label includes a core sentence label and a non-core sentence label; According to the classification results, the core sentences to be analyzed are determined.
3. The method according to claim 1, characterized in that The process of building the core sentence comparison model includes: Extract historical core sentences from various historical policy texts; Collect the action indicator values after each historical policy text is released; Calculate the quantitative evaluation value of each historical core sentence based on the action index value after the release of each historical policy text; Taking every two historical core sentences as a historical comparison data, determining the classification label of each group of historical comparison data according to the difference in the quantitative evaluation values of the two historical core sentences in each group of historical comparison data; A deep learning network model is trained and compared based on the historical comparison data and the classification labels of the historical comparison data to obtain a core sentence comparison model.
4. The method according to claim 3, characterized in that The deep learning network model includes: a Bert pre-training model and a classifier; The Bert pre-training model is used to extract semantic vectors in core sentences; The classifier is used for classifying according to the semantic vector of the core sentence.
5. The method according to claim 3, characterized in that According to the action index value after the release of each historical policy text, the quantitative evaluation value of each historical core sentence is calculated, including: According to the values of each action indicator after the release of all historical policy texts, the normalized values of each action indicator after the release of each historical policy text are calculated; For each historical policy text, the normalized values of all action indicators of the historical policy text are averaged to obtain the quantitative evaluation value of the historical core sentence of the historical policy text.
6. The method according to claim 5, characterized in that According to the values of each action indicator after the release of all historical policy texts, the normalized values of each action indicator after the release of each historical policy text are calculated, including: The following formula is used to calculate the normalized value of each action indicator after the release of each historical policy text: Among them, v· is the normalized action index value, v is the action index value after the release of the historical policy text, is the median of the positive action indicator values in all historical policy texts, is the median of the negative action indicator values in all historical policy texts.
7. The method according to claim 3, characterized in that The classification label of each set of historical comparison data is determined according to the difference in the quantitative evaluation values of the two historical core sentences in each set of historical comparison data, including: Use the following formula to determine the classification label of historical comparison data: Among them, (a, b) is the historical comparison data, a and b are historical core sentences, (a, b)Label is the label of the historical comparison data (a, b), and ε is the tolerance value.
8. The method according to claim 1, characterized in that According to the classification of the reasoning comparison data and the quantitative evaluation value of the historical core sentences in the reasoning comparison data, the quantitative evaluation value of the core sentence to be analyzed is calculated, including: Filtering out the reasoning comparison data of a preset category from all the reasoning comparison data, wherein the preset category indicates that the degree of tightness corresponding to the core sentences in the reasoning comparison data is similar; The quantitative evaluation values of the historical core sentences in the screened reasoning comparison data are weighted and averaged to obtain the quantitative evaluation values of the core sentences of the policy text to be analyzed.
9. The method according to claim 1, characterized in that Also includes: According to the quantitative evaluation value of the core sentence to be analyzed, the estimated adjustment range of the policy text to be analyzed is calculated by reverse normalization.
10. A policy text interpretation device, characterized in that: include: A core sentence extraction unit is used to extract the core sentences to be analyzed from the policy text to be analyzed; A comparison prediction unit, used for inputting the core sentence to be analyzed and the historical core sentences of each historical policy text as a set of inference comparison data into the pre-trained core sentence comparison model, and predicting the classification of the inference comparison data; An evaluation unit, used to calculate the quantitative evaluation value of the core sentence to be analyzed according to the classification of the reasoning comparison data and the quantitative evaluation value of the historical core sentence in the reasoning comparison data; Among them, the core sentence comparison model is obtained by training a comparison deep learning network model using historical comparison data consisting of historical core sentences of every two historical policy texts and the classification labels of the historical comparison data; the classification labels of the historical comparison data are determined according to the difference in quantitative evaluation values of the two historical core sentences in the historical comparison data, and the quantitative evaluation value of the core sentence reflects the tightness of the policy adjustment action.
11. A computer device 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 method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor of a computer device, the method according to any one of claims 1 to 9 is implemented.
13. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor of a computer device, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Policy interpretation method and system based on deep learning
CN109493265A
Article duplicate checking method and system
CN109918670A
Key sentence extraction method and device
CN110852064A
Policy text analysis method
CN118966192A
Device and method for retrieving information, dictionary preparing device and program
JP2010266970A