Financial data drawing method and interaction mode thereof

By introducing a coordinate system and image-based hybrid drawing method into financial data plotting, and combining multiple coordinate systems and multidimensional data-driven approaches, the problem of information transmission and interaction difficulties in plotting large amounts of financial data has been solved, achieving efficient plotting and interaction, and improving the convenience of data understanding and querying.

CN121921398APending Publication Date: 2026-04-24陈明峰
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
陈明峰
Filing Date
2026-01-15
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing coordinate system-based financial data plotting methods struggle to effectively convey valuable information when processing large amounts of data, and querying and observing plotted content is cumbersome and lacks effective interactive methods.

Method used

It adopts a method based on a coordinate system and image hybrid drawing, which allows drawing elements to be translated and scaled on the overall coordinate system of the canvas. It combines multiple coordinate systems and multi-dimensional data driving, and uses CPU or GPU for efficient drawing. It introduces interactive methods such as heatmaps, histograms, in-situ candlestick charts, and market data completion drawing.

Benefits of technology

It enables efficient plotting and interaction of large amounts of financial data, allowing for better discovery and understanding of data patterns, simplified querying and observation, and improved readability and interactivity of plotted content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921398A_ABST
    Figure CN121921398A_ABST
Patent Text Reader

Abstract

The invention discloses a financial data drawing method and an interaction mode thereof. The financial data drawing method is summarized as follows: a multi-coordinate system and a multi-dimensional data driving method are used for drawing data. The interaction mode comprises: in-place thermodynamic diagram statistics: directly drawing a thermodynamic diagram on a canvas according to the position range of a selected drawing element; the invention relates to aligned histogram statistics. An aligned histogram is directly drawn at the edge of a canvas according to the position range of a selected drawing element; the invention relates to in-place K-line graph drawing, which is to draw a K-line graph overlapped or aligned with a corresponding drawing element on a canvas. The invention relates to in-place market data complementation drawing, which is to draw a complete market superposed with a selected drawing element on a canvas. An interaction mode based on code control is characterized in that global calculation is carried out based on a configured calculation environment and a code text, then data processing is further carried out, and the data processing comprises sorting, proportioning, grouping and then calculation result transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer graphics drawing, and more particularly to a method and interactive system for drawing financial data. Background Technology

[0002] Existing financial data visualization generally employs coordinate-based graphical representation, emphasizing numerical matching between the plotted content and the coordinate system. Even when multiple lines are drawn with special handling, it often involves appropriate scaling or multiple y-axis adjustments, without completely deviating from the underlying logic of coordinate-based graphical representation. This method works well for small amounts of financial data. However, it becomes significantly limited when dealing with large volumes of financial data. For example, plotting the daily closing data of all 5,000+ stocks in the A-share market for nearly a year would result in a chaotic, poorly rendered graph, failing to convey valuable information.

[0003] Through extensive practice, I have abandoned the traditional bias of using only coordinate-based graphical representations for financial data. Instead, I employ a hybrid approach combining coordinate-based graphical representations with image rendering to depict financial data, especially large datasets. In traditional coordinate-based graphical representations, a line with a y-value from 1 to 2 is completely different from a line with a y-value from 10 to 11; the former increases by 100%, while the latter only increases by 10%. Therefore, traditional methods do not allow for independent translation or scaling of the drawn content while the coordinate system remains stationary. However, from an image perspective (e.g., with the coordinate system hidden), the two lines appear identical. Therefore, given a clear understanding of the data context, treating the coordinate system as a simple pixel canvas and the lines as images for translation and scaling, while it cannot convey the precise numerical values ​​as quickly as coordinate-based graphical representations, it can still convey valuable information such as general trends, fluctuations, and price movements. Therefore, using the theory of mixed graph and image drawing based on coordinate systems, when drawing large amounts of financial data, the drawing content can be translated and scaled to perform operations such as sorting, classifying, and ranking, which can better convey effective information.

[0004] This invention is a method for plotting financial data, developed to realize the concept of hybrid graph and image plotting based on a coordinate system. However, this method inevitably has some shortcomings and deficiencies in practical use. For example, allowing the plotted content to be translated and scaled like an image makes it difficult to quantitatively observe the plotted content; when the amount of plotted data is large, querying the plotted content can become cumbersome; while it allows the plotted content to be translated like an image, there is no method to control the translation. To improve the shortcomings and deficiencies of this method in practical use, several interactive methods have been invented, mainly including: an in-situ heatmap statistics method, a positional histogram statistics method, an in-situ candlestick chart plotting method, an in-situ market data completion plotting method, and a code-controlled interactive method.

[0005] This invention creates a novel method for plotting financial data and its interactive mechanism, which is beneficial for uncovering and understanding the characteristics and patterns of financial data, and for a more scientific understanding of the financial market. Summary of the Invention

[0006] This invention relates to a method for plotting financial data and its interactive mechanism, developed to realize the concept of hybrid graphical and image rendering based on a coordinate system in financial data. Its core idea is to allow drawing elements to translate and scale within the overall coordinate system of the canvas. The aim is to develop a plotting method and interactive mechanism capable of directly plotting large amounts of financial data, facilitating the discovery of patterns within that data.

[0007] The financial data applicable to this invention generally contains multiple financial products, such as multiple stocks. The financial data processed is mainly divided into two categories. First, financial data directly used for plotting, characterized by a timeline consistent with the market trading process, such as market data or data obtained through further processing of market data; second, financial data used for mapping or interaction, which is data related to financial products.

[0008] The technical solution provided by the financial data plotting method of the present invention is as follows:

[0009] The financial data plotting method of this invention can be summarized as follows: Data is plotted using a multi-coordinate system and a multi-dimensional data-driven approach. The multi-coordinate system consists of a general coordinate system for the canvas and sub-coordinate systems for the plotting elements. The plotting elements are the constituent units of the overall plotting content, referring to basic graphic primitives composed of ordered point sequences that can be independently rendered. The multi-dimensional data-driven approach involves color and translation mapping data related to the plotting elements. The translation of a plotting element refers to its movement within the general coordinate system of the canvas.

[0010] Furthermore, in the so-called "drawing elements as constituent units of the total drawing content", the total drawing content refers to the drawing content of the financial data to be drawn, excluding content related to the basic environment and interaction process, such as coordinate system, mouse crosshairs, background grid, etc.

[0011] Furthermore, each drawing element has its own sub-coordinate system, which is independent of each other. To optimize the final display effect, the preferred sub-coordinate system of the drawing element is hidden and can be displayed when needed.

[0012] Furthermore, setting a sub-coordinate system for each drawing element is to maintain the graphic logic of each drawing element. On the overall coordinate system of the canvas, the relationship between the sub-coordinate system of the drawing element and the overall coordinate system of the canvas can be controlled to enable the drawing element to be translated and scaled like an image.

[0013] Furthermore, the aforementioned statement that "drawing elements can be translated and scaled like images" means that the translation and scaling of drawing elements are similar to the translation and scaling of images on a canvas, and does not mean that the drawing elements need to be processed into images first. Similar to common industrial CAD software, selected content can be translated and scaled, which is essentially the same as the effect described in this invention: "drawing elements can be translated and scaled like images."

[0014] Furthermore, the relative relationship between the sub-coordinate system of the drawn element and the overall coordinate system of the canvas mainly includes the relationships of translation and scaling. In practice, it is preferable to express the relative relationship between the sub-coordinate system of the drawn element and the overall coordinate system of the canvas by directly processing the relevant data of the points of the drawn element.

[0015] Furthermore, the relative relationship between the sub-coordinate system of the drawn element and the overall coordinate system of the canvas does not include rotation, because rotation can easily lead to abnormal trend display (for example, an upward trend line can be rotated clockwise to display as a downward trend), resulting in unsatisfactory practical effects, not because it is technically difficult to implement. Therefore, if rotation is added, but it does not deviate from the core technical framework of this invention, it should fall within the protection scope of this invention.

[0016] Furthermore, the scaling relationship between the sub-coordinate system of the drawing element and the overall coordinate system of the canvas can be understood as follows: the scaling ratio of the overall canvas is 1, and the scaling ratio R of the sub-coordinate system of the drawing element relative to the overall coordinate system of the canvas can be calculated by multiplying the relevant data of all points in the drawing element by R (which can be different for different coordinate axes). For ease of practical use, it can also be understood as taking a certain relevant value as a reference and dividing the relevant data of all points in the drawing element by the reference.

[0017] Furthermore, the translation relationship between the sub-coordinate system of the drawing element and the overall coordinate system of the canvas is preferably achieved by adding the relevant data of all points of the drawing element whose scaling ratio has been adjusted to the position translation data (containing multiple coordinate axes, and the position translation of different coordinate axes can be different).

[0018] Furthermore, the translation relationship of a drawn element refers to the translation relationship of the element's sub-coordinate system relative to the overall canvas coordinate system (including multiple dimensions, such as the X-axis, Y-axis, and Z-axis). Since translation involves the translation of all points within the drawn element, it can also be understood as the translation relationship of a specific point within the drawn element in the overall canvas coordinate system. Therefore, the translation relationship of a drawn element can also be understood as the translation relationship of a specific point within the drawn element in the overall canvas coordinate system. Similarly, when mapping related data to the translation relationship of a drawn element, it can also be understood as mapping related data to the translation relationship of a specific point within the drawn element in the overall canvas coordinate system.

[0019] Furthermore, when mapping the translation relationships of elements to related data, sometimes the numerical range of the data to be mapped is too large or too small, the distribution of values ​​is not reasonable, or the data to be mapped is text labels, making direct mapping unsuitable or the direct mapping effect unsatisfactory. Therefore, before mapping, the user decides to perform some processing on the data to be mapped. Such processing methods include, but are not limited to: converting text labels to numerical values, adjusting the scale of related data, sorting related data, and grouping related data.

[0020] Furthermore, when drawing color mapping data for elements, sometimes the numerical range of the data to be mapped is too large or too small, the distribution of values ​​is not reasonable, or the data to be mapped is text labels, making direct mapping unsuitable or producing unsatisfactory results. Additionally, CPUs or GPUs have range requirements for color values ​​when processing colors; integer color values ​​are typically required to be between 0 and 255, and floating-point color values ​​are typically required to be between 0.0 and 1.0. Therefore, before mapping, the user should decide to perform some processing on the data to be mapped. This processing includes, but is not limited to: converting text labels to numerical values, adjusting the scale of the data, sorting the data, and grouping the data.

