Financial product K line sequence data analysis method and device, electronic equipment and medium

By converting the K-line sequence data of financial products into images and using convolutional layers for analysis, the problems of excessive consumption of computing resources and information loss in financial data analysis are solved, and efficient and accurate data analysis and information fusion are achieved.

CN119810624AActive Publication Date: 2025-04-11CSC FINANCIAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510295338.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-04-11
Estimated Expiration
2045-03-13

AI Technical Summary

Technical Problem

When analyzing financial data, we face excessive consumption of computing resources caused by large amount of data and loss of key information caused by unreasonable compression methods, which affects the ability to integrate information in the later stage.

Method used

By converting the K-line sequence data of financial products into images, an image containing information such as price, opening, closing, trading volume, etc. is generated, and data analysis is performed using convolutional layers and convolution filters of different gradient scales.

Benefits of technology

It reduces the computing resources required for data analysis, improves the accuracy and efficiency of data analysis, avoids information loss, and enhances information fusion capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810624A_ABST
    Figure CN119810624A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a financial product K-line sequence data analysis method and device, electronic equipment and a medium, and relates to the technical field of image processing, and the method comprises the steps: obtaining a first K-line data sequence of a target financial product; based on the first K-line data sequence, a first image is generated, each first pixel column in the first image corresponds to a first time period, and color values of pixel points in first pixel rows corresponding to the highest price and the lowest price are set as first color values; color values of pixel points between the second pixel rows corresponding to the opening price and the closing price are set as first color values; the color value of a pixel point between a third pixel row corresponding to the transaction volume and a third pixel row corresponding to the first preset minimum transaction volume is set as a first color value; and performing data analysis on the target financial product based on the generated image. By applying the scheme provided by the embodiment of the invention, computing resources consumed during analysis of the financial data can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, electronic device and medium for analyzing K-line sequence data of financial products. Background Art

[0002] Analysts and researchers in the financial field need to analyze various financial series data in their financial analysis work, and there are many types of financial data. Taking stocks as an example, the stock time series data that need to be analyzed are often financial series data of multiple time periods such as every trading day, every 5 trading days, 22 trading days, and 66 trading days, and it is often necessary to conduct an overall analysis of the financial data collected in accordance with the above time periods over a long period of time. There are many types of financial data that need to be analyzed, and each type also involves multi-period statistical calculations, and the total amount of data is large. When the analysis results are used for further artificial intelligence model training, there are problems such as computing pressure caused by insufficient data compression rate, and the loss of key information caused by unreasonable information compression methods, which affects the weak ability of later information fusion. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method, device, electronic device and medium for analyzing K-line sequence data of financial products, so as to reduce the computing resources consumed when analyzing financial data. The specific technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for analyzing K-line sequence data of a financial product, the method comprising:

[0005] Acquire a first K-line data sequence of a target financial product, wherein the first K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each first time period;

[0006] Based on the first K-line data sequence, a first image is generated, wherein the first image includes a first part, a second part and a third part;

[0007] Each first pixel column in the first image corresponds to a first time period, each first pixel row in the first part corresponds to a price value, the difference between the price values ​​corresponding to adjacent first pixel rows is a first preset value, and within each first pixel column, the color values ​​of the pixels in the first pixel row corresponding to the highest price and the lowest price in the first time period corresponding to the first pixel column are set to the first color value;

[0008] Each second pixel row of the second part corresponds to a price value, the difference between the price values ​​corresponding to adjacent second pixel rows is a second preset value, and in each first pixel column, the color values ​​of the pixels between the second pixel rows corresponding to the opening price and the closing price in the first time period corresponding to the first pixel column are all set to the first color value;

[0009] Each third pixel row of the third part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent third pixel rows is a third preset value, and in each first pixel column, the color values ​​of the pixels between the third pixel row corresponding to the transaction volume in the first time period corresponding to the first pixel column and the third pixel row corresponding to the first preset minimum transaction volume are all set to the first color value;

[0010] The color value of the pixel point that is not set in the first image is a second color value, and the first color value is different from the second color value;

[0011] Based on the generated image, data analysis is performed on the target financial product.

[0012] In one embodiment of the present application, before performing data analysis on the target financial product based on the generated image, the method further includes:

[0013] Acquire a second K-line data sequence of the target financial product, wherein the second K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each second time period, and the duration of the second time period is shorter than the duration of the first time period;

[0014] Based on the second K-line data sequence, a second image is generated, wherein the second image includes a fourth part, a fifth part, and a sixth part;

[0015] Each second pixel column in the second image corresponds to a second time period, each fourth pixel row in the fourth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fourth pixel rows is a fourth preset value, and within each second pixel column, the color value of the pixel point in the fourth pixel row corresponding to the highest price and the lowest price in the second time period corresponding to the second pixel column is set to a third color value;

[0016] Each fifth pixel row of the fifth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fifth pixel rows is a fifth preset value, and in each second pixel column, the color values ​​of the pixels between the fifth pixel rows corresponding to the opening price and the closing price in the second time period corresponding to the second pixel column are all set to the third color value;

[0017] Each sixth pixel row of the sixth part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent sixth pixel rows is a sixth preset value, and in each second pixel column, the color values ​​of the pixels between the sixth pixel row corresponding to the transaction volume in the second time period corresponding to the second pixel column and the sixth pixel row corresponding to the second preset minimum transaction volume are all set to the third color value;

[0018] The color value of the pixel point that is not set in the second image is a fourth color value, and the third color value is different from the fourth color value.

[0019] In one embodiment of the present application, before performing data analysis on the target financial product based on the generated image, the method further includes:

[0020] Acquire a third data sequence of the trading market for trading the target financial product, wherein the third data sequence includes trading indicator data of the trading duration in each third time period;

[0021] Based on the third data sequence, generate a third image;

[0022] Each second pixel column in the third image corresponds to a third time period, each seventh pixel row in the third image corresponds to a transaction index data value, the difference between transaction index data values ​​corresponding to adjacent seventh pixel rows is a seventh preset value, and within each third pixel column, the color value of the pixel point of the third pixel row corresponding to the transaction index data in the third time period corresponding to the third pixel column is set to the fifth color value;

[0023] The color value of the pixel point that is not set in the second image is the sixth color value, and the fifth color value is different from the sixth color value.

[0024] In one embodiment of the present application, the step of obtaining a first K-line data sequence of a target financial product includes:

[0025] Acquire multiple first K-line data sequences of the target financial product, wherein different first K-line data sequences correspond to first time periods of different lengths, and each first K-line data sequence contains the same number of data items;

[0026] The grayscale values ​​of the pixels in the first part of the first image are different based on different first K-line data sequences; the color values ​​of the pixels in the second part and the third part are set based on the first K-line data sequence corresponding to the shortest first time period.

[0027] In one embodiment of the present application, the step of obtaining a second K-line data sequence of a target financial product includes:

[0028] Acquire multiple second K-line data sequences of the target financial product, wherein different second K-line data sequences correspond to different second time periods, and each second K-line data sequence contains the same number of data items;

