Method, system, medium and equipment for analyzing relation between external information and market factors
Through the analysis method based on GPT, the news description unit and the market status description unit are constructed, combined with the preset output format and thinking chain, the problem of lack of automation and large-scale analysis of the relationship analysis of foreign information and market factors in the existing technology is solved, and the problem of the lack of automation and large-scale analysis of the relationship between foreign information and market factors in the existing technology is realized. Fast and accurate analysis and prediction results.
Patent Information
- Application Number
- CN202411264607.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art lacks automated and large-scale analysis methods in the analysis of the relationship between foreign information and market factors, and relies on manual interpretation and is susceptible to subjective factors.
Using GPT-based analysis method, by constructing news description units and market status description units, combining preset output formats and thinking chains, prompt data is generated and input into the GPT model, to achieve rapid and accurate analysis of the relationship between foreign information and market factors. .
It realizes rapid and accurate analysis and prediction of the relationship between foreign information and market factors, provides an interpretable reasoning chain, reduces the time and energy of manual interpretation, and reduces the influence of subjective factors.
Smart Images

Figure CN119396949A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning and data processing technology, and in particular to a method, system, medium and device for analyzing the relationship between external information and market factors. Background Art
[0002] In the application scenario of analyzing external information and market factors, in the early days, news and market data needed to be manually interpreted. Analysts studied a large number of news articles, reports and market data, and used experience and expertise to identify possible correlations and trends. This method takes a lot of time and effort and is easily affected by subjective factors. In general, there is a lack of automated and large-scale analysis methods for the task of analyzing the relationship between external information and market factors.
[0003] With the technological development in the fields of computer science and data science, people have gradually introduced more advanced technologies and methods. Among them, natural language processing technology is used to help process and analyze large amounts of text data, so that the model can understand the semantics of external information and correctly interpret the content of external information. In this regard, a good language model is the basis for correctly interpreting and reasoning about text.
[0004] In recent years, large language models (LLMs) have demonstrated outstanding capabilities in the field of natural language processing, including natural language generation, language translation, text summarization, and dialogue systems. Some of the classic models, such as GPT-4, BERT, and XLNet, have been widely used. The full name of GPT is Generative Pre-Trained Transformer, which is a deep learning model for text generation based on the Internet and trained with available data. In particular, the subsequent models of the GPT series (such as GPT3, GPT3.5, and GPT4) have demonstrated powerful language understanding and logical reasoning capabilities with the help of larger corpora and more parameters. However, in actual applications, it is found that GPT does not always provide high-quality answers. Among them, the answer of GPT is highly dependent on the instruction (Prompt) of the question. How to construct a good prompt to obtain a satisfactory answer has become a difficult problem. When the prompt is not well constructed, GPT may give vague answers, such as "unable to judge", or provide wrong or inaccurate answers, or refuse to answer, or even make up false answers. This situation may be due to the limitations or defects of the model on certain specific questions. Although the GPT series of models perform well on many tasks, they still need to be applied with caution and combined with other verification and inspection methods to ensure the accuracy of the results. Summary of the invention
[0005] The purpose of the present invention is to provide a method, system, medium and device for analyzing the relationship between external information and market factors, so as to solve the problem of analyzing the relationship between external information and market factors.
[0006] In a first aspect, the present application provides a method for analyzing the relationship between external information and market factors, the method comprising:
[0007] Construct a GPT-based news description unit to obtain news summary description;
[0008] Constructing a market status description unit to obtain a market status description, wherein the market status description at least includes price trends, price volatility, and trading activity;
[0009] Obtain system principles, combine preset output formats and preset thinking chains to get prompt generators;
[0010] The news summary description and the market status description are input into the prompt generator to obtain prompt data, and the prompt data is input into a preset GPT model to obtain an analysis result.
[0011] In a possible implementation of the present application, the construction of a GPT-based news description unit to obtain a news summary description specifically includes:
[0012] Acquire external information and perform preprocessing on it segment by segment to obtain target news data, wherein the target news data includes news features, wherein the news features at least include company code, date, news title and news text;
[0013] The target news data is input into the preset GPT model segment by segment for processing to obtain the news summary description.
[0014] In a possible implementation of the present application, the step of obtaining external information and preprocessing it segment by segment to obtain target news data specifically includes:
[0015] Connect the headline and body of the news to form a complete text;
[0016] Standardizing punctuation marks in the complete text;
[0017] The paragraph length value of each complete text is checked and compared with a preset value. If the paragraph length value is greater than the preset value, the current complete text is segmented until the length value of the news paragraph after segmentation is less than or equal to the preset value.
[0018] In a possible implementation of the present application, when the target news data is input into the preset GPT model segment by segment, the summary description of the previous paragraph is used as the new input data of the preset GPT model after being connected with the news data of the next paragraph. If the paragraph length value of the new input data exceeds the preset value, the new input data is segmented and cut until the paragraph length value of the new input data after cutting is less than or equal to the preset value.
[0019] In a possible implementation of the present application, the constructing of the market status description unit to obtain the market status description specifically includes:
[0020] Acquire original market status time series data, wherein the time series features of the original market status time series data at least include company code, date, opening price sequence, closing price sequence, highest price sequence, lowest price sequence, trading volume sequence and turnover rate sequence;
[0021] The original market status time series data is processed and converted using a statistical model and a tsfresh library to generate the market status description.
[0022] In a possible implementation of the present application, the acquisition system principle, combined with a preset output format and a preset thinking chain to obtain a prompt generator, specifically includes:
[0023] Obtaining system principles of user-side input to limit the response domain of the prompt generator and the GPT model;
[0024] Using a context learning method as the preset output format to determine the text output format of the prompt generator;
[0025] The inference conclusion of the prompt generator is determined based on the inference requirements and inference format in the thought chain.
[0026] In a possible implementation of the present application, the method further includes calculating an evaluation index, wherein the evaluation index includes precision and recall.
[0027] In a second aspect, the present application provides a system for analyzing the relationship between external information and market factors, the system comprising:
[0028] News description module, used to construct a GPT-based news description unit to obtain news summary description;
[0029] A market status description module, used to construct a market status description unit to obtain a market status description, wherein the market status description at least includes price trends, price volatility and trading activity;
[0030] An acquisition module is used to acquire system principles and obtain a prompt generator by combining a preset output format and a preset thinking chain;
[0031] An input module is used to input the news summary description and the market status description into the prompt generator to obtain prompt data, and input the prompt data into a preset GPT model to obtain an analysis result.
[0032] In a third aspect, the present application provides a computer-readable storage medium as described above, on which a computer program is stored, and when the program is executed by a processor, the method for analyzing the relationship between the external information and market factors is implemented.
[0033] In a fourth aspect, the present application provides an electronic device as mentioned above, comprising: a processor and a memory; wherein the memory is used to store a computer program, and the processor is used to load and execute the computer program so that the electronic device executes the analysis method of the relationship between external information and market factors.
[0034] As described above, the analysis method, system, medium and device for the relationship between external information and market factors of the present invention, through rigorous and ingenious design of instructions, can realize rapid and accurate analysis and prediction of the relationship between external information and market factors by using the GPT model, so as to provide reference for users and help them analyze market dynamics. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A diagram showing a scenario application of the method for analyzing the relationship between external information and market factors of the present invention in one embodiment;
[0036] Figure 2 It is a schematic diagram showing the steps of a method for analyzing the relationship between external information and market factors in one embodiment of the present invention;
[0037] Figure 3 Shown is a schematic diagram of the analysis process of the method for analyzing the relationship between external information and market factors in one embodiment of the present invention;
[0038] Figure 4 It is a schematic diagram showing the steps of a method for analyzing the relationship between external information and market factors in one embodiment of the present invention;
[0039] Figure 5 It is a schematic diagram showing the steps of a method for analyzing the relationship between external information and market factors in one embodiment of the present invention;
[0040] Figure 6 It is a schematic diagram showing the steps of a method for analyzing the relationship between external information and market factors in one embodiment of the present invention;
[0041] Figure 7 It is a schematic diagram showing the steps of a method for analyzing the relationship between external information and market factors in one embodiment of the present invention;
[0042] Figure 8 Shown is a schematic diagram of a text output format of an analysis method of the relationship between external information and market factors in one embodiment of the present invention;
[0043] Fig. 9 Shown is a schematic diagram of the ICLPrompt results of an analysis method of the relationship between external information and market factors in one embodiment of the present invention;
[0044] Fig.10 It is a schematic diagram showing the result of the thought chain of an embodiment of the method for analyzing the relationship between external information and market factors of the present invention;
[0045] Fig.11 A schematic diagram showing the results of the system principle of the method for analyzing the relationship between external information and market factors in one embodiment of the present invention;
[0046] Fig.12 It is a schematic diagram showing the reasoning conclusion of the analysis method of the relationship between external information and market factors in one embodiment of the present invention;
[0047] Fig.13 Shown is a schematic diagram of the structure of an analysis system for the relationship between external information and market factors in one embodiment of the present invention;
[0048] Fig.14 Shown is a schematic structural diagram of an electronic device in an embodiment of the present invention.
[0049] Component number description
[0050] Steps S202 to S208
[0051] Steps S402 to S404
[0052] Steps S502 to S506
[0053] Steps S602 to S604
[0054] Steps S702 to S706
[0055] 130 Analysis system of the relationship between external information and market factors
[0056] 131 News description module
[0057] 132 Market status description module
[0058] 133 Get Module
[0059] 134 Input Module DETAILED DESCRIPTION
[0060] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0061] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0062] Given the advantages of natural language processing technology in processing large-scale data and providing automated analysis, we can apply natural language processing technology to the task of analyzing the relationship between external information and market factors, which helps to provide more objective, comprehensive, accurate and fast results. Therefore, the present invention applies GPT to the task of analyzing the relationship between external information and market factors to obtain better analysis results. In order to quickly and accurately analyze the relationship between external information and market factors, the present invention proposes an analysis method for the relationship between external information and market factors. By rigorously and cleverly designing the instructions, GPT is used to realize the analysis and prediction of the relationship between external information and market factors. Figure 1 , which is a scenario application diagram of the analysis method of the relationship between external information and market factors described in the present invention. Compared with the traditional time series model, the present invention utilizes the powerful language knowledge base and excellent reasoning ability of GPT to combine past and current market status information with external information for analysis, specifically evaluate external information such as news, and predict future changes in market factors, while providing an explainable reasoning chain. Among them, the specific input parameters include news and market status descriptions. Through these inputs, the proposed method is used for analysis and reasoning, and the output result is the reasoning and prediction conclusion of market factors such as future price trends, price volatility, and trading activity.
[0063] Specifically, see Figure 2 In one embodiment of the invention, the method for analyzing the relationship between external information and market factors of the invention comprises the following steps:
[0064] Step S202, constructing a news description unit based on GPT to obtain a news summary description;
[0065] Step S204, constructing a market status description unit to obtain a market status description, wherein the market status description at least includes price trends, price volatility and trading activity;
[0066] Step S206, obtaining system principles, combining a preset output format and a preset thinking chain to obtain a prompt generator;
[0067] Step S208, input the news summary description and the market status description into the prompt generator to obtain prompt data, and input the prompt data into a preset GPT model to obtain an analysis result.
[0068] It should be noted that, in this embodiment, Figure 3 As shown, it is a schematic diagram of the analysis process of the analysis method of the relationship between external information and market factors of the present invention, wherein the core of the analysis lies in the prompt generator "M", and the input of the prompt generator "M" includes the news summary description "S" and the market status description "T", as well as the system principle "P" set by itself. In specific applications, how to obtain the news summary description is obtained by constructing a news description unit based on GPT, and the specific acquisition steps will be explained in subsequent embodiments, wherein the obtained news summary description conforms to a specific output format; and how to obtain the market status description is obtained by constructing a market status description unit, and similarly, the specific acquisition steps will be explained in the following embodiments. As described in the continued embodiment, the obtained market status description specifically includes price trends, price volatility and trading activity, wherein the optional values of price trends include decline, shock and rise; the optional values of price volatility are low and high; the optional values of trading activity are low, medium and high. Therefore, in specific applications, the obtained news summary description "S" and the market status description "T" are input into the prompt generator with the system principle "P" to obtain the prompt data, and then the prompt data is input into the preset GPT model to obtain the analysis result corresponding to the score, wherein the corresponding output analysis result is the reasoning and prediction conclusion of market factors such as future price trends, price volatility, trading activity, etc.
[0069] Further, in one embodiment of the invention, the news description unit based on GPT is constructed to obtain a news summary description, such as Figure 4 As shown, the specific steps include:
[0070] Step S402, obtaining external information and performing segment-by-segment preprocessing to obtain target news data, wherein the target news data includes news features, wherein the news features at least include company code, date, news title, and news text;
[0071] Step S404, inputting the target news data into a preset GPT model segment by segment for processing to obtain the news summary description.
[0072] It should be noted that, in this embodiment, how to obtain the news summary description is specifically explained, wherein, specifically, firstly, a news description unit based on GPT is constructed, and the obtained external information is processed segment by segment to obtain the target news data, wherein the target news data includes news features, wherein the news features include at least company code, date, news title and news text; and then the processed target news data is input segment by segment into the corresponding preset GPT model to obtain the news summary description corresponding to the current external information.
[0073] Specifically, in one embodiment of the invention, Figure 5 As shown, the acquisition of external information and preprocessing of each section to obtain target news data specifically includes the following steps:
[0074] Step S502, connecting the title and the body of the news to merge into a complete text;
[0075] Step S504, standardizing the punctuation marks in the complete text;
[0076] Step S506, checking the paragraph length value of each complete text and comparing it with a preset value, wherein if the paragraph length value is greater than the preset value, the current complete text is segmented until the length value of the news paragraph after segmentation is less than or equal to the preset value.
[0077] It should be noted that in this embodiment, the above embodiment describes that the target news data specifically includes four news features, namely, company code, date, news title and news text. When processing the target news data, it is necessary to connect the news title and text and merge them into a complete text; and standardize the punctuation marks in the news text to ensure the consistency and correctness of the marks; and at the same time, it is necessary to check the length of each news paragraph and compare it with the preset value. If a paragraph exceeds the preset value, the paragraph is cut into two paragraphs, and the above operation is repeated until the length of all news paragraphs meets the requirement. In addition, when the target news data is input into the preset GPT model segment by segment, the summary description of the previous segment is used as the above and connected with the news data of the next segment as the new input data of the preset GPT model, wherein, if the paragraph length value of the new input data exceeds the preset value, the new input data is segmented and cut until the paragraph length value of the new input data after cutting is less than or equal to the preset value. Specifically, if the new input data exceeds the length limited by the GPT model, the news segment is divided into two segments, one part is used as the current input, and the other part is input into the GPT model later as a new segment.
[0078] Further, in one embodiment of the invention, if Figure 6 As shown, the step of constructing a market status description unit to obtain a market status description specifically includes the following steps:
[0079] Step S602, obtaining original market status time series data, wherein the time series features of the original market status time series data at least include company code, date, opening price sequence, closing price sequence, highest price sequence, lowest price sequence, trading volume sequence and turnover rate sequence;
[0080] Step S604: Process and transform the original market status time series data using a statistical model and a tsfresh library to generate the market status description.
[0081] It should be noted that, in this embodiment, how to obtain the market status description is specifically explained, wherein, specifically, by using the statistical model and the tsfresh library, the original market status data is processed and converted to generate a market status description containing three dimensions: price trend, price volatility and trading activity. First, the input original market status time series data specifically includes company code, date, opening price sequence, closing price sequence, highest price sequence, lowest price sequence, trading volume sequence and turnover rate sequence, totaling "8" time series features. These sequences are recorded as daily frequency data and contain at least one month of original market status data. Then, by using the statistical model and calling the tsfresh library, the original market status time series data is converted into a market status description. Accordingly, the market status description contains three dimensions, namely, price trend, price volatility and trading activity, wherein the optional values of price trend include decline, shock and rise; the optional values of price volatility are low and high; the optional values of trading activity are low, medium and high.
[0082] Further, in one embodiment of the invention, if Figure 7 As shown, the system principle is obtained, and the prompt generator is obtained by combining the preset output format and the preset thinking chain, which specifically includes the following steps:
[0083] Step S702, obtaining a system principle input by a user terminal to limit the response domain of the prompt generator and the GPT model;
[0084] Step S704, using a context learning method as the preset output format to determine a text output format of the prompt generator;
[0085] Step S706, determining the reasoning conclusion of the prompt generator based on the reasoning requirements and reasoning format in the thought chain.
[0086] It should be noted that, in this embodiment, the content of constructing the prompt generator is specifically described, wherein, specifically, the prompt generator described in the present invention specifically adopts the In Context Learning Prompt (ICLPrompt) method, the system principle (system principle) design and the Chain-of-Thought (CoT) composition, wherein, for the system principle, it is a necessary and important component of the prompt generator. The system principle of the present invention can enable the GPT model to limit the field of answers to market-related, and dare to make reliable judgments on prices, volatility and trading activity. For example, in actual application, you can add the system principle of "You are an honest stock analyst who has read a lot of Chinese news. You are good at reading and understanding the news, and then reasoning and judging the impact of the news on prices, volatility and trading activity, and you can do it very well" to limit the response field of the prompt generator and the GPT model.
[0087] Furthermore, the ICL prompt method is used to make the output of GPT conform to the template. Accordingly, the template in this embodiment is as follows: Figure 8 As shown, the key idea of ICL Prompt is to learn from analogy. The present invention implements ICL Prompt by adding expected answer templates and answer examples to the original input text of the GPT model.
[0088] Furthermore, a thought chain is added to the prompt generator. The method of adding a thought chain is to attach the requirements and reasoning format that need to be reasoned to the original input text of the GPT model, and guide the model to generate reasonable results through a linear chain pattern. The model combines the market status description and news, and attaches the reasoning process and conclusion when predicting each dimension of the future market status description, providing explainability for the model and making the model more transparent.
[0089] Furthermore, in one embodiment of the invention, the method further comprises calculating an evaluation index, wherein the evaluation index comprises precision and recall.
[0090] It should be noted that, in this embodiment, the volatility and trading activity are taken as two market factors to explore the changes of market factors under the influence of external information. Specifically, the precision and recall are used as evaluation indicators, and the calculation method is as follows:
[0091]
[0092] Among them, the results after the analysis and prediction of the present invention are shown in Table 1. Among them, it can be seen from the experimental results that the present invention has excellent prediction capabilities for volatility-decline, activity-decline, and activity-increase, which positively shows that there is a strong correlation between some external information and market factors. In addition, although the prediction effect of activity-oscillation is not good, it is specifically caused by the limitation of the data set. The data set used by the present invention is a news data set, but not every piece of news has an impact on market factors. There may be ambiguous and insignificant news in the data set. When applied, the data set composed of all news that have a greater impact on market factors is used, and the effect of the prediction analysis can also be improved.
[0093] Table 1. Prediction results analysis table
[0094]
[0095] Specifically, in actual application, taking "XX Pharmaceutical" as an example, the corresponding external information is: "XX Pharmaceutical: The company has been engaged in nucleoside (acid) raw materials and pharmaceutical intermediates for many years. It is one of the earliest domestic companies specializing in nucleoside (acid) products; According to Meike AI News, an investor asked a question on the investor interaction platform: Why did Real Bio choose to cooperate with your company to jointly develop Azvudine as a national Class 1.1 innovative drug?" The corresponding original market status time series data is shown in Table 2, including "opening price, highest price, lowest price, closing price, trading volume, trading amount and market value".
[0096] Table 2. Original market status time series data
[0097] Opening Price Highest Price Lowest Price Closing Price Trading Volume Transaction amount Market Cap 71.69 75.58 71.63 73.88 4256180 312418524.0 2032175.20 73.88 74.50 67.00 67.21 5879456 414110140.0 1848707.29 69.00 72.27 68.34 69.18 3995270 280265701.0 1902894.97 69.00 73.88 69.00 71.66 6009232 430710138.0 1971110.92 72.00 74.44 68.88 71.37 5632040 403968423.0 1963134.05
[0098] In this regard, the text output format is determined based on the context learning method of the present invention, such as Fig. 9 As shown, it is a schematic diagram of the ICL Prompt result of the present invention, wherein it can be clearly seen that the text output format with ICL Prompt of the present invention is more organized than the text output format without ICL Prompt. Further, as Fig.10 As shown, it is a schematic diagram of the result of the thought chain of the present invention, in which it can be clearly seen that the reasoning conclusion with the thought chain CoT of the present invention is more convincing than the reasoning conclusion without the thought chain. Similarly, Fig.11 As shown, it is a schematic diagram of the results of the system principle of the present invention. Among them, the system principle set by the present invention can obviously make the conclusion clearer, while the conclusion without the system principle cannot be judged. Finally, the news summary description and market status description corresponding to the current "XX Pharmaceutical" are input into the prompt generator with system principle of the present invention to obtain the corresponding prompt data, and then input into the GPT model. The inference conclusion obtained is as follows Fig.12 shown.
[0099] The embodiments of the present application also provide an analysis system for the relationship between external information and market factors. The analysis system for the relationship between external information and market factors can implement the analysis method for the relationship between external information and market factors described in the present application. However, the implementation device of the analysis method for the relationship between external information and market factors described in the present application includes but is not limited to the structure of the analysis system for the relationship between external information and market factors listed in the embodiments. All structural deformations and replacements of the prior art made according to the principles of the present application are included in the protection scope of the present application.
[0100] See also Fig.13 In one embodiment, this embodiment provides an analysis system 130 for the relationship between external information and market factors, the system comprising:
[0101] A news description module 131, used to construct a news description unit based on GPT to obtain a news summary description;
[0102] A market status description module 132, configured to construct a market status description unit to obtain a market status description, wherein the market status description includes at least price trends, price volatility, and trading activity;
[0103] An acquisition module 133 is used to acquire system principles and obtain a prompt generator in combination with a preset output format and a preset thinking chain;
[0104] The input module 134 is used to input the news summary description and the market status description into the prompt generator to obtain prompt data, and input the prompt data into a preset GPT model to obtain an analysis result.
[0105] Since the specific implementation of this embodiment corresponds to the aforementioned method embodiment, the same details will not be repeated here, and those skilled in the art should also understand that Fig.13 The division of the modules in the embodiment is merely a division of logical functions, and in actual implementation, all or part of them can be integrated into one or more physical entities, and these modules can be implemented entirely in the form of software called by processing elements, or entirely in the form of hardware, or some modules can be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware.
[0106] See also Fig.14 This embodiment provides an electronic device. Specifically, the electronic device includes at least a memory and a processor connected via a bus, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to execute all or part of the steps in the aforementioned method embodiment.
[0107] In summary, the present invention uses a rigorous and ingenious design of instructions and the GPT model to quickly and accurately analyze and predict the relationship between external information and market factors, so as to provide a reference for users and help them analyze market dynamics.
[0108] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that 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 modules or units, which can be electrical, mechanical or other forms.
[0109] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0110] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in 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 the above description according to function. 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 this application.
[0111] The present application embodiment also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by a program to instruct the processor, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state hard disk (SSD)), etc.
[0112] The present application embodiment may also provide a computer program product, the computer program product including one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer or data center.
[0113] When the computer program product is executed by a computer, the computer executes the method described in the above method embodiment. The computer program product may be a software installation package, and when the above method is required, the computer program product may be downloaded and executed on a computer.
[0114] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0115] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A method for analyzing the relationship between external information and market factors, characterized in that: include: Construct a GPT-based news description unit to obtain news summary description; Constructing a market status description unit to obtain a market status description, wherein the market status description at least includes price trends, price volatility, and trading activity; Obtain system principles, combine preset output formats and preset thinking chains to get prompt generators; The news summary description and the market status description are input into the prompt generator to obtain prompt data, and the prompt data is input into a preset GPT model to obtain an analysis result.
2. The method for analyzing the relationship between external information and market factors according to claim 1, characterized in that: The construction of a GPT-based news description unit to obtain a news summary description specifically includes: Acquire external information and perform preprocessing on it segment by segment to obtain target news data, wherein the target news data includes news features, wherein the news features at least include company code, date, news title and news text; The target news data is input into the preset GPT model segment by segment for processing to obtain the news summary description.
3. The method for analyzing the relationship between external information and market factors according to claim 2, characterized in that: The step of obtaining external information and preprocessing it segment by segment to obtain target news data specifically includes: Connect the headline and body of the news to form a complete text; Standardizing punctuation marks in the complete text; The paragraph length value of each complete text is checked and compared with a preset value. If the paragraph length value is greater than the preset value, the current complete text is segmented until the length value of the news paragraph after segmentation is less than or equal to the preset value.
4. The method for analyzing the relationship between external information and market factors according to claim 2, characterized in that: When the target news data is input into the preset GPT model paragraph by paragraph, the summary description of the previous paragraph is used as the new input data of the preset GPT model after being connected with the news data of the next paragraph. If the paragraph length value of the new input data exceeds the preset value, the new input data is segmented and cut until the paragraph length value of the new input data after cutting is less than or equal to the preset value.
5. The method for analyzing the relationship between external information and market factors according to claim 2, characterized in that: The step of constructing a market status description unit to obtain a market status description specifically includes: Acquire original market status time series data, wherein the time series features of the original market status time series data at least include company code, date, opening price sequence, closing price sequence, highest price sequence, lowest price sequence, trading volume sequence and turnover rate sequence; The original market status time series data is processed and converted using a statistical model and a tsfresh library to generate the market status description.
6. The method for analyzing the relationship between external information and market factors according to claim 5, characterized in that: The acquisition system principle, combined with the preset output format and the preset thinking chain, obtains the prompt generator, which specifically includes: Obtaining system principles of user-side input to limit the response domain of the prompt generator and the GPT model; Using a context learning method as the preset output format to determine the text output format of the prompt generator; The inference conclusion of the prompt generator is determined based on the inference requirements and inference format in the thought chain.
7. The method for analyzing the relationship between external information and market factors according to claim 6, characterized in that: The method further includes calculating an evaluation metric, wherein the evaluation metric includes precision and recall.
8. An analysis system for the relationship between external information and market factors, characterized in that: include: News description module, used to construct a GPT-based news description unit to obtain news summary description; A market status description module, used to construct a market status description unit to obtain a market status description, wherein the market status description at least includes price trends, price volatility and trading activity; An acquisition module is used to acquire system principles and obtain a prompt generator by combining a preset output format and a preset thinking chain; An input module is used to input the news summary description and the market status description into the prompt generator to obtain prompt data, and input the prompt data into a preset GPT model to obtain an analysis result.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the analysis method of the relationship between external information and market factors as described in any one of claims 1 to 7.
10. An electronic device, characterized in that: The electronic device comprises: a processor and a memory; wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the analysis method of the relationship between external information and market factors as described in any one of claims 1 to 7.