[0021] Furthermore, the color and translation mapping data of the drawn elements are set and modified by the user, and the axes to be mapped are (such as the X, Y, and Z axes for position, and the R, G, B, and A axes for color). Only one axis can be mapped, multiple axes can be mapped simultaneously, or none of them can be mapped.

[0022] Furthermore, to better adapt to the requirements of plotting large amounts of financial data, the financial data plotting method of the present invention preferably optimizes some performance issues through certain technical methods. These include, but are not limited to:

[0023] Standardize the data source and preload it into memory. For data with a timeline, preferably organize all potentially usable data into multiple two-dimensional arrays similar to tables (which can also be understood as mathematical matrices, data that can be vectorized for calculation). Further, create separate two-dimensional arrays for different dimensions of data; for example, create five two-dimensional arrays for closing price, opening price, highest price, lowest price, and trading volume. Further, create shared row and column labels; preferably, row labels are time-related labels, and column labels are financial product-related labels (obviously, row and column labels can be interchanged and need corresponding adjustments). Further, shared row labels are based on the same time scale (e.g., daily and 60-minute charts are different time scales), and different time scales require different row labels. Further, if there are missing values ​​during processing, preferably consider filling in null values. For data related to financial products but without a timeline, such as attribute-related data of some financial products, preferably organize the relevant data into multiple one-dimensional arrays, with each dimension of data created as a separate one-dimensional array. Further, preferably, the data order in the one-dimensional array follows the order of the column labels (financial product-related labels) of the two-dimensional array. Furthermore, if there are missing values ​​during the processing, it is preferable to fill in the blanks.

[0024] Layer management is used for plotting data. In actual plotting, it's easy to encounter situations where the data volume of specific plotting elements varies significantly, and the data sources and uses may also differ greatly. If all plotting elements are standardized into a single two-dimensional array, it will lead to significant memory waste, and subsequent data processing and interaction will be cumbersome. Therefore, a better approach is to manage the plotting data using layers, standardizing similar data into the same two-dimensional array, and then standardizing the plotting data into multiple two-dimensional arrays and setting layers for each. This reduces memory usage, controls the scope of interaction, simplifies the calculation process, and improves performance.

[0025] The present invention stores and manages relevant data during the plotting process of the financial data plotting method. When re-plotting is required during some interactive processes, the relevant data can be directly extracted, simplifying the plotting process and improving plotting efficiency.

[0026] Furthermore, the specific technical methods described above in "preferably optimizing some performance issues through some technical methods" are, on the one hand, for better implementation of the financial data plotting method of the present invention, and on the other hand, for better description of the technical solution of the financial data plotting method of the present invention. It is not to say that the financial data plotting method of the present invention must have these technical methods, nor is it to say that the technical methods for optimizing the performance of the financial data plotting method of the present invention are limited to these technical methods. Therefore, any technical methods for optimizing performance that are removed, modified, or replaced by those skilled in the art without creative effort, and without departing from the core technical framework of the present invention, should fall within the protection scope of the present invention.

[0027] Furthermore, the financial data plotting method of the present invention includes the following steps:

[0028] The data structure to be plotted needs to be standardized. When plotting large amounts of financial data, the sheer volume and numerous plotting elements require significant computational performance to achieve rapid plotting, which is often insufficient for simple, individual value calculations. Standardizing the data structure, especially ensuring data continuity in memory, improves computational performance. Furthermore, standardizing the data structure facilitates the use of high-performance computational methods in subsequent calculations, such as vectorized computation, computation across a single memory block, and GPU acceleration. During data structure standardization, it is preferable to create an identification label for each plotting element, recording its location relative to the data source. Standardized management of these identification labels enables vectorized or batch queries of related data, improving performance and user experience.

[0029] Identify the target axis of the data to be drawn and complete the associated axis data. Whether drawing with a CPU or GPU, complete coordinate position and color data are required. However, the financial data to be drawn may not have complete data; often, the initial financial data only contains data for one axis. Identify a certain axis of the coordinate system as the target axis of the data to be drawn and complete the associated axis data. Preferably, the financial data to be drawn is marked as the Y-axis data, the X-axis as the ascending order, and the Z-axis as the depth. The preferred color mode is RGB or RGBA, where the R-axis represents the red channel, the G-axis represents the green channel, the B-axis represents the blue channel, and the A-axis represents the transparency. Obviously, the setting of coordinate system axes has a certain relativity. The target axis can be any axis in the coordinate system, and the color can also be other color modes, such as RGB, HSL, HSLA, LAB, and CMYK. Obviously, the relativity of the coordinate system axis setting also includes the relativity of the number of axes required. For example, only the X-axis and Y-axis can be retained, and other axes can be automatically filled with default values.

[0030] Handling the scaling of drawn elements. In drawn data, the numerical ranges of different drawn elements may vary significantly, making comparison difficult. Therefore, using the same or similar scaling rules for drawn elements that need to be compared can improve the comparability between different drawn elements.

[0031] Processing translation mapping-related data. When drawing large amounts of data, especially those containing numerous elements, the content drawn on the canvas often becomes a chaotic mess, difficult to discern. Translation can organize these elements, making the drawing content more orderly and easier to identify. During the translation process, mapping related data increases the data dimensions of the drawing content, allowing us to understand the relationships between data from different dimensions.

[0032] Processing color mapping-related data. Financial data is generally multi-dimensional, allowing the rendering of color mapping-related data of elements, which is beneficial for further expanding the advantages of the financial data plotting method of this invention on multi-dimensional data;

[0033] The data can be drawn using CPU, GPU, or a combination of both. When the amount of data to be drawn is small, CPU-only rendering is sufficient. However, when the amount of data to be drawn is large, CPU alone cannot meet the performance requirements, and GPU participation is often necessary. Furthermore, GPU rendering preferably uses graphics interfaces such as OpenGL, Vulkan, DirectX, and Metal.

[0034] Obviously, the steps of the financial data plotting method of the present invention described above can be simply split, reorganized, rearranged, or have some functions discarded, while maintaining the basic logic. For example: each axis (X-axis, Y-axis, Z-axis, R-axis, G-axis, B-axis, A-axis) can be processed separately before summarizing; the order of processing "color mapping related data" can be changed to advance; the order of processing "translation mapping related data" can be changed to advance; and "processing color mapping related data" can be discarded, etc. Therefore, any simple splitting, reorganization, order change, or function discarding of the steps of the financial data plotting method of the present invention without creative effort by those skilled in the art, without departing from the core technical framework of the present invention, should fall within the protection scope of the present invention.

[0035] The financial data plotting method of the present invention described above can plot the data, but as a plotting method, if the plotted content is difficult to interact with, its user experience will be greatly reduced. At the same time, a good interaction method can compensate for some shortcomings of the financial data plotting method of the present invention and extend some advantages. Here, after extensive practice, I have implemented some general interaction methods on the financial data plotting method of the present invention, and have also created some interaction methods specifically for the financial data plotting method of the present invention.

[0036] Common interaction methods include:

[0037] a. Common file operations, such as open, close, clear, save, save as, etc.

[0038] b. You can draw geometric shapes on the canvas and perform interactive operations with the drawn geometric shapes;

[0039] c. Canvas translation, rotation, and scaling;

[0040] d. The ability to switch between drawing modes, including scatter points, lines, and polygons;

[0041] e. Controlling the amount of data for each plotted element allows you to increase or decrease the amount of data for each element. Furthermore, when the amount of data for each plotted element is reduced to one point, and scatter plotting is used, the plot will be equivalent to a regular scatter plot.

[0042] f. Layer management for drawing content also includes common layer operations such as showing, hiding, deleting, cutting, copying, pasting, and layer parameter management. Furthermore, layer management also includes grouping the data to be drawn and limiting the scope of data during interaction, allowing data to be confined to one or more layers.

[0043] g. Drawing elements can be selected, including but not limited to mouse selection, touch selection, parameter range selection, query selection, list selection, and color selection;

[0044] h. For the selected drawing element, you can copy, delete, cut, paste, pan, modify color, and pass information to other parts, etc.

[0045] i. Supports mouse interaction.

[0046] The aforementioned common interaction methods are already widely used in various drawing software. Any method that can be implemented by those skilled in the art without creative effort will not be described further.

[0047] Furthermore, some interactive methods for the drawing method of the present invention will be described below.

[0048] After plotting a large amount of financial data, the plot content is often quite extensive. Furthermore, the core of this invention's financial data plotting method is to allow the translation and scaling of plotted elements, which further complicates the quantitative observation of the plotted content. To address this issue, the concept of statistical analysis of the plotted content is introduced. Moreover, because this invention's financial data plotting method allows for the translation and mapping of related data, the position of its plotted elements on the canvas has statistical value. Furthermore, directly plotting the statistical results on or aligned with the statistically analyzed data facilitates a better understanding of the relationship between the statistically analyzed data and the statistical results. Furthermore, to achieve this statistical effect, I have invented two interactive statistical methods through extensive practice: Interactive Method 1 based on this invention's financial data plotting method, an in-situ heatmap statistical method; and Interactive Method 2 based on this invention's financial data plotting method, an in-situ histogram statistical method.

[0049] One interactive method of the financial data plotting method based on the present invention is an in-situ heatmap statistics method, which can be summarized as: performing in-situ heatmap statistics on selected plotting elements. In-situ heatmap statistics refers to directly plotting a heatmap on the canvas (where plotting content already exists) of the selected plotting element, and the position range of the heatmap overlaps with or parallels the position range of the selected (to be statistically analyzed) plotting element on the canvas. The position range of the heatmap is calculated based on the position of the selected plotting element on the canvas. Furthermore, the statistics are based on the position of the selected plotting element on the canvas. As described in the financial data plotting method of the present invention, the translation mapping related data of the plotting element means that the position of the plotting element on the canvas contains information related to its translation mapping and has statistical value.

[0050] Furthermore, as described in the financial data plotting method of this invention, "translation means translating all points of the plotting element," so the translation of a point within the plotting element can be used to represent the translation of the plotting element. Moreover, the position of the plotting element being statistically analyzed on the canvas can be further simplified to the position of a point within the plotting element on the canvas. For example, the position of the starting point of the plotting element on the canvas can be used to represent the position of the plotting element on the canvas.