[0029] The grayscale values ​​of the pixels in the fourth part of the second image are different based on different second K-line data sequences, and the color values ​​of the pixels in the fifth and sixth parts are set based on the second K-line data sequence corresponding to the second time period with the longest duration.

[0030] In one embodiment of the present application, the performing data analysis on the target financial product based on the generated image includes:

[0031] The generated image is input into an image analysis model to obtain a data analysis result of the target financial product output by the image analysis model, wherein the image analysis model includes a convolution layer, and the convolution layer includes convolution filters of different gradient scales.

[0032] In a second aspect, an embodiment of the present application provides a financial product K-line sequence data analysis device, the device comprising:

[0033] A first sequence acquisition module, configured to acquire a first K-line data sequence of a target financial product, wherein the first K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each first time period;

[0034] A first image generating module, configured to generate a first image based on the first K-line data sequence, wherein the first image includes a first part, a second part and a third part;

[0035] Each first pixel column in the first image corresponds to a first time period, each first pixel row in the first part corresponds to a price value, the difference between the price values ​​corresponding to adjacent first pixel rows is a first preset value, and within each first pixel column, the color values ​​of the pixels in the first pixel row corresponding to the highest price and the lowest price in the first time period corresponding to the first pixel column are set to the first color value;

[0036] Each second pixel row of the second part corresponds to a price value, the difference between the price values ​​corresponding to adjacent second pixel rows is a second preset value, and in each first pixel column, the color values ​​of the pixels between the second pixel rows corresponding to the opening price and the closing price in the first time period corresponding to the first pixel column are all set to the first color value;

[0037] Each third pixel row of the third part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent third pixel rows is a third preset value, and in each first pixel column, the color values ​​of the pixels between the third pixel row corresponding to the transaction volume in the first time period corresponding to the first pixel column and the third pixel row corresponding to the first preset minimum transaction volume are all set to the first color value;

[0038] The color value of the pixel point that is not set in the first image is a second color value, and the first color value is different from the second color value;

[0039] A data analysis module is used to perform data analysis on the target financial product based on the generated image.

[0040] In one embodiment of the present application, the device further includes:

[0041] A second sequence acquisition module, configured to acquire a second K-line data sequence of a target financial product, wherein the second K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each second time period, and the duration of the second time period is shorter than the duration of the first time period;

[0042] A second image generating module, used for generating a second image based on the second K-line data sequence, wherein the second image includes a fourth part, a fifth part and a sixth part;

[0043] Each second pixel column in the second image corresponds to a second time period, each fourth pixel row in the fourth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fourth pixel rows is a fourth preset value, and within each second pixel column, the color value of the pixel point in the fourth pixel row corresponding to the highest price and the lowest price in the second time period corresponding to the second pixel column is set to a third color value;

[0044] Each fifth pixel row of the fifth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fifth pixel rows is a fifth preset value, and in each second pixel column, the color values ​​of the pixels between the fifth pixel rows corresponding to the opening price and the closing price in the second time period corresponding to the second pixel column are all set to the third color value;

[0045] Each sixth pixel row of the sixth part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent sixth pixel rows is a sixth preset value, and in each second pixel column, the color values ​​of the pixels between the sixth pixel row corresponding to the transaction volume in the second time period corresponding to the second pixel column and the sixth pixel row corresponding to the second preset minimum transaction volume are all set to the third color value;

[0046] The color value of the pixel point that is not set in the second image is a fourth color value, and the third color value is different from the fourth color value.

[0047] In one embodiment of the present application, the device further includes:

[0048] A third sequence acquisition module, used to acquire a third data sequence of the trading market for trading the target financial product, wherein the third data sequence includes trading indicator data of the trading duration in each third time period;

[0049] A third image generating module, used for generating a third image based on the third data sequence;

[0050] Each second pixel column in the third image corresponds to a third time period, each seventh pixel row in the third image corresponds to a transaction index data value, the difference between transaction index data values ​​corresponding to adjacent seventh pixel rows is a seventh preset value, and within each third pixel column, the color value of the pixel point of the third pixel row corresponding to the transaction index data in the third time period corresponding to the third pixel column is set to the fifth color value;

[0051] The color value of the pixel point that is not set in the second image is the sixth color value, and the fifth color value is different from the sixth color value.

[0052] In one embodiment of the present application, the first sequence acquisition module is specifically used to:

[0053] Acquire multiple first K-line data sequences of the target financial product, wherein different first K-line data sequences correspond to first time periods of different lengths, and each first K-line data sequence contains the same number of data items;

[0054] The grayscale values ​​of the pixels in the first part of the first image are different based on different first K-line data sequences; the color values ​​of the pixels in the second part and the third part are set based on the first K-line data sequence corresponding to the shortest first time period.

[0055] In one embodiment of the present application, the second sequence acquisition module is specifically used to:

[0056] Acquire multiple second K-line data sequences of the target financial product, wherein different second K-line data sequences correspond to different second time periods, and each second K-line data sequence contains the same number of data items;

[0057] The grayscale values ​​of the pixels in the fourth part of the second image are different based on different second K-line data sequences, and the color values ​​of the pixels in the fifth and sixth parts are set based on the second K-line data sequence corresponding to the second time period with the longest duration.

[0058] In one embodiment of the present application, the data analysis module is specifically used to:

[0059] The generated image is input into an image analysis model to obtain a data analysis result of the target financial product output by the image analysis model, wherein the image analysis model includes a convolution layer, and the convolution layer includes convolution filters of different gradient scales.

[0060] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0061] Memory, used to store computer programs;

[0062] The processor is used to implement the method steps described in any one of the first aspects when executing the program stored in the memory.

[0063] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of the first aspects are implemented.

[0064] In a fifth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect above.

[0065] Beneficial effects of the embodiments of the present application:

[0066] The financial product K-line sequence data analysis method provided in the embodiment of the present application can generate a first image based on the first K-line data sequence of the target financial product. The color value of the pixel in the first image can represent the various data recorded in the first K-line data sequence, that is, the present application can integrate the information recorded in the first K-line data sequence with a large amount of data into a first image, and the data analysis process of the financial product can be completed by processing the first image later, saving the computing resources required for subsequent data analysis. In addition, the first image only contains pixel points whose color values ​​are the first color value or the second color value, and the color information of the image is relatively simple, and a large amount of noise will not be introduced due to the complex color of the pixel points. Therefore, the signal-to-noise ratio of the first image is relatively high, which is conducive to improving the accuracy and efficiency of subsequent data analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0068] Figure 1 A schematic diagram of the flow of the first financial product K-line sequence data analysis method provided in the embodiment of the present application;

[0069] Figure 2 A schematic diagram of a processing flow of an image analysis model provided in an embodiment of the present application;

[0070] Figure 3 A schematic diagram of a first image provided in an embodiment of the present application;

[0071] Figure 4 A schematic diagram of the flow of the second financial product K-line sequence data analysis method provided in the embodiment of the present application;

[0072] Figure 5 A schematic diagram of the flow of a third financial product K-line sequence data analysis method provided in an embodiment of the present application;

[0073] Figure 6 A schematic diagram of the structure of a financial product K-line sequence data analysis device provided in an embodiment of the present application;

