Method, device and electronic equipment for generating chart data

By filling virtual values ​​according to partition characteristics and preset compression ratios during the chart generation process, the problem of difficult to view data trends caused by excessive coordinate points is solved, and a clearer display of data changes is achieved.

CN115048918BActive Publication Date: 2025-09-02HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210741992.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-09-02
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

In the prior art, when generating charts, some location coordinate points are too dense, making it difficult for users to view the changing trends of data.

Method used

By obtaining the characteristic numerical sequence and partition characteristics of the chart to be generated, the number of numerical values ​​to be filled between each two adjacent feature values ​​is determined according to the preset compression ratio of the partition, and the target chart data is generated, including filling the dummy values ​​between each two feature values ​​to form the target chart.

Benefits of technology

Improves the observability of data changes and makes it easier for users to view data changes in the chart.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048918B_ABST
    Figure CN115048918B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method, device and electronic device for generating chart data, which are applied to the field of information technology and can obtain the characteristic numerical sequence and partition characteristics of the chart to be generated; for any partition, according to the preset compression ratio of the partition, determine the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition, obtain a first number, and determine the first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition; according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with values, obtain the target chart data corresponding to the characteristic numerical sequence. Through the method of the embodiment of the present application, data corresponding to charts of different compression ratios of each partition can be generated by filling values ​​between every two characteristic values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a method, device and electronic device for generating chart data. Background Art

[0002] Currently, charts are increasingly used in our daily work and life. By generating charts from historical data, users can easily view the changing trends of the data.

[0003] Currently, when generating charts based on feature value sequences, the characteristic values ​​in the sequence are often used as the vertical coordinates, and the chart is generated using a uniform compression ratio. However, this method can make it difficult for users to view data trends when some coordinate points are too dense. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device, and storage medium for generating chart data to enhance the visibility of data trends. The specific technical solutions are as follows:

[0005] In a first aspect of an embodiment of the present application, a method for generating chart data is provided, comprising:

[0006] Obtaining a characteristic numerical sequence and partition characteristics of a chart to be generated, wherein the partition characteristics include a preset compression ratio of each partition of the chart to be generated, and the characteristic numerical sequence includes a plurality of subsequences, wherein the plurality of partitions and the plurality of subsequences correspond one to one;

[0007] For any partition, according to a preset compression ratio of the partition, determine the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition to obtain a first number, and determine the first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition;

[0008] Target chart data corresponding to the characteristic value sequence is obtained according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value.

[0009] Optionally, the partition feature also includes a partition ratio between the partitions, and the partition ratio represents the ratio of the number of feature values ​​of each partition. The multiple subsequences are: multiple subsequences obtained by dividing the feature value sequence according to the partition ratio and the total number of feature values ​​in the feature value sequence.

[0010] Optionally, determining a first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition includes:

[0011] According to the first number of the partitions, a first number of arithmetic difference values ​​between every two adjacent characteristic values ​​of the partitions are calculated.

[0012] Optionally, obtaining target chart data corresponding to the feature value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two feature values ​​in each partition requiring value filling includes:

[0013] According to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value, the partition chart of each partition is rendered to obtain a target line chart corresponding to the characteristic value sequence.

[0014] Optionally, the method further includes:

[0015] For any two consecutive partitions, determine a second number of values ​​to be filled between the two consecutive partitions, where the second number is the number of values ​​to be filled between the first characteristic value of the latter partition and the last characteristic value of the former partition, and determine the second number of values ​​to be filled between the two consecutive partitions;

[0016] The step of obtaining target chart data corresponding to the characteristic value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value includes:

[0017] Target chart data corresponding to the characteristic value sequence is obtained according to the subsequence corresponding to each partition, the first number of values ​​between each two characteristic values ​​in each partition that needs to be filled with values, and the second number of values ​​to be filled between each two consecutive partitions.

[0018] Optionally, the second number of values ​​to be filled between the two consecutive partitions is: the first number corresponding to any partition in the two consecutive partitions; and / or

[0019] Determining the second number of values ​​to be filled between the two consecutive partitions includes:

[0020] According to the second quantities corresponding to the two consecutive partitions, the arithmetic difference values ​​of the second quantity between the first characteristic value of the latter partition and the last characteristic value of the former partition of the two consecutive partitions are calculated.

[0021] Optionally, the second number of values ​​to be filled between the two consecutive partitions is: the first number corresponding to the latter partition of the two consecutive partitions.

[0022] Optionally, obtaining target chart data corresponding to the feature value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two feature values ​​in each partition that needs to be filled with a value includes:

[0023] Determine a plurality of coordinate points corresponding to each partition, wherein the vertical coordinates of the plurality of coordinate points include values ​​in the subsequence corresponding to each partition and a first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value, and the horizontal coordinates of the plurality of coordinate points are spaced at the same interval;

[0024] According to the multiple coordinate points corresponding to each partition, the partition chart of each partition is rendered to obtain a target chart corresponding to the characteristic value sequence.

[0025] A second aspect of the embodiments of the present application provides a chart data generating device, comprising:

[0026] a feature acquisition module, configured to acquire a feature value sequence and partition features of a chart to be generated, wherein the partition features include a preset compression ratio of each partition of the chart to be generated, and the feature value sequence includes a plurality of subsequences, wherein the plurality of partitions and the plurality of subsequences correspond one to one;

[0027] a value determination module, configured to determine, for any partition, the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition according to a preset compression ratio of the partition, obtain a first number, and determine the first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition;

[0028] The chart generating module is configured to obtain target chart data corresponding to the characteristic value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value.