[0051] Furthermore, since the statistical data is related to the position of the selected drawing element on the canvas, the statistical result can also be described as the result of the selected drawing element on the canvas within a certain position range. Furthermore, the statistical result and its corresponding position and range on the canvas can be calculated, which is the theoretical basis for in-situ heatmap statistics (the first interactive method of the financial data drawing method of this invention).

[0052] Furthermore, the statistics can directly count the quantity; or count the quantity and then calculate the relevant percentage; or set statistical weights and perform statistics on the weights.

[0053] Furthermore, the statistical weights are set by the user, and the specific data acquisition can be similar to the acquisition method of relevant data to be mapped in the financial data plotting method of this invention, which is obtained from the data source through the identification tags of the plotting elements. Alternatively, the statistical weights can be obtained by using the identification tags of all plotting elements to acquire, save, and manage the statistical weights of all plotting elements. Subsequently, the statistical weights of the selected plotting element can be quickly extracted directly from the saved statistical weights of all elements.

[0054] Furthermore, the so-called "directly drawing a heatmap on the canvas of the selected drawing element (where there is already drawing content)" refers to drawing a heatmap while keeping the content already drawn on the canvas unchanged. The blending process can improve the final display effect by controlling the transparency or depth. The blending of the two results in a final display effect that allows you to see both the statistical results through the heatmap and the data details behind the statistics directly, which is something that conventional heatmap statistics cannot achieve.

[0055] Furthermore, the interactive steps of the financial data plotting method of the present invention include:

[0056] Retrieve the identification label and position coordinates of the selected drawing element. Retrieving the identification label is preferred when there are weighted settings, as it allows for quick retrieval of weight values. Retrieving the position coordinates retrieves the drawing element's location on the canvas, typically using the coordinates of a specific point on the element. These position coordinates form the basis of the statistical analysis.

[0057] The heatmap is subdivided and statistically analyzed. Since the underlying data is coordinate-related, calculating its range and further subdividing it allows us to determine the position, width, and height of each cell in the heatmap. Furthermore, statistical calculations based on this subdivision yield the corresponding statistical values ​​for each cell, enabling the calculation of its color.

[0058] Create a heatmap. Using CPU, GPU, or a CPU+GPU combination, create a heatmap based on the original plot. During the process, control the depth and transparency of the heatmap to blend it seamlessly with the original plot. Furthermore, because the original plot or the heatmap itself may have a large amount of data, it's necessary to consider whether to use a GPU for rendering.

[0059] The second interactive method of the financial data plotting method based on the present invention is a positional histogram statistical analysis, summarized as follows: performing positional histogram statistical analysis on the selected plotting elements. Positional histogram statistical analysis refers to directly plotting a histogram on the canvas (where plotting content already exists) of the selected plotting element, and the position range of the histogram is aligned or parallel to the position range of the selected (to be statistically analyzed) plotting element on the canvas in the dimension of the statistical axis, and remains adjacent to the edge in dimensions other than the statistical axis. In the dimension of the statistical axis, the position range of the histogram is calculated based on the position of the selected plotting element. Furthermore, the so-called statistical analysis is performed in the dimension of the statistical axis based on the position of the selected plotting element on the canvas. As mentioned in the financial data plotting method of the present invention, the translation mapping related data of the plotting elements means that the position of the plotting element on the canvas contains information related to its translation mapping and has statistical value.

[0060] Furthermore, the term "the dimension of the statistical axis" refers to the fact that histogram statistics are statistics on one-dimensional data. Therefore, a certain axis set by the user in the canvas is the statistical axis, and the other axes are not statistical axes.

[0061] Furthermore, as described in the financial data plotting method of this invention, "translation means translating all points of the plotting element," so the translation of a point within the plotting element can be used to represent the translation of the plotting element. Moreover, the position of the plotting element being statistically analyzed on the canvas can be further simplified to the position of a point within the plotting element on the canvas. For example, the position of the starting point of the plotting element on the canvas can be used to represent the position of the plotting element on the canvas.

[0062] Furthermore, along the dimension of the statistical axis, since the data being statistically analyzed is related to the position of the selected drawing element on the canvas, the statistical result can also be described as the result of the selected drawing element on the canvas within a certain position range. Moreover, the statistical result and its corresponding position and range on the canvas can be calculated; this is the theoretical basis for the implementation of positional histogram statistics.

[0063] Furthermore, the so-called "keeping it close to the edge on the non-statistical axis" refers to drawing a histogram in a region set at the edge of the display on the non-statistical axis. This process requires calculating the coordinates of the region on the canvas, and then calculating the position and height correlation of the histogram on the non-statistical axis, thereby keeping the histogram close to the edge on the non-statistical axis.

[0064] Furthermore, the statistical weights are set by the user, and the specific data acquisition can be similar to the acquisition method of relevant data to be mapped in the financial data plotting method of this invention, which is obtained from the data source through the identification tags of the plotting elements. Alternatively, the statistical weights can be obtained by using the identification tags of all plotting elements to acquire, save, and manage the statistical weights of all plotting elements. Subsequently, the statistical weights of the selected plotting element can be quickly extracted directly from the saved statistical weights of all elements.

[0065] Furthermore, the histogram is created by adding a histogram to the existing content on the canvas, keeping it unchanged. The blending process can be improved by controlling the transparency or depth of the histogram. This blending allows the final display to show both the statistical results through the histogram and the corresponding data details directly.

[0066] The interactive method two of the financial data plotting method of the present invention includes the following steps:

[0067] Retrieve the identification label and position coordinates of the selected drawing element. Retrieving the identification label is preferable for quickly retrieving weight values ​​when weights are set in the statistics. Retrieving the position coordinates means obtaining the position coordinates of the drawing element on the canvas, typically using the coordinates of a point on the canvas as a representative. These position coordinates are the basic data for the statistics. Furthermore, retrieving the position coordinates means obtaining the coordinates along the axis being counted.

[0068] Calculate histogram subdivisions and statistical results. Obtain the position, width, and height of each bar in the histogram, as well as the corresponding statistical value and color behind each bar;

[0069] Histogram drawing. Using CPU, GPU, or a CPU+GPU combination, a histogram is drawn based on the original drawing content. During this process, the histogram's depth and transparency are controlled to blend it with the original drawing content. Furthermore, the content blending involves aligning the histogram with the selected drawing elements and drawing it on the canvas near the display edge. Moreover, because the original drawing content may have a large amount of data, it's necessary to consider whether to use GPU rendering.

[0070] In the financial data plotting method of this invention, during normal use, there is often a need to view complete candlestick charts. If a separate window or canvas is opened to draw the candlestick chart, the viewing process often requires readjusting the candlestick position and zoom level, resulting in a less than ideal user experience, especially when viewing candlestick charts frequently. To improve the candlestick chart viewing experience, after extensive experimentation, I developed a method that directly draws the candlesticks on the canvas of the selected drawing element, ensuring that the drawn candlestick chart is aligned with the drawing element on the canvas, including positional alignment and consistent zoom level. This leads to the invention of the third interaction method for financial data plotting of this invention: an in-place candlestick chart drawing method, designed to make viewing candlestick charts simpler and more efficient.

[0071] The third interactive method for drawing financial data based on the present invention is an in-situ candlestick chart drawing, which can be summarized as follows: Selecting one of the selected drawing elements as the drawing element to be drawn into the candlestick chart, and performing in-situ candlestick chart drawing, including drawing the candlestick chart and restoring the coordinate system. The in-situ candlestick chart is drawn directly on the canvas (with existing drawing content) of the selected drawing element, and the drawing element to be drawn into the candlestick chart and its corresponding position on the candlestick chart are kept coincident or aligned. The coordinate system restoration method is based on the overall canvas coordinate system, restoring and displaying the coordinate system of the candlestick chart. The coordinate system restoration method uses replacement or simultaneous display.

[0072] Furthermore, the phrase "selecting one of the selected drawing elements as the element to be drawn in the candlestick chart" is because there may be multiple, even thousands, of selected drawing elements. Drawing multiple candlestick charts simultaneously on a single canvas would result in a cluttered and unusable display. Therefore, it's necessary to control the number of candlestick charts drawn on the canvas, ideally controlling it to only one. Thus, one element needs to be selected from the selected drawing elements as the element to be drawn in the candlestick chart; the selection method can be chosen by the user.

[0073] Furthermore, when drawing in-place candlestick charts, drawing only one element and drawing only one in-place candlestick chart is a preferred solution considering the final display effect, but it does not mean that multiple in-place candlestick charts cannot be drawn simultaneously.

[0074] Furthermore, the so-called "directly drawing candlestick charts on the canvas of the selected drawing element (where there is already drawing content)" refers to drawing candlestick charts while keeping the original drawing content on the canvas unchanged. This process improves the blending effect by controlling depth or transparency. It can also be understood as using the original drawing content on the canvas as a background to draw candlestick charts.

[0075] Furthermore, the so-called "keeping the drawing elements of the candlestick chart coincident or aligned with their corresponding positions on the candlestick chart" is achieved through two aspects: scaling and translation. Regarding scaling, the candlestick chart and the drawing elements of the candlestick chart maintain the same scaling ratio on the canvas (including multiple axes, such as the X-axis, Y-axis, and Z-axis). This can also be understood as the scaling ratio of the candlestick chart directly referencing the scaling ratio of its corresponding drawing elements on the canvas. Regarding translation, as described in the financial data drawing method of this invention, "translation is the translation of all points on the drawing element." Therefore, it can be understood that the candlestick chart is translated to ensure that a certain point of the drawing element of the candlestick chart coincides or aligns with its corresponding point on the candlestick chart.

[0076] Furthermore, the so-called "restoring the coordinate system," as described in the financial data plotting method of this invention, refers to the fact that "the plotted coordinate system consists of the overall coordinate system of the canvas and the sub-coordinate systems of the plotting elements." The coordinate system normally displayed on the canvas (unaffected by interaction) is the overall coordinate system of the canvas, not the sub-coordinate system corresponding to the selected plotting element for drawing the candlestick chart. However, to properly view a candlestick chart, it is necessary to restore and display its coordinate system. In most cases, the coordinate system of the candlestick chart is consistent with the sub-coordinate system of the corresponding plotting element for drawing the candlestick chart.