[0074] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0076] Since the amount of financial data in the related technology is large, data analysis requires a lot of computing resources. In order to solve the above problem, the embodiments of the present application provide a method, device, electronic device and medium for analyzing K-line sequence data of financial products.

[0077] See also Figure 1 , which is a flow chart of the first financial product K-line sequence data analysis method provided in an embodiment of the present application, including the following steps S101-S103.

[0078] S101: Acquire the first K-line data sequence of the target financial product.

[0079] The first K-line data sequence includes the highest price, lowest price, opening price, closing price, and trading volume of the target financial product in each first time period. The first K-line data sequence comes from the K-line information of the target financial product. The source and collection method of the K-line information can be found in the relevant technology and will not be described in detail here.

[0080] For example, when the first time period is one day, the first K-line data sequence includes the highest price, lowest price, opening price, closing price, and trading volume of the target financial product on each day.

[0081] When the first time period is 5 days, for each day, the first K-line data sequence includes the highest price, lowest price, opening price, closing price and trading volume in the past 5 days with that day as the last day.

[0082] When the first time period is 22 days, for each day, the first K-line data sequence includes the highest price, lowest price, opening price, closing price and trading volume in the past 22 days with that day as the last day.

[0083] When the first time period is 66 days, for each day, the first K-line data sequence includes the highest price, the lowest price, the opening price, the closing price and the trading volume in the past 66 days with the day as the last day.

[0084] It should be noted that since the target financial product may not be traded on every natural day, when counting the first K-line data series, only the data of the target financial product on the trading day can be counted. In this case, the above-mentioned "each day" means each trading day, the last 5 days means the last 5 trading days, and so on.

[0085] In addition, the above-mentioned target financial products may be stocks, futures, funds, gold and other products, that is, the embodiments of the present application are applicable to stock data analysis, futures data analysis, fund data analysis, gold data analysis and the like.

[0086] Furthermore, if the target financial product is not traded on a certain day or several days due to factors such as suspension, the first K-line data sequence does not include data in the first time period corresponding to the target financial product including the time interval in which no trading was performed.

[0087] In another embodiment of the present application, the data recorded in the above-mentioned first K-line data sequence can be original data. Alternatively, the above-mentioned highest price, lowest price, opening price, and closing price can also be data scaled to integers after scaling the original collected actual prices in equal proportion. For example, a vertical axis scaling method can be adopted, and the present application will not repeat the specific scaling method. The data contained in the first K-line data sequence can be simplified by scaling, and the simplified data can facilitate the subsequent generation of the first image.

[0088] S102: Generate a first image based on the first K-line data sequence.

[0089] The first image includes a first part, a second part and a third part.

[0090] Specifically, the first part, the second part and the third part are arranged up and down in the first image. In a possible case, the first part, the second part and the third part are arranged from bottom to top in the first image, or are arranged in other orders.

[0091] (I) For the first part, each first pixel column in the above-mentioned first image corresponds to a first time period, each first pixel row in the above-mentioned first part corresponds to a price value, the difference between the price values ​​corresponding to adjacent first pixel rows is a first preset value, and in each first pixel column, the color value of the pixel point in the first pixel row corresponding to the highest price and the lowest price in the first time period corresponding to the first pixel column is set to the first color value.

[0092] In one embodiment of the present application, the above-mentioned first preset value can be set according to actual needs, and the price value corresponding to the first pixel row at the bottom of the first part and the price value corresponding to the first pixel row at the top are set, so as to determine the price value corresponding to each first pixel row and then set it.

[0093] In another embodiment of the present application, the first part may include x first pixel columns and y first pixel rows. In this case, the highest price and the lowest price of each first time period originally collected may be equally scaled to an integer value in the interval (0, y-1). In this case, the price value corresponding to the first pixel row at the bottom of the first part is 0, the price value corresponding to the first pixel row at the top is y-1, and the difference between the price values ​​corresponding to adjacent first pixel rows is 1. The first pixel row corresponding to the minimum value of all the lowest and highest prices obtained after scaling is the lowest row of the first part, and the first pixel row corresponding to the maximum value of all the lowest and highest prices obtained after scaling is the highest row of the first part. In this case, there may be no first pixel row whose color values ​​of all pixels are not configured at the top and bottom of the first part, thereby reducing the image size of the first part.

[0094] In addition, if there is no data corresponding to one or some first time periods in the first K-line data sequence due to data collection failure or suspension of trading, the color value of the first part of the pixels in the first pixel column corresponding to the first time period will not be set.

[0095] After completing the color value setting, the first part can reflect the fluctuation of the highest price and the lowest price over time.

[0096] (ii) For the second part, each second pixel row of the second part corresponds to a price value, the difference between the price values ​​corresponding to adjacent second pixel rows is a second preset value, and within each first pixel column, the color values ​​of the pixel points between the second pixel rows corresponding to the opening price and the closing price in the first time period corresponding to the first pixel column are all set to the first color value.

[0097] In one embodiment of the present application, the above-mentioned second preset value can be set according to actual needs, and the price value corresponding to the second pixel row at the bottom of the second part and the price value corresponding to the second pixel row at the top are set, so as to determine the price value corresponding to each second pixel row and then set it.

[0098] In another embodiment of the present application, the second part includes x first pixel columns and z second pixel rows. For each first time period, the original collected opening price and closing price corresponding to the first time period are subtracted from the minimum value of the two to obtain the updated opening price and closing price. Afterwards, the updated opening price and closing price corresponding to each first time period are scaled to an integer value within the interval (0, z-1) to obtain the opening price and closing price contained in the first K-line data sequence. In this case, the price corresponding to the second pixel row at the bottom of the second part is 0, the price corresponding to the second pixel row at the top is z-1, and the difference between the price values ​​corresponding to the adjacent second pixel rows is 1. The second pixel row corresponding to the minimum value of all the opening prices and closing prices finally obtained is the bottom row of the second part, and the minimum value of each group of opening prices and closing prices finally obtained is 0, which corresponds to the second pixel row at the bottom in the second part. The second pixel row corresponding to the maximum value of all the lowest prices and highest prices finally obtained is the top row of the second part. In this case, there can be no second pixel row at the top of the second part where the color values ​​of all pixels are not configured, and there may be only one second pixel row at the bottom corresponding to the minimum value of all opening prices and closing prices, where the color values ​​of all pixels are configured as the first color value. Thus, the image size of the second part can be reduced.

[0099] After the setting, for each second pixel column, the more pixels whose color values ​​are set to the first color value in the second pixel column, the larger the absolute value of the difference between the opening price and the closing price of the first time period corresponding to the second pixel column, indicating that the price of the target financial product has a greater change from the beginning to the end of the first time period.

[0100] In addition, if there is no data corresponding to one or some first time periods in the first K-line data sequence due to data collection failure or suspension of trading, the color value of the second part of the pixel points in the first pixel column corresponding to the first time period will not be set.

[0101] (III) With respect to the third part, each third pixel row of the third part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent third pixel rows is a third preset value, and within each first pixel column, the color values ​​of the pixel points between the third pixel row corresponding to the transaction volume in the first time period corresponding to the first pixel column and the third pixel row corresponding to the first preset minimum transaction volume are both set to the first color value.