[0029] Optionally, the partition feature also includes a partition ratio between the partitions, and the partition ratio represents the ratio of the number of feature values ​​of each partition. The multiple subsequences are: multiple subsequences obtained by dividing the feature value sequence according to the partition ratio and the total number of feature values ​​in the feature value sequence.

[0030] Optionally, the value determination module is specifically configured to calculate, based on the first number of the partitions, a first number of arithmetic difference values ​​between every two adjacent characteristic values ​​of the partition.

[0031] Optionally, the chart generation module is specifically used to render the partition chart of each partition based on the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with values, so as to obtain a target line chart corresponding to the characteristic value sequence.

[0032] Optionally, the device further includes:

[0033] a second value determination module, configured to determine, for any two consecutive partitions, a second number of values ​​to be filled between the two consecutive partitions, where the second number is the number of values ​​to be filled between the first characteristic value of the latter partition and the last characteristic value of the former partition, and determine the second number of values ​​to be filled between the two consecutive partitions;

[0034] The chart generation module is specifically used to obtain target chart data corresponding to the characteristic value sequence based on the subsequence corresponding to each partition, the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with values, and the second number of values ​​to be filled between each two consecutive partitions.

[0035] Optionally, the second number of values ​​to be filled between the two consecutive partitions is: the first number corresponding to any partition in the two consecutive partitions; and / or

[0036] The second value determination module is specifically configured to calculate, based on the second quantities corresponding to the two consecutive partitions, a second number of arithmetic difference values ​​between the first characteristic value of the latter partition and the last characteristic value of the previous partition of the two consecutive partitions.

[0037] Optionally, the second number of values ​​to be filled between the two consecutive partitions is: the first number corresponding to the latter partition of the two consecutive partitions.

[0038] Optionally, the chart generation module includes:

[0039] an interval determination submodule, configured to determine a plurality of coordinate points corresponding to each partition, wherein the vertical coordinates of the plurality of coordinate points include values ​​in a first number of values ​​between every two characteristic values ​​in the subsequence corresponding to each partition and each partition requiring filling, and the horizontal coordinates of the plurality of coordinate points are spaced uniformly;

[0040] The chart rendering submodule is used to render the partition chart of each partition according to the multiple coordinate points corresponding to each partition, so as to obtain a target chart corresponding to the characteristic value sequence.

[0041] Another aspect of the embodiments of the present application further provides an electronic device, including a processor and a memory, wherein the memory is used to store a computer program;

[0042] The processor is configured to implement any of the above-mentioned steps of the chart data generation method when executing the program stored in the memory.

[0043] In another aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned steps of the method for generating chart data is implemented.

[0044] In another aspect of the embodiments of the present application, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the steps of the above-mentioned method for generating chart data.

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

[0046] The embodiment of the present application provides a method, device, electronic device and storage medium for generating chart data, which can obtain a characteristic value sequence and a partition feature of a chart to be generated, wherein the partition feature includes a preset compression ratio of each partition of the chart to be generated, and the characteristic value sequence includes multiple subsequences, wherein the multiple partitions and the multiple subsequences correspond one to one; for any partition, according to the preset compression ratio of the partition, the number of values ​​to be filled between each two adjacent characteristic values ​​of the partition is determined to obtain a first number, and the first number of values ​​to be filled between each two adjacent characteristic values ​​of the partition is determined; according to the subsequence corresponding to each partition and the first number of values ​​between each two characteristic values ​​in each partition that needs to be filled with values, the target chart data corresponding to the characteristic value sequence is obtained. Through the method of the embodiment of the present application, according to the characteristic value sequence and the partition feature of the chart to be generated, and according to the subsequence corresponding to each partition and the first number of values ​​between each two characteristic values ​​in each partition that needs to be filled with values, the target chart data corresponding to the characteristic value sequence is obtained, thereby obtaining data corresponding to charts of different compression ratios of each partition by filling values ​​between each two characteristic values, thereby improving the observability of the data change trend when displaying the data of each partition later.

[0047] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 A schematic diagram of a flow chart of a method for generating chart data provided in an embodiment of the present application;

[0050] Figure 2Another flowchart of the method for generating chart data provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of another flow chart of the method for generating chart data provided in an embodiment of the present application;

[0052] Figure 4 An example diagram of a method for generating chart data provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of the structure of a chart data generating device provided in an embodiment of the present application;

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

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

[0056] First, the professional terms that may be used in the embodiments of this application are explained:

[0057] Line chart: A chart that connects data points with broken lines. The horizontal axis is called the X-axis (usually used to represent different comparison dimensions, such as 'time'), and the vertical axis is called the Y-axis (usually used to represent data values, such as 'times').

[0058] X-axis basic unit: The smallest unit used to represent the horizontal axis in a chart. (For example, if a horizontal axis is composed of 100 X-axis basic units, the smallest unit of the horizontal axis is 1 / 100).

[0059] Data basic unit: used to represent the actual minimum granularity of data (for example, the chart shows data within 10 minutes, where one data is generated every 10 seconds. In this case, one data basic unit is the actual data generated. The entire chart contains 60 data basic units. This does not mean that one X-axis basic unit corresponds to one data basic unit. There may be two X-axis basic units to display one data basic unit).

[0060] Compression ratio: This represents the ratio of data units to X-axis units. (For example, if six X-axis units are used to display one data unit, the compression ratio is 1 / 6. The maximum compression ratio is 1, meaning one X-axis unit is used to display one data unit.)

[0061] Partition: A regional noun that has different characteristics between partitions but the same characteristics within a partition.