[0077] Furthermore, in the so-called "restoration of the coordinate system using replacement or simultaneous display," replacement means hiding the original canvas coordinate system and replacing it with the candlestick chart's coordinate system. Simultaneous display means that both the canvas coordinate system and the candlestick chart's coordinate system are displayed simultaneously.

[0078] The interactive method three steps of the financial data plotting method of the present invention include:

[0079] Select the drawing element. To avoid drawing a large number of candlestick charts simultaneously, select one element from the selected elements to be used as the drawing element for the candlestick chart. Specifically, the user selects a specific element to be used for the candlestick chart.

[0080] Obtain identification labels, coordinates, and scaling data. Identification labels typically contain the position of the drawing element on the data source; more specifically, they can be understood as containing the position information of the drawing element to be plotted on the corresponding candlestick chart. The preferred coordinates use the coordinates of the starting point of the drawing element to be plotted on the canvas. Scaling data indicates the scaling of the drawing element on the canvas, used to adjust the scaling ratio of the candlestick chart.

[0081] Acquire candlestick chart data. Based on the identification tags of the elements to be plotted in the candlestick chart, retrieve the candlestick chart data from the data source. This acquisition process requires relevant calculations, and the acquired candlestick chart data includes the associated axis data.

[0082] Control the translation and scaling of the candlestick chart. Use the scaling ratio of the elements to be drawn in the candlestick chart as the scaling ratio of the candlestick chart. Preferably, translate the candlestick chart to ensure that the starting point of the elements to be drawn in the candlestick chart coincides with the corresponding point on the candlestick chart. Furthermore, manage and save the translation and scaling data of the candlestick chart during the translation and scaling process, because the relevant data is needed to restore the coordinate system of the candlestick chart later.

[0083] Restore the coordinate system of the candlestick chart. Using data related to the translation and scaling of the candlestick chart, calculate and restore the coordinate system corresponding to the current display environment. The goal is to ensure that the final drawn candlestick chart contains normal candlestick patterns. Figure 1 Such complete information, including candlestick charts and their coordinate system, can be displayed like ordinary candlestick charts. Figure 1 It can be used in this way, while the original drawing content still exists as a background;

[0084] Draw candlestick charts. Use CPU, GPU, or a combination of CPU and GPU to draw the candlestick charts. Although a single candlestick chart has limited content, the drawing process preserves the original chart data, which may be quite large. Therefore, it is necessary to consider using GPUs for drawing or assistance when necessary.

[0085] One application scenario of the financial data plotting method of this invention is to plot a large number of market data segments. In this scenario, it is often necessary to quickly understand the complete market trend of a large number of selected plotted elements. Viewing each candlestick chart individually is too cumbersome and makes comparison difficult. Therefore, after extensive practice, I invented a fourth interactive method for the financial data plotting method of this invention: in-situ market data completion plotting. This method plots the complete market data of all selected plotted elements on the canvas of the selected elements, while ensuring that each plotted element completely overlaps with its corresponding position in the complete market data, greatly simplifying the process of batch viewing of complete market trends.

[0086] The fourth interactive method of the financial data drawing method based on the present invention is an in-situ market data completion drawing, which can be summarized as follows: when the financial data to be drawn is market data, in-situ market data completion drawing is performed on the selected drawing elements. The in-situ market data completion drawing involves acquiring the complete market data of each selected drawing element and aligning the acquired complete market data with the data of the selected drawing element on the canvas (existing drawing content) of the selected drawing element. Further alignment drawing involves overlapping or aligning each selected drawing element with its corresponding position within the corresponding complete market data.

[0087] Furthermore, market data refers to financial data with a timeline consistent with the market trading process, especially data related to trading prices.

[0088] Furthermore, the phrase "when the drawn financial data is market data" refers to the application of the interaction mode four of the financial data drawing method of this invention to this scenario. Furthermore, in layer management mode, considering that layer management can limit the scope of interaction, it can be understood as "when the drawn financial data within the layer is market data".

[0089] Furthermore, the fourth interactive mode of the financial data plotting method of the present invention is particularly suitable for scenarios where the plotted financial data consists of market data segments. If the plotted financial data is complete market data, although it is possible to perform in-situ market data completion plotting, it is meaningless because the completed plotting is the same as the currently plotted elements.

[0090] Furthermore, the so-called "complete market data" refers to complete market data from the data source, and the time range of the market data is set by the user, not all historical market data.

[0091] Furthermore, the so-called "aligned drawing" involves aligning or matching each selected drawing element with its corresponding position within the complete market data. This process includes two aspects: scaling and translation. Regarding scaling, the complete market data maintains the same scaling ratio as its corresponding drawing element on the canvas (including multiple axes, such as the X, Y, and Z axes). This can also be understood as the scaling ratio of the acquired complete market data directly referencing the scaling ratio of its corresponding drawing element on the canvas. Regarding translation, as described in the financial data drawing method of this invention, "translation involves translating all points on the drawing element." Therefore, it can be understood that translating the complete market data ensures that the starting point of its corresponding drawing element coincides or aligns with its corresponding point on the complete market data.

[0092] The interactive steps of the financial data plotting method of the present invention, in mode four, include:

[0093] Retrieve the identification label, position, and scale of the selected drawing element. The identification label typically contains the position of the drawing element on the data source; more specifically, it can be understood as containing the position information of the drawing element within its complete market data. The position and scale data of the selected drawing element are used to adjust the translation and scaling of the corresponding complete market data to be supplemented.

[0094] Retrieve the completed financial data (market data). Based on the identification tags of the selected drawing elements, retrieve the complete market data from the data source.

[0095] Complete the correlation axis data. Preferably, the market data obtained in the previous step is used as the data on the Y-axis. It is necessary to further complete the correlation axis data, such as the ascending axis X-axis, the depth axis Z-axis, and the color axes R-axis, G-axis, B-axis, and A-axis.

[0096] Apply scaling and translation. Using the scaling data of the selected drawing element, scale the completed market data to ensure consistent scaling rules. Then, by recognizing labels, find the position of the starting point of the selected drawing element on the completed market data, and control the translation of the completed market data to make them coincide. The purpose is to ensure that the drawn element and its segment on the complete market data can overlap.

[0097] Draw the completed market data. Use CPU, GPU, or a CPU+GPU combination to draw the completed market data. Because there may be many selected drawing elements, or the original drawing content may already have a certain amount of data, it is necessary to consider whether to use GPU for drawing or assistance.

[0098] As described in the financial data plotting method of this invention, "the color and translation of the plotting elements are mapped to related data." Furthermore, weights can be set during the statistical process of interaction methods one and two in the financial data plotting method of this invention. To make this process easier for users, using a code-like interaction method is a good solution. However, the general code interaction method is not ideal for the financial data plotting method of this invention. Therefore, after extensive practice, I invented interaction method five for the financial data plotting method of this invention, a code-controlled interaction method, designed to simplify the interaction code, improve computational performance, and enhance the user experience.

[0099] The fifth interaction method for the financial data plotting method based on this invention is a code-controlled interaction method, summarized as follows: First, global calculation is performed based on a configured computing environment and code text; then, further data processing is performed; and finally, the calculation results are transmitted. The configured computing environment refers to preparing the data and functions required for the calculation process in memory in advance and configuring an environment with executable code text, including standardization processing of the output results; the code text refers to text written by the user containing the algorithm to be calculated. Global calculation means that the data used for the calculation and the calculation results are performed at the data source dimension, and are calculations for all financial products in the data source, not calculations using the specific financial data of the plotting content. Further data processing means that the user decides whether to further process the results of the global calculation, and the methods of further data processing include: sorting, scaling, and grouping. Transmitting the calculation results means outputting the global calculation results. The process of transmitting the calculation results includes adapting the global calculation results to the specific plotting content, and the target and purpose of transmitting the calculation results are set by the user.

[0100] Furthermore, the data source refers to the origin of all financial data required for the operation of the financial data plotting method of this invention, which generally needs to be normalized. The data source normalization process is described in the relevant section of the financial data plotting method of this invention, "normalize the data source and pre-load it into memory." Preferably, data with a time axis in the data source is made into multiple two-dimensional matrices, with data of different dimensions placed independently in a two-dimensional matrix, and row and column labels are created. Preferably, data without a time axis in the data source is made into a one-dimensional array.

[0101] Preferably, for data with a timeline in a normalized data source, certain factors may cause missing (null) data for a particular financial product at a certain point in time, such as a stock being suspended from trading on a certain trading day. Furthermore, null values ​​can lead to computational discrepancies, such as those related to the rolling window function in pandas. To mitigate this issue, the two-dimensional matrix used for computation places null values ​​at the top or bottom of the normalized data source's timeline-aligned two-dimensional matrix. This can be understood as the computational two-dimensional matrix abandoning the time alignment of different financial products on the same row, ensuring the continuity of non-null values ​​for different financial products. Furthermore, after computation, the original data structure needs to be restored, i.e., the time alignment of different financial products on the same row. Furthermore, preferably, a conversion table is created for the two data structures: the computational two-dimensional matrix and the normalized data source's timeline-aligned two-dimensional matrix, enabling quick switching between the two. Furthermore, the so-called "output result normalization" includes the process of restoring the timeline-aligned two-dimensional matrix from the timeline-aligned two-dimensional matrix in the normalized data source (i.e., the time alignment of different financial products on the same row).

[0102] Furthermore, for data with a timeline that has been standardized, if there is no missing value for a particular financial product, the two-dimensional matrix used for calculation can be the same two-dimensional matrix with a timeline that has been standardized from the data source, thus eliminating the need for conversion steps between the two.

[0103] Furthermore, configuring the computing environment involves setting up an environment capable of executing algorithm code. Preferably, Python's `exec` function is used, creating a dictionary of the required data and functions for the `exec` function's namespace, and executing the code within that namespace. Furthermore, the required data includes the data used in the code. Preferably, the two-dimensional matrix in the required data is the same two-dimensional matrix used in the calculation (ensuring that the non-null values ​​for different financial products are continuous two-dimensional matrices). Furthermore, the required data is obtained directly or indirectly from a data source and is unrelated to the specific plotting content, ensuring that the configured computing environment is a global computing environment. Obviously, the two-dimensional matrix in the required data can also directly use a standardized two-dimensional matrix from a data source, and then perform the corresponding transformations in the code. Using the two-dimensional matrix used in the calculation is for the purpose of simplifying the code.