[0102] The first preset minimum transaction volume may be 0, or may be the minimum value of all transaction volumes recorded in the first K-line data sequence.

[0103] In one embodiment of the present application, the above-mentioned third preset value can be set according to actual needs, and the transaction volume value corresponding to the third pixel row at the bottom of the third part and the transaction volume value corresponding to the third pixel row at the top are set, so as to determine the transaction volume value corresponding to each third pixel row, and then set it.

[0104] In another embodiment of the present application, the third part includes x first pixel columns and p third pixel rows. For each first time period, the original collected transaction volume corresponding to the first time period is subtracted from the first preset minimum transaction volume to obtain the updated transaction volume. Afterwards, the updated transaction volume corresponding to each first time period is scaled to an integer value in the interval (0, p-1) to obtain the transaction volume included in the first K-line data sequence. In this case, the transaction volume corresponding to the third pixel row at the bottom of the third part is 0, the transaction volume corresponding to the third pixel row at the top is p-1, and the difference between the transaction volume values ​​corresponding to adjacent third pixel rows is 1.

[0105] With the above configuration, the more pixels whose color values ​​in the first pixel column are configured as the first color value, the higher the transaction volume in the first time period corresponding to the first pixel column.

[0106] If the first preset minimum transaction volume is less than the minimum value among all transaction volumes, it means that all transaction volumes are greater than the first preset minimum transaction volume. In this case, the third pixel row corresponding to all transaction volumes and the third pixel row corresponding to the first preset minimum transaction volume are not the same pixel row. Therefore, there will be more than one pixel point whose color value is set to the first color value in each first pixel column. Therefore, there may be more than one third pixel row at the bottom of the third part whose color values ​​of all pixel points are set to the first color value. Even if this part of the third pixel row does not exist, it does not affect the difference in the number of pixel points whose color values ​​contained in each first pixel column are configured as the first color value, which can represent the difference in transaction volume in the first time period corresponding to the first pixel column. Therefore, this part of the third pixel row may not exist, so the first preset minimum transaction volume can be set to the minimum value among all transaction volumes. Thereby, the size of the third part can be reduced.

[0107] The color value of the pixel point (also referred to as the background pixel point) that is not set in the first image is the second color value, and the first color value is different from the second color value.

[0108] In one embodiment of the present application, the first color value and the second color value may be any different color values.

[0109] In another embodiment of the present application, the first color value may be a color value corresponding to white, and the second color value may be a color value corresponding to black. Alternatively, the first color value may be a color value corresponding to black, and the second color value may be a color value corresponding to white. Since white and black in an image only require a single-channel image to be displayed, and if the colors corresponding to the first color value and / or the second color value are colors other than black and white, in order to display colors other than black and white, it is necessary to generate a first image containing three channels, such as an RGB image, etc. This will increase the amount of data in the first image, thereby increasing the amount of data that needs to be analyzed during subsequent data analysis. And the additional color information will reduce the signal-to-noise ratio of the first image representing financial data.

[0110] S103: Based on the generated image, data analysis is performed on the target financial product.

[0111] In one embodiment of the present application, the above-mentioned data analysis may include analyzing the price fluctuations and transaction conditions of the above-mentioned target financial products or predicting the future transactions and / or price fluctuations of the target financial products.

[0112] Algorithms, models, etc. in related technologies can be used to conduct data analysis on target financial products.

[0113] As can be seen from the above, in the embodiment of the present application, a first image can be generated based on the first K-line data sequence of the target financial product, and the color value of the pixel in the first image can represent the various data recorded in the first K-line data sequence, that is, the present application can integrate the information recorded in the first K-line data sequence with a large amount of data into a first image, and the data analysis process of the financial product can be completed by processing the first image later, saving the computing resources required for subsequent data analysis. In addition, the first image only contains pixel points whose color values ​​are the first color value or the second color value, and the color information of the image is relatively simple, and a large amount of noise will not be introduced due to the complex color of the pixel points. Therefore, the signal-to-noise ratio of the first image is relatively high, which is conducive to improving the accuracy and efficiency of subsequent data analysis.

[0114] In another embodiment of the present application, step S103 can be implemented by following step A below.

[0115] Step A: Input the generated image into the image analysis model to obtain the data analysis result of the target financial product output by the image analysis model.

[0116] The image analysis model includes a convolution layer, and the convolution layer includes convolution filters of different gradient scales.

[0117] Since the above convolutional layer contains convolutional filters of different gradient scales, the image analysis model used in the embodiment of the present application can extract image information of image areas of different sizes in the first image, thereby extracting multi-scale association relationships in the first image. For example, the above association relationships include "no change", "slight increase", "substantial increase", "bottom reversal", "high-level collapse" and the like in the price and / or trading volume of the target financial product. This improves the accuracy of the output data analysis results.

[0118] In another embodiment of the present application, a data processing flow of the above-mentioned image analysis model is: input the generated image into the patch embedding layer, use the activation function and the normalization layer to process the output result of the patch embedding layer, obtain the residual information, input the residual information into the channel convolution layer for convolution processing, and the channel convolution layer outputs the first convolution processing result. After processing the first convolution processing result using the activation function and the normalization layer, a first normalized result is obtained. The first normalized result is input into the one-dimensional convolution layer, and the one-dimensional convolution layer outputs the second convolution processing result. After processing the second convolution processing result using the activation function and the normalization layer, a second normalized result is obtained. The second normalized result is fused with the above-mentioned residual information and input into the global pooling layer to obtain the pooling result. The pooling result is input into the multi-head attention layer to obtain the output result, and the output result is input into the fully connected layer and the activation function, that is, the output result is first input into the fully connected layer, and then the output result of the fully connected layer is input into the activation function to obtain the data analysis result output by the activation function, and the above-mentioned activation function can be a Sigmoid function. The above channel convolution layer and one-dimensional convolution layer contain convolution filters with different gradient scales, extract multi-scale correlation relationships in the image, and use the attention mechanism to dynamically assign different weight outputs to different convolution filter information.

[0119] See also Figure 2 , is a schematic diagram of the processing flow of an image analysis model provided in an embodiment of the present application.

[0120] The specific processing flow is the same as described above and will not be repeated here.

[0121] In another embodiment of the present application, the above step S101 can be implemented by following step B.

[0122] Step B: Acquire multiple first K-line data sequences of the target financial product.

[0123] The duration of the first time period corresponding to different first K-line data sequences is different, and the number of data items contained in each first K-line data sequence is the same. The same number of data items can make the number of first time periods corresponding to each first K-line data sequence the same, and therefore, the number of first pixel columns corresponding to each first K-line data sequence is the same, and the financial data contained in each first K-line data sequence can be integrated in the same first image, and the number of first pixel columns contained in the first image is the same as the number of data items contained in each first K-line data sequence.

[0124] In this case, the grayscale values ​​of the pixels set in the first part of the first image based on different first K-line data sequences are different. The color values ​​of the pixels in the second part and the third part are set based on the first K-line data sequence corresponding to the first time period with the shortest duration.