[0062] Virtual values: In partitions with a compression ratio less than 1, there are some non-existent values ​​between two basic data units. These values ​​are usually obtained through calculation and used for drawing charts.

[0063] Arithmetic calculation: Calculate the value of an arithmetic progression based on the previous and next real data. The goal is to connect the two basic data units with a line segment.

[0064] In a first aspect of an embodiment of the present application, a method for generating chart data is provided, comprising:

[0065] Obtaining a feature value sequence and partition features of a chart to be generated, wherein the partition features include a preset compression ratio of each partition of the chart to be generated, and the feature value sequence includes multiple subsequences, wherein the multiple partitions correspond to the multiple subsequences in a one-to-one correspondence;

[0066] For any partition, according to a preset compression ratio of the partition, determine the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition to obtain a first number, and determine the first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition;

[0067] Target chart data corresponding to the characteristic value sequence is obtained according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value.

[0068] It can be seen that through the method of the embodiment of the present application, the target chart data corresponding to the characteristic value sequence can be determined based on the characteristic value sequence and partition characteristics of the chart to be generated, and based on the subsequence corresponding to each partition and the first number of values ​​between each two characteristic values ​​in each partition that needs to be filled with values, thereby obtaining data corresponding to charts with different compression ratios for each partition by filling values ​​between each two characteristic values, thereby improving the visibility of the data change trend when displaying the data of each partition subsequently, and solving the problem in the prior art that when generating charts, it is inconvenient for users to view the data change trend because some position coordinate points are too dense.

[0069] For details, see Figure 1 , Figure 1 A flowchart of a method for generating chart data provided in an embodiment of the present application includes:

[0070] Step S11: Obtain the characteristic numerical sequence and partition characteristics of the chart to be generated.

[0071] The partition characteristics include a preset compression ratio for each partition of the chart to be generated, and the characteristic numerical sequence includes multiple subsequences, wherein the multiple partitions correspond to the multiple subsequences one-to-one. The preset compression ratio for each partition and the characteristic numerical sequence in the embodiment of the present application can be input by the user. For example, when generating a chart, the user inputs the characteristic numerical sequence and the preset compression ratio for each partition through the user interface. The chart to be generated in the embodiment of the present application can be a line chart, a curve chart, etc.

[0072] Among them, the multiple subsequences corresponding to the multiple partitions can be input by the user. In one embodiment, the partition feature also includes the partition ratio between the partitions. The multiple subsequences corresponding to the multiple partitions can also be multiple subsequences obtained by dividing the feature value sequence according to the partition ratio. Among them, the partition ratio can represent the ratio of the number of feature values ​​in the subsequences of each partition. Therefore, the number of feature values ​​in the subsequence corresponding to each partition can be calculated based on the partition ratio and the total number of feature values ​​in the feature value sequence, so that the feature value sequence is divided to obtain multiple subsequences. In the embodiment of the present application, the number of feature values ​​of each partition can be different, or the number of values ​​of some partitions can be the same and the number of values ​​of some partitions can be different. For example, when the feature value sequence is 12, -1, 51, -9, 35, 15, 39, 57, 1, 15, a total of 10 data, and the partition ratio is 5:3:2. The characteristic value sequence can be divided into three parts, and the corresponding number of characteristic values ​​are 5, 3, and 2 respectively. Then the subsequence is divided, and the subsequences corresponding to the three partitions are 12, -1, 51, -9, 35; 15, 39, 57; 1, 15 respectively.

[0073] The method of the embodiment of the present application is applied to a smart terminal and can be implemented through the smart terminal. Specifically, the smart terminal can be a computer, a mobile phone, or a server.

[0074] Step S12: for any partition, determine the number of values ​​to be filled between every two adjacent feature values ​​of the partition according to the preset compression ratio of the partition, obtain a first number, and determine the first number of values ​​to be filled between every two adjacent feature values ​​of the partition.

[0075] Among them, the first number is negatively correlated with the preset compression ratio, and the preset compression ratios of different partitions may be different. Since the preset compression ratio indicates the degree of compression, the preset compression ratio in the embodiment of the present application can be used to represent the data basic unit / X-axis basic unit. For example, 6 X-axis basic units are used to display one data basic unit, and the compression ratio is 1 / 6. Therefore, for any partition, according to the preset compression ratio of the partition, the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition is calculated, and the reciprocal of the compression ratio corresponding to the partition can be calculated, and then the calculated reciprocal is subtracted by 1 to obtain the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition, and the first number and the first number of values ​​are obtained. For example, for the third interval in the above example, the subsequence of the interval is 1,15. When the preset compression ratio corresponding to the partition is 1 / 6, the corresponding reciprocal is calculated to be 6, and then subtracted by 1 to obtain the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition, that is, the first number is 5. Then, the first number of values ​​to be filled between every two adjacent feature values ​​of the partition can be determined in any manner. Optionally, the first number of values ​​needs to be between the values ​​of the two adjacent feature values. For the third interval in the above example, any five values ​​between 1 and 15 can be selected as the values ​​to be filled. Optionally, the first number of values ​​to be filled can be arranged in increasing or decreasing order. In this way, the filled values ​​can more friendly represent the changing trend of the two adjacent feature values.