[0104] Furthermore, the code text is user-defined text containing algorithmic content. Because the execution of the code text takes place within a configured computing environment, and the necessary data and functions are already configured within that environment, the code text only needs to contain algorithm-related content. Unlike typical program code, it does not require preloading and reading data, thus simplifying the code text.

[0105] Furthermore, global computation is used because it is more suitable for the financial data plotting method of this invention, mainly considering both computational logic and computational performance.

[0106] In terms of computational logic:

[0107] Firstly, one of the purposes of the financial data plotting method of this invention is to explore the relationships between different data dimensions, such as the "color and translation mapping related data" in the financial data plotting method of this invention. The result of global calculation conforms to the concept of data dimension, and it is not affected by the specific plotting content, thus possessing stability and reference value. If only local calculations are performed on the specific plotting content, the calculation results may be affected by the specific plotting content, lacking stability and reference value, and are not suitable as the concept of data dimension;

[0108] Secondly, during the sorting process, global calculations, which already contain data for all financial products, can directly sort the results. However, local calculations for specific plot content require consideration of whether the data includes all financial products, making the process more complex.

[0109] Finally, some calculations in financial data (such as calculating the 5-day average of closing prices) require not only current-time data but also previous data. This means that local calculations based on specific plot content need to prepare data according to the calculation method, significantly reducing the versatility of the computing environment. Global calculations, on the other hand, are performed at the data source level and do not require this consideration.

[0110] In terms of computational performance: While global computation uses a larger amount of data, resulting in some redundant data for plots with smaller datasets, the overall computational efficiency is still acceptable. Furthermore, global computation efficiency is unaffected by the amount of data in the specific plot content. However, if local computation is performed on specific plot content, especially when dealing with large amounts of financial data, the amount of data to be calculated may far exceed the global data. Moreover, the data aggregation for calculations requires prior extraction and summarization from the data source, a cumbersome process that leads to significantly lower computational efficiency compared to the global computation method. Therefore, while global computation is not always optimal, it is stable and reliable. For the financial data plotting method of this invention, it is still generally superior to direct local computation on specific plot content.

[0111] Furthermore, the so-called "data processing" refers to the user's decision on whether to further process the results of the global calculation. Further data processing methods include sorting, scaling, and grouping. This is because sometimes the results of global calculations may have numerical ranges that are too large or too small, or the numerical distribution may be chaotic, resulting in unsatisfactory performance when used directly. Further processing can improve the usability. Obviously, these processing methods can also be written in the code. Separating these processing methods from the code simplifies the code and allows users to adjust processing methods or related parameters without modifying the code, making it more convenient to use.

[0112] Furthermore, the so-called "process of transferring calculation results includes adapting global calculation results to specific drawing content, and the target and purpose of transferring calculation results are set by the user," taking four possible uses as examples:

[0113] Firstly, the data related to translation and color mapping described in the financial data plotting method of this invention. The way the global calculation results are adapted to specific plotting content is by extracting and summarizing the results from the global calculation results based on the identification label of each plotting element in the specific plotting content, and then passing this summary to the target axis set by the user.

[0114] Secondly, the statistical weights of interaction methods one and two used in the financial data plotting method of this invention. The way the global calculation result is adapted to the specific plotting content is also based on the identification label of each plotting element in the specific plotting content, extracting and summarizing from the global calculation result;

[0115] Third, financial data used to create the plot content. The preferred global calculation code text needs to consider that the output is financial data used to create the plot content. Preferably, a Boolean-type two-dimensional matrix with a time axis is used as the output. The way to adapt the global calculation result to the specific plot content is to convert the global calculation result into the financial data of the plot content. The specific conversion methods are as follows: First, each True value in the global calculation result represents a plotting element. By adding data before or after each True value, the financial data of the plot content is extracted and summarized from a set data source. Second, a continuous True value in the global calculation result represents a plotting element. The financial data of the plot content is extracted and summarized from a set data source.

[0116] Fourth, it is used to filter the content of the drawing. The basic method is similar to "financial data used to create the drawing content", except that the financial data used to obtain the drawing content is used as a list for filtering.

[0117] The steps of the interactive mode five of the financial data plotting method based on the present invention include:

[0118] Retrieves the text of the algorithm code. Retrieves the text of the algorithm code defined by the user.

[0119] Load the configured computing environment and execute the algorithm code. Preferably, use Python's `exec` function, creating a dictionary of the data and functions needed for the computation within the `exec` function's namespace, and then execute the code text within that namespace.

[0120] Extract the calculation results. This involves obtaining the result of the code execution, including normalization of the output, resulting in a global calculation.

[0121] Handling sorting, scaling, and grouping. Often, the numerical ranges and distributions of different calculation results vary greatly, and practical applications are sometimes less than ideal. Sorting, as a way to transform calculation results into an ideal, uniform distribution, is more effective than the actual calculated values ​​in certain scenarios. Furthermore, if the numerical range of the calculation results is too large or too small, directly using them for mapping, coloring, or setting statistical weights will not yield ideal results. By scaling the calculation results to a suitable range, the user experience can be greatly improved. Moreover, grouping similar calculation results together, especially for translation mapping results, facilitates data comparison.

[0122] Output. Based on the user-defined purpose and goals, output the results to the corresponding location to execute the appropriate task.

[0123] Furthermore, in specific applications, the interaction methods one, two, three, four, and five of the financial data plotting method of the present invention can be operated independently or in combination. Furthermore, the "multiple interaction methods operating simultaneously" refers not only to the interaction methods one, two, three, four, and five of the financial data plotting method of the present invention, but also to general interaction methods. Furthermore, the operation of multiple interaction methods can be performed simultaneously, sequentially, or automatically switching between interaction methods based on specific circumstances. For example, interaction modes one and two of the financial data plotting method of the present invention can be executed simultaneously, allowing simultaneous viewing of the in-situ heatmap, X-axis histogram statistics, and Y-axis histogram statistics; interaction modes five and one of the financial data plotting method of the present invention can be executed sequentially, updating the in-situ heatmap statistics after changing the relevant data of the Y-axis translation mapping; interaction modes one and three of the financial data plotting method of the present invention can automatically switch interaction modes according to specific circumstances. When creating in-situ heatmap statistics, if there is only one or a few selected plotting elements, which are not statistically significant, the display can be automatically switched to an in-situ candlestick chart. Clearly, the combinations of interaction modes are diverse, far exceeding the three examples given. Therefore, any person skilled in the art who, without creative effort, uses one or more of the interaction modes one, two, three, four, and five of the financial data plotting method of the present invention through the combined operation of multiple interaction modes, and without departing from the core technical framework of the present invention, should fall within the protection scope of the present invention. Attached Figure Description

[0124] Figure 1 A flowchart of an embodiment of the financial data plotting method of the present invention.

[0125] Figure 2 A partial flowchart of an embodiment of the financial data plotting method of the present invention.

[0126] Figure 3 Another part of the flowchart of an embodiment of the financial data plotting method of the present invention.

[0127] Figure 4 A flowchart of one embodiment of the interactive mode of the financial data plotting method of the present invention.

[0128] Figure 5 A flowchart of an embodiment of the interactive mode two of the financial data plotting method of the present invention.

[0129] Figure 6 A flowchart of an embodiment of the interactive mode three of the financial data plotting method of the present invention.

[0130] Figure 7 A flowchart of an embodiment of the interactive mode four of the financial data plotting method of the present invention.

[0131] Figure 8 A flowchart of an environment configuration for the interactive mode five of the financial data plotting method of the present invention.

[0132] Figure 9 A flowchart of an embodiment of the interactive mode five of the financial data plotting method of the present invention.

[0133] Figure 10 The effects of using this invention on actual financial data. Figure 1 The effect when only a large number of short lines are drawn.

[0134] Figure 11 The effects of using this invention on actual financial data. Figure 2 The effect after translating and color mapping related data.

[0135] Figure 12 The effects of using this invention on actual financial data. Figure 3 The effects of interactive modes one and two using the financial data plotting method of the present invention.

[0136] Figure 13 The effects of using this invention on actual financial data. Figure 4 The effect of interactive mode three using the financial data plotting method of the present invention.

[0137] Figure 14 The effects of using this invention on actual financial data. Figure 5 The effect of interactive mode four using the financial data plotting method of the present invention. Detailed Implementation

[0138] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the content described below is merely some embodiments of the present invention, and those skilled in the art can obtain other implementation methods based on this content without creative effort.

[0139] In an embodiment of the financial data plotting method of the present invention, such as Figure 1 As shown, the process of a financial data plotting method includes:

[0140] Step S100 standardizes the data structure to be drawn. Preferably, the drawing element with the largest data length is used as the baseline length. All drawing elements are padded with null values ​​to the same length, and each drawing element is placed in a separate column (or a separate row, with the calculation method modified accordingly). This standardizes the structure of the drawn data into a two-dimensional matrix, denoted as Y0, with n rows and m columns. Preferably, an identification label is created for each drawing element, preferably using the product code and time of a certain point in each drawing element. Preferably, the identification labels are managed as two one-dimensional arrays of length m, which are equivalent to arrays recording the position of a certain point of the drawing element in the data source. This process ensures that the relevant data of the drawing has a certain continuity in memory, which facilitates the use of vectorized methods for subsequent calculations or queries.

[0141] Step S200 confirms the target axis of the drawn data and completes the associated axis data. Preferably, the above data Y0 is marked as the Y-axis, and based on the data rules of Y0, the associated axis data is completed: X-axis, Z-axis, R-axis, G-axis, B-axis, and A-axis. If associated axis data already exists, the existing associated axis data is used directly. The completion method is as follows: the X-axis is an increasing axis, preferably using a two-dimensional matrix with the same structure as Y, where each column consists of n numbers from 0 to n-1. The Z-axis is a depth axis, preferably using a two-dimensional matrix with the same structure as Y, where all values ​​are 0.0. The R-axis, G-axis, and B-axis are the red channel, green channel, and blue channel, respectively, preferably using a two-dimensional matrix with the same structure as Y, where all values ​​are 0.5. The A-axis is transparency, preferably using a two-dimensional matrix with the same structure as Y, where all values ​​are 1.0.