[0125] In one embodiment, the grayscale values ​​corresponding to the first K-line data sequences may be decreased or increased according to the first preset step length in order from small to large according to the duration of the corresponding first time period.

[0126] For each first K-line data sequence, the manner of setting the color value of the first part in the first image based on the first K-line data sequence can refer to the above step S102, which will not be repeated here.

[0127] In addition, in the case where the color corresponding to the first color value is white and the color corresponding to the second color value is black, or the color corresponding to the first color value is black and the color corresponding to the second color value is white, since different first K-line data sequences correspond to different grayscale values, different first K-line data sequences can be represented by a single-channel image, and therefore different first K-line data sequences can still be integrated into the first image of the single channel, and the data volume of the first image is relatively low.

[0128] See also Figure 3 , is a schematic diagram of a first image provided in an embodiment of the present application.

[0129] From bottom to top in the figure, there are the first part, the second part and the third part. Each square in the figure represents a pixel. The first part is below the horizontal line at the bottom left of the figure, the second part is between the two horizontal lines, and the third part is above the horizontal line at the top. The horizontal lines are only used to distinguish different parts of the first image, and they are not included in the first image. Among them, the first part contains pixels set to white based on a first K-line data sequence, and pixels set to gray based on another first K-line data sequence. Other unconfigured pixels are black. There are no pixels set to white or gray in some of the first pixel columns in the first part, indicating that there is data missing in the first K-line data sequence due to suspension or data acquisition failure. The pixels configured with color values ​​in the second part are white, and the pixels not configured are black. The pixels configured with color values ​​in the third part are white, and the pixels not configured are black.

[0130] As can be seen from the above, in one embodiment of the present application, the pixels with different grayscale values ​​in the first part of the above-mentioned first image can represent multiple different first K-line data sequences collected by the target financial product according to different first time periods. That is, multiple first K-line data sequences can be integrated into one first image. Thereby, the amount of information of the financial data contained in the first image is higher and the signal-to-noise ratio is higher. That is, in the present application, a large amount of financial data can be represented by one first image, further reducing the amount of calculation required for subsequent data analysis.

[0131] See also Figure 4 , is a flow chart of a second method for analyzing K-line sequence data of a financial product provided in an embodiment of the present application, which is similar to the aforementioned Figure 1 Compared with the embodiment shown, the following steps S104-S105 are also included before the aforementioned step S103.

[0132] S104: Acquire a second K-line data sequence of the target financial product.

[0133] Among them, the above-mentioned second K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the above-mentioned target financial product in each second time period, and the length of the above-mentioned second time period is shorter than the length of the above-mentioned first time period.

[0134] S105: Generate a second image based on the second K-line data sequence.

[0135] The second image includes a fourth part, a fifth part and a sixth part.

[0136] Each second pixel column in the above-mentioned second image corresponds to a second time period, each fourth pixel row in the above-mentioned fourth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fourth pixel rows is a fourth preset value, and in each second pixel column, the color value of the pixel point in the fourth pixel row corresponding to the highest price and the lowest price in the second time period corresponding to the second pixel column is set to the third color value.

[0137] Each fifth pixel row in the above-mentioned fifth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fifth pixel rows is a fifth preset value, and in each second pixel column, the color values ​​of the pixel points between the fifth pixel rows corresponding to the opening price and the closing price in the second time period corresponding to the second pixel column are all set to the third color value.

[0138] Each sixth pixel row in the above-mentioned sixth part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent sixth pixel rows is a sixth preset value, and in each second pixel column, the color values ​​of the pixel points between the sixth pixel row corresponding to the transaction volume in the second time period corresponding to the second pixel column and the sixth pixel row corresponding to the second preset minimum transaction volume are all set to the third color value.

[0139] The color value of the pixel point that is not set in the second image is a fourth color value, and the third color value is different from the fourth color value.

[0140] With the aforementioned Figure 1Compared with step S101-step S102 shown in FIG. 1 , the difference between step S104-step S105 is that the second time period corresponding to the second K-line data sequence used in generating the second image is shorter than the first time period corresponding to the first K-line data sequence used in generating the first image. That is, the second K-line data sequence can represent the microscopic changes of the target financial product in a shorter time.

[0141] For example, the first time period is one day, and the second time period is 60 minutes, 15 minutes, 5 minutes, or 1 minute, etc., which can be selected according to actual needs.

[0142] In addition, the second image is generated in a similar manner to the first image, and will not be described in detail here. Compared with the first image, the second image can represent the rapid changes in the data of the target financial product in a short period of time.

[0143] As can be seen from the above, in the embodiment of the present application, a second image can be generated based on the second K-line data sequence of the target financial product, and the color value of the pixel in the second image can represent the various data recorded in the second K-line data sequence, that is, the present application can integrate the information recorded in the second K-line data sequence with a large amount of data into a second image, and the data analysis process of the target financial product can be completed by processing a second image later, saving the computing resources required for subsequent data analysis. In addition, the second image only contains pixels whose color values ​​are the third color value or the fourth color value, and the color information of the image is relatively simple, and a large amount of noise will not be introduced due to the complex color of the pixel points. Therefore, the signal-to-noise ratio of the second image is relatively high, which is conducive to improving the accuracy and efficiency of subsequent data analysis. Compared with the first image, the second image is generated based on the second K-line data sequence with a shorter acquisition period, so that the second image can reflect the rapid changes of the target financial product in a short time, and provide rich information in combination with the first image, which can improve the accuracy of the data results obtained by subsequent data processing.

[0144] In one embodiment of the present application, the above step S104 can be implemented by following the following step C.

[0145] Step C: Acquire multiple second K-line data sequences of the target financial product, wherein different second K-line data sequences correspond to different second time periods, and each second K-line data sequence contains the same number of data items.

[0146] The grayscale values ​​of the pixels in the fourth part of the second image are different based on different second K-line data sequences, and the color values ​​of the pixels in the fifth and sixth parts are set based on the second K-line data sequence corresponding to the second time period with the longest duration.

[0147] For example, each second K-line data sequence contains data generated by the target financial product in one day. For example, one second K-line data sequence contains data generated by the target financial product in every 60 minutes in one day, another second K-line data sequence contains data generated by the target financial product in every 15 minutes in one day, another second K-line data sequence contains data generated by the target financial product in every 5 minutes in one day, and another second K-line data sequence contains data generated by the target financial product in every 1 minute in one day. When setting the color value of the pixel point in the fourth part, different second K-line data sequences correspond to different grayscale values. For example, according to the order of the duration of the second time period corresponding to each second K-line data sequence from large to small, the grayscale values ​​corresponding to each second K-line data sequence are increased or decreased in sequence.

[0148] Specifically, the method of generating the second image in this embodiment is similar to the method of generating the first image described in the aforementioned step B, and will not be repeated here.

[0149] As can be seen from the above, in one embodiment of the present application, the fourth part of the second image can represent multiple different second K-line data sequences collected by the target financial product according to different second time periods through pixels with different gray values. That is, multiple second K-line data sequences can be integrated into one second image. Thereby, the amount of information of the financial data contained in the second image is higher and the signal-to-noise ratio is higher. That is, in the present application, a large amount of financial data can be represented by one second image, further reducing the amount of calculation required for subsequent data analysis.