[0076] Optionally, determining the first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition includes: calculating the arithmetic difference values ​​of the first number between every two adjacent characteristic values ​​of the partition according to the first number of the partition. Specifically, for any partition, according to the first number of the partition, the arithmetic difference values ​​of the first number between every two adjacent characteristic values ​​of the partition are calculated, the difference between every two adjacent characteristic values ​​of the partition can be calculated, and then the arithmetic difference calculation is performed according to the first number of the partition to obtain the arithmetic difference values ​​of the first number between every two adjacent characteristic values. For example, when the first number corresponding to a certain partition is 6, the arithmetic difference values ​​between the two adjacent characteristic values ​​1 and 15 are calculated, the difference between 1 and 15 can be calculated to obtain 14, and then the arithmetic difference calculation is performed according to 14. Since 6 arithmetic difference values ​​need to be calculated, 14 can be divided into 7 equal parts to obtain a tolerance of 2. Therefore, the arithmetic difference values ​​of the first number between 1 and 15 are 3, 5, 7, 9, 11, and 13 respectively. During actual use, for any partition, the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition is calculated according to the preset compression ratio of the partition. Before obtaining the first number, the preset compression ratio can be judged first. When the preset compression ratio of a partition is 1, there is no need to calculate the arithmetic difference value. Since when the preset compression ratio of a partition is 1, the first number of the partition is 0, it is meaningless to calculate the arithmetic difference value.

[0077] Step S13 : obtaining target chart data corresponding to the characteristic value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value.

[0078] In one embodiment, target chart data corresponding to the feature value sequence is obtained based on the subsequence corresponding to each partition and the first number of values ​​between every two feature values ​​in each partition that needs to be filled with values. After calculating the first number of arithmetic difference values ​​between every two adjacent feature values ​​of the partition, a partition chart corresponding to each partition is generated based on the subsequence corresponding to each partition and the first number of arithmetic difference values ​​between every two feature values ​​of each partition. The subsequence corresponding to each partition and the first number of arithmetic difference values ​​between every two feature values ​​of each partition can be used as the vertical coordinates, and the subsequence corresponding to each partition or the first number of arithmetic difference values ​​between every two feature values ​​of each partition can be selected in turn as the vertical coordinates of the coordinate points, and a value can be selected as the horizontal coordinate of the coordinate point at intervals of a preset length to generate the chart. For example, for a certain interval, the corresponding subsequence is 1,15, and the first number of arithmetic progression values ​​corresponding to the interval are 3, 5, 7, 9, 11, and 13, respectively. Then, if the horizontal coordinate starts from 1 and generates coordinate points, they can be (1,1), (2,3), (3,5), (4,7), (5,9), (6,11), (7,13), and (8,15), respectively. Thus, a chart corresponding to the partition is generated based on the obtained coordinate points. The generated target icon can be a line chart, and the inflection points in the line chart can be the values ​​in the characteristic value sequence. As the first number of values ​​between each two characteristic values ​​are virtual values, they are not the values ​​in the actual characteristic value sequence and can be omitted from display. Only the actual data can be displayed.

[0079] In one embodiment, according to the subsequence corresponding to each partition and the first number of values ​​between every two feature values ​​in each partition that needs to be filled with values, obtaining the target chart data corresponding to the feature value sequence includes: rendering the partition chart of each partition according to the subsequence corresponding to each partition and the first number of values ​​between every two feature values ​​in each partition that needs to be filled with values, to obtain the target chart corresponding to the feature value sequence. Preferably, the target chart can be a target line chart. In actual use, the partition chart of each partition can be generated first, and then the target chart corresponding to the feature value sequence can be obtained by splicing the partition charts of each partition. Alternatively, the target chart data corresponding to the feature value sequence can be directly rendered according to the subsequence corresponding to each partition and the first number of values ​​between every two feature values ​​in each partition that needs to be filled with values, without first generating the partition chart. Moreover, the charts corresponding to different partitions can be identified by different identifiers in the target chart data.

[0080] In one embodiment, the first number of values ​​to be filled between every two adjacent characteristic values ​​of any partition is determined by calculating the first number of arithmetic differences between every two adjacent characteristic values ​​of the partition based on the first number of the partition. At the same time, when rendering the target chart data, the target line graph corresponding to the characteristic value sequence is rendered. In this way, the first number of values ​​to be filled, i.e., the virtual data, are all on the line segments of the target line graph, and the characteristic values, i.e., the real data, are all on the inflection points of the line graph. The situation of the real data can be intuitively seen through the inflection points, and the changes in the adjacent characteristic values ​​can be observably seen with the help of the first number of virtual values ​​between every two adjacent characteristic values, thereby improving the observability of viewing the changing trend of the data.

[0081] Through the method of the embodiment of the present application, different partitions can be divided according to different partition ratios and preset compression ratios to obtain data corresponding to charts with different compression ratios for each partition, and then generate charts, thereby facilitating the user to view the changing trends of characteristic values. For example, when there is a real-time electrocardiogram, in order to be able to display longer-term heartbeat data, the latest heartbeat data is obviously relatively more important. The solution of the present application can be used to set a low compression ratio for early values ​​and a high compression ratio for new values, thereby facilitating user viewing.

[0082] It can be seen that through the method of the embodiment of the present application, the characteristic numerical sequence and partition characteristics of the chart to be generated can be determined and the target chart data corresponding to the characteristic numerical sequence can be obtained based on the subsequence corresponding to each partition and the first number of values ​​between each two characteristic numerical values ​​in each partition that needs to be filled with numerical values. By filling in numerical values ​​between each two characteristic numerical values, charts with different compression ratios for each partition are generated, which solves the problem in the prior art that when generating charts, it is inconvenient for users to view the changing trend of data because some position coordinate points are too dense.