[0142] Step S300 processes the scaling of the drawing elements. For the Y-axis, preferably, a reference value is found for each drawing element and the values ​​are summed to obtain the scaling reference YR. YR is a one-dimensional array of length m. The Y-axis data after scaling is Y1 = Y0 / YR (a vectorized calculation expression, representing the data in each column of Y0 divided by the value at the corresponding position in YR). For the scaling of the X-axis, the X-axis data after scaling is obtained in a similar manner to Y1. When there are no special requirements for the scaling of the X-axis, preferably, the scaling reference of the X-axis for each drawing element is defined as 1, and a one-dimensional array XR of length m containing only 1 values ​​is obtained.

[0143] Step S400 processes the translation mapping related data;

[0144] Step S500 processes color mapping-related data;

[0145] Step S600 renders the data using CPU, GPU, or a combination of both. Considering the large data volume, CPU rendering alone is insufficient; therefore, the rendering process primarily uses GPU with CPU as a secondary component. Preferably, GPU rendering is implemented using the OpenGL graphics interface.

[0146] Specifically, such as Figure 2 A preferred embodiment of step S400, which processes translation mapping-related data, includes:

[0147] S410 determines whether the Y-translation maps to related data. If yes, proceed to S411. If no, proceed to S412.

[0148] S411 processes the translation mapping of Y. Preferably, based on the identification label of the drawing element, the relevant data to be mapped is obtained from the data source, and the position translation YM of the corresponding drawing element sub-coordinate system in the overall canvas coordinate system is obtained. YM is a one-dimensional array of length m;

[0149] S412 sets the translation of Y to 0. Preferably, the translation array YM of the Y-axis is a one-dimensional array of length m with all values ​​being 0;

[0150] S420 calculates the data after the Y-axis translation. The translated data on the Y-axis is YD = Y1 + YM, which is a vector calculation expression, representing the data in each column of Y1 plus the value at the corresponding position of YM;

[0151] S430 determines whether the X translation maps to related data. If yes, execute S441; otherwise, execute S442.

[0152] S441 processes the translation mapping of X. Preferably, based on the identification label of the drawing element, the relevant data to be mapped is obtained from the data source to obtain the position translation XM of the corresponding drawing element sub-coordinate system in the overall canvas coordinate system. XM is a one-dimensional array of length m;

[0153] S442 sets the translation of X to 0. The translation array XM along the X-axis uses a one-dimensional array of length m, where all values ​​are 0.

[0154] S450 calculates the data after X-axis translation. The translated data on the X-axis is XD = X1 + XM, which is a vector calculation expression, representing the data in each column of X1 plus the value at the corresponding position of XM;

[0155] Specifically, such as Figure 2The content described does not include Z-axis translation mapping because the display effect in the preferred XY two-dimensional plane is better than that in three-dimensional space, and Z-axis translation mapping is not easy to represent in the XY two-dimensional plane. This does not mean that Z-axis translation mapping is impossible, nor that the canvas cannot be three-dimensional.

[0156] Specifically, such as Figure 3 A preferred embodiment of step 500, which processes color mapping-related data, includes:

[0157] S510 determines whether the R-axis is mapped to relevant data. If yes, proceed to step S520. If no, proceed to step S530.

[0158] S520 processes the mapping of the R-axis. Preferably, based on the identification labels of the drawing elements, it obtains the relevant data to be mapped from the data source, acquires the new color data after mapping, and replaces the old R-axis data. During this process, if the acquired color data is a one-dimensional array of length m, it generates an n-row m-column two-dimensional matrix by copying rows.

[0159] S530 determines whether the G-axis is mapped to relevant data. If yes, proceed to step S540. If no, proceed to step S550.

[0160] S540 handles the mapping of the G-axis. The specific method is similar to that of S520, and will not be described in detail here;

[0161] S550 determines whether the B-axis is mapped to relevant data. If so, proceed to step S560;

[0162] S560 handles the mapping of the B-axis. The specific method is similar to that of S520, and will not be described in detail here.

[0163] In an embodiment of the interactive mode one (an in-situ heatmap statistics) of the financial data plotting method of the present invention, such as Figure 4 As shown, it includes the following steps:

[0164] A100 obtains the identification label and position coordinates of the selected drawing element. In the financial data drawing method of this invention, process data is managed, including data such as the identification label and position coordinates of the drawing element required by this interaction method. The identification label and coordinate data of the selected drawing element are then obtained from this data. Preferably, the coordinates of the starting point of each selected drawing element are used to represent the coordinates of the selected drawing element. Preferably, the obtained X-coordinate of the selected drawing element is marked as XS, which is an array of the same length as the number of selected drawing elements. Similarly, the Y-coordinate of the selected drawing element is marked as YS, which is an array of the same length as XS.

[0165] A200 calculates the statistical results of the heatmap. It calculates the position, width, height, value, and color of each cell, including:

[0166] A210 determines whether to subdivide by step size. It determines the subdivision method and creates different subdivisions based on the chosen method. If yes, proceed to A221. If no, proceed to A222.

[0167] A221 creates subdivisions by step size. For the X-axis, calculate the minimum and maximum values ​​of XS, and then calculate the X-axis subdivision XP based on the set step size. This is a one-dimensional array with a length equal to the number of cells in the X-axis direction of the heatmap plus one. Further, the Y-axis subdivision YP is calculated in a similar way, also as a one-dimensional array with a length equal to the number of cells in the Y-axis direction of the heatmap plus one.

[0168] A222 Subdivisions are created based on quantity. For the X-axis, it's preferable to calculate the minimum and maximum values ​​of XS, and then calculate the X-axis subdivision XP based on the set number of cells along the X-axis. This is a one-dimensional array with a length equal to the number of cells along the X-axis on the heatmap plus one. The Y-axis subdivision YP is calculated similarly, also as a one-dimensional array with a length equal to the number of cells along the Y-axis on the heatmap plus one. Furthermore, if the statistical function used directly passes the subdivision quantity, and the subdivision result is obtained together with the statistical result, the workflow needs to be adjusted accordingly, for example, using NumPy's histogram2d function.

[0169] A230 determines if there is a weight. If yes, proceed to A241. If no, proceed to A242.

[0170] A241 Weighted Statistics. Preferably, the weighted data WS to be statistically analyzed is obtained based on the identification tags of the selected drawing elements, which is a one-dimensional array with the same length as XS. Based on the obtained XP, YP, and WS, a heatmap is performed on the data XS and YS to be statistically analyzed to obtain the statistical results. The statistical results are a two-dimensional matrix HS, where the number of rows is the same as the number of cells in the Y-axis direction, and the number of columns is the same as the number of cells in the X-axis direction. The values ​​represent the average weights of the selected drawing elements falling into the corresponding cells. Furthermore, some statistical algorithms require step-by-step calculations: first, the statistical results of weight accumulation are calculated, then the statistical results of quantity are calculated, and finally the average is obtained by division. Furthermore, the obtained WS may encounter null values; preferably, the corresponding data is removed or filled with 0.

[0171] A242 Statistical Analysis by Quantity. Preferably, based on the obtained subdivisions XP and YP, heatmap statistics are performed on the data XS and YS to be statistically analyzed to obtain the statistical results. The statistical results are a two-dimensional matrix HS, where the number of rows is the same as the number of cells along the Y-axis, and the number of columns is the same as the number of cells along the X-axis. The numerical values ​​represent the number of selected drawing elements falling into the corresponding cells. Furthermore, if the quantity needs to be converted to a percentage display, HS can be processed accordingly, for example, HS divided by the sum of HS.

[0172] A250 acquires color. Preferably, based on the statistical result HS, the minimum value HS_min and the maximum value HS_max are first calculated, and then the color data is further calculated. For example, the red channel can be calculated using the vector calculation expression: H_R = (HS - HS_min) / (HS_max - HS_min). The specific color calculation scheme can be adjusted according to some color schemes and parameters;

[0173] As described in A210-250, the specific process of A200 allows you to obtain complete heatmap data from A200, which includes detailed data for each cell. Specifically: the cell's starting point is in XP and YP (neither including the last value); the cell's width is in XP, calculated by subtracting the previous value from the next value in XP; the cell's height is in YP, calculated by subtracting the previous value from the next value; the cell's value HS; and the cell's color.

[0174] The A300 generates a heatmap. Based on the complete heatmap data obtained from the A200, it is drawn onto the canvas. Transparency and depth are considered during the drawing process to ensure better integration of the drawn heatmap with the original content on the canvas. The drawing process preferably uses the OpenGL graphics interface.

[0175] In an embodiment of the interactive mode two (a positional histogram statistics) of the financial data plotting method of the present invention, as follows: Figure 5 As shown, the preferred implementation process, which sets the X-axis as the axis to be counted, includes the following steps:

[0176] B100 obtains the identification label and position coordinates of the selected drawing element. In the financial data drawing method of this invention, process data is managed, including data such as the identification label and position coordinates of the drawing elements required by this interaction method. The identification label and coordinate data of the selected drawing element are then obtained from this data. Furthermore, the coordinates of the selected drawing element are generated by creating a point representing the coordinates of each selected drawing element; this point can be one of the selected drawing elements. Preferably, the coordinates of the starting point of each selected drawing element are used to represent the coordinates of the selected drawing element. Preferably, the obtained X-coordinate of the selected drawing element is marked as XS. XS is an array with a length equal to the number of selected drawing elements;

[0177] B200 calculates histogram statistics. It calculates the position, width, height, value, and color of each histogram bar, including:

[0178] B210 determines whether to subdivide by step size. It determines the subdivision method and creates different subdivisions based on the chosen method. If yes, proceed to B221. If no, proceed to B222.

[0179] B221 creates subdivisions based on step size. For the X-axis, preferably, the minimum and maximum values ​​of XS are calculated, and then the subdivision XP of the X-axis is calculated according to the set step size. XP is a one-dimensional array with a length equal to the number of bars in the histogram plus 1;

[0180] B222 Subdivisions are created based on quantity. For the X-axis, preferably, the minimum and maximum values ​​of XS are calculated, and then the subdivision XP of the X-axis is calculated based on the set number of bars in the histogram along the X-axis direction. XP is a one-dimensional array with a length equal to the number of bars in the histogram plus one. Furthermore, if the statistical function used for subdivision directly passes the subdivision quantity, and the subdivision result is obtained together with the statistical result, the process needs to be adjusted accordingly, for example, using NumPy's histogram function;

