Data trend chart acquisition method and device, computer equipment and storage medium
By obtaining and utilizing the positioning lines and subscript points on the data trend chart, and enlarging the data trend chart, the problem in the existing technology of being unable to view the data trend at a time point independently is solved, and accurate data viewing and trend display at a specific time point are achieved.
Patent Information
- Application Number
- CN202410828898.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-20
AI Technical Summary
Existing data trend charts cannot separately view the data trend at a certain point in time, which has limitations.
By obtaining the first positioning line and the second positioning line on the data trend graph, based on the subscript points of these positioning lines, the data trend graph is enlarged and the time dividing line between the first positioning line and the second positioning line is displayed. Achieve viewing of data trends at specific points in time.
It enables accurate viewing and adjustment of data trend graphs at a specific time point. It is possible to view the data trend at a certain time point individually and adjust the size of the left and right axes to present precise data and time points.
Smart Images

Figure CN118672706A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data trend drawing, and in particular to a method, device, computer equipment and storage medium for obtaining a data trend graph. Background Art
[0002] In embedded products, the technology of drawing trends based on data is becoming more and more mature. The application of data trend charts is common in various industries. Data trend charts are mainly used to view the trend of certain data over a period of time. The current data trend charts can display a variety of data trends. For data that requires long-term monitoring, data trend charts cannot view the data at a certain point in time alone, but can only present all the trends of the trend chart. This has certain limitations when you need to view the data trend at a single point in time. Summary of the invention
[0003] The embodiments of the present invention provide a method, device, computer equipment and storage medium for obtaining a data trend graph to solve the problem of being able to view data trends at individual time points.
[0004] A method for obtaining a data trend graph, comprising:
[0005] Obtaining a first positioning line, a second positioning line and a date dividing line on the data trend graph, wherein the first positioning line and the second positioning line are dividing lines used to determine the starting point of the zoom position;
[0006] Obtaining subscript points corresponding to the first positioning line and the second positioning line;
[0007] Based on the subscript points corresponding to the first positioning line and the second positioning line, the data trend graph between the first positioning line and the second positioning line is enlarged, and the time dividing line between the first positioning line and the second positioning line is displayed.
[0008] A device for obtaining a data trend graph, comprising:
[0009] A first acquisition module is used to acquire a first positioning line, a second positioning line and a date dividing line on the data trend graph, wherein the first positioning line and the second positioning line are dividing lines used to determine the starting point of the zoom position;
[0010] A second acquisition module, used to acquire the subscript points corresponding to the first positioning line and the second positioning line;
[0011] The determination module is used to amplify the data trend graph between the first positioning line and the second positioning line based on the subscript points corresponding to the first positioning line and the second positioning line, and display the time dividing line between the first positioning line and the second positioning line.
[0012] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned data trend chart acquisition method is implemented.
[0013] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data trend chart acquisition method is implemented.
[0014] The above-mentioned data trend graph acquisition method, device, computer equipment and storage medium obtain the time points of the first positioning line and the second positioning line on the data trend graph, wherein the first positioning line and the second positioning line are dividing lines whose positions are determined by dates; obtain the subscript points and subscript point data corresponding to the first positioning line and the second positioning line, wherein the subscript points are corresponding subscript points stored in the overall trend data; according to the subscript points corresponding to the first positioning line and the second positioning line, the data trend graph between the first positioning line and the second positioning line is enlarged, and the time points of the first positioning line and the second positioning line are displayed. The present application can view accurate data trend graphs separately according to the positioning lines and determine the starting time point and a certain time point, and can also adjust the size of the left and right coordinate axes to adjust the trend line position to present accurate data and time points. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0016] Figure 1 It is a schematic diagram of an application environment of a method for obtaining a data trend graph in one embodiment of the present invention;
[0017] Figure 2 is a flow chart of a method for obtaining a data trend graph in one embodiment of the present invention;
[0018] Figure 3 is another flow chart of a method for obtaining a data trend graph in one embodiment of the present invention;
[0019] Figure 4 is another flow chart of a method for obtaining a data trend graph in one embodiment of the present invention;
[0020] Figure 5 is another flow chart of a method for obtaining a data trend graph in one embodiment of the present invention;
[0021] Figure 6 is another flow chart of a method for obtaining a data trend graph in one embodiment of the present invention;
[0022] Figure 7 is another flow chart of a method for obtaining a data trend graph in one embodiment of the present invention;
[0023] Figure 8 is another flow chart of a method for obtaining a data trend graph in one embodiment of the present invention;
[0024] Fig. 9 is a schematic diagram of a device for obtaining a data trend graph in one embodiment of the present invention;
[0025] Fig.10 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] The data trend graph acquisition method provided by the embodiment of the present invention can be applied as follows: Figure 1 Specifically, the data trend graph acquisition method is applied in a data trend graph acquisition system, and the data trend graph acquisition system includes: Figure 1 The client and server shown in the figure communicate with each other through the network to realize the data trend chart, which can view the accurate trend data of a certain period of time. Among them, the client, also known as the user end, refers to the program corresponding to the server and providing local services to customers. The client can be installed on but not limited to various personal computers, laptops, smart phones, and tablets. The server can be implemented as an independent server or a server cluster composed of multiple servers.
[0028] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0029] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0030] As used in the present specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]", depending on the context.
[0031] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0032] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0033] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0034] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.
[0035] In one embodiment, if Figure 2 As shown, a method for obtaining a data trend graph is provided, and the method is applied in Figure 2 Take this as an example to illustrate the steps below:
[0036] S10: Acquire a first positioning line, a second positioning line, and a date dividing line on the data trend graph, wherein the first positioning line and the second positioning line are dividing lines used to determine the starting point of the zoom position;
[0037] S20: Obtain subscript points corresponding to the first positioning line and the second positioning line;
[0038] S30: Based on the subscript points corresponding to the first positioning line and the second positioning line, a data trend graph between the first positioning line and the second positioning line is enlarged, and a time dividing line between the first positioning line and the second positioning line is displayed.
[0039] Specifically, it is common to have a data trend chart in the interface of an embedded product, which is used to view the overall trend. In order to obtain data for a certain time period in this application, it is necessary to obtain the overall trend of the data trend chart, as well as the first positioning line, the second positioning line, and the data of the subscript points of the positioning lines on the trend chart. According to the subscript points of the first positioning line and the second positioning line, the data trend between the first positioning line and the second positioning line is enlarged, and the time points of the first positioning line and the second positioning line, as well as the date dividing line between the positioning lines are displayed, wherein the date dividing line is a dotted dividing line used to distinguish dates, and the first positioning line and the second positioning line are solid dividing lines whose positions are determined by time points, and the subscript points correspond to the data stored in the overall trend data. The data trend chart generated by this application can be used to view both the overall trend over a long period of time and the precise trend data for a certain time period.
[0040] In one embodiment, a method for obtaining a data trend graph is provided, such as Figure 3 As shown, in step S10, the first positioning line, the second positioning line and the date segmentation line on the data trend graph are obtained, wherein the first positioning line and the second positioning line are segmentation lines used to determine the starting point of the magnification position. Figure 3 Take this as an example to illustrate the steps below:
[0041] S11: Determine whether there is data at a time point of 0:00:00 on the data trend graph; if there is data at a time point of 0:00:00, determine whether the time point of 0:00:00 has been removed;
[0042] S12: If the data at the time point of 0:00:00 is removed, the time point closest to 0:00:00 is obtained as the data at the time point of 0:00:00;
[0043] S13: If the data at the time point of 00:00:00 is not eliminated, the position of the data at the time point of 00:00 in the data trend graph is obtained, and a dotted line is displayed at the position in the data trend graph as the date dividing line.
[0044] S14: Determine the positions of the first positioning line and the second positioning line according to the time period selected by the user.
[0045] Specifically, it is necessary to first determine whether there is data at the time point of 00:00 on the data trend chart. If there is data at the time point of 00:00, then determine whether the time point of 00:00 has been eliminated. If the data at the time point of 00:00 is eliminated, then obtain the time point closest to 00:00 as the data at the time point of 00:00. If the data at the time point of 00:00 is not eliminated, then obtain the position of the data at the time point of 00:00 in the data trend chart, determine the date according to 00:00, and display a dotted line as a date dividing line at the position in the data trend chart, and determine the positions of the first positioning line and the second positioning line according to the time period selected by the user. The present application determines the first positioning line and the second positioning line by time points, and by obtaining the date dividing line, enables the user to understand the date of each segment of data in the data trend distribution, and can clearly understand the changes in data of different dates in the data trend chart.
[0046] In one embodiment, a method for obtaining a data trend graph is provided, such as Figure 4 As shown, in step S20, the subscript points corresponding to the first positioning line and the second positioning line are obtained. Figure 4 Take this as an example to illustrate the steps below:
[0047] S21: input the total number of trend data points and the number of data points that can be displayed in the data trend chart;
[0048] S22: Calculate the ratio of the total number of points of the trend data to the number of data points that can be displayed in the data trend graph;
[0049] S23: Multiplying the subscript points displayed on the data trend graph by the ratio value to obtain all the subscript points of the data trend graph and the data that needs to be presented at the subscript points.
[0050] Specifically, in real applications, the trend data actually collected may not be displayed in the data trend chart, because the data that can be displayed in the data trend chart is limited. Therefore, it is necessary to input the total number of trend data points and the number of points that the trend chart can display, and then divide the total number of trend data points by the number of points that the trend chart can display to calculate the ratio of the total number of trend data points to the number of data points that the data trend chart can display. By multiplying the subscript points displayed by the data trend chart by the ratio, all the subscript points of the data trend chart and the data that needs to be presented by the subscript points are obtained. For example: the total number of trend data points is 20, and the specific data are:
[0051] {1.2,3,4,5,6,7,8,9,10,11.12,13.14,15,16,17.18.19.20}
[0052] If you need to select 5 data from these 20 data to display in the trend chart, you need to use the total number of trend data points divided by the number of points that the trend chart can display, that is, 20 / 5=4. Because only 5 points can be displayed, the first point is 1*4=4, and this 4 refers to the 4th point in the total number of trend data points, that is, the specific data is 4. The second point is 2*4=8, and this 8 refers to the 8th point in the total number of trend data points, that is, the specific data is 8. The third point is 3*4=12, and this 12 refers to the 12th point in the total number of trend data points, that is, the specific data is 12. The fourth point is 4*4=16, and this 16 refers to the 16th point in the total number of trend data points, that is, the specific data is 16. The fifth point is 5*4=16, and this 20 refers to the 20th point in the total number of trend data points, that is, the specific data is 20. The embodiments in this application are only for illustration and are not limited in any way. By removing the data of redundant subscript points, the space occupied by unnecessary data storage can be reduced, and the data trend can be ensured not to be changed.
[0053] In one embodiment, a method for obtaining a data trend graph is provided, such as Figure 5 As shown, in step S30, based on the subscript points corresponding to the first positioning line and the second positioning line, the data trend chart between the first positioning line and the second positioning line is enlarged, and the time dividing line between the first positioning line and the second positioning line is displayed. Figure 5 Take this as an example to illustrate the steps below:
[0054] S31: Obtaining time points of the first positioning line and the second positioning line of the data trend graph;
[0055] S32: judging whether there are time points of the first positioning line and the second positioning line in the total data points according to the acquired time points;
[0056] S33: if the time points of the first positioning line and the second positioning line exist, obtaining the subscripts of the time points of the first positioning line and the second positioning line in the total data points;
[0057] S34: determining whether the subscript data of the time points of the first positioning line and the second positioning line in the total data points are smaller than the data points that can be displayed in the data trend graph;
[0058] S35: if the subscript data of the time points of the first positioning line and the second positioning line in the total data points are smaller than the data points that can be displayed in the data trend chart, the time points of the first positioning line and the second positioning line are enlarged to the trend chart; if the subscript data of the time points of the first positioning line and the second positioning line in the total data points are larger than the data points that can be displayed in the data trend chart, they are removed;
[0059] S36: After the time points of the first positioning line and the second positioning line are enlarged onto the trend chart, it is determined whether there is a time point of 0:00:00 between the time points of the first positioning line and the second positioning line. If there is such a time point, a dividing line between the time points of the first positioning line and the second positioning line is displayed. If there is such a time point, the enlarged trend chart and the dividing line between the time points of the first positioning line and the second positioning line are not presented.
[0060] Specifically, when presenting an enlarged trend graph based on the first positioning line and the second positioning line of the data trend graph, it is necessary to first obtain the time points of the first positioning line and the second positioning line of the data trend graph, and determine whether the time points of the first positioning line and the second positioning line exist in the total data points based on the obtained time points. If the time points of the first positioning line and the second positioning line exist, obtain the subscripts of the time points of the first positioning line and the second positioning line in the total data points, and determine whether the subscript data of the time points of the first positioning line and the second positioning line in the total data points are less than the data points that can be displayed in the data trend graph. If the subscript data of the time points of the first positioning line and the second positioning line in the total data points are less than the data points that can be displayed in the data trend graph, If there are data points to be displayed, the time points of the first positioning line and the second positioning line are magnified on the trend chart. If the subscript data of the time points of the first positioning line and the second positioning line in the total data points is greater than the data points that can be displayed in the data trend chart, they are eliminated. After the time points of the first positioning line and the second positioning line are magnified on the trend chart, it is determined whether there is a time point of zero hour, zero minute and zero second in the time points of the first positioning line and the second positioning line. If there is such a time point, the dividing line between the time points of the first positioning line and the second positioning line is displayed. If there is no such time point of zero hour, zero minute and zero second, the magnified trend chart and the dividing line between the time points of the first positioning line and the second positioning line are not presented.
[0061] In one embodiment, a method for obtaining a data trend graph is provided, such as Figure 6 As shown, in step S30, based on the subscript points corresponding to the first positioning line and the second positioning line, the data trend chart between the first positioning line and the second positioning line is enlarged, and the time dividing line between the first positioning line and the second positioning line is displayed. Figure 6 Take this as an example to illustrate the steps below:
[0062] S31A: Click the data trend graph or slide the positioning line to the target position point of the data trend graph;
[0063] S32A: Obtaining the time point coordinates and the temperature point coordinates of the target position point of the data trend graph;
[0064] S33A: setting the positions of the first positioning line and the second positioning line according to the positions of the time point coordinates and the temperature point coordinates;
[0065] S34A: Obtain the subscript data between the positions of the first positioning line and the second positioning line and amplify and display the trend data.
[0066] Specifically, the positioning line in the present application can be positioned by time, or by clicking on the positioning line in the data trend chart, dragging and sliding the positioning line to the target position, by clicking on the data trend chart or sliding the positioning line to the target position point of the data trend chart. The time point coordinates and the temperature point coordinates of the target position point of the data trend chart are obtained. The positions of the first positioning line and the second positioning line are set according to the positions of the time point coordinates and the temperature point coordinates. The subscript data between the positions of the first positioning line and the second positioning line is obtained and the trend data is enlarged and displayed. The data trend chart acquisition method in the present application can present the precise data and time point of the point while sliding the positioning line.
[0067] In one embodiment, a method for obtaining a data trend graph is provided, such as Figure 7 As shown, in step S30, based on the subscript points corresponding to the first positioning line and the second positioning line, the data trend chart between the first positioning line and the second positioning line is enlarged, and the time dividing line between the first positioning line and the second positioning line is displayed. Figure 7 Take this as an example to illustrate the steps below:
[0068] S31B: By clicking on the left and right coordinate axis areas of the data trend graph, a window for modifying the upper and lower limits of the coordinate axis will pop up;
[0069] S32B: modify the upper and lower limits in the coordinate axis according to the first positioning line, the second positioning line and the pop-up modification window;
[0070] S33B: Set the coordinate axis range in the data trend chart according to the modified upper and lower limits of the coordinate axis;
[0071] S34B: Based on the setting of the coordinate axis range in the data trend graph, the enlarged trend graph is redisplayed.
[0072] Specifically, the user can also adjust the size of the left and right coordinate axes to adjust the direction of the trend in the trend chart with a magnification step. By clicking on the left and right coordinate axis areas of the data trend chart, a modification window for the upper and lower limits of the coordinate axis will pop up. The upper and lower limits of the coordinate axis can be modified according to the first positioning line, the second positioning line and the pop-up modification window. According to the modified upper and lower limits of the coordinate axis, the coordinate axis range in the data trend chart is set. Based on the set coordinate axis range in the data trend chart, the enlarged trend chart is redisplayed. Since the data directions of the trend charts of different left and right coordinate axis units will be different, when the user can adjust the coordinate axis scale size through the left and right coordinate axes, part of the data in the data trend will be increased or decreased accordingly, so that the changes in the trend charts under different units can be observed.
[0073] In one embodiment, a method for obtaining a data trend graph is provided, such as Figure 8 As shown, in step S30, based on the subscript points corresponding to the first positioning line and the second positioning line, the data trend chart between the first positioning line and the second positioning line is enlarged, and the time dividing line between the first positioning line and the second positioning line is displayed. Figure 8 Take this as an example to explain, including the following steps:
[0074] S31C: when the time point between the first positioning line and the second positioning line is the starting time point of the enlargement trend, firstly obtain the starting time point of the enlargement trend input by the user of the data trend graph;
[0075] S32C: judging, according to the acquired time point, whether there is a magnification trend start time point acquired from the user input in the total data points;
[0076] S33C: If there is a starting time point of the enlargement trend input by the user, then obtain the subscript of the starting time point of the enlargement trend input by the user in the total data points;
[0077] S34C: Determine whether the subscript data of the enlargement trend start time point input by the user in the total data points is smaller than the data points that can be displayed in the data trend graph;
[0078] S35C: If the subscript data of the enlarged trend start time point input by the user in the total data points is smaller than the data points that can be displayed in the data trend chart, the enlarged trend start time point input by the user is enlarged to the trend chart; if the subscript data of the enlarged trend start time point input by the user in the total data points is larger than the data points that can be displayed in the data trend chart, it will be removed;
[0079] S36C: After the enlarged trend starting time point input by the user is enlarged onto the trend chart, it is determined whether the enlarged trend starting time point input by the user exists at 0:00:00. If so, the dividing line of the enlarged trend starting time point input by the user is displayed; if not, the enlarged trend chart and the dividing line of the enlarged trend starting time point input by the user are not presented.
[0080] Specifically, when the time point of the first positioning line and the second positioning line is the start time point of the enlarged trend, the part that needs to be enlarged at this time is the data trend chart of the specific time period that needs to be viewed in the trend chart. It is necessary to first obtain the enlarged trend start time point input by the user of the data trend chart, and determine whether the enlarged trend start time point input by the user exists in the total data points according to the obtained time point. If the enlarged trend start time point input by the user exists, obtain the subscript of the enlarged trend start time point input by the user in the total data points, and determine whether the subscript data of the enlarged trend start time point input by the user in the total data points is less than the data points that can be displayed in the data trend chart. If the subscript data of the enlarged trend start time point input by the user in the total data points is less than the data points that can be displayed in the data trend chart, the enlarged trend start time point input by the user is enlarged to the trend chart, and if the subscript data of the enlarged trend start time point input by the user in the total data points is greater than the data points that can be displayed in the data trend chart, it will be eliminated. After the starting time point of the enlarged trend input by the user is enlarged onto the trend chart, it is determined whether the starting time point of the enlarged trend input by the user exists at 0:00:00. If the time point 0:00:00 exists, the dividing line of the starting time point of the enlarged trend input by the user is displayed; if the time point 0:00:00 does not exist, the enlarged trend chart and the dividing line of the starting time point of the enlarged trend input by the user are not presented. The above-mentioned data trend chart acquisition method can accurately obtain the precise data of a certain time point by inputting the time period that the user wants to enlarge.
[0081] The above-mentioned data trend graph acquisition method, device, computer equipment and storage medium obtain the time points of the first positioning line and the second positioning line on the data trend graph, wherein the first positioning line and the second positioning line are dividing lines whose positions are determined by dates; obtain the subscript points and subscript point data corresponding to the first positioning line and the second positioning line, wherein the subscript points are corresponding subscript points stored in the overall trend data; according to the subscript points corresponding to the first positioning line and the second positioning line, the data trend graph between the first positioning line and the second positioning line is enlarged, and the time points of the first positioning line and the second positioning line are displayed. The present application can view accurate data trend graphs separately according to the positioning lines and determine the starting time point and a certain time point, and can also adjust the size of the left and right coordinate axes to adjust the trend line position to present accurate data and time points.
[0082] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0083] In one embodiment, a device for obtaining a data trend graph is provided, and the device for obtaining a data trend graph corresponds one-to-one to the method for obtaining a data trend graph in the above embodiment. Fig. 9 As shown, the device for obtaining a data trend graph includes a first obtaining module, a second obtaining module and a determining module. Each functional module is described in detail as follows:
[0084] A first acquisition module is used to acquire a first positioning line, a second positioning line and a date dividing line on the data trend graph, wherein the first positioning line and the second positioning line are dividing lines used to determine the starting point of the zoom position;
[0085] A second acquisition module, used to acquire the subscript points corresponding to the first positioning line and the second positioning line;
[0086] The determination module is used to amplify the data trend graph between the first positioning line and the second positioning line based on the subscript points corresponding to the first positioning line and the second positioning line, and display the time dividing line between the first positioning line and the second positioning line.
[0087] Specifically, it is common to have a data trend chart in the interface of an embedded product, which is used to view the overall trend. In order to obtain data for a certain period of time in the present application, it is necessary to obtain the overall trend of the data trend chart, as well as the first positioning line, the second positioning line, and the data of the subscript points of the positioning lines on the trend chart. According to the subscript points of the first positioning line and the second positioning line, the data trend between the first positioning line and the second positioning line is enlarged, and the time points of the first positioning line and the second positioning line, as well as the date dividing line between the positioning lines are displayed, wherein the date dividing line is a dotted dividing line used to distinguish dates, and the first positioning line and the second positioning line are solid dividing lines whose positions are determined by time points, and the subscript points correspond to the data stored in the overall trend data.
[0088] For the specific limitations of the device for obtaining a data trend graph, please refer to the limitations of the method for obtaining a data trend graph above, which will not be repeated here. Each module in the above-mentioned device for obtaining a data trend graph can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0089] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to obtain accurate trend data for a period of time. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for obtaining a data trend chart is implemented.
[0090] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for obtaining a data trend graph in the above embodiment is implemented, for example Figures 2 to 8 Alternatively, when the processor executes the computer program, the functions of each module / unit in the embodiment of the device for obtaining a data trend graph are realized, for example Fig. 9 The functions of the data trend chart shown are obtained and will not be described here in detail to avoid repetition.
[0091] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for obtaining a data trend graph in the above embodiment is implemented, for example, Figures 2 to 8 Alternatively, when the computer program is executed by the processor, the functions of each module / unit in the embodiment of the device for obtaining a data trend graph are realized, for example Fig. 9 The functions of the data trend chart shown are obtained and will not be described here in detail to avoid repetition.
[0092] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0093] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0094] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for obtaining a data trend graph, characterized in that: include: Obtaining a first positioning line, a second positioning line and a date dividing line on the data trend graph, wherein the first positioning line and the second positioning line are dividing lines used to determine the starting point of the zoom position; Obtaining subscript points corresponding to the first positioning line and the second positioning line; Based on the subscript points corresponding to the first positioning line and the second positioning line, the data trend graph between the first positioning line and the second positioning line is enlarged, and the time dividing line between the first positioning line and the second positioning line is displayed.
2. The data trend graph acquisition method according to claim 1, characterized in that: The method of obtaining a first positioning line, a second positioning line and a date dividing line on the data trend graph includes: Determine whether there is data at the time point of 0:00:00 on the data trend graph; if there is data at the time point of 0:00:00, determine whether the time point of 0:00:00 has been removed; If the data at the time point of 0:00:00 is removed, the time point closest to 0:00:00 is obtained as the data at the time point of 0:00:00; If the data at the time point of 00:00:00 is not eliminated, the position of the data at the time point of 00:00 in the data trend graph is obtained, and a dotted line is displayed at the position in the data trend graph as the date dividing line; The positions of the first positioning line and the second positioning line are determined according to a time period selected by a user.
3. The data trend graph acquisition method according to claim 1, characterized in that: The obtaining of the subscript points corresponding to the first positioning line and the second positioning line includes: Enter the total number of trend data points and the number of data points that can be displayed in the data trend chart; Calculate the ratio of the total number of points of the trend data to the number of data points that can be displayed in the data trend graph; By multiplying the subscript points displayed on the data trend graph by the ratio value, all subscript points of the data trend graph and the data that need to be presented at the subscript points are obtained.
4. The data trend graph acquisition method according to claim 1, characterized in that: The method of enlarging the data trend graph between the first positioning line and the second positioning line based on the subscript points corresponding to the first positioning line and the second positioning line, and displaying the time points of the first positioning line and the second positioning line includes: Acquire the time points of the first positioning line and the second positioning line of the data trend graph; According to the acquired time point, determining whether there is a time point of the first positioning line and the second positioning line in the total data points; If the time points of the first positioning line and the second positioning line exist, obtaining the subscripts of the time points of the first positioning line and the second positioning line in the total data points; Determine whether the subscript data of the time points of the first positioning line and the second positioning line in the total data points are less than the data points that can be displayed in the data trend graph; If the subscript data of the time points of the first positioning line and the second positioning line in the total data points are smaller than the data points that can be displayed in the data trend chart, the time points of the first positioning line and the second positioning line are enlarged to the trend chart; if the subscript data of the time points of the first positioning line and the second positioning line in the total data points are larger than the data points that can be displayed in the data trend chart, they are removed; After the time points of the first positioning line and the second positioning line are enlarged onto the trend chart, it is determined whether there is a time point of 0:00:00 between the time points of the first positioning line and the second positioning line. If there is such a time point, the dividing line between the time points of the first positioning line and the second positioning line is displayed. If there is such a time point, the enlarged trend chart and the dividing line between the time points of the first positioning line and the second positioning line are not presented.
5. The data trend graph acquisition method according to claim 1, characterized in that: The method of enlarging the data trend graph between the first positioning line and the second positioning line based on the subscript points corresponding to the first positioning line and the second positioning line, and displaying the time points of the first positioning line and the second positioning line, further includes: Click the data trend chart or slide the positioning line to the target position point of the data trend chart; Obtain the time point coordinates and temperature point coordinates of the target position point of the data trend graph; Setting the positions of the first positioning line and the second positioning line according to the positions of the time point coordinates and the temperature point coordinates; The subscript data between the positions of the first positioning line and the second positioning line are obtained and the trend data is enlarged and displayed.
6. The data trend graph acquisition method according to claim 1, characterized in that: The method further comprises: amplifying the data trend graph between the first positioning line and the second positioning line according to the subscript points corresponding to the first positioning line and the second positioning line, and displaying the time points of the first positioning line and the second positioning line. By clicking on the left and right coordinate axis areas of the data trend chart, a window for modifying the upper and lower limits of the coordinate axis will pop up; Modify the upper and lower limits of the coordinate axis according to the first positioning line, the second positioning line and the pop-up modification window; Set the coordinate axis range in the data trend chart according to the modified upper and lower limits of the coordinate axis; Based on the setting of the coordinate axis range in the data trend chart, the enlarged trend chart is redisplayed.
7. The data trend graph acquisition method according to claim 1, characterized in that: The method of enlarging the data trend graph between the first positioning line and the second positioning line according to the subscript points corresponding to the first positioning line and the second positioning line, and displaying the time points of the first positioning line and the second positioning line includes: When the time point of the first positioning line and the second positioning line is the starting time point of the enlargement trend, firstly obtain the starting time point of the enlargement trend input by the user of the data trend graph; According to the acquired time point, determining whether there is a magnification trend start time point acquired from the user input in the total data points; If there is a starting time point of the enlargement trend input by the user, then obtaining the subscript of the starting time point of the enlargement trend input by the user in the total data points; Determine whether the subscript data of the amplification trend start time point input by the user in the total data points is smaller than the data points that can be displayed in the data trend graph; If the subscript data of the enlarged trend start time point input by the user in the total data points is smaller than the data points that can be displayed in the data trend chart, the enlarged trend start time point input by the user will be enlarged to the trend chart; if the subscript data of the enlarged trend start time point input by the user in the total data points is larger than the data points that can be displayed in the data trend chart, it will be removed; After the enlarged trend starting time point input by the user is enlarged onto the trend chart, it is determined whether the enlarged trend starting time point input by the user exists at 0:00:
00. If so, the dividing line of the enlarged trend starting time point input by the user is displayed; if not, the enlarged trend chart and the dividing line of the enlarged trend starting time point input by the user are not presented.
8. A device for obtaining a data trend graph, characterized in that: include: A first acquisition module is used to acquire a first positioning line, a second positioning line and a date dividing line on the data trend graph, wherein the first positioning line and the second positioning line are dividing lines used to determine the starting point of the zoom position; A second acquisition module, used to acquire the subscript points corresponding to the first positioning line and the second positioning line; The determination module is used to amplify the data trend graph between the first positioning line and the second positioning line based on the subscript points corresponding to the first positioning line and the second positioning line, and display the time dividing line between the first positioning line and the second positioning line.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the data trend chart acquisition method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data trend chart acquisition method according to any one of claims 1 to 7 is implemented.