[0083] Optionally, the partition feature also includes a partition ratio between the partitions, where the partition ratio represents the ratio of the number of feature values ​​of each partition. The multiple subsequences are: multiple subsequences obtained by dividing the feature value sequence according to the partition ratio and the total number of feature values ​​in the feature value sequence.

[0084] The partition ratio represents the ratio of the number of feature values ​​in each partition. Therefore, the total ratio of the number of feature values ​​to be divided in each partition to the total number of feature values ​​in the feature value sequence can be calculated based on the ratio of the number of feature values ​​in each partition. For example, when the ratio of the number of feature values ​​in each partition is 5:3:2, the total ratios of the number of feature values ​​to be divided in each partition to the total number of feature values ​​in the feature value sequence are calculated to be 1 / 2, 3 / 10, and 1 / 5, respectively.

[0085] According to the partition ratio and the total number of characteristic values ​​in the characteristic value sequence, the characteristic value sequence is divided into multiple subsequences. The number of characteristic values ​​corresponding to each partition can be calculated based on the total number of characteristic values ​​in the characteristic value sequence and the total ratio corresponding to each partition. Specifically, the product of the total number of characteristic values ​​in the characteristic value sequence and the total ratio corresponding to each partition can be calculated. For example, when the total number of characteristic values ​​in the characteristic value sequence is 10, when the total ratio of the number of characteristic values ​​to be divided in each partition to the total number of characteristic values ​​in the characteristic value sequence is 1 / 2, 3 / 10, and 1 / 5 respectively, the number of characteristic values ​​corresponding to each partition can be calculated to be 5, 3, and 2. For example, when the characteristic value sequence is 12, -1, 51, -9, 35, 15, 39, 57, 1, 15, a total of 10 data, and the partition ratio is 5:3:2. The feature value sequence can be divided into three parts, with the corresponding number of feature values ​​being 5, 3, and 2, respectively. Then, the subsequences corresponding to the three partitions are divided into 12, -1, 51, -9, 35; 15, 39, 57; and 1, 15. In actual use, if a feature value in the feature value sequence cannot be divided evenly according to the partition ratio, the user can be prompted to modify or select, for example, to select which partition the feature value that cannot be divided evenly should be assigned to.

[0086] It can be seen that through the method of the embodiment of the present application, the feature value sequence can be divided into multiple subsequences in sequence according to the ratio of the number of feature values ​​of each partition, thereby facilitating the generation of a chart for the corresponding partition according to the corresponding subsequence.

[0087] Optional, see Figure 2 Step S13 obtains target chart data corresponding to the feature value sequence based on the subsequence corresponding to each partition and the first number of values ​​between every two feature values ​​in each partition that needs to be filled with a value, including:

[0088] Step S131, determining a plurality of coordinate points corresponding to each partition, wherein the vertical coordinates of the plurality of coordinate points include the values ​​of the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value, and the horizontal coordinates of the plurality of coordinate points are spaced uniformly;

[0089] Step S132 : Rendering the partition chart of each partition according to the multiple coordinate points corresponding to each partition to obtain a target chart corresponding to the characteristic value sequence.

[0090] Select a value as the ordinate from the subsequence corresponding to each partition or the first number of arithmetic progressions between every two characteristic values ​​in each partition. The calculated first number of arithmetic progressions can be treated as the value between two adjacent characteristic values ​​and then selected. For example, if the subsequence corresponding to a certain interval is 1, 15, and the first number of values ​​corresponding to the interval are 3, 5, 7, 9, 11, and 13, respectively, then a value can be selected from 1, 3, 5, 7, 9, 11, 13, and 15 as the ordinate. On the horizontal axis, a value is selected as the horizontal coordinate for each interval of a preset length. The horizontal coordinate can be selected based on the last horizontal coordinate in the coordinate points of the previous interval. For example, if the last coordinate point in the coordinate points corresponding to the previous interval is (10, 3), then when selecting the horizontal coordinate, it can be selected after 10, such as 11, 12, 13, 14, 15, 16, 17, 18, and the multiple coordinate points corresponding to the partition are (11, 1), (12, 3), (13, 5), (14, 7), (15, 9), (16, 11), (17, 13), (18, 15). Then, based on the corresponding multiple coordinate points, a partition chart corresponding to the partition is generated. The partition charts of each partition are rendered. The partition charts can be spliced ​​according to the order in the corresponding feature value sequences of the multiple partitions to obtain the target chart corresponding to the feature value sequence. Alternatively, the entire target chart can be directly rendered according to the multiple coordinate points corresponding to each partition to achieve the rendering of each partition chart.

[0091] It can be seen that through the method of the embodiment of the present application, multiple coordinate points corresponding to each partition can be calculated, the partition chart corresponding to each partition can be rendered, and the target chart corresponding to the characteristic value sequence can be obtained, thereby realizing the generation of charts through different compression ratios.

[0092] Optional, see Figure 3 , the above method further includes:

[0093] Step S31: for any two consecutive partitions, determine a second number of values ​​to be filled between the two consecutive partitions, where the second number is the number of values ​​to be filled between the first characteristic value of the latter partition and the last characteristic value of the former partition, and determine the second number of values ​​to be filled between the two consecutive partitions;

[0094] According to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value, target chart data corresponding to the characteristic value sequence is obtained, including:

[0095] Step S32 , obtaining target chart data corresponding to the characteristic value sequence according to the subsequence corresponding to each partition, the first number of values ​​between every two characteristic values ​​in each partition to be filled with values, and the second number of values ​​to be filled between each two consecutive partitions.