[0181] B230 Determines if there is a weight. If yes, proceed to A241. If no, proceed to A242.

[0182] B241 Weighted Statistics. Preferably, based on the acquired identification labels of the selected drawing elements, the weighted data WS to be statistically analyzed is obtained, which is a one-dimensional array with the same length as XS. Based on the acquired subdivisions XP and WS, histogram statistics are performed on the data XS to be statistically analyzed to obtain the statistical results. The statistical results are a one-dimensional array ZS, the length of which is the same as the number of bars in the histogram along the X-axis, and the values ​​represent the average weight of the selected drawing elements that fall into the corresponding histogram bars along the X-axis. Furthermore, some statistical algorithms require step-by-step calculations, first calculating the statistical results of weight accumulation, then calculating the statistical results of quantity, and then dividing and averaging. Furthermore, the obtained WS may encounter null values, preferably by removing the corresponding data or filling with 0;

[0183] B242 Statistical Analysis by Quantity. Based on the obtained segmentation XP, histogram statistics are performed on the data XS to be analyzed, and the statistical results are obtained. The statistical results are a one-dimensional array ZS, the length of which is the same as the number of bars in the histogram along the X-axis. The values ​​represent the number of selected plotted elements falling into the corresponding histogram bars along the X-axis. Furthermore, if the quantity needs to be converted to a percentage display, ZS can be processed accordingly, for example, by dividing ZS by the sum of ZS.

[0184] B250 acquires color data. Preferably, based on the statistical result ZS, the minimum value ZS_min and the maximum value ZS_max of ZS are first calculated, and then the color data is further calculated. For example, the red channel can be calculated using the vector calculation expression: Z_R = (ZS - ZS_min) / (ZS_max - ZS_min). The specific color calculation scheme can be adjusted according to some color schemes and parameters;

[0185] B260 Complete the position data. For the X-axis direction, the position information of the histogram bars can be obtained through XP. In the X-axis direction, the starting point of the histogram bar is within XP (excluding the last value), and the width of the histogram bar is also within XP, calculated by subtracting the previous value from the next value in XP. Furthermore, it is necessary to obtain the position data of the histogram in the Y-axis direction, which requires considering the histogram's drawing position. Preferably, the histogram is drawn below the corresponding current display area on the canvas, and its drawing range height is preferably 15% of the total display area. Further calculate the histogram drawing range, its position in the Y-axis direction of the canvas, including the lower ZY_min and upper ZY_max. Further, the starting point of the histogram bar on the Y-axis is ZY_min, and the height of the histogram bar is calculated using a vector expression: Z_H = (ZS-ZS_min)*(ZY_max-ZY_min) / (ZS_max-ZS_min).

[0186] The specific process of B200, as described in B210-B260, allows you to obtain complete histogram data, including detailed data of the histogram bars.

[0187] The B300 histogram is drawn. Based on the complete histogram data obtained from the B200, it is drawn onto the canvas. Transparency and depth are considered during the drawing process to ensure better integration of the drawn histogram with the original content on the canvas. The drawing process preferably uses the OpenGL graphics interface. Furthermore, when the canvas is translated and scaled, and the display is refreshed, ZY_min and ZY_max need to be dynamically updated, thereby updating the data along the Y-axis of the histogram bars before drawing.

[0188] In an embodiment of the interactive mode three (an in-situ candlestick chart drawing) of the financial data drawing method of the present invention, such as Figure 6 As shown, it includes the following steps:

[0189] C100 confirms the drawing element. Select one of the selected drawing elements to draw the candlestick chart. The user decides which drawing element to choose, and can switch between them during the actual interaction.

[0190] C200 acquires identification labels, coordinates, and scaling data. In the financial data drawing method of this invention, process data is managed, including the identification labels, coordinates, and scaling data of the drawing elements required by this interactive method. Furthermore, the identification labels, coordinates, and scaling data of the drawing elements for which the candlestick chart is to be drawn are obtained from this data.

[0191] The C300 acquires candlestick chart data. Preferably, it acquires candlestick chart data from a data source based on the identification tags of the elements to be plotted. This acquisition process requires relevant calculations, and the acquired candlestick chart data includes associated axis data.

[0192] The C400 controls the panning and scaling of the candlestick chart. Preferably, the scaling data of the elements to be plotted in the candlestick chart is used to scale the acquired candlestick chart data, ensuring that the scaling rules are consistent. Alternatively, by recognizing tags, the position of a point of the element to be plotted in the candlestick chart is found on the candlestick chart, and the candlestick chart is panned to make them coincide. Furthermore, the data used for scaling and panning the candlestick chart needs to be saved, as it will be required when restoring the coordinate system of the candlestick chart.

[0193] C500 restores the coordinate system of the candlestick chart. Using the translation and scaling data of the candlestick chart saved in C400, it calculates the coordinate system required for the current display environment, including the Y-axis numerical labels and the X-axis time labels. Preferably, the original canvas coordinate system is replaced with the candlestick chart coordinate system.

[0194] The C600 is used to draw candlestick charts. The candlestick charts are drawn on the canvas, preferably using the OpenGL graphics interface.

[0195] In an embodiment of the interactive mode four (an in-situ market data completion drawing) of the financial data drawing method of the present invention, such as Figure 7 As shown, it includes the following steps:

[0196] D100 retrieves the identification label, position, and scale of the selected drawing element. In the financial data drawing method of this invention, process data is managed, including the identification label, position, and scale data of the drawing elements required by this interactive method. The identification label, position, and scale data of the selected drawing element are then retrieved from this data.

[0197] D200 retrieves the completed financial data (market data). Preferably, it retrieves complete market data from the data source based on the identification tags of the selected drawing elements.

[0198] The D300 requires supplementary data for related axes. The market data obtained from the D200 is based on the Y-axis and needs further supplementation with related axis data. For example, the X-axis (incremental axis), Z-axis (depth axis), and R, G, and B-axis (color axes).

[0199] The D400 application uses scaling and translation. It uses the scaling data of the selected drawing element to scale the completed market data, ensuring that the scaling rules are consistent. Then, by recognizing labels, it finds the position of a point of the selected drawing element on the completed market data and translates the completed market data to make them overlap.

[0200] The D500 renders the completed market data. The completed content is then drawn onto the canvas, preferably using the OpenGL graphics interface.

[0201] The fifth interactive mode (a code-controlled interactive mode) of the financial data plotting method of the present invention requires a computing environment in a specific embodiment. To better describe the specific embodiment of the fifth interactive mode of the financial data plotting method of the present invention, a preferred scheme for configuring the computing environment will be described. Specifically, as follows... Figure 8 As shown, the specific steps are as follows:

[0202] E001 data source standardization. Details are as follows:

[0203] Preferably, for data with a timeline in the data source, it is standardized into multiple two-dimensional matrices, and row and column labels are created. Preferably, the row labels use time labels, and the column labels use financial product labels. Taking A-share financial data as an example, closing price, opening price, highest price, lowest price, trading volume, ex-rights factor, and financial report-related data are each created into multiple two-dimensional matrices, with row labels using trading time and column labels using stock codes. Preferably, for market data (such as closing price), data from periods of suspension or before listing are treated as null values. Preferably, for financial report-related data, when null values ​​are encountered, a forward (earlier in time) search for non-null values ​​is used to fill them (considering that financial report-related data may only be available on the announcement date). Preferably, for ex-rights factors, a forward-adjusted method is used, and null values ​​are filled by a backward (later in time) search for non-null values ​​(considering that ex-rights factor-related data may only be available on the record date).

[0204] Preferably, for data in the data source that is related to financial products but lacks a timeline, such as attribute-related data of some financial products, the relevant data is organized into multiple one-dimensional arrays, with data of different dimensions each forming a separate one-dimensional array. Specifically, the data order in the one-dimensional array follows the column labels (labels related to financial products) of the two-dimensional matrix containing time-scale data in the data source. If any values ​​are missing during the processing, they are filled with null values.

[0205] E002 creates a mapping table. The mapping table is created based on normalized market data from a data source, such as a two-dimensional matrix of closing prices. The preferred mapping table is a 3-column array used for converting between the two-dimensional matrix from the normalized data source and the two-dimensional matrix used in the calculation. The first column, SC1, represents the row number of each non-null value in the normalized data source's two-dimensional matrix. The second column, SC2, represents the column number of each non-null value. The third column, SC3, represents the row number of each non-null value in the two-dimensional matrix used in the calculation.

[0206] E003 Obtain the two-dimensional matrix used for calculation. The two-dimensional matrix on the data source after normalization needs to be converted into the two-dimensional matrix used for calculation. Preferably, taking the closing price processed by NumPy vector assignment as an example, the closing price on the normalized data source is Close0, and the closing price used for calculation is Close1, and the expression is: Close1[SC3, SC2] = Close0[SC1, SC2]. The specific conversion process is reversible, and the output matrix needs to be filled with empty values ​​before conversion;

[0207] E004 Configure the computing environment. Preferably, use Python's `exec` function to execute the code. Create a dictionary within the `exec` namespace containing the data and functions needed for the computation. Specifically, the two-dimensional matrix in the required data is the one used for the computation.

[0208] like Figure 9 As shown, a specific embodiment of the fifth interaction mode (a code-controlled interaction mode) of the financial data plotting method of the present invention is illustrated, and the specific steps are as follows:

[0209] The E100 retrieves the text of the algorithm code. This text comes from user input and typically only includes the algorithm's computational process.

[0210] E200 loads the configured computing environment and executes the algorithm code. Preferably, it loads the pre-configured computing environments such as E001-E004 and executes the acquired algorithm code. Specifically, if additional usable data is needed during the computation process, it needs to be loaded into the configured computing environment beforehand.

[0211] E300 extracts the calculation results. Preferably, the results are retrieved using a dictionary from the namespace of Python's `exec` function, with a variable named `out` set to receive the results. Specifically, if the calculation result `out` is a two-dimensional matrix, it's necessary to consider using a mapping table (as described in E002) to restore it to the structure of a normalized two-dimensional matrix with a time axis from the data source. Furthermore, the extracted data results are labeled as `Arr`.

[0212] The E400 handles sorting, scaling, and grouping. Whether sorting, automatic scaling, or grouping is required depends on user settings, as detailed below:

[0213] E410 determines whether sorting is required. If yes, proceed to E420. If no, proceed to E430.

[0214] E420 performs sorting. The calculation results are further sorted, preferably using a sorting method where the minimum value in each row is 0 and the maximum value is 1.0. This can be implemented using existing encapsulated functions, such as pandas' `rank` function.

[0215] E430 determines whether the scaling is automatic. If yes, proceed to E441. If no, proceed to E442.

[0216] E441 automatically calculates the scale. Its purpose is to adjust the scale of the calculated result, keeping its value within a relatively suitable range. Preferably, it first calculates the maximum value of Arr, Arr_max. If Arr_max equals 0, this adjustment is skipped. If Arr_max is not equal to 0, the expression: Arr = Arr / Arr_max is used. Preferably, if the calculation result is to be used for color, it needs to be kept within the range of color values.

[0217] The E442 uses a set ratio. To obtain the user-set ratio k, use the expression: Arr = Arr * k;

[0218] E450 determines whether to group. If yes, proceed to E460. If no, proceed to E500.

[0219] The E460 applies grouping. Arr is grouped according to the set number of groups. Preferably, Arr is divided equally from its minimum to its maximum value based on the number of groups, thus converting the Arr data into grouped data.

[0220] Output at E500. The calculation results Arr are obtained from E100 to E400. Arr is output to the appropriate location according to the user-defined purpose and objective, executing the corresponding task and realizing the relevant interaction with the financial data plotting method of this invention.

[0221] Furthermore, to better describe the financial data plotting method and its interaction mechanism of the present invention, a practical example is used to demonstrate the effect of the invention in specific use. The financial data in the practical example is: using a large number of short lines to plot the closing prices of more than 5,000 stocks in the A-share market for all five days within a year. It can be understood that the closing price of each stock on the current day and the following four days (a total of five days) is plotted as a line, resulting in approximately more than one million lines of length 5.

[0222] like Figure 10 The diagram illustrates how the fifth interactive method of the financial data plotting method of this invention generates the financial data to be plotted. Specifically, the time range of the data source is first modified to within one year. Then, the configuration environment of the fifth interactive method of the financial data plotting method of this invention is further modified. The code text "out = ~d['close'].isna()" (where d['close'] is a two-dimensional matrix of daily closing prices in pandas format, representing data from the configuration environment) is executed. This defines the code output used to create the financial data to be plotted. The creation method uses each True value and the next 5 points as a plotting element, resulting in 1.23 million short lines of length 5. Figure 10Looking at the specific effect after drawing 1.23 million short lines of length 5, it can be seen that only some scaling was used, and the translation and color were not mapped to relevant data. The effect is basically the same as that drawn by ordinary drawing methods, and it is almost impossible to convey effective information.

[0223] like Figure 11 As shown, in Figure 10 Building upon the existing content, further data related to translation and color mapping is added. For X-axis translation, data is mapped to a sequence of transaction dates. The most recent transaction date from one year ago is set to 0, and the sequence increments by 5 for each subsequent transaction. For Y-axis translation, data is mapped to a sequence of data sorted by the day's price increase and grouped into 10 groups. The color mapping scheme is as follows: R-axis mapping is to sorted data as "(highest price - closing price) / closing price", and G-axis mapping is to sorted data as "(closing price - lowest price) / closing price".

[0224] Furthermore, from Figures 10 to 11 The specific process is implemented using the interactive method five of the financial data plotting method of this invention. For example, the R-axis uses the code text "out = (d['high']-d['close']) / d['close']" (the specific contents of d['close'] and d['high'] are a two-dimensional matrix of the closing price and the highest price of the daily line in pandas format, which is the data in the configuration environment), and further processes and sorts it, and finally defines the output for the color mapping of the R-axis.

[0225] Furthermore, such as Figure 11 As shown in the diagram, the overall effect of a practical drawing example is demonstrated by adjusting the canvas's panning and scaling to display all content, showcasing the advantages of the financial data drawing method of this invention in drawing large amounts of financial data. Due to limitations in image size, in practical use, it can be used on some large-sized displays without needing to display all content, and the actual effect is better than that of a single image.

[0226] Furthermore, during normal use, the canvas can be panned and scaled. For example... Figure 12 The image shown represents the effect during normal browsing. Specifically, Figure 12 The content also includes interactive modes one and two of the financial data plotting method of the present invention, which perform an in-situ heatmap statistics (J100) and two in-situ histogram statistics (J200 histogram statistics on the Y-axis and J300 histogram statistics on the X-axis), wherein the weight of the statistics used is the sorting of the increase over the next 5 days from the first day, and the selected plotting elements are all plotting elements within the range of the heatmap (J100).

[0227] like Figure 13The image shows a specific effect of the interactive mode three of the financial data plotting method of this invention. The bold purple line K100 is the plotting element for drawing the candlestick chart; for better display, only one plotting element is selected in the image. K200 is the candlestick chart drawn based on K100. As described in Figure 13, the closing prices of K100 and K200 coincide. K300 is the Y-axis coordinate system, changing from the canvas coordinate system to the Y-axis coordinate system of the candlestick chart. K400 is the X-axis coordinate system, changing from the canvas coordinate system to the X-axis coordinate system of the candlestick chart.

[0228] like Figure 14 The image shows a specific effect of one of the interactive modes of the financial data plotting method of this invention. The bold purple line L100 in the image represents the market data completed based on the selected plotting element.

[0229] The above description of the embodiments is provided to enable those skilled in the art to understand and apply the present invention. It will be apparent to those skilled in the art that various modifications can be made to the above embodiments, and the general principles described herein can be applied to other embodiments without inventive effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made to the present invention by those skilled in the art based on the disclosure thereof should be within the scope of protection of the present invention.

Claims

1. A method for plotting financial data, characterized in that, The drawing data is generated using a multi-coordinate system and multi-dimensional data-driven method. The multi-coordinate system consists of a global coordinate system for the canvas and sub-coordinate systems for the drawing elements. The drawing elements are the constituent units of the overall drawing content, referring to basic graphic primitives composed of ordered point sequences that can be rendered independently. The multi-dimensional data-driven method uses color and translation mapping data for the drawing elements. The translation of the drawing elements refers to their movement within the global coordinate system of the canvas. The method includes the following steps: Standardize the data structure to be drawn; Identify the target axis for the data to be plotted and complete the associated axis data; Handle the scaling ratio of drawn elements; Process translation mapping related data; Process color mapping related data; It can be drawn using CPU, GPU, or a combination of CPU and GPU.

2. A first interactive mode of a plotting method based on the financial data of claim 1, characterized in that, Perform in-situ heatmap statistics on the selected drawing elements; the in-situ heatmap statistics refer to directly drawing a heatmap on the canvas (where there is already drawing content) of the selected drawing elements, and the position range of the heatmap overlaps with or is parallel to the position range of the selected (to be statistically analyzed) drawing elements on the canvas; the position range of the heatmap is calculated based on the position of the selected drawing elements on the canvas; the statistics are based on the position of the selected drawing elements on the canvas; including the following steps: Obtain the identification label and position coordinates of the selected drawing element; Calculate the heatmap subdivision and statistical results; Draw a heat map.

3. A second interactive method for plotting financial data based on claim 1, characterized in that, Perform alignment histogram statistics on the selected drawing elements; the alignment histogram statistics refer to directly drawing a histogram on the canvas (where drawing content already exists) of the selected drawing elements, and the position range of the histogram is aligned or parallel to the position range of the selected (to be statistically analyzed) drawing element on the canvas in the dimension of the statistical axis, and remains adjacent to the edge in the dimension other than the statistical axis; in the dimension of the statistical axis, the position range of the histogram is calculated based on the position of the selected drawing element; the statistics are performed in the dimension of the statistical axis based on the position of the selected drawing element on the canvas; including the following steps: Obtain the identification label and position coordinates of the selected drawing element; Calculate histogram subdivisions and statistical results; Draw a histogram.

4. A third interactive mode of a plotting method based on the financial data of claim 1, characterized in that, Select one of the selected drawing elements as the element to be drawn into the candlestick chart, and perform in-place candlestick chart drawing, including drawing the candlestick chart and restoring the coordinate system; the in-place candlestick chart is drawn directly on the canvas (where there is already drawing content) of the selected drawing element, and the drawing element to be drawn into the candlestick chart and its corresponding position on the candlestick chart are kept coincident or aligned; the restoration of the coordinate system is based on the overall coordinate system of the canvas, restoring the coordinate system of the candlestick chart and displaying it, using the replacement or simultaneous display method; including the following steps: Confirm the drawing elements; Acquire identification labels, coordinates, and scaling data; Obtain candlestick chart data; Control the panning and zooming of the candlestick chart; Restore the coordinate system of the candlestick chart; Draw a candlestick chart.

5. A fourth interactive method for plotting financial data based on claim 1, characterized in that, When the financial data being drawn is market data, the selected drawing elements are completed with in-situ market data. This in-situ market data completion drawing involves acquiring the complete market data for each selected drawing element and aligning the acquired complete market data with the data of the selected drawing element on the canvas of the selected drawing element (where there is already drawing content). This alignment drawing involves overlapping or aligning each selected drawing element with its corresponding position within the corresponding complete market data. This includes the following steps: Get the identification label, position, and scale of the selected drawing element; Obtain the completed financial data (market data); Complete the associated axis data; Apply scaling and panning; Draw the completed market data.

6. A fifth interactive mode of a plotting method based on the financial data of claim 1, characterized in that, First, a global calculation is performed based on the configured computing environment and code text, then further data processing is performed, and finally the calculation result is transmitted; the configured computing environment refers to the environment in which the data and functions required for the calculation process are prepared in memory in advance and an executable code text is configured, and also includes the normalization processing of the output result; The code text refers to text written by the user containing the algorithm to be calculated; the global calculation refers to the calculation being performed on a data source level, covering all financial products within the data source, not just the financial data of the specific plot content; further data processing refers to the user's decision on whether to further process the global calculation results, including sorting, scaling, and grouping; passing the calculation results refers to outputting the global calculation results, which includes adapting the global calculation results to the specific plot content. The target and purpose of passing the calculation results are set by the user; including the following steps: Get the text of the algorithm code; Load the configured computing environment and execute the algorithm code; Extract the calculation results; Handling sorting, proportioning, and grouping; Output.