A method and device for generating a financial article, a computer device and a storage medium
By acquiring the discrete and continuous features of historical financial articles, a financial article template is generated. Then, using generative adversarial networks and the BERT model, the target financial article is automatically matched and generated. This solves the problem of the large amount of manpower and time required to write financial articles, and achieves efficient and high-quality article generation.
Patent Information
- Application Number
- CN202211422777.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-11-14
AI Technical Summary
Writing financial articles requires a lot of manpower and time, making it difficult to guarantee the timeliness and quality of the articles.
By acquiring the discrete and continuous features of historical financial articles, financial article templates are generated, and target financial articles are automatically matched and generated using generative adversarial networks and the BERT model.
It enables efficient and high-quality generation of financial articles, saves labor costs, and can monitor changes in financial indices around the clock, responding quickly and generating relevant articles.
Smart Images

Figure CN115905470B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, and in particular to a method and device for generating a financial article, a computer device and a storage medium. BACKGROUND
[0002] With the rapid progress of technology, thanks to the popularity of the Internet, the cost of information acquisition has been reduced, and the speed of information update has reached an unprecedented level, while the amount of information acquired has become increasingly large. The previous financial articles relied on the editing team to collect, write and push financial information in real time. However, due to the particularity of financial articles, not only does the editing team need to have a certain professional background, but also needs to pay close attention to the changes of related financial events, prices and indexes. This makes the editing work not only tedious and consumes a lot of manpower, but also makes it difficult to ensure the timeliness and quality of the articles at the same time. If urgent articles are needed, more time and effort need to be spent to ensure that the writing work is completed timely and efficiently. SUMMARY
[0003] The embodiments of the present application provide a method and device for generating a financial article, a computer device and a storage medium to solve the problem of consuming a lot of manpower and time cost in the writing of financial articles, effectively improving the real-time nature of the articles while ensuring the quality of the articles.
[0004] In a first aspect, a method for generating a financial article is provided, the method comprising:
[0005] obtaining different historical financial articles, the historical financial articles comprising historical text information and historical index information;
[0006] performing feature extraction on the historical text information to obtain historical discrete features;
[0007] performing feature extraction on index features of the historical index information to obtain historical continuous features;
[0008] generating a plurality of different financial article templates according to the historical discrete features and the historical continuous features of the different historical financial articles and storing the plurality of different financial article templates;
[0009] performing feature extraction on index features of target index information to obtain target continuous features;
[0010] matching a target financial article template from the stored plurality of different financial article templates according to the target continuous features;
[0011] generating a target financial article according to the target index information and the target financial article template.
[0012] Further, the performing feature extraction on the historical text information to obtain historical discrete features comprises:
[0013] performing word vector conversion on the historical text information to obtain word vector features;
[0014] performing article classification on the historical financial article according to the word vector features to obtain an article classification label of the historical financial article;
[0015] performing bearish classification on the historical financial article according to the word vector features to obtain a bearish classification label of the historical financial article;
[0016] performing entity extraction on the historical financial article according to the word vector features to obtain entity features of the historical financial article;
[0017] The historical discrete features include the article classification label, the bearish classification label, and the entity features.
[0018] Further, the feature extraction on the index features of the historical index information to obtain historical continuous features includes:
[0019] analyzing changes in indicators in the historical index information over time periods to obtain historical index changes of the historical index information;
[0020] extracting financial derivatives indicators from the historical index information to obtain historical related derivative coefficients of the historical index information;
[0021] estimating and analyzing the historical index changes and the historical related derivative coefficients to estimate the value of the index, and taking the estimated value as the historical continuous features.
[0022] Further, the generation of a plurality of different financial article templates according to different historical discrete features and historical continuous features of the historical financial article and storage includes:
[0023] inputting the historical discrete features and the historical continuous features of the historical financial article into a generative adversarial network to generate a candidate financial article template to be tested;
[0024] embedding the historical discrete features and the historical continuous features of the historical financial article into the candidate financial article template to generate a test text;
[0025] comparing the test text with the original historical financial article in terms of restoration degree to test whether the candidate financial article template meets the restoration degree requirement;
[0026] When the test text has sufficient restoration degree, the candidate financial article template passes the test.
[0027] When the candidate financial article template passes the test, the candidate financial article template that passes the test is stored.
[0028] Further, the index features of the target index information are extracted to obtain target continuous features, including:
[0029] The slope of the index change of the target index information is analyzed to obtain an index slope of the target index information.
[0030] The critical value of the target index information within a certain time period is analyzed to obtain an index threshold of the target index information.
[0031] The index types of the target index information are summarized to obtain index types of the target index information.
[0032] The target continuous features include the index slope, the index threshold, and the index types.
[0033] Further, the index features of the target index information are extracted to obtain target continuous features, including:
[0034] The slope of the index change of the target index information is analyzed to obtain an index slope of the target index information.
[0035] The critical value of the target index information within a certain time period is analyzed to obtain an index threshold of the target index information.
[0036] The index types of the target index information are summarized to obtain index types of the target index information.
[0037] The target continuous features include the index slope, the index threshold, and the index types.
[0038] Further, the index information within a specified time range is obtained as a training set, and the index features of the training set are extracted to obtain training set features, including:
[0039] The slope of the index change of the training set is analyzed to obtain an index slope of the target index information.
[0040] The critical value of the training set within a certain time period is analyzed to obtain an index threshold of the target index information.
[0041] The index types of the training set are summarized to obtain index types of the target index information.
[0042] The training set features include the index slope, the index threshold, and the index types.
[0043] In a second aspect, an apparatus for automatically generating a financial article is provided, comprising:
[0044] an acquisition module configured to acquire different historical financial articles, the historical financial articles comprising historical text information and historical index information;
[0045] a historical discrete feature extraction module configured to extract features from the historical text information to obtain historical discrete features;
[0046] a historical continuous feature extraction module configured to extract features from index features of the historical index information to obtain historical continuous features;
[0047] a template generation module configured to generate a plurality of different financial article templates according to the historical discrete features and the historical continuous features of the different historical financial articles and store the templates;
[0048] a target continuous feature extraction module configured to extract features from index features of target index information to obtain target continuous features;
[0049] a selection module configured to match a target financial article template from the stored plurality of different financial article templates according to the target continuous features;
[0050] an article generation module configured to generate a target financial article according to the target index information and the target financial article template.
[0051] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method for automatically generating a financial article when executing the computer program.
[0052] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, wherein the computer program implements the steps of the above method for automatically generating a financial article when executed by a processor.
[0053] The above method, apparatus, computer device, and storage medium for generating a financial article make the text editing work free from traditional manuscript writing, efficiently complete the writing task, save the labor cost, and improve the work efficiency, compared with the way of relying on manpower and manually editing articles. Moreover, the above method, apparatus, computer device, and storage medium can continuously pay attention to the changes of financial indices all day long, quickly respond to the changes of financial indices, and timely, efficiently, and high-quality generate corresponding articles. BRIEF DESCRIPTION OF DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those of ordinary skill in the art without any creative effort based on these drawings.
[0055] Figure 1 is a system framework schematic diagram of the method for automatically generating financial articles in an embodiment of the present application;
[0056] Figure 2 is a flow chart of the method for automatically generating financial articles in an embodiment of the present application;
[0057] Figure 3 is a flow chart of the method for automatically generating financial articles in an embodiment of the present application;
[0058] Figure 4 is a flow chart of the method for automatically generating financial articles in an embodiment of the present application;
[0059] Figure 5 is a flow chart of the method for automatically generating financial articles in an embodiment of the present application;
[0060] Figure 6 is a flow chart of the method for automatically generating financial articles in an embodiment of the present application;
[0061] Figure 7 is a schematic diagram of the device for automatically generating financial articles in an embodiment of the present application;
[0062] Figure 8 is a schematic diagram of the computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0063] The technical solutions of the embodiments of the present application will be described clearly and completely in the following with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all the other embodiments obtained by those of ordinary skill in the art without any creative effort belong to the scope of protection of the present application.
[0064] The method for generating financial articles provided by the embodiments of the present application can be applied in the system framework as shown in Figure 1 Specifically, the method for generating financial articles is applied in the system for automatically generating financial articles, and the system for automatically generating financial articles includes the system framework as shown in Figure 1The illustrated client and server communicate over a network to enable efficient and high-quality automatic generation of financial articles without human intervention. The client, also known as the user end, is a program that provides local services for the client corresponding to the server. The client can be installed on, but not limited to, various personal computers, notebook computers, smartphones, tablet computers and portable wearable devices. The server can be implemented by a standalone server or a server cluster composed of multiple servers.
[0065] In an embodiment, as shown in Figure 2 , a method for generating financial articles is provided. Taking the server in Figure 1 as an example, the method includes the following steps:
[0066] S10: Obtain different historical financial articles, which include historical text information and historical index information.
[0067] In this step, a large number of historical financial articles need to be collected, and the collected historical financial articles are used as raw data. The raw data is divided into two different paths for separate processing. The two different paths process historical text information and historical index information, respectively.
[0068] The historical text information includes but is not limited to the text content of the collected historical financial articles, the comment content of the articles, etc. The historical index information includes the financial index in the collected historical financial articles and the related derivative coefficients of the financial index.
[0069] It should be noted that in actual application, the way of collecting a large number of historical financial articles includes but is not limited to web crawler crawling, specific interface acquisition, manual collection and other automatic or manual text information and financial data information acquisition methods.
[0070] S20: Feature extraction is performed on the historical text information to obtain historical discrete features.
[0071] In the path of processing historical text information, the historical text information is taken as raw data, and feature extraction is performed on the historical text information to obtain a plurality of original features. Then, the plurality of original features are input into different classification models to obtain a plurality of different types of features, which are taken as historical discrete features.
[0072] S30: Feature extraction is performed on the index features of the historical index information to obtain historical continuous features.
[0073] In the path of processing historical index information, the historical index information is taken as original data, and the historical index information is processed to obtain a plurality of original features. Then, a time period is set, and the plurality of original features are input into different training models set in the time period to obtain a plurality of different types of features in the time period, and the features are taken as historical continuous features in the time period.
[0074] It should be noted that in the process of obtaining historical continuous features, the set time period can be set in combination with experience or demand, and can be set by manual input, application submission or interface acquisition, and the way and range of setting the time period are not limited.
[0075] In addition, in the embodiment of the present application, steps S20 and S30 are not limited in execution sequence.
[0076] S40: generating and storing a plurality of different financial article templates according to different historical discrete features and historical continuous features of the historical financial articles.
[0077] After the historical continuous features and the historical discrete features of the historical financial articles are selected by the model, the historical continuous features and the historical discrete features are taken as input variables and input into a training generation model to generate and store a plurality of different financial article templates.
[0078] It should be noted that the generated financial article template has a plurality of slots. The slots are key nodes for subsequent article generation, and the operation will be filled in one by one in subsequent operations.
[0079] S50: extracting features of index features of target index information to obtain target continuous features.
[0080] In this step, a target range is set, and index information in the target range is collected as target index information. The target index information is taken as original data, and the original data is processed to obtain a plurality of index features. The plurality of index features are extracted to obtain a plurality of types of features, and the features are target continuous features.
[0081] It should be noted that in the process of setting the target range, the set target can be set in combination with experience or demand, and can be set by manual input, application submission or interface acquisition, and the way and range of setting the target are not limited.
[0082] S60: matching a target financial article template from the stored plurality of different financial article templates according to the target continuous features.
[0083] After the model selects the target continuous features, the target continuous features are used as input variables to train the selection model, which then matches the target financial article template from multiple stored financial article templates.
[0084] S70: Generate a target financial article based on the target index information and the target financial article template. After selecting the target financial article template, the target index information is vectorized to obtain the vector features of the target index information; based on the vector features, the target index information is filled into the target financial article template, and the filling result is used as the target financial article.
[0085] Compared to the traditional method of manually collecting vast amounts of financial information and then manually writing articles, the solution presented in this example not only frees text editing from traditional handwritten manuscripts, efficiently completing writing tasks, saving labor costs, and improving work efficiency, but also enables continuous monitoring of changes in financial indices around the clock, allowing for rapid responses to these changes and the timely, efficient, and high-quality generation of corresponding articles.
[0086] In one embodiment, such as Figure 3 As shown, step S20, which involves extracting features from the historical text information to obtain historical discrete features, specifically includes the following steps:
[0087] S21: Perform word vector transformation on the historical text information to obtain word vector features.
[0088] S22: Classify the historical financial articles based on the word vector features to obtain the article classification labels of the historical financial articles.
[0089] S23: Based on the word vector features, classify the historical financial articles into negative categories to obtain negative category labels for the historical financial articles.
[0090] S24: Extract entities from the historical financial articles based on the word vector features to obtain the entity features of the historical financial articles.
[0091] In this embodiment, historical textual information related to the financial field is primarily used as input for word vector conversion. Based on the word vector features, the historical financial articles are classified, entity extracted, and classified as bearish, resulting in historical discrete features. These historical discrete features include, but are not limited to, article classification labels, bearish classification labels, and entity features. These historical discrete features will serve as input for subsequent article generation. Article classification includes, but is not limited to, futures research, market consulting, and fund research; bearish classification refers to determining whether an article is bearish or bullish; and entity features include, but are not limited to, place names, institution names, time, date, currency, and percentages.
[0092] In steps S22-S24, the historical text information is converted into a word vector, and the obtained word vector features are used as one of the input features in each classification training model for feature extraction. The classification training model includes but is not limited to article classification, bearish classification, and entity extraction.
[0093] In this embodiment, the word vector conversion and classification training model preferably use a BERT model, which is a pre-trained language representation model. Other common machine learning models can also be used. For example, the bull and bear classification model can use a binary classification related machine learning model, and the classification training model is not limited in this embodiment.
[0094] In addition, in the embodiment of the present application, steps S22-S24 are not limited in execution order.
[0095] In this embodiment, the historical financial articles are subjected to feature extraction, so that more diverse financial article templates can be generated based on the article classification, bearish classification, and entity features of the historical financial articles. In the subsequent selection of financial article templates, the most similar financial article templates can be better matched.
[0096] In an embodiment, as shown in FIG. 3, in step S30, the index features of the historical index information are subjected to feature extraction to obtain historical continuous features, including the following steps: Figure 4
[0097] S31: Analyzing the changes of the indicators in the historical index information over time periods to obtain the historical index changes of the historical index information.
[0098] S32: Extracting financial derivative indicators from the historical index information to obtain the historical related derivative coefficients of the historical index information.
[0099] S33: Estimating and analyzing the historical index changes and the historical related derivative coefficients to estimate the index value, and using the estimated value as the historical continuous features.
[0100] In this embodiment, a time period range is mainly set to obtain historical continuous features in the set time period. The historical continuous features refer to the estimation of relevant historical index information, including but not limited to historical index indicators, historical index changes, and historical index information derivative coefficients, etc. Among them, the historical index indicators include but are not limited to relevant technical indicators of historical indexes, such as momentum indexes, index averages, closing prices, etc. The historical index changes include but are not limited to index slopes and index thresholds. And the historical index information derivative coefficients include but are not limited to trading volumes, turnover rates, and heat, etc.
[0101] Specifically, in steps S31-S32, some indicators in the historical index information will change with the time period in the set time period range. The changes include but are not limited to period-on-period changes and year-on-year changes, etc. For example, the daily closing prices of listed stocks are accumulated day by day. If the closing price of the day is higher than that of the previous day, the historical index change is positive, otherwise it is negative, and if the prices are the same, it is 0.
[0102] Among them, for step S33, an index to be valued is set, and the historical index changes and historical derivative coefficients obtained in the foregoing are used to evaluate the index to be valued in the interval to estimate the valuation of the index to be valued in the time period. For example, the Dow Jones Oil Index needs to be valued in 2014-2021, and the Dow Jones Oil Index is obtained in the time period from 2014 to 2021. The valuation of the Dow Jones Oil Index in the time period is estimated to be a large increase.
[0103] In addition, in the embodiment of the present application, steps S31 and S32 are not limited in execution order.
[0104] In this embodiment, the relevant content in the historical index information is valued, which can better generate corresponding target financial article templates according to different valuation situations, so that the generated templates have diversity, and the target index information is more accurately embedded into the slot of the target financial article template in the subsequent process, so as to ensure the quality of the finally generated target article.
[0105] In an embodiment, as shown in Figure 5 In step S40, a plurality of different financial article templates are generated and stored according to different historical discrete features and historical continuous features of the historical financial articles, specifically including the following steps:
[0106] S41: inputting the historical discrete features and historical continuous features of the historical financial articles into a generative adversarial network to generate a candidate financial article template to be tested.
[0107] S42: embedding the historical discrete features and the historical continuous features of the historical financial article into the candidate financial article template to generate a test text.
[0108] S43: comparing the test text with the original historical financial article in terms of restoration degree to test whether the candidate financial article template meets the restoration degree requirement.
[0109] S44: when the test text has sufficient restoration degree, the candidate financial article template passes the test.
[0110] S45: when the candidate financial article template passes the test, the candidate financial article template that passes the test is stored.
[0111] In this embodiment, for steps S41-S43, the historical discrete features and the historical continuous features extracted from the historical financial article are input into a generative adversarial network model to generate a test financial article template. The generated financial article template has multiple slots. The historical discrete features and the historical continuous features are embedded into the slots of the generated test article template to generate a test text. Whether the test text can be restored to the historical financial article is compared. Preferably, the generative adversarial network model is used to generate the template through mutual game playing, and the restoration comparison between the test text and the original text is made by the generative adversarial network. The generated financial article template not only effectively reflects the diversity of the text, but also is closer to natural language.
[0112] In step S41, the model for generating the financial article template used in this embodiment includes but is not limited to a generative adversarial network model, a GPT series model (Generative Pre-trained Transformer, a pre-trained language model), etc. In this embodiment, the generative adversarial network model is used. The generator sentence vector is mainly used to restore the test financial article template with more randomness, so as to better optimize the generator in the process of mutual game playing between the generator and the discriminator.
[0113] In addition, steps S44-S45 also include obtaining a very high loss function and gradient direction when the candidate financial article test fails. The process of generating the candidate financial article is optimized according to the loss function and the gradient direction. Thus, the training model of the generated template is optimized.
[0114] It is worth noting that the generative adversarial network model is used in this embodiment, as long as the discriminator is well trained, the generator can perfectly learn the distribution of the training features, so as to generate a target article template better than other training models. This makes the final generated target financial article template closer to the high-quality template written by artificial, which will have the advantages of approaching natural language, article timeliness and high-quality guarantee.
[0115] In an embodiment, as shown in FIG. 6, in step S60, a target financial article template is matched from a plurality of different stored financial article templates according to the target continuous feature, which includes the following steps: Figure 7
[0116] S61: Obtain the index information in a specified time range as a training set, and perform feature extraction on the index features of the training set to obtain training set features;
[0117] S62: Input the training set features into a financial article template selection learning model, and perform template selection training on a plurality of different stored financial article templates to obtain a financial article template classifier;
[0118] S63: Input the target continuous feature into the financial article template classifier, so that the financial article template classifier classifies and counts the target continuous feature, and selects a target financial article template with the most matched features according to the classification and counting result.
[0119] In step S61 of this embodiment, the index information in a certain time range is obtained in advance, and the index information is input into the training model as a training set for feature extraction to obtain training set features. For example, the Shanghai Composite Index information today is obtained, and the Shanghai Composite Index today is obtained through feature extraction. The training set features include but are not limited to index values, index types, index thresholds and index slopes, etc. The index values include but are not limited to Dow Jones Industrial Average, NASDAQ, Hong Kong Hang Seng Index and Cinda Index, etc. The index types include but are not limited to industry index, theme index, etc. Among them, the industry index is an index developed by an index development company for a certain industry, such as Cinda Environmental Protection, Cinda Medical, etc., and the theme index refers to an index tracking a certain theme, for example, Cinda Old-age Industry Theme Index, etc. The certain time range includes but is not limited to a day, a minute, a month and a year, etc. For example, the non-performing loan rate of a certain bank last year is obtained in advance, input into the training model, and the non-performing loan rate as a training set feature is obtained.
[0120] In step S62, the extracted training set features are input into the financial article template selection learning model. The model selects from multiple different financial article templates based on the classification and quantity of the training set features. The trained model will then be used as a financial article template classifier in subsequent template selection. For example, if the target continuous feature includes both index type and index slope, it must be matched to a financial article template that requires both index type and index slope features, but not to a template that only requires index type, or to a template that requires all three features: index type, index value, and index slope.
[0121] In steps S61-63, feature extraction and classification are performed on the exponential features of the training set, using the same method as in steps S21-S24. The BERT model is preferred, but other relevant machine learning training models can also be used. No limitations are imposed on the techniques used for feature extraction and classification. Furthermore, all other techniques involving feature extraction and classification in this application, while preferably using the BERT model, can also employ other machine learning models. No limitations are imposed on the techniques used for feature extraction and classification in this application.
[0122] In this embodiment, the target continuous features are input into the financial article template classifier. The classifier determines the category and quantity of the target continuous features and then selects the most matching target financial article template. This ensures that the target continuous features can be appropriately embedded into the target financial article template during subsequent article generation, resulting in a high-quality financial article.
[0123] It should be understood that the sequence number of each step in the above embodiments does not imply 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.
[0124] In one embodiment, an apparatus for automatically generating financial articles is provided, which corresponds one-to-one with the method for generating financial articles in the above embodiments. For example... Figure 7 As shown, the device for automatically generating financial articles includes an acquisition module 10, a historical discrete feature extraction module 20, a historical continuous feature extraction module 30, a template generation module 40, a target continuous feature extraction module 50, a selection module 60, and an article generation module 70. Detailed descriptions of each functional module are as follows:
[0125] The acquisition module 10 is used to acquire different historical financial articles, which include historical text information and historical index information;
[0126] The historical discrete feature extraction module 20 is used to extract features from the historical text information to obtain historical discrete features.
[0127] a historical continuous feature extraction module 30 configured to perform feature extraction on the index features of the historical index information to obtain historical continuous features;
[0128] a template generation module 40 configured to generate and store a plurality of different financial article templates according to the historical discrete features and the historical continuous features of different historical financial articles;
[0129] a target continuous feature extraction module 50 configured to perform feature extraction on the index features of the target index information to obtain target continuous features;
[0130] a selection module 60 configured to match a target financial article template from the stored plurality of different financial article templates according to the target continuous features;
[0131] an article generation module 70 configured to generate a target financial article according to the target index information and the target financial article template.
[0132] The specific limitations of the device for automatically generating a financial article can refer to the limitations of the method for automatically generating a financial article described above, and will not be repeated here. The various modules in the device for automatically generating a financial article described above can be realized by software, hardware, and combinations thereof, in whole or in part. The various modules described above can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the various modules.
[0133] In one embodiment, a computer device is provided, which can be a server, and the internal structure diagram thereof can be as shown in Figure 8 The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store data collected and generated in the process of generating a financial article. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a method for generating a financial article.
[0134] In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
[0135] Obtaining different historical financial articles, the historical financial articles including historical text information and historical index information;
[0136] Feature extraction is performed on the historical text information to obtain historical discrete features;
[0137] Feature extraction is performed on index features of the historical index information to obtain historical continuous features;
[0138] According to the historical discrete features and the historical continuous features of the different historical financial articles, a plurality of different financial article templates are generated and stored;
[0139] Feature extraction is performed on index features of target index information to obtain target continuous features;
[0140] According to the target continuous features, a target financial article template is matched from the stored plurality of different financial article templates;
[0141] According to the target index information and the target financial article template, a target financial article is generated.
[0142] In one embodiment, a computer readable storage medium is provided, and a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to implement the following steps:
[0143] Obtaining different historical financial articles, the historical financial articles including historical text information and historical index information;
[0144] Feature extraction is performed on the historical text information to obtain historical discrete features;
[0145] Feature extraction is performed on index features of the historical index information to obtain historical continuous features;
[0146] According to the historical discrete features and the historical continuous features of the different historical financial articles, a plurality of different financial article templates are generated and stored;
[0147] Feature extraction is performed on index features of target index information to obtain target continuous features;
[0148] According to the target continuous features, a target financial article template is matched from the stored plurality of different financial article templates;
[0149] According to the target index information and the target financial article template, a target financial article is generated.
[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above-described functions.
[0152] The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method of generating a financial article, characterized by, The method comprises the following steps: acquiring different historical financial articles, the historical financial articles comprising historical text information and historical index information; performing feature extraction on the historical text information to obtain historical discrete features; performing feature extraction on index features of the historical index information to obtain historical continuous features; generating a plurality of different financial article templates according to the historical discrete features and the historical continuous features of the different historical financial articles and storing the templates; performing feature extraction on index features of target index information to obtain target continuous features; matching a target financial article template from the stored plurality of different financial article templates according to the target continuous features; generating a target financial article according to the target index information and the target financial article template; the step of performing feature extraction on the index features of the target index information to obtain the target continuous features comprises the following steps: performing slope analysis on index changes of the target index information to obtain an index slope of the target index information; analyzing critical values of the target index information within a certain time period to obtain an index threshold of the target index information; and summarizing and organizing index types of the target index information to obtain an index type of the target index information; and the target continuous features comprise the index slope, the index threshold and the index type; the step of matching the target financial article template from the stored plurality of different financial article templates according to the target continuous features comprises the following steps: acquiring index information within a specified time range as a training set, performing feature extraction on index features of the training set to obtain training set features; inputting the training set features into a financial article template selection learning model to perform template selection training on the plurality of different financial article templates stored in the model to obtain a financial article template classifier; and inputting the target continuous features into the financial article template classifier to enable the financial article template classifier to classify and count the target continuous features and select a target financial article template with the most matched features according to the classification and counting results.
2. The method of generating a financial article of claim 1, wherein, the step of performing feature extraction on the historical text information to obtain historical discrete features comprises the following steps: performing word vector conversion on the historical text information to obtain word vector features; performing article classification on the historical financial articles according to the word vector features to obtain article classification labels of the historical financial articles; performing bearish classification on the historical financial articles according to the word vector features to obtain bearish classification labels of the historical financial articles; performing entity extraction on the historical financial articles according to the word vector features to obtain entity features of the historical financial articles; the historical discrete features comprise the article classification labels, the bearish classification labels and the entity features.
3. The method of generating a financial article of claim 1, wherein, the step of performing feature extraction on index features of the historical index information to obtain historical continuous features comprises the following steps: analyzing changes of indexes in the historical index information over time periods to obtain historical index changes of the historical index information; extracting financial derivative indexes from the historical index information to obtain historical related derivative coefficients of the historical index information; The historical index changes and historical related derivative coefficients are estimated and analyzed to estimate the index value, which is then used as a historical continuous feature.
4. The method for generating a financial article of claim 1, wherein, The process involves generating and storing multiple different financial article templates based on the historical discrete and historical continuous characteristics of the historical financial articles, including: The historical discrete and continuous features of the historical financial articles are input into a generative adversarial network to generate candidate financial article templates to be tested. The historical discrete and continuous features of the historical financial articles are embedded into the candidate financial article template to generate test text; The test text is compared with the original historical financial article in terms of fidelity to test whether the candidate financial article template meets the fidelity requirements. When the test text meets the fidelity requirement, the candidate financial article template passes the test. Once the candidate financial article template passes the test, the candidate financial article template that has passed the test will be stored.
5. An apparatus for automatically generating a financial article, the apparatus comprising: include: The acquisition module is used to acquire different historical financial articles, which include historical text information and historical index information. The historical discrete feature extraction module is used to extract features from the historical text information to obtain historical discrete features. The historical continuous feature extraction module is used to extract features from the index features of the historical index information to obtain historical continuous features. The template generation module is used to generate and store multiple different financial article templates based on the historical discrete and historical continuous characteristics of the different historical financial articles. The target continuous feature extraction module is used to extract the index features of the target index information to obtain the target continuous features; The selection module is used to match a target financial article template from multiple different stored financial article templates based on the target continuous features. The article generation module is used to generate a target financial article based on the target index information and the target financial article template. The apparatus for automatically generating financial articles is used to implement the method as described in claim 1.
6. 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, it implements the steps of the method for generating financial articles as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, wherein the computer program comprises the following steps of: receiving a request for a resource from a client; determining whether the client is authorized to access the resource; and if the client is authorized to access the resource, providing the resource to the client. When the computer program is executed by a processor, it implements the steps of the method for generating financial articles as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Web news text-based rapid land cover change detection method and system
CN107885833A
Article generation method and device and storage medium
CN111476011A