[0096] The observability of the changing trend of the data between any two consecutive partitions can be improved by filling a second number of values ​​between any two consecutive partitions. Optionally, the second number of values ​​to be filled between two consecutive partitions is: the first number corresponding to any of the two consecutive partitions, so that the changing trend of the data between two consecutive partitions can be the same or similar to the changing trend of the data in any of the two partitions, thereby improving the observability of the changing trend of the overall target chart data. Optionally, the second number of values ​​can be between the first feature value of the latter partition in the two consecutive partitions and the last feature value of the previous partition, and the second number of values ​​to be filled can be arranged in ascending or descending order. In this way, the filled values ​​can more friendly represent the changing trend of the two adjacent feature values.

[0097] In one embodiment, determining the second number of values ​​to be filled between the two consecutive partitions includes: calculating the second number of arithmetic difference values ​​between the first characteristic value of the latter partition and the last characteristic value of the previous partition in the two consecutive partitions according to the second number corresponding to the two consecutive partitions. In this way, the filled values ​​can more friendly represent the changing trend of the two adjacent characteristic values. In one embodiment, the target chart data obtained can be a target line chart, so that the second number of values ​​to be filled, that is, the virtual data, are all on the line segment of the target line chart, and the characteristic values, that is, the real data, are all on the inflection point of the line chart. The situation of the real data can be intuitively seen through the inflection point, and the change of the characteristic values ​​of the adjacent partitions can be observable with the help of the second number of virtual values ​​between each two adjacent partitions, thereby improving the observability of viewing the changing trend of the data.

[0098] Optionally, the second number of values ​​to be filled between two consecutive partitions is: the first number corresponding to the latter partition of the two consecutive partitions.

[0099] For any two consecutive partitions, the second number of values ​​to be filled between the two consecutive partitions can be the same as the number of values ​​to be filled between every two adjacent characteristic values ​​in the previous partition or the next partition in the two consecutive partitions, that is, the first number. For example, the subsequences corresponding to the three partitions are 12, -1, 51, -9, 35; 15, 39, 57; 1, 15, among which the first partition of the three partitions is 12, -1, 51, -9, 35. For this partition, it is only necessary to perform an arithmetic difference calculation for every two adjacent characteristic values ​​of the partition according to the first number of the partition. For the second partition 15, 39, 57, it is necessary not only to calculate the arithmetic difference calculation for every two adjacent characteristic values ​​in 15, 39, 57, but also to calculate the first number of arithmetic difference values ​​between the last characteristic value 35 of the previous partition and the first characteristic value 15 of the partition, that is, the values ​​to be filled between the first partition and the second partition. Among them, by calculating the second number of arithmetic difference values ​​between the first characteristic value of the latter partition in the two consecutive partitions and the last characteristic value in the previous partition, and finally generating chart data through the arithmetic difference values, not only can the calculation be facilitated and the calculation efficiency be improved, but also when the chart data in the embodiment of the present application is a line graph, the second number of arithmetic difference values ​​can be not displayed, which facilitates the generation of the line graph. In one embodiment, according to the subsequence corresponding to each partition, the first number of values ​​between each two characteristic values ​​in each partition that needs to be filled with values, and the second number of values ​​to be filled between each two consecutive partitions, the target chart data corresponding to the characteristic value sequence is obtained, including:

[0100] Determine multiple coordinate points corresponding to each partition, wherein the vertical coordinates of the multiple coordinate points corresponding to each partition include the values ​​of the first number of values ​​between each two characteristic values ​​in the subsequence corresponding to each partition and each partition that needs to be filled with a value; determine multiple coordinate points corresponding between each two consecutive partitions, wherein the vertical coordinates of the multiple coordinate points corresponding between each two consecutive partitions include the values ​​of the second number of values ​​to be filled between each two consecutive partitions; the horizontal coordinate intervals of the multiple coordinate points corresponding to each partition and the multiple coordinate points corresponding between each two consecutive partitions are the same;

[0101] According to the multiple coordinate points corresponding to each partition and the multiple coordinate points corresponding between two consecutive partitions, the partition chart of each partition and the part between two consecutive partitions are rendered to obtain a target chart corresponding to the feature value sequence.

[0102] The target chart can be obtained by rendering each partition icon and the part between each partition separately, and then splicing each part. Alternatively, the target chart can be directly rendered according to the coordinate points to achieve the rendering of each partition chart and the part between each partition.

[0103] In order to illustrate the method of the embodiment of the present application, the following is described in conjunction with specific embodiments. Figure 4 ,include:

[0104] 1. Get all the data of the chart. For example, get the original data array: 12, -1, 51, -9, 35, 15, 39, 57, -11, 51, a total of 10 data.

[0105] 2. Split the data according to the basic parameters. For example, when the partition ratio is (5:3:2), the original data array can be cut into three segments: 12, -1, 51, -9, 35; 15, 39, 57; -11, 51.

[0106] 3. Calculate virtual values ​​based on the compression ratio. For example, the first segment has a compression ratio of 1, so no virtual values ​​need to be filled in. The second segment has a compression ratio of 1 / 3, which means that three X-axis basic units represent one data basic unit, and two virtual values ​​need to be filled in. For example, two values ​​need to be filled in between 15 and 39, namely 23 and 31, and the final result is an arithmetic progression of 15, 23, 31, and 39.

[0107] 4. Connect all the data to get the rendering data. For example, the final data after filling is: 12,-1,51,-9,35,28.33,21.67,15,23,31,39,45,51,57,45.67,34.33,23,11.67,0.33,-11,-0.67,9.67,20,30.33,40.67,51.

[0108] 5. Import the data into the component to render the chart. For example, you can mark each segment of chart data separately, and use different marks to identify different segments.