[0150] See also Figure 5 , is a flow chart of a third method for analyzing K-line sequence data of a financial product provided in an embodiment of the present application, which is similar to the aforementioned Figure 1 Compared with the embodiment shown, the following steps S106-S107 are also included before the above step S103.

[0151] S106: Acquire a third data sequence of the trading market for trading the target financial product.

[0152] The third data sequence includes transaction index data of the transaction duration in each third time period.

[0153] Specifically, the above-mentioned trading indicator data may include at least one of the following data: the quantity and price of the broad-based index of the market where the target financial product is located, the quantity and price of the broad-based index of the market where the target financial product is located, and the quantity and price of the industry index of the industry where the target financial product is located.

[0154] S107: Generate a third image based on the third data sequence.

[0155] Among them, each second pixel column in the above-mentioned third image corresponds to a third time period, each seventh pixel row in the above-mentioned third image corresponds to a transaction indicator data value, the difference between the transaction indicator data values ​​corresponding to adjacent seventh pixel rows is a seventh preset value, and in each third pixel column, the color value of the pixel point of the third pixel row corresponding to the transaction indicator data in the third time period corresponding to the third pixel column is set to the fifth color value.

[0156] The color value of the pixel point that is not set in the second image is the sixth color value, and the fifth color value is different from the sixth color value.

[0157] In one embodiment of the present application, the size of the third image is (m, n), and the original collected transaction index data can be proportionally scaled to integers in the interval (0, n-1) to obtain a third data sequence. The minimum value of the scaled transaction index data is 0, and the maximum value is n-1. Therefore, the third pixel row whose color values ​​of the pixels contained are all the sixth color value does not exist at the upper and lower ends of the third image generated based on this third data sequence, thereby reducing the size of the third image.

[0158] In another embodiment of the present application, the colors corresponding to the fifth pixel value and the sixth pixel value are respectively white and black. In this case, the generated third image may only include one channel, thereby reducing the data volume of the third image.

[0159] In the case where the third data sequence includes one type of transaction indicator data, the color value of the pixel at the corresponding position is set to the fifth color value based on the third data sequence. In the case where the third data sequence includes multiple types of transaction indicator data, and the grayscale value corresponding to each type of data included in the third data sequence is different, in addition to setting the color value of the pixel at the corresponding position to the fifth color value based on one type of data in the third data sequence, the grayscale value of the pixel is also set to the grayscale value corresponding to the data, so as to distinguish different data in the third image.

[0160] As can be seen from the above, the third image generated in the embodiment of the present application can represent the fluctuation of the trading indicators of the trading market over time, and the macro information of the entire trading market can be represented by a third image, so that the subsequent processing of a third image with a smaller data volume can complete the data processing process. Therefore, the computing resources required for data processing can be reduced.

[0161] In an embodiment of the present application, multiple images of the first image, the second image, and the third image are generated, and the color of the pixels in each image is black, white or gray, then each image is a single-channel image, even if a total of three images are generated, there are only three channels of images that need to be processed later, and the amount of data is still small. In one embodiment of the present application, multiple images can be input into the image analysis model as different channels of the image for joint processing. If the first image, the second image and the third image are all generated, the three-channel image can concisely embed a large amount of multi-dimensional spatiotemporal information such as the volume and price changes, K-line patterns, market trends, intraday fluctuations of the target financial product, etc., effectively improving the signal-to-noise ratio and storage efficiency of the final generated image, thereby reducing the computing pressure of subsequent data analysis.

[0162] Corresponding to the aforementioned financial product K-line sequence data analysis method, the embodiment of the present application also provides a financial product K-line sequence data analysis device.

[0163] See also Figure 6 , is a schematic diagram of the structure of a financial product K-line sequence data analysis device provided in an embodiment of the present application, the device comprising:

[0164] A first sequence acquisition module 601 is used to acquire a first K-line data sequence of a target financial product, wherein the first K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each first time period;

[0165] A first image generating module 602, configured to generate a first image based on the first K-line data sequence, wherein the first image includes a first part, a second part and a third part;

[0166] Each first pixel column in the first image corresponds to a first time period, each first pixel row in the first part corresponds to a price value, the difference between the price values ​​corresponding to adjacent first pixel rows is a first preset value, and within each first pixel column, the color values ​​of the pixels in the first pixel row corresponding to the highest price and the lowest price in the first time period corresponding to the first pixel column are set to the first color value;

[0167] Each second pixel row of the second part corresponds to a price value, the difference between the price values ​​corresponding to adjacent second pixel rows is a second preset value, and in each first pixel column, the color values ​​of the pixels between the second pixel rows corresponding to the opening price and the closing price in the first time period corresponding to the first pixel column are all set to the first color value;

[0168] Each third pixel row of the third part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent third pixel rows is a third preset value, and in each first pixel column, the color values ​​of the pixels between the third pixel row corresponding to the transaction volume in the first time period corresponding to the first pixel column and the third pixel row corresponding to the first preset minimum transaction volume are all set to the first color value;

[0169] The color value of the pixel point that is not set in the first image is a second color value, and the first color value is different from the second color value;

[0170] The data analysis module 603 is used to perform data analysis on the target financial product based on the generated image.

[0171] As can be seen from the above, in the embodiment of the present application, a first image can be generated based on the first K-line data sequence of the target financial product, and the color value of the pixel in the first image can represent the various data recorded in the first K-line data sequence, that is, the present application can integrate the information recorded in the first K-line data sequence with a large amount of data into a first image, and the data analysis process of the financial product can be completed by processing the first image later, saving the computing resources required for subsequent data analysis. In addition, the first image only contains pixel points whose color values ​​are the first color value or the second color value, and the color information of the image is relatively simple, and a large amount of noise will not be introduced due to the complex color of the pixel points. Therefore, the signal-to-noise ratio of the first image is relatively high, which is conducive to improving the accuracy and efficiency of subsequent data analysis.

[0172] In one embodiment of the present application, the device further includes:

[0173] A second sequence acquisition module, configured to acquire a second K-line data sequence of a target financial product, wherein the second K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each second time period, and the duration of the second time period is shorter than the duration of the first time period;

[0174] A second image generating module, used for generating a second image based on the second K-line data sequence, wherein the second image includes a fourth part, a fifth part and a sixth part;

[0175] Each second pixel column in the second image corresponds to a second time period, each fourth pixel row in the fourth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fourth pixel rows is a fourth preset value, and within each second pixel column, the color value of the pixel point in the fourth pixel row corresponding to the highest price and the lowest price in the second time period corresponding to the second pixel column is set to a third color value;

[0176] Each fifth pixel row of the fifth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fifth pixel rows is a fifth preset value, and in each second pixel column, the color values ​​of the pixels between the fifth pixel rows corresponding to the opening price and the closing price in the second time period corresponding to the second pixel column are all set to the third color value;

[0177] Each sixth pixel row of the sixth part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent sixth pixel rows is a sixth preset value, and in each second pixel column, the color values ​​of the pixels between the sixth pixel row corresponding to the transaction volume in the second time period corresponding to the second pixel column and the sixth pixel row corresponding to the second preset minimum transaction volume are all set to the third color value;

