Disclosure of Invention
An object of the disclosed embodiments is to provide a processing method and apparatus for a chart, an electronic device, and a storage medium, which can automatically mine key information of the chart to generate a relevant data conclusion.
According to a first aspect of the present disclosure, a method of processing a chart is provided. The method comprises the following steps:
acquiring a first target data sequence in the chart, wherein the first target data sequence takes time as a sequence;
obtaining a first correlation, the first correlation being a correlation between data items of the first target data sequence and category values corresponding to the data items of the first target data sequence;
and outputting a chart processing result related to the first correlation according to the first correlation.
Optionally, before acquiring the first target data sequence in the graph, the method further includes:
acquiring a data sequence in the chart;
and determining that the data sequence is the first target data sequence when the category values corresponding to the data items of the data sequence represent time and the category values corresponding to the data items of the data sequence have a sequential relationship.
Optionally, in a case that there are N first target temporal data sequences and there is a temporal sequential relationship between the N first target data sequences, where N is an integer and N ≧ 2, the method further includes:
processing a data item of an nth first target data sequence to obtain target data corresponding to the nth first target data sequence, wherein the nth first target data sequence is any one of N first target data sequences;
according to the time sequence relation among the N first target data sequences, giving class values to target data corresponding to the N first target data sequences as data items to construct a second target data sequence in a time sequence;
obtaining a second correlation, the second correlation being a correlation between the data items of the second target data sequence and the category values corresponding to the data items of the second target data sequence;
and outputting a chart processing result corresponding to the second correlation according to the second correlation.
Optionally, the outputting a graph processing result corresponding to the first correlation according to the first correlation includes:
determining a relationship between two data items adjacent in a sequential direction in the first target data sequence when the first correlation characterizes that the data items of the first target data sequence are positively correlated with the class values corresponding to the data items;
and generating a chart processing result corresponding to the first correlation according to the relation between two adjacent data items in the first target data sequence in the sequence direction.
Optionally, the determining a relationship between two data items adjacent in a sequential direction in the first target data sequence includes: for two adjacent data items in the first target data sequence, calculating the speed increase of the next data item relative to the previous data item;
generating a chart processing result corresponding to the first correlation according to a relationship between two data items adjacent in the first target data sequence in the sequential direction, including: determining whether the latter data item is in negative increase or not according to the increase rate of the latter data item relative to the former data item; generating a chart processing result corresponding to the first correlation according to the number of the negatively increased data items in the first target data sequence and the positions of the negatively increased data items in the first target data sequence.
Optionally, the outputting a graph processing result corresponding to the first correlation according to the first correlation includes:
determining a relationship between two data items adjacent in a sequential direction in the first target data sequence when the first correlation characterizes that the data items of the first target data sequence are negatively correlated with the class values corresponding to the data items;
and generating a chart processing result corresponding to the first correlation according to the relation between two adjacent data items in the first target data sequence in the sequence direction.
Optionally, the determining a relationship between two data items adjacent in a sequential direction in the first target data sequence includes: for two adjacent data items in the first target data sequence, calculating the speed increase of the next data item relative to the previous data item;
generating a chart processing result corresponding to the first correlation according to a relationship between two data items adjacent in the first target data sequence in the sequential direction, including: determining whether the latter data item is increasing according to the speed increase of the latter data item relative to the former data item; generating a chart processing result corresponding to the first correlation according to the number of growing data items in the first target data sequence and the positions of the growing data items in the first target data sequence.
Optionally, the outputting a graph processing result corresponding to the first correlation according to the first correlation includes:
determining an average value of the data items of the first target data sequence and a maximum value and a minimum value of the data items of the first target data sequence under the condition that the first correlation characterizes that the data items of the first target data sequence are not correlated with the class values corresponding to the data items;
determining a first difference value and a second difference value, wherein the first difference value is the difference value between the maximum value and the average value, and the second difference value is the difference value between the average value and the minimum value;
outputting a category value corresponding to the maximum value when the first difference value is larger than the second difference value;
and outputting the category value corresponding to the minimum value when the first difference value is smaller than the second difference value.
Optionally, the method further comprises:
for two adjacent data items in the first target data sequence, calculating the speed increase of the next data item relative to the previous data item;
judging whether the latter data item is in positive growth or negative growth according to the speed increase of the latter data item relative to the former data item;
and outputting a corresponding chart processing result according to the category value of the data item growing positively and the category value of the data item growing negatively.
According to a second aspect of the present disclosure, a processing apparatus of a chart is provided. The device comprises:
the first acquisition module is used for acquiring a first target data sequence in the chart, wherein the first target data sequence takes time as an order;
a second obtaining module, configured to obtain a first correlation, where the first correlation is a correlation between a data item of the first target data sequence and a category value corresponding to the data item of the first target data sequence;
and the output module is used for outputting the chart processing result related to the first correlation according to the first correlation.
According to a third aspect of the present disclosure, there is also provided an electronic device comprising a memory for storing a computer program and a processor; the processor is adapted to execute the computer program to implement the method of the first aspect of the present disclosure.
According to a fourth aspect of the present disclosure, there is also provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the first aspect of the present disclosure.
According to the chart processing method and device, the electronic equipment and the storage medium, for the data sequence taking time as an axis in the chart, key information can be mined to generate a relevant data conclusion, excessive human intervention is not needed, the chart processing automation is realized, the chart processing time is saved, and convenience is brought to users.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< hardware configuration >
FIG. 1 is a schematic structural diagram of an electronic device that can be used to implement embodiments of the present disclosure. The electronic device can be used for implementing the chart processing method of the embodiment of the disclosure.
The electronic device 1000 may be a smart phone, a portable computer, a desktop computer, a tablet computer, a server, etc., and is not limited herein.
The electronic device 1000 may include, but is not limited to, a processor 1100, a memory 1200, aninterface device 1300, a communication device 1400, a display device 1500, aninput device 1600, a speaker 1700, amicrophone 1800, and the like. The processor 1100 may be a central processing unit CPU, a graphics processing unit GPU, a microprocessor MCU, or the like, and is configured to execute a computer program/instruction, which may be written by using an instruction set of architectures such as x86, Arm, RISC, MIPS, and SSE. The memory 1200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. Theinterface device 1300 includes, for example, a USB interface, a serial interface, a parallel interface, and the like. The communication device 1400 is capable of wired communication using an optical fiber or a cable, or wireless communication, and specifically may include WiFi communication, bluetooth communication, 2G/3G/4G/5G communication, and the like. The display device 1500 is, for example, a liquid crystal display panel, a touch panel, or the like. Theinput device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. The speaker 1700 is used to output an audio signal. Themicrophone 1800 is used to collect audio signals.
As applied to the disclosed embodiments, the memory 1200 of the electronic device 1000 is used to store computer programs/instructions for controlling the processor 1100 to operate so as to implement the graph processing method according to the disclosed embodiments. The computer program/instructions may be designed by the skilled person in accordance with the disclosure of the present disclosure. How the computer programs/instructions control the operation of the processor is well known in the art and will not be described in detail herein. The electronic device 1000 may be installed with an intelligent operating system (e.g., Windows, Linux, android, IOS, etc. systems) and application software.
It should be understood by those skilled in the art that although a plurality of devices of the electronic apparatus 1000 are illustrated in fig. 1, the electronic apparatus 1000 of the embodiments of the present disclosure may refer to only some of the devices therein, for example, only the processor 1100 and the memory 1200, etc.
Fig. 9 and 10 are diagrams corresponding to the same source data, wherein fig. 9 illustrates a graphic form of the diagram and fig. 10 illustrates a table form of the diagram. The chart comprises a plurality of data sequences, wherein fig. 9 and 10 only illustrate one of the data sequences, the data sequence is {9700,109267,6800,20864,17602,68028,27400,5000,92855,27400,15650,15520,32450}, the total number is 13 data items, and the category values corresponding to the data items represent time, for example, the category value "1" represents "2 month and 8 days", the category value "2" represents "2 month and 11 days", and the like.
Referring to fig. 3 in conjunction with fig. 9 and 10, a method for processing a graph provided by the embodiment of the present disclosure is described, which includes steps S102-S106.
Step S102, a first target data sequence in the chart is obtained, and the first target data sequence takes time as a sequence.
In one example, before step S102, a process of determining the first target sequence in the graph is further included. First, each data sequence in the chart is acquired. And when the category values corresponding to the data items of the data sequence represent time and the category values corresponding to the data items of the data sequence have an order relation, determining the data sequence as a first target data sequence.
Referring to the data sequence shown in fig. 9 and 10, 13 category values corresponding to 13 data items are "1", "2", … "and" 13 ", respectively, there is a sequential relationship between the category values, and the category values represent time, then it may be determined that the data sequence is a time sequence, and the data sequence may be determined as a first target sequence.
In one example, determining whether the data sequence is time-sequenced comprises: and acquiring the graph type corresponding to the data sequence. In the case where the graph type corresponding to the data series is a line graph, it is determined that the data series is time-series.
And step S104, obtaining a first correlation, wherein the first correlation is the correlation between the data items of the first target data sequence and the category values corresponding to the data items of the first target data sequence.
In one example, a correlation coefficient between a data item of the first target data sequence and a category value corresponding to the data item may be calculated, and whether the data item of the first target data sequence and the category value thereof are positively correlated, negatively correlated, or uncorrelated may be determined according to the correlation coefficient. The correlation refers to the degree of association between two variables, where the two variables are the data item of the first target data sequence and the category value corresponding to the data item of the first target data sequence.
In one example, the correlation coefficient is between-1 and 1, 0 indicates no correlation, and a larger absolute value of the correlation coefficient indicates a larger first correlation, positive values tend to be positive and negative values tend to be negative. In one example, the correlation coefficient may be a covariance between a data item of the first target data sequence and a class value to which the data item corresponds. The covariance can reflect the synergistic relationship between the two variables X and Y, i.e. whether the two variables have consistent trend. If the variable X is larger and the variable Y is also larger, the two variables are changed in the same direction, and the covariance is positive. If the variable X becomes larger and the variable Y becomes smaller, it means that the two variables are inversely changed, and the covariance is negative. In this example, the covariance between the data items of the first target data sequence and the corresponding class value is calculated using the variable X and the variable Y.
In one example, a data item of a data sequence is determined to be positively correlated with a category value corresponding to the data item if a first correlation coefficient between the data item and the category value corresponding to the data item is greater than a positive threshold. The positive threshold is, for example, 0.7.
In one example, a data item of a data sequence is determined to be negatively correlated with a category value corresponding to the data item if a first correlation coefficient between the data item and the category value corresponding to the data item is less than a negative threshold. The negative threshold is, for example, -0.7.
In one example, a data item of a data sequence is determined to be irrelevant to a category value to which the data item corresponds if a first correlation coefficient between the data item and the category value to which the data item corresponds is less than or equal to a positive threshold and greater than or equal to a negative threshold. The positive threshold value is, for example, 0.7, and the negative threshold value is, for example, -0.7, that is, if the first correlation coefficient is equal to or less than 0.7 and equal to or more than-0.7, it is determined that the data item of the data sequence is not correlated with the category value to which the data item corresponds.
And S106, outputting a chart processing result related to the first correlation according to the first correlation.
Step S106 is exemplified below:
in one example, referring to FIG. 4, step S106 includes steps S402-S404.
Step S402, determining the relation between two data items adjacent in the sequence direction in the first target data sequence under the condition that the first correlation represents that the data items of the first target data sequence are positively correlated with the corresponding category values of the data items.
Step S404, generating a chart processing result corresponding to the first correlation according to a relationship between two data items adjacent in the first target data sequence in the sequential direction.
In step S402, determining a relationship between two data items adjacent in the sequential direction in the first target data sequence may include: for two adjacent data items in the first target data sequence, the speed increase of the latter data item relative to the former data item is calculated.
For the ith data in the first target data sequenceItem, Ki=(Si-Si-1)/Si-1Wherein S isiFor the ith data item in the first target data sequence, Si-1Is the i-1 th data item in the first target data sequence, i is an integer and i ≧ 2. Si-1And SiAdjacent in sequential direction, KiIs the speed increase of the ith data item in the first target data sequence relative to the (i-1) th data item.
In step S404, generating a chart processing result corresponding to the first correlation according to a relationship between two data items adjacent in the sequential direction in the first target data sequence may include: determining whether the latter data item is in negative increase or not according to the increase rate of the latter data item relative to the former data item; generating a chart processing result corresponding to the first correlation according to the number of the negatively increased data items in the first target data sequence and the positions of the negatively increased data items in the first target data sequence.
If K isiFor positive values, the ith data item S is determinediIs growing. If K isiNegative, the ith data item S is determinediIs a negative increase.
Generating a chart processing result corresponding to the first correlation according to the number of the negatively increased data items in the first target data sequence and the positions of the negatively increased data items in the first target data sequence, for example, may be:
if the number of negatively increasing data items in the first target data sequence is zero, the generated graph processing conclusion is that: the growth is stable.
If the number of negatively grown data items in the first target data sequence is 1 and the only negatively grown data item is the last data item of the first target data sequence, generating a graph processing conclusion comprising: the overall increase but the recent increase is slightly slower.
If the number of negatively-increasing data items in the first target data sequence is 1, and the time represented by the category value corresponding to the unique data item is assumed to be T11, the generated graph processing conclusion includes: except for the drop at time T11, the other times continue to increase.
If the number of the data items with negative growth in the first target data sequence is greater than or equal to 1, selecting the data item with the minimum speed increase, and assuming that the time represented by the category value corresponding to the data item with the minimum speed increase is T12, generating a chart processing conclusion, wherein the chart processing conclusion comprises the following steps: the fastest drop is at time T12.
For a data sequence taking time as an axis in a diagram, by using the diagram processing method of the example, key information can be mined to generate a relevant data conclusion, excessive human intervention is not needed, the automation of diagram processing is realized, the diagram processing time is saved, and convenience is brought to a user.
In one example, referring to FIG. 5, step S106 includes steps S502-S504.
Step S502, under the condition that the data items of the first relevance characterization first target data sequence and the corresponding class values of the data items are in negative relevance, determining the relation between two data items adjacent in the first target data sequence in the sequence direction.
Step S504 is to generate a chart processing result corresponding to the first correlation according to a relationship between two data items adjacent in the order direction in the first target data sequence.
In step S502, determining a relationship between two data items adjacent in the sequential direction in the first target data sequence may include: for two adjacent data items in the first target data sequence, the speed increase of the latter data item relative to the former data item is calculated.
For the ith data item in the first target data sequence, Ki=(Si-Si-1)/Si-1Wherein S isiFor the ith data item in the first target data sequence, Si-1Is the i-1 th data item in the first target data sequence, i is an integer and i ≧ 2. Si-1And SiAdjacent in sequential direction, KiIs the speed increase of the ith data item in the first target data sequence relative to the (i-1) th data item.
In step S504, generating a chart processing result corresponding to the first correlation according to a relationship between two data items adjacent in the sequential direction in the first target data sequence may include: determining whether the latter data item is increasing according to the speed increase of the latter data item relative to the former data item; generating a chart processing result corresponding to the first correlation according to the number of the growing data items in the first target data sequence and the positions of the growing data items in the first target data sequence.
If K isiFor positive values, the ith data item S is determinediIs growing. If K isiNegative, the ith data item S is determinediIs a negative increase.
Generating a chart processing result corresponding to the first correlation according to the number of growing data items in the first target data sequence and the positions of the growing data items in the first target data sequence, for example, may be:
if the number of growing data items in the first target data sequence is zero, the generated graph processing conclusion includes: steadily decreasing.
If the number of growing data items in the first target data sequence is 1 and the only growing data item is the last data item of the first target data sequence, generating a graph processing conclusion comprising: the overall decline but the rate of decline in the near future is slightly slowed down.
If the number of growing data items in the first target data sequence is 1, and the time represented by the category value corresponding to the unique data item is T21, the generated graph processing conclusion includes: except for the increase at time T21, the other times continue to decrease.
If the number of the growing data items in the first target data sequence is greater than or equal to 1, selecting the data item with the largest acceleration rate, and assuming that the time represented by the category value corresponding to the data item with the largest acceleration rate is T22, the generated chart processing conclusion comprises the following steps: the fastest increase is at time T22.
For a data sequence taking time as an axis in a diagram, by using the diagram processing method of the example, key information can be mined to generate a relevant data conclusion, excessive human intervention is not needed, the automation of diagram processing is realized, the diagram processing time is saved, and convenience is brought to a user.
In one example, referring to FIG. 6, step S106 includes steps S602-S606.
Step S602, in a case that the first correlation indicates that the data items of the first target data sequence are not correlated with the category values corresponding to the data items, determining an average value of the data items of the first target data sequence and a maximum value and a minimum value among the data items of the first target data sequence.
Step S604, a first difference value and a second difference value are determined, where the first difference value is a difference value between the maximum value and the average value, and the second difference value is a difference value between the average value and the minimum value.
And step S606, outputting the category value corresponding to the maximum value under the condition that the first difference value is larger than the second difference value. And outputting the class value corresponding to the minimum value under the condition that the first difference value is smaller than the second difference value.
For example, when the first difference is greater than the second difference, the category value corresponding to the maximum value is output, and assuming that the category value corresponding to the maximum value is time T31, the generated graph processing result includes: at time T31 is a maximum.
For example, when the first difference is smaller than the second difference, the category value corresponding to the minimum value is time T32, and the generated graph processing result includes: at time T32 is a minimum.
For a data sequence taking time as an axis in a diagram, by using the diagram processing method of the example, key information can be mined to generate a relevant data conclusion, excessive human intervention is not needed, the automation of diagram processing is realized, the diagram processing time is saved, and convenience is brought to a user.
Referring to fig. 7, the processing method of the chart may further include steps S702 to S706.
Step S702, for two adjacent data items in the first target data sequence, calculating the speed increase of the next data item relative to the previous data item.
In step S702, K is applied to the ith data item in the first target data sequencei=(Si-Si-1)/Si-1Wherein S isiFor the ith data item in the first target data sequence, Si-1Is the i-1 th data item in the first target data sequence, i is an integer and i ≧ 2. Si-1And SiAdjacent in sequential direction, KiIs the speed increase of the ith data item in the first target data sequence relative to the (i-1) th data item.
And step S704, judging whether the latter data item is in positive growth or negative growth according to the speed increase of the latter data item relative to the former data item.
In step S704, generating a chart processing result corresponding to the first correlation according to a relationship between two data items adjacent in the sequential direction in the first target data sequence may include: determining whether the latter data item is in negative increase or not according to the increase rate of the latter data item relative to the former data item; generating a chart processing result corresponding to the first correlation according to the number of the negatively increased data items in the first target data sequence and the positions of the negatively increased data items in the first target data sequence.
If K isiFor positive values, the ith data item S is determinediIs growing. If K isiNegative, the ith data item S is determinediIs a negative increase.
And S706, outputting a corresponding chart processing result according to the category value of the data item which is gathered and is positively increased and the category value of the data item which is gathered and negatively increased.
In step S706, the classified processing is performed and the same type is collected; according to the category values of the data items which are being increased and are being collected, the category values of all the data items which are being increased and are obtained through calculation can be arranged according to the time sequence or other sequences, the category value of at least one data item which is being increased and has the continuous uninterrupted sequence is used as one collection data, after all the collection data are arranged, the processing result corresponding to the category value of the data item which is being increased is output, and the processing result can be described as how many times and time periods are increased in total in the graph processing; similarly, the category values of the negatively increased data items in the set may be all the calculated category values of all the negatively increased data items, which are arranged according to a time sequence or other sequences, the category value of at least one negatively increased data item whose sequence is continuous and uninterrupted is used as one set data, after all the set data are sorted, a processing result corresponding to the category value of the negatively increased data item is output, and the processing result may be described as how many times and time periods of negative increase are shared in the graph processing; further, combining the number of times and time periods of positive increase in total and the number of times and time periods of negative increase in total, the processing result of the corresponding graph as a whole can be output as the comparison result of the number of times of positive increase with respect to the number of times of negative increase, the length of time of the time period of positive increase with respect to the length of the time period of negative increase, and the length of the time period is the sum of the times of all the time periods.
Referring to FIG. 8, in the case that there are N first target temporal data sequences and there is a time sequence relationship between the N first target data sequences (the N first target data sequences may belong to the same graph or multiple graphs), where N is an integer and N ≧ 2, the method may include steps S802-S808.
Step S802, processing the data item of the nth first target data sequence to obtain target data corresponding to the nth first target data sequence, where the nth first target data sequence is any one of the N first target data sequences.
The target data corresponding to the first target data sequence is data determined according to the data items in the first target data sequence. For example, the target data corresponding to the first target data sequence may be an average of all data items in the first target data sequence. For example, the target data corresponding to the first target data sequence may be the maximum value of all data items in the first target data sequence. For example, the target data corresponding to the first target data sequence may be the minimum value of all data items in the first target data sequence. For example, the target data corresponding to the first target data sequence may be a difference between the maximum value and the minimum value.
Step S804, according to the time sequence relationship among the N first target data sequences, giving category values to the target data corresponding to the N first target data sequences as data items to construct a second target data sequence in time sequence.
The time sequence relationship between the N first target data sequences may be determined according to a time range corresponding to the first target data sequence. For example, the time range corresponding to the first target data sequence is the first half year of the current year, and the time range corresponding to the second first target data sequence is the second half year, so that the time sequence relationship between the first target data sequence and the second first target data sequence is the second target data sequence.
And taking the target data corresponding to the N first target data sequences as N new data items, and arranging the new data items into new sequences according to the time sequence relation among the N first target data sequences. And assigning a category value to the data items in the new sequence, so that the category values corresponding to the data items in the new sequence have a sequential relation, thereby obtaining a second target data sequence with time as the sequence.
Step S806, obtaining a second correlation, where the second correlation is a correlation between the data item of the second target data sequence and the category value corresponding to the data item of the second target data sequence.
And step S808, outputting a chart processing result corresponding to the second correlation according to the second correlation.
In this example, if a plurality of first target time data series exist and a time-series relationship exists between the first target data series, the target data corresponding to the first target data series are assigned to a category value as a data item to construct a second target data series in time-series. Then, through steps S806 to S808, the chart processing result for the second target data series is output in a similar manner to the aforementioned steps 104 to S106.
In the example, a plurality of data sequences with time as an axis in the chart can be comprehensively analyzed, and the relationship among the plurality of data sequences with time as an axis is mined to generate a related data conclusion, so that excessive human intervention is not needed, the chart processing automation is realized, the chart processing time is saved, and convenience is brought to users.
Referring to fig. 11, in the present embodiment, a graph processing apparatus is also provided. The processing means 20 of the diagram comprise the following modules:
a first obtaining module 21, configured to obtain a first target data sequence in the graph, where the first target data sequence is in time order.
A second obtaining module 22, configured to obtain a first correlation, where the first correlation is a correlation between the data item of the first target data sequence and the category value corresponding to the data item of the first target data sequence.
And a first output module 23, configured to output a chart processing result related to the first correlation according to the first correlation.
In one example, the processing device of the graph further comprises a determination module.
The determining module is used for acquiring a data sequence in the chart; and determining the data sequence as a first target data sequence when the category values corresponding to the data items of the data sequence represent time and the category values corresponding to the data items of the data sequence have a sequential relationship.
In one example, the processing device of the chart further comprises a first processing module, a building module, a third obtaining module and a second output module.
The first processing module is used for processing the data items of the nth first target data sequence to obtain target data corresponding to the nth first target data sequence under the condition that N first target time data sequences exist and time sequence relations exist among the N first target data sequences, wherein N is an integer and is not less than 2, and the nth first target data sequence is any one of the N first target data sequences.
And the construction module is used for giving category values to the target data corresponding to the N first target data sequences as data items according to the time sequence relation among the N first target data sequences so as to construct a second target data sequence in a time sequence.
And the third obtaining module is used for obtaining a second correlation, wherein the second correlation is the correlation between the data items of the second target data sequence and the category values corresponding to the data items of the second target data sequence.
And the second output module is used for outputting the chart processing result corresponding to the second correlation according to the second correlation.
In one example, outputting a graph processing result corresponding to the first correlation according to the first correlation includes: determining the relationship between two data items adjacent in the sequence direction in the first target data sequence under the condition that the first correlation represents that the data items of the first target data sequence are positively correlated with the corresponding class values of the data items; and generating a chart processing result corresponding to the first correlation according to the relation between two data items adjacent in the sequence direction in the first target data sequence.
In this example, determining a relationship between two data items adjacent in a sequential direction in the first target data sequence includes: for two adjacent data items in the first target data sequence, the speed increase of the latter data item relative to the former data item is calculated. Generating a chart processing result corresponding to the first correlation according to a relationship between two data items adjacent in the first target data sequence in the sequential direction, including: determining whether the latter data item is in negative increase or not according to the increase rate of the latter data item relative to the former data item; generating a chart processing result corresponding to the first correlation according to the number of the negatively increased data items in the first target data sequence and the positions of the negatively increased data items in the first target data sequence.
In one example, outputting a graph processing result corresponding to the first correlation according to the first correlation includes: determining the relation between two data items adjacent in the sequence direction in the first target data sequence under the condition that the first relevance represents that the data items of the first target data sequence and the corresponding class values of the data items are in negative relevance; and generating a chart processing result corresponding to the first correlation according to the relationship between two data items adjacent in the sequence direction in the first target data sequence.
In this example, determining a relationship between two data items adjacent in a sequential direction in the first target data sequence includes: for two adjacent data items in the first target data sequence, the speed increase of the latter data item relative to the former data item is calculated. Generating a chart processing result corresponding to the first correlation according to a relationship between two data items adjacent in the sequence direction in the first target data sequence, including: determining whether the latter data item is increasing according to the speed increase of the latter data item relative to the former data item; generating a chart processing result corresponding to the first correlation according to the number of the growing data items in the first target data sequence and the positions of the growing data items in the first target data sequence.
In one example, outputting a graph processing result corresponding to the first correlation according to the first correlation includes: under the condition that the first correlation characterizes that the data items of the first target data sequence are not correlated with the corresponding class values of the data items, determining the average value of the data items of the first target data sequence and the maximum value and the minimum value of the data items of the first target data sequence; determining a first difference value and a second difference value, wherein the first difference value is the difference value between the maximum value and the average value, and the second difference value is the difference value between the average value and the minimum value; under the condition that the first difference is larger than the second difference, outputting a category value corresponding to the maximum value; and outputting the class value corresponding to the minimum value under the condition that the first difference value is smaller than the second difference value.
In one example, the processing apparatus of the graph further includes a second processing module and a third output module.
The second processing module is used for calculating the speed increase of the next data item relative to the previous data item for two adjacent data items in the first target data sequence; and judging whether the latter data item is positively increased or negatively increased according to the speed increase of the latter data item relative to the former data item.
And the third output module is used for outputting a corresponding chart processing result according to the category value of the data item which is increased positively and the category value of the data item which is increased negatively.
The embodiment also provides an electronic device, which comprises a memory and a processor, wherein the memory is used for storing the computer program; the processor is configured to execute the computer program to implement the processing method of the chart of the first aspect of the present disclosure.
The present embodiment also provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the method of processing a graph of the first aspect of the present disclosure.
In the embodiment, an electronic device is also provided. The electronic device includes a memory and a processor. The memory is used for storing a computer program; the processor is used for executing the computer program to realize the chart processing method provided by any one of the above embodiments.
In the present embodiment, a computer-readable storage medium is also provided. The computer readable storage medium stores thereon a computer program, which when executed by a processor, implements the method for processing a chart provided in any of the above embodiments.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the server embodiment, since it is substantially similar to the method embodiment, the description is simple, and for relevant points, reference may be made to part of the description of the method embodiment.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.