[0109] In the second aspect of the embodiment of this application, see Figure 5 , provides a chart data generating device, comprising:

[0110] A feature acquisition module 501 is configured to acquire a feature value sequence and partition features of a chart to be generated, wherein the partition features include a preset compression ratio of each partition of the chart to be generated, and the feature value sequence includes multiple subsequences, wherein the multiple partitions correspond to the multiple subsequences in a one-to-one correspondence;

[0111] A value determination module 502 is configured to determine, for any partition, the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition according to a preset compression ratio of the partition, obtain a first number, and determine the first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition;

[0112] The chart generating module 503 is configured to obtain target chart data corresponding to the characteristic value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value.

[0113] Optionally, the partition feature also includes a partition ratio between the partitions, where the partition ratio represents the ratio of the number of feature values ​​of each partition. The multiple subsequences are: multiple subsequences obtained by dividing the feature value sequence according to the partition ratio and the total number of feature values ​​in the feature value sequence.

[0114] Optionally, the value determination module 502 is specifically configured to calculate, according to the first number of the partitions, a first number of arithmetic difference values ​​between every two adjacent characteristic values ​​of the partition.

[0115] Optionally, the chart generation module 503 is specifically used to render the partition chart of each partition according to the subsequence corresponding to each partition and the first number of values ​​between each two characteristic values ​​in each partition that needs to be filled with values, so as to obtain a target line chart corresponding to the characteristic value sequence.

[0116] Optionally, the above device further includes:

[0117] a second value determination module, configured to determine, for any two consecutive partitions, a second number of values ​​to be filled between the two consecutive partitions, the second number being the number of values ​​to be filled between the first characteristic value of the latter partition and the last characteristic value of the former partition, and determine the second number of values ​​to be filled between the two consecutive partitions;

[0118] The chart generation module is specifically used to obtain target chart data corresponding to the characteristic value sequence based on the subsequence corresponding to each partition, the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with values, and the second number of values ​​to be filled between each two consecutive partitions.

[0119] Optionally, the second number of values ​​to be filled between two consecutive partitions is: the first number corresponding to any partition in the two consecutive partitions; and / or

[0120] The second value determination module is specifically configured to calculate, based on the second quantities corresponding to the two consecutive partitions, a second number of arithmetic difference values ​​between the first characteristic value of the latter partition and the last characteristic value of the previous partition.

[0121] Optionally, the second number of values ​​to be filled between two consecutive partitions is: the first number corresponding to the latter partition of the two consecutive partitions.

[0122] Optionally, the chart generation module 503 includes:

[0123] an interval determination submodule, configured to determine a plurality of coordinate points corresponding to each partition, wherein the vertical coordinates of the plurality of coordinate points include values ​​in a first number of values ​​between every two characteristic values ​​in the subsequence corresponding to each partition and each partition requiring filling, and the horizontal coordinates of the plurality of coordinate points are spaced uniformly;

[0124] The chart rendering submodule is used to render the partition chart of each partition according to the multiple coordinate points corresponding to each partition, and obtain the target chart corresponding to the characteristic value sequence.

[0125] It can be seen that through the device of the embodiment of the present application, the characteristic numerical sequence and partition characteristics of the chart to be generated can be determined and the target chart data corresponding to the characteristic numerical sequence can be obtained based on the subsequence corresponding to each partition and the first number of values ​​between each two characteristic values ​​in each partition that needs to be filled with values. By filling values ​​between each two characteristic values, data corresponding to charts with different compression ratios for each partition can be obtained, so that the visibility of the data change trend can be improved when the data of each partition is subsequently displayed, and the problem of the existing technology that when generating charts, some position coordinate points are too dense, which makes it inconvenient for users to view the data change trend.

[0126] An embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory is used to store computer programs; and the processor is used to implement any of the above-mentioned steps of the chart data generation method when executing the program stored in the memory.

[0127] The present application also provides an electronic device, such as Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0128] Memory 603, used for storing computer programs;

[0129] The processor 601 is configured to execute the program stored in the memory 603 by performing the following steps:

[0130] Obtaining a feature value sequence and partition features of a chart to be generated, wherein the partition features include a preset compression ratio of each partition of the chart to be generated, and the feature value sequence includes multiple subsequences, wherein the multiple partitions correspond to the multiple subsequences in a one-to-one correspondence;

[0131] For any partition, according to a preset compression ratio of the partition, determine the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition to obtain a first number, and determine the first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition;

[0132] Target chart data corresponding to the characteristic value sequence is obtained according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value.

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

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

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

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

[0137] In another embodiment provided by the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of any of the above-mentioned chart data generation methods are implemented.

[0138] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the chart data generating methods in the above embodiments.

[0139] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

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

[0141] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device, electronic device, storage medium, and computer program product embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.

[0142] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.

Claims

1. A method for generating chart data, characterized in that: include: Obtaining a characteristic numerical sequence and partition characteristics of a chart to be generated, wherein the partition characteristics include a preset compression ratio of each partition of the chart to be generated, and the characteristic numerical sequence includes a plurality of subsequences, wherein the plurality of partitions correspond to the plurality of subsequences in a one-to-one manner; For any partition, according to a preset compression ratio of the partition, determine the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition to obtain a first number, and determine the first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition; According to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value, target chart data corresponding to the characteristic value sequence is obtained.

2. The method according to claim 1, characterized in that The partition feature also includes a partition ratio between the partitions, where the partition ratio represents the ratio of the number of feature values ​​of the partitions. The multiple subsequences are: multiple subsequences obtained by dividing the feature value sequence according to the partition ratio and the total number of feature values ​​in the feature value sequence.