[0178] The color value of the pixel point that is not set in the second image is a fourth color value, and the third color value is different from the fourth color value.

[0179] As can be seen from the above, in the embodiment of the present application, a second image can be generated based on the second K-line data sequence of the target financial product, and the color value of the pixel in the second image can represent the various data recorded in the second K-line data sequence, that is, the present application can integrate the information recorded in the second K-line data sequence with a large amount of data into a second image, and the data analysis process of the target financial product can be completed by processing a second image later, saving the computing resources required for subsequent data analysis. In addition, the second image only contains pixels whose color values ​​are the third color value or the fourth color value, and the color information of the image is relatively simple, and a large amount of noise will not be introduced due to the complex color of the pixel points. Therefore, the signal-to-noise ratio of the second image is relatively high, which is conducive to improving the accuracy and efficiency of subsequent data analysis. Compared with the first image, the second image is generated based on the second K-line data sequence with a shorter acquisition period, so that the second image can reflect the rapid changes of the target financial product in a short time, and provide rich information in combination with the first image, which can improve the accuracy of the data results obtained by subsequent data processing.

[0180] In one embodiment of the present application, the device further includes:

[0181] A third sequence acquisition module, used to acquire a third data sequence of the trading market for trading the target financial product, wherein the third data sequence includes trading indicator data of the trading duration in each third time period;

[0182] A third image generating module, used for generating a third image based on the third data sequence;

[0183] Each second pixel column in the third image corresponds to a third time period, each seventh pixel row in the third image corresponds to a transaction index data value, the difference between transaction index data values ​​corresponding to adjacent seventh pixel rows is a seventh preset value, and within each third pixel column, the color value of the pixel point of the third pixel row corresponding to the transaction index data in the third time period corresponding to the third pixel column is set to the fifth color value;

[0184] The color value of the pixel point that is not set in the second image is the sixth color value, and the fifth color value is different from the sixth color value.

[0185] As can be seen from the above, the third image generated in the embodiment of the present application can represent the fluctuation of the trading indicators of the trading market over time, and the macro information of the entire trading market can be represented by a third image, so that the subsequent processing of a third image with a smaller data volume can complete the data processing process. Therefore, the computing resources required for data processing can be reduced.

[0186] In one embodiment of the present application, the first sequence acquisition module 601 is specifically used to:

[0187] Acquire multiple first K-line data sequences of the target financial product, wherein different first K-line data sequences correspond to first time periods of different lengths, and each first K-line data sequence contains the same number of data items;

[0188] The grayscale values ​​of the pixels in the first part of the first image are different based on different first K-line data sequences; the color values ​​of the pixels in the second part and the third part are set based on the first K-line data sequence corresponding to the shortest first time period.

[0189] As can be seen from the above, in one embodiment of the present application, the pixels with different grayscale values ​​in the first part of the above-mentioned first image can represent multiple different first K-line data sequences collected by the target financial product according to different first time periods. That is, multiple first K-line data sequences can be integrated into one first image. Thereby, the amount of information of the financial data contained in the first image is higher and the signal-to-noise ratio is higher. That is, in the present application, a large amount of financial data can be represented by one first image, further reducing the amount of calculation required for subsequent data analysis.

[0190] In one embodiment of the present application, the second sequence acquisition module is specifically used to:

[0191] Acquire multiple second K-line data sequences of the target financial product, wherein different second K-line data sequences correspond to different second time periods, and each second K-line data sequence contains the same number of data items;

[0192] The grayscale values ​​of the pixels in the fourth part of the second image are different based on different second K-line data sequences, and the color values ​​of the pixels in the fifth and sixth parts are set based on the second K-line data sequence corresponding to the second time period with the longest duration.

[0193] As can be seen from the above, in one embodiment of the present application, the fourth part of the second image can represent multiple different second K-line data sequences collected by the target financial product according to different second time periods through pixels with different gray values. That is, multiple second K-line data sequences can be integrated into one second image. Thereby, the amount of information of the financial data contained in the second image is higher and the signal-to-noise ratio is higher. That is, in the present application, a large amount of financial data can be represented by one second image, further reducing the amount of calculation required for subsequent data analysis.

[0194] In one embodiment of the present application, the data analysis module 603 is specifically used to:

[0195] The generated image is input into an image analysis model to obtain a data analysis result of the target financial product output by the image analysis model, wherein the image analysis model includes a convolution layer, and the convolution layer includes convolution filters of different gradient scales.

[0196] Since the above convolutional layer contains convolutional filters of different gradient scales, the image analysis model used in the embodiment of the present application can extract image information of image areas of different sizes in the first image, thereby extracting multi-scale association relationships in the first image. For example, the above association relationships include "no change", "slight increase", "substantial increase", "bottom reversal", "high-level collapse" and the like in the price and / or trading volume of the target financial product. This improves the accuracy of the output data analysis results.

[0197] The present application also provides an electronic device, such as Figure 7 As shown, it includes a processor 701 , a communication interface 702 , a memory 703 and a communication bus 704 , wherein the processor 701 , the communication interface 702 , and the memory 703 communicate with each other via the communication bus 704 .

[0198] Memory 703, used for storing computer programs;

[0199] The processor 701 is used to implement any financial product K-line sequence data analysis method in the embodiments of the present application when executing the program stored in the memory 703.

[0200] When the electronic device provided by the embodiment of the present application is used to analyze the K-line sequence data of a financial product, a first image can be generated based on the first K-line data sequence of the target financial product. The color value of the pixel in the first image can represent the various data recorded in the first K-line data sequence, that is, the present application can integrate the information recorded in the first K-line data sequence with a large amount of data into a first image, and the data analysis process of the financial product can be completed by processing the first image later, saving the computing resources required for subsequent data analysis. In addition, the first image only contains pixel points whose color values ​​are the first color value or the second color value, and the color information of the image is relatively simple, and a large amount of noise will not be introduced due to the complex color of the pixel points. Therefore, the signal-to-noise ratio of the first image is relatively high, which is conducive to improving the accuracy and efficiency of subsequent data analysis.

[0201] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0202] The communication interface is used for communication between the above electronic device and other devices.

[0203] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0204] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0205] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned financial product K-line series data analysis methods are implemented.

[0206] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the financial product K-line sequence data analysis methods in the above-mentioned embodiments.

[0207] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. 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, a computer, a server or a 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, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0208] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0209] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0210] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A method for analyzing K-line sequence data of financial products, characterized in that: The method comprises: Acquire a first K-line data sequence of a target financial product, wherein the first K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each first time period; Based on the first K-line data sequence, a first image is generated, wherein the first image includes a first part, a second part and a third part; Each first pixel column in the first image corresponds to a first time period, each first pixel row in the first part corresponds to a price value, the difference between the price values ​​corresponding to adjacent first pixel rows is a first preset value, and within each first pixel column, the color values ​​of the pixels in the first pixel row corresponding to the highest price and the lowest price in the first time period corresponding to the first pixel column are set to the first color value; Each second pixel row of the second part corresponds to a price value, the difference between the price values ​​corresponding to adjacent second pixel rows is a second preset value, and in each first pixel column, the color values ​​of the pixels between the second pixel rows corresponding to the opening price and the closing price in the first time period corresponding to the first pixel column are all set to the first color value; Each third pixel row of the third part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent third pixel rows is a third preset value, and in each first pixel column, the color values ​​of the pixels between the third pixel row corresponding to the transaction volume in the first time period corresponding to the first pixel column and the third pixel row corresponding to the first preset minimum transaction volume are all set to the first color value; The color value of the pixel point that is not set in the first image is a second color value, and the first color value is different from the second color value; Based on the generated image, data analysis is performed on the target financial product.

