Financial data visualization generation method based on AI, generator and storage medium
By analyzing the historical transaction data of commodities, constructing price trend charts and overview charts, predicting price change trends and performing visualization, the problem of inaccurate price trend analysis in existing technologies is solved, and the effectiveness of user purchasing decisions is improved.
Patent Information
- Application Number
- CN202510862634.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When predicting market trend data, existing financial data forecasting and visualization technology has inaccurate analysis of commodity price change trends and low coverage, and cannot effectively help users make purchasing decisions.
By obtaining historical transaction data of commodities, compiling a summary table of commodity transaction data, analyzing price trends and visualizing them, and predicting price change trends, including constructing price trend charts and price overview charts, determining turning points and predicting the time of price changes.
The accuracy and coverage of financial data prediction visualization technology have been improved, helping users make more effective decisions when purchasing goods, especially considering the impact of factors such as brand activities.
Smart Images

Figure CN120765285A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of financial data prediction visualization, in particular to an AI-based financial data visualization generation method, a generator and a storage medium. BACKGROUND
[0002] The financial data prediction visualization technology refers to a technology for analyzing and displaying financial market data by using data visualization methods and tools to predict future trends, price trends and risk information. The technology usually combines data analysis, statistics and visualization technology.
[0003] Financial data does not only refer to data in the financial industry. Financial data includes data from multiple fields and various types, including market trend data. Existing visualization technologies for market trend data usually show users the historical price changes of goods, and users can only know from the historical price changes whether the current price of the goods is the lowest, but cannot help users make further judgments, and cannot predict the price increase and decrease of the goods. In addition, different goods may have discount activities on different dates, at which time the goods will be discounted. Conventional price prediction methods are difficult to predict the price drop caused by discount activities. For example, in the patent application with the publication number CN118446720A, a market trend analysis system based on big data is disclosed, which predicts the price trend of goods by using meteorological data and government policy information. However, such data can only predict a small part of the goods. The price change trend of most goods is still related to the activities of the brand, and discount activities are the main factor affecting the price change of the goods. The existing financial data prediction visualization technology still has the problems of inaccurate analysis of the price change trend of the goods and low coverage when predicting the market trend data, which cannot help users make decisions when purchasing goods. SUMMARY
[0004] The present application aims to at least solve one of the technical problems in the prior art. By obtaining historical transaction data of goods and arranging a goods transaction data summary table, the price trend of the goods is analyzed based on the historical transaction data to obtain a price trend graph. The transaction records are grouped and divided based on the transaction time to obtain a date group. The date group is analyzed to determine the price change trend of the goods and predict the time of the next price change of the goods, as well as the price change of the goods. Finally, the price trend and the price change trend are visualized to solve the problem that the existing financial data prediction visualization technology has inaccurate analysis of the price change trend of the goods and low coverage when predicting the market trend data, which cannot help users make decisions when purchasing goods.
[0005] To achieve the above objectives, in a first aspect, the present application provides an AI-based financial data visualization generation method, comprising the following steps: Obtain historical transaction data of commodities and compile a summary table of commodity transaction data; Analyze the price trend of commodities based on historical transaction data and obtain a price trend chart; Analyze commodity price trends based on historical transaction data, determine commodity price trends and predict the next time the commodity price will change, while also predicting commodity price changes; Visualize price movements and price trends.
[0006] Furthermore, obtaining historical transaction data of commodities and compiling a commodity transaction data summary table includes the following sub-steps: Constructing a commodity transaction database, wherein the commodity transaction database includes a plurality of commodity transaction data summary tables; When users need to check the price trend of a certain product, they can obtain the historical transaction data of the product; Entering historical transaction data into a commodity transaction data summary table, wherein the commodity transaction data summary table stores the transaction price and transaction time of each transaction record of a commodity in a certain year, wherein the transaction price and transaction time constitute a transaction record; Based on the oldest transaction records that can be found for a product, several summary tables of product transaction data are compiled.
[0007] Furthermore, analyzing the price trend of the commodity based on historical transaction data to obtain a price trend chart includes the following sub-steps: Obtain all transaction records in the commodity transaction data summary table, group them by year and month, and mark them as year-month groups; Sort and number the year-month groups in order from front to back, using the symbol T m Represents, where m is a positive integer and m is the sequence number of T; Calculate the average transaction price within each year-month group, named average unit price, for T m , mark the calculated average unit price as P m ; Create a rectangular coordinate system with year and month as the X-axis and average unit price as the Y-axis, name it Price Trend Chart, and enter the average unit price corresponding to the year and month groups into the Price Trend Chart; Perform linear regression on the price trend chart, mark the regression function obtained by analysis as the price trend function, draw the price trend function in the price trend chart, and mark the drawn straight line as the price trend straight line.
[0008] Furthermore, based on historical transaction data, the price change trend of the commodity is analyzed to determine the price change trend of the commodity and predict the time of the next price change of the commodity. At the same time, the prediction of the price change of the commodity includes the following sub-steps: Transaction records are grouped and divided based on transaction time to obtain date groups; Analyze the date group to determine the price change trend of the product and predict the time when the price of the product will change next time, and predict the price change of the product.
[0009] Furthermore, grouping the transaction records based on the transaction time to obtain date groups includes the following sub-steps: Sort and number the commodity transaction data summary table in the order of year, and use the symbol S n Indicates, where n is a positive integer and n is the sequence number of S. The smaller n is, the older the year corresponding to the commodity transaction data summary table is; Targeting S n The transaction records in the table are grouped by date. After excluding February 29, 365 groups remain, which are named date groups. The date groups are sorted and numbered according to the order of the dates, and are represented by the symbol D(n, i), where i is a positive integer and (n, i) is the sequence number of D, and the D(n, i) represents the commodity transaction data summary table S n The date group for the i-th day in .
[0010] Furthermore, the date group is analyzed to determine the price change trend of the product and predict the time of the next price change of the product. The prediction of the price change of the product includes the following sub-steps: Create a rectangular coordinate system with i as the horizontal axis and the transaction price as the vertical axis, named the price overview chart. Enter the transaction records in D(n, i) into the price overview chart according to i and the transaction price. Based on the difference of n, the coordinate point in the price overview graph is named the nth subsidiary point; Starting from n=1, connect the adjacent n-th subsidiary points, and finally get a line segment that only contains horizontal lines parallel to the horizontal axis and vertical lines parallel to the vertical axis, which is named the n-th price line; Analyze all values of n and obtain several n-th price lines; Get the turning point of the nth price line. The turning point is the intersection of the horizontal line and the vertical line. There is a right angle at the turning point, which is marked as the turning right angle. Determine whether the turning angle is above or below the turning point. If the turning angle is above the turning point, output a price increase signal; if the turning angle is below the turning point, output a price decrease signal. If the price increase signal is output, the turning point is marked as a price increase point; if the price decrease signal is output, the turning point is marked as a price decrease point; For price increase and price decrease points, predict the date and price of the next product price change.
[0011] Furthermore, for the price increase point and price reduction point, predicting the date of the next commodity price change and the changed price includes the following sub-steps: For any n-th price line, sort and number the price increase points in the n-th price line from left to right, represented by the symbol U(n,a), and sort and number the price decrease points in the n-th price line from left to right, represented by the symbol D(n,b), where a and b are both positive integers, (n,a) is the sequence number of U, (n,b) is the sequence number of D, U(n,a) represents the a-th price increase point in the n-th price line, and D(n,b) represents the b-th price decrease point in the n-th price line; Starting with a=1, perform a linear regression on U(n, a) and mark the straight line obtained by regression as the reference line for price increase points. Starting with b=1, perform a linear regression on D(n, b) and mark the straight line obtained by regression as the reference line for price decrease points. Add one to a and b and reanalyze until all reference lines for price increases and price decreases are found. Get the midpoint of the price increase reference line and mark it as the price increase reference point; get the midpoint of the price reduction reference line and mark it as the price reduction reference point; Using X as the reference benchmark, connect adjacent price increase reference points and price reduction reference points with horizontal and vertical lines. When connecting, if the X value of the price increase reference point is less than the price reduction reference point, then the horizontal line connects to the price increase reference point, and the vertical line connects to the price reduction reference point; if the X value of the price increase reference point is greater than the price reduction reference point, then the vertical line connects to the price increase reference point, and the horizontal line connects to the price reduction reference point; Mark the resulting broken line as the trend reference line, obtain the current date and price of the product, mark them as the real-time date and real-time price, mark the coordinate point (real-time date, real-time price) as the real-time coordinate point, mark the coordinate point where X in the trend reference line is equal to the real-time date as the reference coordinate point, and move the trend reference line to the real-time coordinate point based on the reference coordinate point; Mark the first price increase reference point and price decrease reference point to the right of the real-time coordinate point as a change point. Obtain the X and Y values of the change point and mark them as the change date and change price, respectively. If the change point is a price increase reference point, output a price increase change signal. If the change point is a price decrease reference point, output a price decrease change signal. If a price increase change signal is output, the marked product will increase in price on the change date and the price will be changed to the change price; if a price decrease change signal is output, the marked product will decrease in price on the change date and the price will be changed to the change price.
[0012] Furthermore, visualizing the price trend and price change trend includes the following sub-steps: Visualize the price trend chart and price trend line and display them to the user; Re-establish the coordinate system and import the change trend reference line, change date and change price, and visualize them and display them to the user.
[0013] In a second aspect, the present application provides an AI-based financial data visualization generator, comprising a historical data acquisition module, a price trend analysis module, a change trend analysis module, and a visualization terminal; the historical data acquisition module, the price trend analysis module, and the change trend analysis module are respectively connected to the visualization terminal data; The historical data acquisition module is used to obtain historical transaction data of commodities and compile a commodity transaction data summary table; The price trend analysis module is used to analyze the price trend of commodities based on historical transaction data to obtain a price trend chart; The change trend analysis module is used to analyze the price change trend of commodities based on historical transaction data, determine the price change trend of commodities and predict the time when the price of commodities will change next time, and predict the price change of commodities; The visualization terminal is used to visualize price trends and price change trends.
[0014] In a third aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are performed.
[0015] Beneficial effects of the present invention: The present invention obtains historical transaction data of commodities and compiles a summary table of commodity transaction data, and then analyzes the price trend of commodities based on the historical transaction data to obtain a price trend chart. The advantage is that the price trend chart shows the monthly price trend of commodities, which can help users judge the value of commodities. If the price continues to rise, it means that the commodity is of high value, and if it continues to fall, it means that the commodity is of low value. This improves the effectiveness of financial data prediction visualization technology in helping users make decisions when purchasing commodities.
[0016] The application divides the transaction records into date groups according to transaction time, analyzes the date groups, judges the price change trend of the commodity and predicts the time when the price of the commodity changes next time, and predicts the change of the price of the commodity, and the advantage is that in addition to the conventional holiday price reduction and platform promotion activity price reduction, different price reduction activities of each commodity will exist according to different brands, and such activities are usually related to brand merchants or stores, so that the price reduction points and price increase points of the commodity are analyzed through historical data, and then further prediction can maximize the accuracy of the prediction result, and then the visual technology is used to present to the user, thereby helping the user's purchase decision, and improving the effectiveness of the financial data prediction visualization technology in helping the user to purchase the commodity and the accuracy of the prediction of the price of the commodity. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 It is a principle block diagram of the system of the application; Figure 2 It is a price trend chart of the application; Figure 3 It is a schematic diagram of the nth price line and the turning point of the application; Figure 4 It is a price overview chart of the application; Figure 5 It is a schematic diagram of the price increase point and the price reduction point of the application; Figure 6 It is a schematic diagram of the distribution of D(n,1) and the price reduction point reference straight line of the application; Figure 7 It is a schematic diagram of the price increase point reference straight line and the price reduction point reference straight line of the application; Figure 8 It is a schematic diagram of the change trend reference line of the application; Figure 9 It is a schematic diagram of the moving change trend reference line of the application; Figure 10 It is a schematic diagram of the change date and the change price shown to the user of the application; Figure 11 It is a step flow chart of the method of the application. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.
[0019] Embodiment 1, please refer to Figure 1 As shown, the present application provides an AI-based financial data visualization generator, including a historical data acquisition module, a price trend analysis module, a change trend analysis module and a visualization terminal; the historical data acquisition module, the price trend analysis module, and the change trend analysis module are respectively connected to the visualization terminal data; The historical data acquisition module is used to obtain the historical transaction data of commodities and compile a summary table of commodity transaction data; The historical data acquisition module is configured with a historical data acquisition strategy, which includes: Building a commodity transaction database, which includes several commodity transaction data summary tables; When users need to check the price trend of a certain product, they can obtain the historical transaction data of the product; Entering historical transaction data into a commodity transaction data summary table, which stores the transaction price and transaction time of each transaction record of a commodity in a certain year. The transaction price and transaction time constitute a transaction record; Based on the oldest transaction records that can be found for a product, a summary table of several product transaction data is compiled; In actual applications, the commodity in this embodiment is not a certain type of commodity, but a specific type, brand, and quantity of commodities. For example, if a user needs to view 2 kg of cat food B of brand A in the cat food category, in this embodiment, commodity C is used as the proxy, and the historical transaction data of commodity C is obtained and entered into the commodity transaction data summary table exclusive to commodity C. Part of the data in the 2023 commodity transaction data summary table is shown in Table 1 below: Table 1 Partial data from the 2023 commodity trading data summary table Transaction time Transaction price (yuan) 2023.1.1 149 …… …… 2023.5.7 159 …… …… 2023.6.1 129 Table 1 is only part of the data in the 2023 commodity trading data summary table. For commodity C, the commodity trading database also includes the 2020 commodity trading data summary table, the 2021 commodity trading data summary table, the 2022 commodity trading data summary table and the 2024 commodity trading data summary table.
[0020] The price trend analysis module is used to analyze the price trend of commodities based on historical transaction data and obtain a price trend chart; The price trend analysis module is equipped with price trend analysis strategies, which include: Obtain all transaction records in the commodity transaction data summary table, group them by year and month, and mark them as year-month groups; Sort and number the year-month groups in order from front to back, using the symbol T m Represents, where m is a positive integer and m is the sequence number of T; Calculate the average transaction price within each year-month group, named average unit price, for T m , mark the calculated average unit price as P m ; See also Figure 2 As shown, a plane rectangular coordinate system is established with year and month as the X-axis and average unit price as the Y-axis, named as price trend chart, and the average unit price corresponding to the year and month grouping is entered into the price trend chart; Performing linear regression on the price trend chart, marking the regression function obtained by analysis as the price trend function, plotting the price trend function on the price trend chart, and marking the plotted straight line as the price trend straight line; In actual application, the specific grouping of year-month groups is January 2020 as one group and February 2020 as another group. Since there are only data from January to August in the 2024 commodity transaction data summary table, the year-month grouping is divided into August 2024, a total of 56 year-month groups, namely T1 to T 56 , 1≤m≤56, due to the excessive amount of data in the commodity transaction data summary table, it is not convenient to display it specifically in this embodiment. Therefore, in this embodiment, the specific value of the average unit price is not displayed, and only a concise display is made through the price trend chart. The price trend chart is constructed as follows Figure 2 As shown, a price trend straight line has been drawn in the price trend chart, so the price trend function is not described in detail in this embodiment. The price trend function is only used to determine the price trend straight line.
[0021] The change trend analysis module is used to analyze the price change trend of commodities based on historical transaction data, determine the price change trend of commodities, predict the time of the next price change of commodities, and predict the price change of commodities; the change trend analysis module includes a date grouping unit, a lifting point analysis unit, and a change trend analysis unit; The date grouping unit is used to group transaction records based on transaction time to obtain date groups; The date grouping unit is configured with a date grouping strategy, which includes: Sort and number the commodity transaction data summary table in the order of year, and use the symbol S n Indicates, where n is a positive integer and n is the sequence number of S. The smaller n is, the older the year corresponding to the commodity transaction data summary table is; Targeting S n The transaction records in the table are grouped by date. After excluding February 29, 365 groups remain, which are named date groups. The date groups are sorted and numbered according to the order of the dates, and are represented by the symbol D(n, i), where i is a positive integer and (n, i) is the sequence number of D, and D(n, i) represents the commodity transaction data summary table S n The date group of the i-th day; In actual application, S1 to S5 are the 2020 commodity transaction data summary table, the 2021 commodity transaction data summary table, the 2022 commodity transaction data summary table, the 2023 commodity transaction data summary table, and the 2024 commodity transaction data summary table, 1≤n≤5, S n Each day is a date group, numbered D(1,1) to D(1,365), D(2,1) to D(2,365), D(3,1) to D(3,365), D(4,1) to D(4,365), and D(5,1) to D(5,365); The lifting point analysis unit and the change trend analysis unit are used to analyze the date group, determine the price change trend of the commodity and predict the time when the price of the commodity will change next, and predict the price change of the commodity; The lifting point analysis unit is configured with a lifting point analysis strategy, which includes: See also Figures 3 and 4 As shown, a rectangular coordinate system is established with i as the horizontal axis and the transaction price as the vertical axis, named the price overview chart. The transaction records in D(n, i) are entered into the price overview chart according to i and the transaction price; Based on the difference of n, the coordinate point in the price overview graph is named the nth subsidiary point; Starting from n=1, connect the adjacent n-th subsidiary points, and finally get a line segment that only contains horizontal lines parallel to the horizontal axis and vertical lines parallel to the vertical axis, which is named the n-th price line; Analyze all values of n and obtain several n-th price lines; Get the turning point of the nth price line. The turning point is the intersection of the horizontal line and the vertical line. There is a right angle at the turning point, which is marked as the turning angle. Determine whether the turning angle is above or below the turning point. If the turning angle is above the turning point, output a price increase signal; if the turning angle is below the turning point, output a price decrease signal. See also Figure 5 As shown, if a price increase signal is output, the turning point is marked as a price increase point; if a price decrease signal is output, the turning point is marked as a price decrease point; For price increase and price reduction points, predict the date and price of the next price change; In practical applications, Figure 3It shows the composition of an nth price line and the position of the turning point. The turning angle only exists on the left side of the turning point. If the right angle appears on the right side of the point, then the point is not a turning point. The price overview chart constructed from the 1st to the 5th price lines is as follows Figure 4 As shown, Figure 3 For example, Figure 3 There are 4 turning points in the chart. From left to right, if the turning angles of the first and third turning points are below the turning point, a price reduction signal is output, which is a price reduction point. If the turning angles of the second and fourth turning points are above the turning point, a price increase signal is output, which is a price increase point. The change trend analysis unit is configured with a change trend analysis strategy, which includes: For any n-th price line, sort and number the price increase points in the n-th price line from left to right, represented by the symbol U(n,a), and sort and number the price decrease points in the n-th price line from left to right, represented by the symbol D(n,b), where a and b are both positive integers, (n,a) is the sequence number of U, (n,b) is the sequence number of D, U(n,a) represents the a-th price increase point in the n-th price line, and D(n,b) represents the b-th price decrease point in the n-th price line; See also Figure 6 As shown, starting with a=1, linear regression is performed on U(n, a), and the regression line is marked as the reference line for price increase points; starting with b=1, linear regression is performed on D(n, b), and the regression line is marked as the reference line for price decrease points; In practical applications, Figure 5 For example, Figure 5 The third price line includes two price increase points and two price decrease points, namely U(3,1), U(3,2), D(3,1) and D(3,2). When n=3, 1≤a≤2, 1≤b≤2 and b=1, the distribution of D(n,1) is as follows: Figure 6 As shown, linear regression is performed on D(1,1), D(2,1), D(3,1), D(4,1) and D(5,1), and the price reduction point reference straight line is obtained. Figure 6 The analysis of the price increase reference line is the same as that of the price reduction reference line, so it will not be described in detail in this embodiment. See also Figure 7 As shown, add one to a and b and reanalyze until all reference straight lines for price increases and price decreases are found. Get the midpoint of the price increase reference line and mark it as the price increase reference point; get the midpoint of the price reduction reference line and mark it as the price reduction reference point; In practical applications, all reference straight lines for price increases and price reductions are analyzed. Figure 7 As shown, for easy observation, Figure 7 The nth price line is hidden in the chart, and only the reference straight line of price increase point and price decrease point is retained. The reference points of price increase and price decrease are obtained as follows: Figure 7 As shown; See also Figure 8 As shown, with X as the reference benchmark, adjacent price increase reference points and price reduction reference points are connected by horizontal and vertical lines. When connecting, if the X value of the price increase reference point is smaller than the price reduction reference point, the horizontal line connects to the price increase reference point and the vertical line connects to the price reduction reference point; if the X value of the price increase reference point is larger than the price reduction reference point, the vertical line connects to the price increase reference point and the horizontal line connects to the price reduction reference point; In actual application, the connection method of price increase reference point and price reduction reference point is as follows Figure 8 As shown, in addition to the connecting horizontal lines, you need to add a horizontal line at the beginning and end of the trend reference line so that the trend reference line spans the entire X-axis, that is, every day of the year. Figure 8 The first and last horizontal lines are the added horizontal lines. The Y value of the horizontal line added at the end is the average of the Y values of the remaining horizontal lines with X=365. Figure 8 The pentagon at the end of the middle is their average value; See also Figure 9 As shown, the resulting broken line is marked as the change trend reference line, the current date and price of the commodity are obtained, marked as the real-time date and real-time price, the coordinate point (real-time date, real-time price) is marked as the real-time coordinate point, the coordinate point where X in the change trend reference line is equal to the real-time date is marked as the reference coordinate point, and the change trend reference line is moved to the real-time coordinate point based on the reference coordinate point; In actual application, the real-time date is August 12, the real-time price is 159, and August 12 is the 224th day in 365 days of a year. The coordinate point (224, 139) is marked as the real-time coordinate point, and the coordinate point X=224 in the trend reference line is marked as the reference coordinate point. After moving, Figure 9 As shown, Figure 9 The solid line in the figure is the reference line of the change trend after the movement, and the dotted line is the reference line of the change trend before the movement; Mark the first price increase reference point and price decrease reference point to the right of the real-time coordinate point as a change point. Obtain the X and Y values of the change point and mark them as the change date and change price, respectively. If the change point is a price increase reference point, output a price increase change signal. If the change point is a price decrease reference point, output a price decrease change signal. If a price increase signal is output, the marked product will increase in price on the change date and the price will be changed to the change price; if a price decrease signal is output, the marked product will decrease in price on the change date and the price will be changed to the change price; In practical applications, the change points are as follows Figure 9 As shown, the change point is the price increase reference point, and the price increase change signal is output. The change date of the change point is August 27, which means that the price of product C will increase on August 27. The Y value of the change point is a vertical line. After passing through multiple Y values, it is necessary to take the other endpoint of the vertical line except the change point as the change price. The change price is 155, and it is predicted that the price of product C will increase to 155 yuan on August 27.
[0022] The visualization terminal is used to visualize price trends and price change trends; The visualization terminal is configured with a visualization policy, which includes: Visualize the price trend chart and price trend line and display them to the user; See also Figure 10 As shown, the coordinate system is re-established and the change trend reference line, change date and change price are imported, and they are visualized and displayed to the user; In actual application, the price trend chart and price trend line are visualized using existing visualization technology, and the coordinate system is re-established and the trend reference line, change date and change price are imported. Figure 10 As shown, Figure 10 The figure in the middle represents the price change of commodity C before August 12, and the dotted line represents the price change trend of commodity C after August 12.
[0023] Example 2, please refer to Figure 11 As shown, this application provides an AI-based financial data visualization generation method, including the following steps: Step S1: Obtain historical transaction data of commodities and compile a commodity transaction data summary table; Step S1 includes the following sub-steps: Step S101: constructing a commodity transaction database, which includes several commodity transaction data summary tables; Step S102: When a user needs to inquire about the price trend of a certain product, historical transaction data of the product is obtained; Step S103: Enter the historical transaction data into a commodity transaction data summary table. The commodity transaction data summary table stores the transaction price and transaction time of each transaction record of a commodity in a certain year. The transaction price and transaction time constitute a transaction record. Step S104: Based on the oldest transaction record that can be found for the product, a summary table of several product transaction data is compiled; Step S2: Analyze the price trend of the commodity based on the historical transaction data to obtain a price trend chart. Step S2 includes the following sub-steps: Step S201: Obtain all transaction records in the commodity transaction data summary table, group the transaction records according to the year and month of the transaction time, and mark them as year-month groups; Step S202: sort and number the year-month groups in the order from the beginning to the end, using the symbol T m Represents, where m is a positive integer and m is the sequence number of T; Step S203: Calculate the average transaction price in each year-month group, named average unit price, for T m , mark the calculated average unit price as P m ; Step S204: Create a rectangular coordinate system with the year and month as the X-axis and the average unit price as the Y-axis, name it a price trend chart, and enter the average unit price corresponding to the year and month groups into the price trend chart; Step S205: performing linear regression on the price trend chart, marking the regression function obtained by analysis as the price trend function, drawing the price trend function on the price trend chart, and marking the drawn straight line as the price trend straight line; Step S3, analyzing the price change trend of the commodity based on the historical transaction data, determining the price change trend of the commodity and predicting the time when the price of the commodity will change next, and predicting the price change of the commodity; Step S3 includes the following sub-steps: Step S301, grouping the transaction records based on transaction time to obtain date groups; Step S301 includes the following sub-steps: Step S3011, sort and number the commodity transaction data summary table in the order of year, and use the symbol S n Indicates, where n is a positive integer and n is the sequence number of S. The smaller n is, the older the year corresponding to the commodity transaction data summary table is; Step S3012, for S n The transaction records in the table are grouped by date. After excluding February 29, 365 groups remain, which are named date groups. Step S3013, sort and number the date groups according to the order of the dates, represented by the symbol D(n, i), where i is a positive integer and (n, i) is the sequence number of D, and D(n, i) represents the commodity transaction data summary table S n The date group of the i-th day; Step S302: Analyze the date group to determine the price change trend of the product and predict the time of the next price change of the product, and predict the price change of the product; Step S302 includes the following sub-steps: Step S3021: Create a rectangular coordinate system with i as the horizontal axis and the transaction price as the vertical axis, named the price overview chart. Enter the transaction records in D(n, i) into the price overview chart according to i and transaction price. Step S3022, based on the difference of n, the coordinate point in the price overview graph is named as the nth subsidiary point; Step S3023, starting with n=1, connect the adjacent n-th attached points to finally obtain a broken line segment consisting only of a horizontal line parallel to the horizontal axis and a vertical line parallel to the vertical axis, named the n-th price line; Step S3024, analyzing all values of n to obtain several n-th price lines; Step S3025: Obtain the turning point of the nth price line. The turning point is the intersection of the horizontal line and the vertical line. There is a right angle at the turning point, which is marked as the turning right angle. Step S3026, determining whether the turning angle is above or below the turning point, if the turning angle is above the turning point, outputting a price increase signal; if the turning angle is below the turning point, outputting a price decrease signal; Step S3027: If a price increase signal is output, the turning point is marked as a price increase point; if a price decrease signal is output, the turning point is marked as a price decrease point; Step S3028, for the price increase point and price reduction point, predict the date of the next commodity price change and the price change; Step S3028 includes the following sub-steps: Step S3028.1: For any nth price line, sort and number the price increase points in the nth price line from left to right, using the symbol U(n, a). Sorting and numbering the price decrease points in the nth price line from left to right, using the symbol D(n, b), where a and b are both positive integers, (n, a) is the sequence number of U, and (n, b) is the sequence number of D. U(n, a) represents the ath price increase point in the nth price line, and D(n, b) represents the bth price decrease point in the nth price line. Step S3028.2: Starting with a=1, perform linear regression on U(n, a), marking the resulting line as the price increase reference line. Starting with b=1, perform linear regression on D(n, b), marking the resulting line as the price decrease reference line. Step S3028.3: Add one to a and b and reanalyze until all reference lines for price increases and price decreases are found. Step S3028.4: Obtain the midpoint of the price increase reference line and mark it as the price increase reference point; obtain the midpoint of the price reduction reference line and mark it as the price reduction reference point; Step S3028.5: Using X as the reference point, connect adjacent price increase reference points and price decrease reference points with horizontal and vertical lines. When connecting, if the X value of the price increase reference point is less than that of the price decrease reference point, the horizontal line connects to the price increase reference point, and the vertical line connects to the price decrease reference point. If the X value of the price increase reference point is greater than that of the price decrease reference point, the vertical line connects to the price increase reference point, and the horizontal line connects to the price decrease reference point. Step S3028.6: Mark the resulting broken line as the trend reference line. Obtain the current date and price of the product, mark them as the real-time date and real-time price, mark the coordinate point (real-time date, real-time price) as the real-time coordinate point, mark the coordinate point on the trend reference line where X equals the real-time date as the reference coordinate point, and move the trend reference line from the reference coordinate point to the real-time coordinate point. Step S3028.7: Mark the first price increase reference point and price decrease reference point to the right of the real-time coordinate point as a change point. Simultaneously, obtain the X and Y values of the change point and mark them as the change date and price, respectively. If the change point is a price increase reference point, output a price increase change signal; if the change point is a price decrease reference point, output a price decrease change signal. Step S3028.8: If a price increase signal is output, the marked product will increase in price on the change date and the price will be changed to the changed price; if a price decrease signal is output, the marked product will decrease in price on the change date and the price will be changed to the changed price; Step S4: Visualize the price trend and price change trend. Step S4 includes the following sub-steps: Step S401: Visualize the price trend chart and the price trend line and display them to the user; Step S402 , re-establishing the coordinate system and importing the change trend reference line, change date and change price, while visualizing them and displaying them to the user.
[0024] In Example 3, the present application provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. The memory stores computer-readable instructions, and the processor can call instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the AI-based financial data visualization generation method are executed to achieve the following functions: obtaining historical transaction data of commodities and compiling a summary table of commodity transaction data; analyzing the price trend of commodities based on the historical transaction data to obtain a price trend chart; determining the price change trend of commodities and predicting the time when the price of commodities will next change; and visualizing the price trend and price change trend.
[0025] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0026] Example 4. The present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the AI-based financial data visualization generation method provided by the above methods, which includes: obtaining historical transaction data of the commodity and compiling a summary table of commodity transaction data; analyzing the price trend of the commodity based on the historical transaction data to obtain a price trend chart; judging the price change trend of the commodity and predicting the time when the price of the commodity will change next; and visualizing the price trend and price change trend.
[0027] Example 5. The present application also provides a computer-readable storage medium. The present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned AI-based financial data visualization generation method are run to achieve the following functions: obtain historical transaction data of commodities and compile a summary table of commodity transaction data; analyze the price trend of commodities based on historical transaction data to obtain a price trend chart; determine the price change trend of commodities and predict the time when the price of commodities will change next time; and visualize the price trend and price change trend.
[0028] Through the description of the above embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the essence of the above technical solutions or the portion that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (such as a personal computer, server, or network device) to execute the methods described in various embodiments or certain portions of the embodiments.
[0029] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.
[0030] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. The AI-based financial data visualization generation method is characterized by: The steps include: Obtain historical transaction data of commodities and compile a summary table of commodity transaction data; Analyze the price trend of commodities based on historical transaction data and obtain a price trend chart; Analyze commodity price trends based on historical transaction data, determine commodity price trends and predict the next time the commodity price will change, while also predicting commodity price changes; Visualize price movements and price trends.
2. The AI-based financial data visualization generation method according to claim 1, characterized in that: Obtaining historical transaction data for a product and compiling a summary table of the product transaction data includes the following sub-steps: Constructing a commodity transaction database, wherein the commodity transaction database includes a plurality of commodity transaction data summary tables; When users need to check the price trend of a certain product, they can obtain the historical transaction data of the product; Entering historical transaction data into a commodity transaction data summary table, wherein the commodity transaction data summary table stores the transaction price and transaction time of each transaction record of a commodity in a certain year, wherein the transaction price and transaction time constitute a transaction record; Based on the oldest transaction records that can be found for a product, several summary tables of product transaction data are compiled.
3. The AI-based financial data visualization generation method according to claim 2, characterized in that: Analyzing commodity price trends based on historical transaction data to obtain a price trend chart includes the following sub-steps: Obtain all transaction records in the commodity transaction data summary table, group them by year and month, and mark them as year-month groups; Sort and number the year-month groups in order from front to back, using the symbol T m Represents, where m is a positive integer and m is the sequence number of T; Calculate the average transaction price within each year-month group, named average unit price, for T m , mark the calculated average unit price as P m ; Create a rectangular coordinate system with year and month as the X-axis and average unit price as the Y-axis, name it Price Trend Chart, and enter the average unit price corresponding to the year and month groups into the Price Trend Chart; Perform linear regression on the price trend chart, mark the regression function obtained by analysis as the price trend function, draw the price trend function in the price trend chart, and mark the drawn straight line as the price trend straight line.
4. The AI-based financial data visualization generation method according to claim 3, characterized in that: Analyze the price change trend of commodities based on historical transaction data, determine the price change trend of commodities and predict the time of the next price change of commodities. Predicting the price change of commodities includes the following sub-steps: Transaction records are grouped and divided based on transaction time to obtain date groups; Analyze the date group to determine the price change trend of the product and predict the time when the price of the product will change next time, and predict the price change of the product.
5. The AI-based financial data visualization generation method according to claim 4, characterized in that: Grouping transaction records based on transaction time to obtain date groups includes the following sub-steps: Sort and number the commodity transaction data summary table in the order of year, and use the symbol S n Indicates, where n is a positive integer and n is the sequence number of S. The smaller n is, the older the year corresponding to the commodity transaction data summary table is; Targeting S n The transaction records in the table are grouped by date. After excluding February 29, 365 groups remain, which are named date groups. The date groups are sorted and numbered according to the order of the dates, and are represented by the symbol D(n, i), where i is a positive integer and (n, i) is the sequence number of D, and the D(n, i) represents the commodity transaction data summary table S n The date group for the i-th day in .
6. The AI-based financial data visualization generation method according to claim 5, characterized in that: Analyze the date group to determine the price change trend of the product and predict the time of the next price change of the product. The price change prediction of the product includes the following sub-steps: Create a rectangular coordinate system with i as the horizontal axis and the transaction price as the vertical axis, named the price overview chart. Enter the transaction records in D(n, i) into the price overview chart according to i and the transaction price. Based on the difference of n, the coordinate point in the price overview graph is named the nth subsidiary point; Starting from n=1, connect the adjacent n-th subsidiary points, and finally get a line segment that only contains horizontal lines parallel to the horizontal axis and vertical lines parallel to the vertical axis, which is named the n-th price line; Analyze all values of n and obtain several n-th price lines; Get the turning point of the nth price line. The turning point is the intersection of the horizontal line and the vertical line. There is a right angle at the turning point, which is marked as the turning right angle. Determine whether the turning angle is above or below the turning point. If the turning angle is above the turning point, output a price increase signal. If the turning angle is below the turning point, a price reduction signal is output; If the price increase signal is output, the turning point is marked as a price increase point; if the price decrease signal is output, the turning point is marked as a price decrease point; For price increase and price decrease points, predict the date and price of the next product price change.
7. The AI-based financial data visualization generation method according to claim 6, characterized in that: For price increase and price decrease points, predicting the date and price of the next price change includes the following sub-steps: For any n-th price line, sort and number the price increase points in the n-th price line from left to right, represented by the symbol U(n,a), and sort and number the price decrease points in the n-th price line from left to right, represented by the symbol D(n,b), where a and b are both positive integers, (n,a) is the sequence number of U, (n,b) is the sequence number of D, U(n,a) represents the a-th price increase point in the n-th price line, and D(n,b) represents the b-th price decrease point in the n-th price line; Starting with a=1, perform a linear regression on U(n, a) and mark the straight line obtained by regression as the reference line for price increase points. Starting with b=1, perform a linear regression on D(n, b) and mark the straight line obtained by regression as the reference line for price decrease points. Add one to a and b and reanalyze until all reference lines for price increases and price decreases are found. Get the midpoint of the price increase reference line and mark it as the price increase reference point; get the midpoint of the price reduction reference line and mark it as the price reduction reference point; Using X as the reference benchmark, connect adjacent price increase reference points and price reduction reference points with horizontal and vertical lines. When connecting, if the X value of the price increase reference point is less than the price reduction reference point, then the horizontal line connects to the price increase reference point, and the vertical line connects to the price reduction reference point; if the X value of the price increase reference point is greater than the price reduction reference point, then the vertical line connects to the price increase reference point, and the horizontal line connects to the price reduction reference point; Mark the resulting broken line as the trend reference line, obtain the current date and price of the product, mark them as the real-time date and real-time price, mark the coordinate point (real-time date, real-time price) as the real-time coordinate point, mark the coordinate point where X in the trend reference line is equal to the real-time date as the reference coordinate point, and move the trend reference line to the real-time coordinate point based on the reference coordinate point; Mark the first price increase reference point and price decrease reference point to the right of the real-time coordinate point as a change point. Obtain the X and Y values of the change point and mark them as the change date and change price, respectively. If the change point is a price increase reference point, output a price increase change signal. If the change point is a price decrease reference point, output a price decrease change signal. If a price increase change signal is output, the marked product will increase in price on the change date and the price will be changed to the change price; if a price decrease change signal is output, the marked product will decrease in price on the change date and the price will be changed to the change price.
8. The AI-based financial data visualization generation method according to claim 7, characterized in that: Visualizing price movements and price trends includes the following sub-steps: Visualize the price trend chart and price trend line and display them to the user; Re-establish the coordinate system and import the change trend reference line, change date and change price, and visualize them and display them to the user.
9. An AI-based financial data visualization generator, configured to implement the AI-based financial data visualization generation method according to any one of claims 1 to 8, characterized in that: It includes a historical data acquisition module, a price trend analysis module, a change trend analysis module and a visualization terminal; the historical data acquisition module, the price trend analysis module and the change trend analysis module are respectively connected to the visualization terminal data; The historical data acquisition module is used to obtain historical transaction data of commodities and compile a commodity transaction data summary table; The price trend analysis module is used to analyze the price trend of commodities based on historical transaction data to obtain a price trend chart; The change trend analysis module is used to analyze the price change trend of commodities based on historical transaction data, determine the price change trend of commodities and predict the time when the price of commodities will change next time, and predict the price change of commodities; The visualization terminal is used to visualize price trends and price change trends.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Market trend analysis system based on big data
CN118446720A