3. The method according to claim 1, characterized in that The determining of a first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition includes: Calculate the arithmetic difference values ​​of the first number between every two adjacent characteristic values ​​of the partition according to the first number of the partition; and / or The step of obtaining target chart data corresponding to the characteristic value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value includes: According to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value, the partition chart of each partition is rendered to obtain a target line chart corresponding to the characteristic value sequence.

4. The method according to claim 1, wherein The method further comprises: For any two consecutive partitions, determine a second number of values ​​to be filled between the two consecutive partitions, where the second number is the number of values ​​to be filled between the first characteristic value of the latter partition and the last characteristic value of the previous partition, and determine the second number of values ​​to be filled between the two consecutive partitions; The step of obtaining target chart data corresponding to the characteristic value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value includes: Target chart data corresponding to the characteristic value sequence is obtained according to the subsequence corresponding to each partition, the first number of values ​​between each two characteristic values ​​in each partition that needs to be filled with values, and the second number of values ​​to be filled between each two consecutive partitions.

5. The method according to claim 4, characterized in that The second number of values ​​to be filled between the two consecutive partitions is: the first number corresponding to any partition in the two consecutive partitions; and / or Determining the second number of values ​​to be filled between the two consecutive partitions includes: According to the second quantities corresponding to the two consecutive partitions, the arithmetic difference values ​​of the second quantity between the first characteristic value of the latter partition and the last characteristic value of the previous partition of the two consecutive partitions are calculated.

6. The method according to claim 5, characterized in that The second number of values ​​to be filled between the two consecutive partitions is: the first number corresponding to the latter partition of the two consecutive partitions.

7. The method according to claim 1, characterized in that The step of obtaining target chart data corresponding to the characteristic value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value includes: Determine a plurality of coordinate points corresponding to each partition, wherein the vertical coordinates of the plurality of coordinate points include values ​​in the subsequence corresponding to each partition and a first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value, and the horizontal coordinates of the plurality of coordinate points are spaced at the same interval; According to the multiple coordinate points corresponding to each partition, the partition chart of each partition is rendered to obtain a target chart corresponding to the characteristic value sequence.

8. A chart data generating device, characterized in that: include: a feature acquisition module, configured to acquire a feature value sequence and partition features of a chart to be generated, wherein the partition features include a preset compression ratio of each partition of the chart to be generated, and the feature value sequence includes a plurality of subsequences, wherein the plurality of partitions and the plurality of subsequences correspond one to one; a value determination module, configured to determine, for any partition, the number of values ​​to be filled between every two adjacent characteristic values ​​of the partition according to a preset compression ratio of the partition, obtain a first number, and determine the first number of values ​​to be filled between every two adjacent characteristic values ​​of the partition; The chart generating module is configured to obtain target chart data corresponding to the characteristic value sequence according to the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value.

9. The device according to claim 8, characterized in that The partition feature further includes a partition ratio between the partitions, where the partition ratio represents a ratio of the number of feature values ​​of the partitions, and the multiple subsequences are: multiple subsequences obtained by dividing the feature value sequence according to the partition ratio and the total number of feature values ​​in the feature value sequence; and / or The value determination module is specifically configured to calculate, based on the first number of the partitions, a first number of arithmetic difference values ​​between every two adjacent characteristic values ​​of the partition; and / or The chart generating module is specifically configured to render a partition chart of each partition based on the subsequence corresponding to each partition and the first number of values ​​between every two characteristic values ​​in each partition that needs to be filled with a value, to obtain a target broken line chart corresponding to the characteristic value sequence; and / or The device further comprises: a second value determination module, configured to determine, for any two consecutive partitions, a second number of values ​​to be filled between the two consecutive partitions, where the second number is the number of values ​​to be filled between the first characteristic value of the latter partition and the last characteristic value of the former partition, and determine the second number of values ​​to be filled between the two consecutive partitions; The chart generating module is specifically configured to obtain target chart data corresponding to the characteristic value sequence based on the subsequence corresponding to each partition, a first number of values ​​between every two characteristic values ​​in each partition to be filled with values, and a second number of values ​​to be filled between each two consecutive partitions; The second number of values ​​to be filled between the two consecutive partitions is: the first number corresponding to any partition in the two consecutive partitions; and / or The second value determination module is specifically configured to calculate, based on the second quantities corresponding to the two consecutive partitions, a second number of arithmetic difference values ​​between the first characteristic value of the latter partition and the last characteristic value of the previous partition of the two consecutive partitions; The second number of values ​​to be filled between the two consecutive partitions is: the first number corresponding to the latter partition of the two consecutive partitions; and / or The chart generation module includes: an interval determination submodule, configured to determine a plurality of coordinate points corresponding to each partition, wherein the vertical coordinates of the plurality of coordinate points include values ​​in a first number of values ​​between every two characteristic values ​​in the subsequence corresponding to each partition and each partition requiring filling, and the horizontal coordinates of the plurality of coordinate points are spaced uniformly; The chart rendering submodule is used to render the partition chart of each partition according to the multiple coordinate points corresponding to each partition, so as to obtain a target chart corresponding to the characteristic value sequence.

10. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory is used to store computer programs; A processor, configured to implement the method according to any one of claims 1 to 7 when executing a program stored in a memory.

Citation Information

Patent Citations

  • Method and device for processing visualized data

    CN107103010A

  • Monitoring device, and monitoring information display method and apparatus

    CN112351734A