2. The method according to claim 1, characterized in that Before performing data analysis on the target financial product based on the generated image, the method further includes: Acquire a second K-line data sequence of the target financial product, wherein the second K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each second time period, and the duration of the second time period is shorter than the duration of the first time period; Based on the second K-line data sequence, a second image is generated, wherein the second image includes a fourth part, a fifth part, and a sixth part; Each second pixel column in the second image corresponds to a second time period, each fourth pixel row in the fourth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fourth pixel rows is a fourth preset value, and within each second pixel column, the color value of the pixel point in the fourth pixel row corresponding to the highest price and the lowest price in the second time period corresponding to the second pixel column is set to a third color value; Each fifth pixel row of the fifth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fifth pixel rows is a fifth preset value, and in each second pixel column, the color values ​​of the pixels between the fifth pixel rows corresponding to the opening price and the closing price in the second time period corresponding to the second pixel column are all set to the third color value; Each sixth pixel row of the sixth part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent sixth pixel rows is a sixth preset value, and in each second pixel column, the color values ​​of the pixels between the sixth pixel row corresponding to the transaction volume in the second time period corresponding to the second pixel column and the sixth pixel row corresponding to the second preset minimum transaction volume are all set to the third color value; The color value of the pixel point that is not set in the second image is a fourth color value, and the third color value is different from the fourth color value.

3. The method according to claim 1, characterized in that Before performing data analysis on the target financial product based on the generated image, the method further includes: Acquire a third data sequence of the trading market for trading the target financial product, wherein the third data sequence includes trading indicator data of the trading duration in each third time period; Based on the third data sequence, generate a third image; Each second pixel column in the third image corresponds to a third time period, each seventh pixel row in the third image corresponds to a transaction index data value, the difference between transaction index data values ​​corresponding to adjacent seventh pixel rows is a seventh preset value, and within each third pixel column, the color value of the pixel point of the third pixel row corresponding to the transaction index data in the third time period corresponding to the third pixel column is set to the fifth color value; The color value of the pixel point that is not set in the third image is the sixth color value, and the fifth color value is different from the sixth color value.

4. The method according to claim 1, characterized in that: The step of obtaining the first K-line data sequence of the target financial product includes: Acquire multiple first K-line data sequences of the target financial product, wherein different first K-line data sequences correspond to first time periods of different lengths, and each first K-line data sequence contains the same number of data items; The grayscale values ​​of the pixels in the first part of the first image are different based on different first K-line data sequences; the color values ​​of the pixels in the second part and the third part are set based on the first K-line data sequence corresponding to the shortest first time period.

5. The method according to claim 2, characterized in that: The step of obtaining a second K-line data sequence of a target financial product includes: Acquire multiple second K-line data sequences of the target financial product, wherein different second K-line data sequences correspond to different second time periods, and each second K-line data sequence contains the same number of data items; The grayscale values ​​of the pixels in the fourth part of the second image are different based on different second K-line data sequences, and the color values ​​of the pixels in the fifth and sixth parts are set based on the second K-line data sequence corresponding to the second time period with the longest duration.

6. The method according to any one of claims 1 to 5, characterized in that The performing data analysis on the target financial product based on the generated image includes: The generated image is input into an image analysis model to obtain a data analysis result of the target financial product output by the image analysis model, wherein the image analysis model includes a convolution layer, and the convolution layer includes convolution filters of different gradient scales.

7. A financial product K-line sequence data analysis device, characterized in that: The device comprises: A first sequence acquisition module, configured to acquire a first K-line data sequence of a target financial product, wherein the first K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each first time period; A first image generating module, configured to generate a first image based on the first K-line data sequence, wherein the first image includes a first part, a second part and a third part; Each first pixel column in the first image corresponds to a first time period, each first pixel row in the first part corresponds to a price value, the difference between the price values ​​corresponding to adjacent first pixel rows is a first preset value, and within each first pixel column, the color values ​​of the pixels in the first pixel row corresponding to the highest price and the lowest price in the first time period corresponding to the first pixel column are set to the first color value; Each second pixel row of the second part corresponds to a price value, the difference between the price values ​​corresponding to adjacent second pixel rows is a second preset value, and in each first pixel column, the color values ​​of the pixels between the second pixel rows corresponding to the opening price and the closing price in the first time period corresponding to the first pixel column are all set to the first color value; Each third pixel row of the third part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent third pixel rows is a third preset value, and in each first pixel column, the color values ​​of the pixels between the third pixel row corresponding to the transaction volume in the first time period corresponding to the first pixel column and the third pixel row corresponding to the first preset minimum transaction volume are all set to the first color value; The color value of the pixel point that is not set in the first image is a second color value, and the first color value is different from the second color value; A data analysis module is used to perform data analysis on the target financial product based on the generated image.

8. The device according to claim 7, characterized in that The device also includes: A second sequence acquisition module, configured to acquire a second K-line data sequence of a target financial product, wherein the second K-line data sequence includes the highest price, the lowest price, the opening price, the closing price, and the trading volume of the target financial product in each second time period, and the duration of the second time period is shorter than the duration of the first time period; A second image generating module, used for generating a second image based on the second K-line data sequence, wherein the second image includes a fourth part, a fifth part and a sixth part; Each second pixel column in the second image corresponds to a second time period, each fourth pixel row in the fourth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fourth pixel rows is a fourth preset value, and within each second pixel column, the color value of the pixel point in the fourth pixel row corresponding to the highest price and the lowest price in the second time period corresponding to the second pixel column is set to a third color value; Each fifth pixel row of the fifth part corresponds to a price value, the difference between the price values ​​corresponding to adjacent fifth pixel rows is a fifth preset value, and in each second pixel column, the color values ​​of the pixels between the fifth pixel rows corresponding to the opening price and the closing price in the second time period corresponding to the second pixel column are all set to the third color value; Each sixth pixel row of the sixth part corresponds to a transaction volume value, the difference between the transaction volume values ​​corresponding to adjacent sixth pixel rows is a sixth preset value, and in each second pixel column, the color values ​​of the pixels between the sixth pixel row corresponding to the transaction volume in the second time period corresponding to the second pixel column and the sixth pixel row corresponding to the second preset minimum transaction volume are all set to the third color value; The color value of the pixel point that is not set in the second image is a fourth color value, and the third color value is different from the fourth color value.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor is used to implement the method steps of any one of claims 1-6 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Information processing method and device, equipment, medium and program product

    CN118469381A

  • Image processing method and apparatus, computer device, storage medium, and computer program product

    WO2023005743A1