WO2016192546A1 - Method and device for updating data point of dynamic curve - Google Patents

Method and device for updating data point of dynamic curve Download PDF

Info

Publication number
WO2016192546A1
WO2016192546A1 PCT/CN2016/083083 CN2016083083W WO2016192546A1 WO 2016192546 A1 WO2016192546 A1 WO 2016192546A1 CN 2016083083 W CN2016083083 W CN 2016083083W WO 2016192546 A1 WO2016192546 A1 WO 2016192546A1
Authority
WO
WIPO (PCT)
Prior art keywords
data point
data
dynamic curve
point
curve
Prior art date
Application number
PCT/CN2016/083083
Other languages
French (fr)
Chinese (zh)
Inventor
黄淞
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2016192546A1 publication Critical patent/WO2016192546A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Definitions

  • the present application relates to the field of computers, and in particular to a data point update technique for a dynamic curve.
  • the commonly used dynamic curve is in the form of: data points representing stock prices at a certain moment and connecting lines connecting the data points, and each data point is not updated once generated, such as a stock market curve. Since the data points are not updated as soon as they are generated, it is not conducive to intuitively displaying the accumulated amount in a certain data period. For example, if the user needs to check the accumulated amount of a certain data within one hour, then the above curve cannot be obtained intuitively. a message.
  • the present application provides a data point update method for a dynamic curve, the method comprising:
  • the first data point is cleared and the second data point is displayed at a display position of the data period.
  • generating the second data point according to the data of the current update time in the data source including:
  • the method further includes:
  • the first data point is highlighted.
  • the method further includes:
  • the second data point is displayed at a display position of a data period corresponding to the second data point.
  • the method further includes:
  • the highlighting of the first data point is cancelled, and the display position of the data period corresponding to the second data point is displayed.
  • the second data point is described.
  • the method further includes:
  • the starting position of the currently displayed dynamic curve is used as the display position of the data period corresponding to the second data point, and the currently displayed dynamic curve is cleared.
  • the clearing the currently displayed dynamic curve includes:
  • the method further includes:
  • the currently displayed dynamic curve is cleared according to the switching operation, and the historical dynamic curve is displayed, including:
  • the currently displayed dynamic curve is saved as a first dynamic curve according to the switching operation, and the currently displayed dynamic curve is cleared, and the historical dynamic curve is displayed;
  • the method further includes:
  • the update of the data points is resumed at a subsequent update time.
  • the method further includes:
  • the method further includes:
  • the present application also provides another method for updating data points of a dynamic curve, the method comprising:
  • the real-time component includes a graphic display unit and a function calling unit;
  • the graphic display unit and the function invoking unit perform any of the foregoing methods to update data points in the dynamic curve.
  • the configuration information includes display parameter information and call parameter information
  • the function invoking unit acquires data for generating an initial data point according to the invoking parameter information, and generates a dynamic curve including the initial data point, and the graphic display unit generates a display area according to the display parameter information and displays the display area The dynamic curve is displayed in the area.
  • a dynamic curve data point update device wherein the device comprises:
  • a first device configured to acquire, at each update time, a first data point of a previous update time in the data point if a data point exists in the currently displayed dynamic curve
  • a second device configured to generate a second data point according to data of a current update time in the data source
  • a third device configured to: when the second data point and the first data point belong to the same data period, clear the first data point and display the second data point at a display position of the data period.
  • the second device includes:
  • a second module configured to asynchronously acquire data of a current update time from a data source according to a pre-configured path
  • a second module configured to generate a second data point according to the data of the current update time.
  • the first device is further configured to:
  • the first data point After acquiring the first data point of the previous update time in the data point, the first data point is highlighted.
  • the device further includes:
  • a fourth device configured to: when the second data point and the first data point do not belong to the same data period, display the second data point at a display position of a data period corresponding to the second data point.
  • the fourth device is further configured to:
  • the highlighting of the first data point is cancelled, and the display position of the data period corresponding to the second data point is displayed.
  • the second data point is described.
  • the device further includes:
  • a fifth device configured to determine whether the clearing condition is met before the second data point is displayed at a display position of the data period corresponding to the second data point, and if the clearing condition is met, the currently displayed dynamic curve is The starting position is used as a display position of the data period corresponding to the second data point, and the currently displayed dynamic curve is cleared.
  • the fifth device is configured to save the currently displayed dynamic curve as a historical dynamic curve, and clear the currently displayed dynamic curve;
  • the device also includes a sixth device, the sixth device comprising:
  • a sixth module configured to: after saving the currently displayed dynamic curve as a historical dynamic curve, and clearing the currently displayed dynamic curve, when acquiring the switching operation, clearing the currently displayed dynamic curve according to the switching operation Displaying the historical dynamic curve;
  • the sixth module is configured to suspend updating the data point at a subsequent update time.
  • sixth module is configured to:
  • the currently displayed dynamic curve is saved as the first dynamic according to the switching operation. Curve and clear the currently displayed dynamic curve to display the historical dynamic curve;
  • the sixth device further includes:
  • a sixth module configured to: after the update of the data point is paused at a time of suspending the subsequent update, when the recovery operation is acquired, clear the currently displayed historical dynamic curve according to the recovery operation, and display the first dynamic Curve
  • the sixth four module is configured to restore the update of the data point at a subsequent update time.
  • the device further includes:
  • a seventh device configured to generate and display a connection between the first data point and the second data point after displaying the second data point at a display position of a data period corresponding to the second data point .
  • the device further includes:
  • the eighth device is configured to detect a location of the user operation point, and when the user operation point coincides with the data point, display data corresponding to the data point at the location of the user operation point.
  • the present application also provides another dynamic curve data point updating device, the device comprising:
  • a ninth device configured to acquire a real-time component for generating the dynamic curve
  • a tenth device configured to write configuration information to the real-time component
  • the eleventh device is configured to initialize the real-time component, and control the operation of any one of the foregoing devices according to the configuration information of the real-time component.
  • the real-time component includes a graphic display unit and a function calling unit;
  • the eleventh device is configured to:
  • the configuration information includes display parameter information and call parameter information
  • the eleventh device is configured to:
  • the technical solution provided by the present application can acquire the data points of the latest update time on the curve, and then compare with the data points generated by the current update time. If they belong to the same data cycle, the newly generated data will be newly generated.
  • the data points replace the original data points, so that the data points are continuously updated and displayed in one data period, and the information such as the accumulated amount of a certain data in a certain period can be more intuitively displayed.
  • the present application provides In another solution, the real-time component only needs to write a small amount of code, such as some custom configuration information, etc., to realize the function of updating the data point. Since most of the program code adopts a modular form, the code can be improved. Readability and maintainability reduce the developer's reliance on programming knowledge and improve development efficiency.
  • FIG. 1 is a flowchart of a method for updating a data point of a first dynamic curve according to an embodiment of the present application
  • step S102 is a processing flowchart of step S102 in the data point updating method of the first dynamic curve
  • 3(a) to 3(b) are schematic diagrams showing display effects when data points are updated
  • FIG. 4 is a flowchart of a method for updating a data point of a second dynamic curve according to an embodiment of the present application
  • FIG. 5 is a flowchart of a method for updating a data point of a third dynamic curve according to an embodiment of the present application
  • FIG. 6 is a schematic diagram of a dynamic curve chart involved in an embodiment of the present application.
  • Figure 7 is a flowchart of initialization of a real-time component
  • FIG. 8 is a flowchart of monitoring a listener of an arrow in a real-time component initialization process
  • FIG. 9 is a schematic structural diagram of a data point update device of a first dynamic curve according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a second device in a data point updating device of a dynamic curve
  • FIG. 11 is a schematic structural diagram of a data point update device of a second dynamic curve according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of a data point update device of a third dynamic curve according to an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a fourth dynamic curve data point updating device according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic diagram of a preferred structure of a sixth device in a data point updating device of a dynamic curve according to an embodiment of the present disclosure
  • FIG. 15 is a schematic structural diagram of a fifth dynamic curve data point updating device according to an embodiment of the present application.
  • 16 is a schematic structural diagram of a sixth dynamic curve data point updating device according to an embodiment of the present disclosure.
  • FIG. 17 is a schematic structural diagram of a data point update device of a seventh dynamic curve according to an embodiment of the present disclosure.
  • the terminal, the device of the service network, and the trusted party each include one or more Processor (CPU), input/output interface, network interface, and memory.
  • processor CPU
  • input/output interface network interface
  • memory memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage,
  • computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
  • FIG. 1 is a flowchart of a method for updating a data point of a dynamic curve according to an embodiment of the present application, where the method specifically includes the following steps:
  • Step S101 at each update time, if there is a data point in the currently displayed dynamic curve, acquiring a first data point of the previous update time in the data point;
  • Step S102 generating a second data point according to data of a current update time in the data source
  • Step S103 when the second data point and the first data point belong to the same data period, clear the first data point and display the second data point at a display position of the data period.
  • first data point and the second data point are respectively used to refer to specific data points of each stage in the dynamic curve updating process.
  • the first data point updates the displayed data point for the previous update time
  • the second data point is the data point generated for the current update time and is about to be updated.
  • the second data point at the time of this update becomes the first data point at the time of the next update.
  • the technical solution provided by the present application acquires the data points updated at the latest update time on the curve, and then compares the data points generated at the current update time. If the two data points belong to the same data period, the newly generated data points will be generated. Replacing the original data points, so that the data points are continuously updated in one data cycle, thereby providing a data presentation manner different from the existing dynamic curves, which can more intuitively display, for example, the accumulation of a certain data in a certain period. Quantity and other information.
  • the data period may be set to different durations according to actual requirements, for example, set to one. Hours, fifteen minutes, etc.
  • the interval of the update time may also be set according to actual needs, such as a user. The real-time requirements of the data are high, so the interval of the update time can be set to be shorter, such as 1 second.
  • the trigger of each update time can be implemented by using a timer, and the trigger interval of the timer logic is set to 1 second. Each time the trigger is performed: the data point update of step S101 to step S103 is performed once.
  • the dynamic curve consists of data points and connections between adjacent two data points, wherein each data point (including the first data point and the second data point) represents data within a corresponding data period.
  • the data points on the dynamic curve are used to indicate the number of newly registered users in an hour, and the data points are updated every second, so each hour is a data. Cycles, such as 12:00:01 to 13:00:00, 13:00:01 to 14:00:00, 14:00:01 to 15:00:00, etc., where the X and Y coordinates of the dynamic curve
  • the axes can represent the time and the number of newly registered users, respectively.
  • the definition of 12:00:01 to 13:00:00 is data cycle A
  • 13:00:01 to 14:00:00 is data cycle B
  • the display positions of the data periods A to C can be respectively set to 13:00:00, 14 on the X coordinate axis. : 00:00, 15:00:00 location.
  • the data point at 13:00:00 indicates 12:00:01 ⁇ 13:00:00, the number of newly registered users, since the current time has passed 13:00:00 , then the data point has not been updated, and the data point at 14:00:00 indicates the number of new users in the 13:00:01 to the previous update time (ie 13:15:15), the data point is Is the first data point mentioned above. Assume that there are already 5,000 newly registered users between 13:00:01 and 13:15:15, and there are 3 newly registered users in the 13:15:16 second, then the second data point indicates new The number of registered users is 5003.
  • the data may be processed to a certain extent, for example, by filtering to screen out some potentially inaccurate data.
  • the physical address of the device used by the user can be filtered.
  • the user registers five accounts with the terminal of the same physical address, and when the data point is generated, the five registrations can be performed according to the physical address.
  • the information is filtered, and only one user is newly registered, thereby ensuring the accuracy of the data represented by the data points.
  • data processing is merely an example, other existing or future may occur.
  • the manner in which the data is processed, as applicable to the present application is also included in the scope of the present application and is hereby incorporated by reference.
  • the method for generating the second data point according to the data of the current update time in the data source in step S102 can be implemented by using the processing flow shown in FIG. 2, and the specific steps include:
  • the asynchronous acquisition may adopt AJAX (Asynchronous Javascript And XML, asynchronous Javascript and XML technology).
  • AJAX is a technology for creating a fast dynamic webpage, which can exchange certain parts of a webpage (ie, data points that need to be updated) without reloading the entire webpage by performing a small amount of data exchange with the server in the background of the browser. ) Updates to speed up data point updates.
  • the method further includes highlighting the first data point.
  • the manner of highlighting includes, but is not limited to, zooming in, changing the color of the data point, changing the transparency of the data point, adding a border, and the like.
  • the actual display effect of the first data point 3A in step S101 is as shown in FIG. 3(a), when the first data point 3A is cleared and the second is displayed at the display position of the data cycle.
  • the second data point 3B is displayed as a normal size, as shown in FIG.
  • the data point update method of the preferred dynamic curve is also provided in the embodiment of the present application, because the second data point and the first data point do not belong to the same data period.
  • the processing flow is shown in Figure 4, specifically including:
  • Step S101 at each update time, if there is a data point in the currently displayed dynamic curve, acquiring a first data point of the previous update time in the data point;
  • Step S102 generating a second data point according to data of a current update time in the data source
  • Step S103 when the second data point and the first data point belong to the same data period, clearing the first data point and displaying the second data point at a display position of the data period;
  • Step S104 when the second data point and the first data point do not belong to the same data period, in the The display position of the data period corresponding to the two data points displays the second data point.
  • the display position of the data period corresponding to the second data point displays the second data point, that is, the first data point is not updated, but a new data point is newly inserted in the dynamic curve.
  • the current time is 14:00:01
  • the generated second data point at the update time belongs to the data period C (14:00:01 to 15:00:00)
  • the first data point generated by the previous update time is the data period B (13:00:01 to 14:00:00)
  • the display position of the data period corresponding to the second data point is the position of 15:00:00 on the X coordinate axis, thereby the current update time.
  • the first data point at the 14:00:00 position will not be cleared, but the second data point will be displayed directly at the 15:00:00 position.
  • the steps described in step S103 are performed, and the new data points are no longer inserted, but Is to update the original data points;
  • the step S104 may specifically include: when the second When the data point and the first data point do not belong to the same data period, the highlighting of the first data point is cancelled, and the second data point is displayed at a display position of the data period corresponding to the second data point. .
  • the first data of the previous data period is canceled immediately after being enlarged, forming a flickering effect, and the second data point is normally displayed at the display position of the current data period, so that the user can clearly know.
  • the data has been entered for the next data cycle, and the data of the previous data cycle is no longer updated.
  • the embodiment of the present application further provides a data point update method of a more preferred dynamic curve, where the method further includes before the displaying the second data point in the display position of the data period corresponding to the second data point. And determining whether the clearing condition is met. If the clearing condition is met, the starting position of the currently displayed dynamic curve is used as the display position of the data period corresponding to the second data point, and the currently displayed dynamic curve is cleared.
  • the clearing condition may be set according to requirements in an actual application.
  • the clearing condition may be that the current time reaches 00:00:01 of the next day, and the starting position of the currently displayed dynamic curve is the first day.
  • the position of 00:00:01, that is, the dynamic curve only shows the data of one day, and the curve is automatically cleared at the beginning of the next day, and the drawing is restarted.
  • the emptying period can be set according to actual needs, and can be set to 4 hours, 12 hours, etc. in addition to the aforementioned 24 hours.
  • the emptying condition may also be some specific operations input by the user, such as switching operation of viewing historical curve data.
  • the foregoing clearing the currently displayed dynamic curve specifically includes: saving the currently displayed dynamic curve as a historical dynamic curve, and clearing the current display. Dynamic curve.
  • the switching operations include, but are not limited to, a click or slide operation of the operating point at a specific location, a textual instruction input through the interactive interface, and the like.
  • a left arrow button can be set on the left side of the graph interface of the dynamic curve.
  • the switching operation is Slide to the left in the chart area of the dynamic curve, slide once to switch to the dynamic curve of the previous day or switch to different historical dynamic curves according to the sliding distance; for example, enter the number of the historical dynamic curve in the provided interactive interface. You can switch to the corresponding historical dynamic curve.
  • the handover operation is only an example, and other existing or future possible handover operations, as applicable to the present application, are also included in the scope of protection of the present application, and This is hereby incorporated by reference.
  • the current displayed dynamic curve is saved as a historical dynamic curve, including but not limited to the following manner: only information of each data point in the historical dynamic curve is saved, or information of each data point and the connection between the data points is saved. Wait. If only the information of each data point in the historical dynamic curve is saved, the specific steps of displaying the historical dynamic curve are as follows: First, each data point is generated and displayed according to the saved information, and then a connection between the data points is generated and displayed according to the data point. To show the complete dynamic curve. Of course, in order to ensure that data points and connections can be displayed simultaneously, data points and their connections can be displayed simultaneously after data points and connections are generated based on the saved information.
  • the data points of the dynamic curve of the current time need not be updated after the update time is reached, so after the historical dynamic curve is displayed, the subsequent update time is suspended.
  • the update refers only to the update of the data point displayed in the dynamic curve, but the data record is not stopped in the data source.
  • the application scenario of the number of newly registered users in an hour is taken as an example. Assume that the data of the historical dynamic curve and the number of newly registered users in the data source are saved in the cloud server, and the dynamic curve is passed.
  • the browser on the update device displays that the information of the number of newly registered users is sent to the server by the mobile terminal on which the application is installed and saved in the data source.
  • the update device obtains the switching operation of the user input, the update device will clear the currently displayed dynamic curve, and according to the configured path information, the saved historical dynamic curve will be obtained by the server and browsed. This historical dynamic curve is displayed in the device.
  • the mobile terminal with the application installed will still send a new registration to the server.
  • the data source will still receive this information and save it so that the update device can still get the latest data when it needs to be updated, but the dynamic curve displayed at this time will not change.
  • the method further includes: when the recovery operation is acquired, clearing the currently displayed historical dynamic curve according to the recovery operation, displaying the first dynamic curve; and recovering The update of the data points is performed at a subsequent update time.
  • the recovery operation includes, but is not limited to, a click or slide operation of the operation point at a specific position, a text instruction input through the interactive interface, and the like. For example, click the operation of the right arrow, swipe right in the chart area of the dynamic curve, or enter the number of the first dynamic curve.
  • the recovery operation input by the user is obtained, and the update device clears the currently displayed historical dynamic curve according to the recovery operation, and displays the first dynamic in the browser. The curve, while recovering the update of the data points at the time of subsequent update.
  • the method further includes: generating and displaying a connection between the first data point and the second data point .
  • new data points are inserted after another data cycle is reached, and the connection between the data points needs to be increased to form a complete dynamic curve.
  • a new data point is inserted into the display position of the next data cycle of the dynamic curve (ie, at 15:00:00), and Generates and displays a line between the data point at 14:00:00 and the data point at 15:00:00.
  • connection between the two data points will be updated in real time as the data points are updated.
  • the data points at 14:00:00 are not updated, assuming data point coordinates (14:00:00, 5350), data points at 15:00:00 The coordinates are (15:00:00, 5352).
  • the time passes one second to reach 14:00:02 the data point at the 15:00:00 data point at 15:00:00 is more (15:00:00,5352) after the update.
  • the line between the two data points can only represent the trend of change between the data represented by the data points, without representing specific data, for example, the closer to the position of the two data points, the closer the tangent of the line is to the horizontal level, the more Near the center of the two data points, the tangent to the line is closer to vertical.
  • the foregoing dynamic curve data point updating method further includes: detecting a location of a user operation point, and displaying, when the user operation point coincides with the data point, displaying, at a position of the user operation point, the data point corresponding to the data point data.
  • the user can accurately obtain the accurate value of the data in addition to the change trend of the data.
  • FIG. 5 shows a method for updating a data point of a dynamic curve according to an embodiment of the present application, the method includes:
  • Step S501 acquiring a real-time component for generating the dynamic curve
  • Step S502 writing configuration information to the real-time component
  • Step S503 initializing the real-time component, and performing the foregoing method according to the configuration information of the real-time component, thereby completing the data point.
  • the real-time component includes a graphic display unit and a function calling unit.
  • the graphic display unit and the function calling unit may be pre-program code, for example, using HTML (Hyper Text Markup Language) and JavaScript (Java scripting language), since JavaScript can be inserted into an HTML page. It is executed by any browser and has good versatility.
  • HTML Hyper Text Markup Language
  • JavaScript Java scripting language
  • the Highcharts chart library written in JavaScript can easily and conveniently add interactive charts to HTML pages to facilitate the drawing of dynamic curves.
  • the configuration information includes display parameter information and call parameter information.
  • the display parameter information includes, but is not limited to, related parameters for adjusting the display style of the chart, such as the style of the data point, the color, the color of the line, the style, the position of the chart in the page, etc.
  • the calling parameter information includes However, it is not limited to parameters that need to be used when implementing function calls, such as information about data sources, control parameters of functions, and so on.
  • the step S503 includes: the function calling unit acquires data for generating an initial data point according to the calling parameter information, and generates a dynamic curve including the initial data point, where the graphic display unit generates according to the display parameter information. Displaying the area and displaying the dynamic curve in the display area; and the graphic display unit and the function invoking unit performing any of the foregoing methods to update the data points in the dynamic curve.
  • the program code of the HTML part is mainly used to display the external style of the chart, including the bits of the chart. Set, size, etc.
  • the JavaScript part of the program code is mainly used to implement the background function of the chart, such as acquiring data, generating Highcharts graphics, calling functions, etc.
  • Figure 6 shows a schematic diagram of a dynamic curve chart, the corresponding dynamic components of the chart
  • the program code is as follows, where the HTML part is:
  • chart1 is an HTML DOM (HTML Document Object Model) node, which is presented as the entire area of FIG. 6, which is equivalent to the outermost container of FIG. 6, and the other contents shown in FIG. Included in the area.
  • realTimeArrow is a class of internal elements in the figure, and is used to specify the partial display effect of the chart display area 6A and the left and right arrows 6B, 6C in FIG. 6; in addition, the left arrow 6B, the right arrow 6C, and the chart display area are separately defined separately.
  • the 6A class "wdm-left leftArrow-on arrow-icon”, “wdm-right rightArrow arrow-icon”, and “Chart_area”, respectively display the part of the chart display area 6A, the left arrow 6B, and the right arrow 6C.
  • the effects were individually specified.
  • "margin-right: 25px;” indicates that the right margin of the chart display area 6A is 25 pixels.
  • J_Chart_area is an HTML DOM node for presenting Highcharts graphics (ie, dynamic curve 6D), where the HTML DOM is used to provide an interface that enables programs to dynamically access and update the content, structure, and style of HTML pages.
  • the program code of the JavaScript call part is:
  • type represents a curve type, such as hour, min, etc., wherein hour and min respectively indicate that a data point is displayed for 1 hour or 5 minutes on the X coordinate axis, that is, the aforementioned data period is 1 hour or 5 minutes. .
  • lineParams represents the set of parameters that need to be passed to the background of the browser when the curve is acquired.
  • the parameters in the parameter set include date, version information, and so on.
  • pointParams represents a set of parameters that need to be passed to the background when the data point of the current update time is obtained.
  • the parameters in the parameter set include date, version information, and the like.
  • lineDS represents the data source for the acquisition curve.
  • pointDS represents the data source of the data point at the current update time.
  • clickLeftCallBack indicates that the callback function after clicking the left arrow to get the data, which points to the function leftOneCallBack, is valid when the arrow is true.
  • clickRightCallBack indicates the callback function after clicking the right arrow to get the data. This points to the function rightOneCallBack, which is valid when the arrow is true.
  • offLeftArrow indicates that the processing function is clicked when the left arrow is clicked. This points to the function leftOne, which is valid when the arrow is true.
  • offRightArrow represents the processing function when clicking the right arrow, which points to the function rightOne, which is valid when the arrow is true.
  • Arrow which can be true or false, when true, means that the aforementioned left or right arrow can be clicked and the related function is called.
  • the configuration information (config) written to the real-time component includes but is not limited to the curve type type, the color of the curve, Line width and data point color, size, the aforementioned lineParams, pointParams, lineDS, pointDS, JavaScript related processing functions, axis color, point shape and other information.
  • FIG. 7 shows an initialization process of the real-time component, including the following steps:
  • Step S701 loading a corresponding curve type profile according to the type in the config of the real-time component, for example, the loaded type is hour.
  • Config is the configuration of the real-time component, specifying the relevant configuration information for use when initializing the real-time component.
  • the profile is a concrete instance of the real-time component, and the relevant attribute information in the config is written to the profile at each initialization.
  • step S702 the corresponding attribute in the current profile is overwritten by the related attribute in the config, where the related attribute may include the color of the curve, the line width, and the color, size, and the like of the data point.
  • the initLine method is called to initialize the data.
  • the initLine method includes: if a chart already exists in the current HTML page (such as the first dynamic curve mentioned in the foregoing method, a historical dynamic curve, etc.), the chart is cleared, and then the related attributes (such as coordinates) of the current instance are used.
  • the axis configuration information including the color, point shape), initialize the chart object, and then asynchronously obtain the corresponding curve data according to lineDS and lineParams in the config, and then draw the curve according to the data.
  • Step S704 calling the current openTimer method to update the data point.
  • the trigger of the openTimer method is implemented by using a timer, and the trigger interval of the timer logic is set to 1 second. Each time the trigger is triggered, it is determined whether the timer is empty. If the timer is not empty, the timer is cleared, and the timer is newly created. The processing steps of the data point update shown in FIG. 1 or FIG. 4 are performed once.
  • step S705 it is determined whether the arrow is turned on, that is, whether the left and right arrows are clickable. If it is turned on, step S706 is performed, and if not, the initialization of the real-time component is completed.
  • Step S706 adding a listener to the arrow, so that the relevant processing logic can be triggered when the click is clicked.
  • Figure 8 shows the listening process of the arrow's listener, including the following steps:
  • Step S801 obtaining a click operation
  • Step S802 determining whether the arrow is in a non-clickable state, if yes, ending the listening process; if not, executing step S803;
  • step S803 the function clickLeftCallBack or clickRightCallBack is called to perform processing.
  • the clickLeftCallBack function can implement the foregoing switching operation function, that is, for turning the page forward and displaying the historical dynamic curve, and clickRightCallBack can implement the function of the recovery operation, turning the page backwards until returning Shows the dynamic curve of the day.
  • step S804 the function offLeftArrow or offRightArrow is called to perform processing. If the value of the current arrow is true, then the function of calling the above two functions is to click the left (or right) arrow and set it to be unclickable. If the value of arrow is false, click the left (or right) arrow. It is placed in a clickable state.
  • step S805 the initLine method is called to initialize the data. Since the curve needs to be cleared and displayed after using the clickLeftCallBack or clickRightCallBack function, the curve can be switched by the initLine method.
  • Step S806 if the left arrow is clicked, the closeTimer method is called. If the right arrow is clicked, it is necessary to determine whether the right arrow is clickable after the offRightArrow function is processed. If clickable, the closeTimer method is called, if not clickable, Then call the openTimer method.
  • the openTimer method is used to update the data points. It has been described in the initialization process of the real-time component. It will not be described here.
  • the closeTimer method is used to clear the timer, that is, stop updating the data points to reduce the data processing and reduce the processing load. .
  • FIG. 9 is a schematic structural diagram of a data point updating device 1 of a dynamic curve provided by an embodiment of the present application.
  • the device 1 specifically includes a first device 910, a second device 920, and a third device 930.
  • the first device 910 acquires a first data point of the previous update time in the data point if the currently displayed dynamic curve has a data point at each update time; the second device 920 is updated according to the current data source.
  • the data of the time generates a second data point; when the second data point belongs to the same data cycle as the first data point, the third device 930 clears the first data point and displays the display position at the display position of the data cycle
  • the second data point is described.
  • first data point and the second data point are respectively used to refer to specific data points of each stage in the dynamic curve updating process.
  • the first data point updates the displayed data point for the previous update time
  • the second data point is the data point generated for the current update time and is about to be updated.
  • the second data point at the time of this update becomes the first data point at the time of the next update.
  • the device 1 includes, but is not limited to, a device formed by a network device, a touch terminal, or a network device integrated with a touch terminal through a network.
  • the network device includes, but is not limited to, an implementation such as a network host, a single network server, a plurality of network server sets, or a cloud computing-based computer collection; or is implemented by a user equipment.
  • the cloud is composed of a large number of host or network servers based on Cloud Computing, which is a kind of distributed computing, a super virtual computer composed of a group of loosely coupled computers.
  • the device 1 can also be a software program running on a network device or a touch terminal.
  • the touch terminal is any electronic product that can perform human-computer interaction through a touch screen, such as a smart phone, a PDA, a portable game machine, a handheld computer PPC, a portable device, or a tablet computer; among them, a touch screen ( Touch Screen), including capacitive touch screen.
  • a touch screen Touch Screen
  • Technology in the field The operator should be able to understand that the above-mentioned device 1 and the touch terminal are only examples, and other existing or future devices 1 or touch terminals may be applicable to the present invention, and should also be included in the scope of protection of the present invention. This is hereby incorporated by reference.
  • the technical solution provided by the present application acquires the data points updated at the latest update time on the curve, and then compares the data points generated at the current update time. If the two data points belong to the same data period, the newly generated data points will be generated. Replacing the original data points, so that the data points are continuously updated in one data cycle, thereby providing a data presentation manner different from the existing dynamic curves, which can more intuitively display, for example, the accumulation of a certain data in a certain period. Quantity and other information.
  • the data period may be set to different durations according to actual requirements, for example, set to one hour, fifteen minutes, and the like.
  • the first device 910, the second device 920, and the third device 930 perform processing once to complete the update of the data points, and similarly update the time.
  • the interval can also be set according to actual needs. For example, if the user has high requirements on the real-time performance of the data, the interval of the update time can be set to be shorter, such as 1 second.
  • the trigger of each update time can be implemented by using a timer, and the trigger interval of the timer logic is set to 1 second.
  • Each time the trigger is: whether the timer is empty or not, if the timer is not empty, The timer is cleared, and a new timer is created, and the data point update is performed by the first device 910, the second device 920, and the third device 930.
  • the above description about the data period, the interval of the update time, and the trigger of each update time are merely examples, and other existing or future possible manners may be applied to the present application as well. It is intended to be included within the scope of this application and is hereby incorporated by reference.
  • the dynamic curve consists of data points and connections between adjacent two data points, wherein each data point (including the first data point and the second data point) represents data within a corresponding data period.
  • the data points on the dynamic curve are used to indicate the number of newly registered users in an hour, and the data points are updated every second, so each hour is a data. Cycles, such as 12:00:01 to 13:00:00, 13:00:01 to 14:00:00, 14:00:01 to 15:00:00, etc., where the X and Y coordinates of the dynamic curve
  • the axes can represent the time and the number of newly registered users, respectively.
  • the definition of 12:00:01 to 13:00:00 is data cycle A
  • 13:00:01 to 14:00:00 is data cycle B
  • the display positions of the data periods A to C can be respectively set to 13:00:00, 14 on the X coordinate axis. : 00:00, 15:00:00 location.
  • the data point at 13:00:00 indicates 12:00:01 ⁇ 13:00:00
  • the number of newly registered users since the current time has passed 13:00:00
  • the data point at 14:00:00 indicates 13:00:01
  • the number of new users in the previous update time is the first data point mentioned above. Assume that there are already 5,000 newly registered users between 13:00:01 and 13:15:15, and there are 3 newly registered users in the 13:15:16 second, then the second data point indicates new The number of registered users is 5003.
  • the data may be processed to a certain extent, for example, by filtering to screen out some potentially inaccurate data.
  • the physical address of the device used by the user can be filtered.
  • the user registers five accounts with the terminal of the same physical address, and when the data point is generated, the five registrations can be performed according to the physical address.
  • the information is filtered, and only one user is newly registered, thereby ensuring the accuracy of the data represented by the data points.
  • the specific structure of the second device 920 is as shown in FIG. 10, and includes a second module 921 and a second module 922.
  • the second module 921 acquires the data of the current update time asynchronously from the data source according to the pre-configured path; the second module 922 generates the second data point according to the data of the current update time.
  • the asynchronous acquisition may adopt AJAX (Asynchronous Javascript And XML, asynchronous Javascript and XML technology).
  • AJAX is a technology for creating a fast dynamic webpage, which can exchange certain parts of a webpage (ie, data points that need to be updated) without reloading the entire webpage by performing a small amount of data exchange with the server in the background of the browser. ) Updates to speed up data point updates.
  • the first device 910 is further configured to: after acquiring the first data point of the previous update time in the data point, highlight the first data point display.
  • the manner of highlighting includes, but is not limited to, zooming in, changing the color of the data point, changing the transparency of the data point, adding a border, and the like.
  • the actual display effect of the first data point 3A obtained by the first device processing is as shown in FIG. 3(a), when the first data point 3A is cleared and displayed in the display position of the data period.
  • the second data point 3B since the second data point 3B is not highlighted, the second data point 3B is displayed as a normal size, as shown in FIG.
  • the data point update device of the preferred dynamic curve is also provided in the embodiment of the present application, because the second data point and the first data point do not belong to the same data period.
  • the structure is as shown in FIG. 11, and includes a fourth device 940 in addition to the first device 910, the second device 920, and the third device 930 as shown in FIG. Specifically, the fourth device 940 displays the second data at a display position of a data period corresponding to the second data point when the second data point and the first data point do not belong to the same data period. point.
  • the first device 910, the second device 920, and the third device 930 are the same as or substantially the same as the corresponding devices in the embodiment of FIG. 9, for brevity, and therefore will not be described herein. And is included here by reference.
  • the method After the method generates the second data point according to the data of the current update time in the data source, if it is determined that the second data point and the first data point do not belong to the same data period, the method corresponds to the second data point.
  • the display position of the data period displays the second data point, ie, the first data point is not updated, but a new data point is inserted in the dynamic curve.
  • the current time is 14:00:01
  • the generated second data point at the update time belongs to the data period C (14:00:01 to 15:00:00)
  • the first data point generated by the previous update time is the data period B (13:00:01 to 14:00:00)
  • the display position of the data period corresponding to the second data point is the position of 15:00:00 on the X coordinate axis, thereby the current update time.
  • the first data point at the 14:00:00 position will not be cleared, but the second data point will be displayed directly at the 15:00:00 position.
  • the steps described in step S103 are performed, and the new data points are no longer inserted, but Is to update the original data points;
  • the fourth device 940 is specifically configured to: when When the second data point and the first data point do not belong to the same data period, canceling the highlighting of the first data point, and displaying the second at the display position of the data period corresponding to the second data point data point.
  • the first data of the previous data period is canceled immediately after being enlarged, forming a flickering effect, and the second data point is normally displayed at the display position of the current data period, so that the user can clearly know.
  • the data has been entered for the next data cycle, and the data of the previous data cycle is no longer updated.
  • the embodiment of the present application further provides a more preferred dynamic curve data point updating device.
  • the structure of the device is as shown in FIG. 12, except for the first device 910, the second device 920, and the first device shown in FIG.
  • a fifth device 950 is also included.
  • the fifth device 950 is at the second data point Determining whether the clearing condition is satisfied before displaying the second data point in the display position of the corresponding data period, and if the clearing condition is satisfied, using the starting position of the currently displayed dynamic curve as the data corresponding to the second data point The position of the cycle is displayed and the currently displayed dynamic curve is cleared.
  • first device 910 the second device 920, the third device 930, and the fourth device 940 are respectively the same or substantially the same as the corresponding devices in the embodiment of FIG. 11, for the sake of brevity, It is not described here, and is hereby incorporated by reference.
  • the clearing condition may be set according to requirements in an actual application.
  • the clearing condition may be that the current time reaches 00:00:01 of the next day, and the starting position of the currently displayed dynamic curve is the first day.
  • the position of 00:00:01, that is, the dynamic curve only shows the data of one day, and the curve is automatically cleared at the beginning of the next day, and the drawing is restarted.
  • the emptying period can be set according to actual needs, and can be set to 4 hours, 12 hours, etc. in addition to the aforementioned 24 hours.
  • the emptying condition may also be some specific operations input by the user, such as switching operation of viewing historical curve data.
  • the foregoing clearing the currently displayed dynamic curve specifically includes: saving the currently displayed dynamic curve as a historical dynamic curve, and clearing the currently displayed dynamic curve. .
  • the application embodiment further provides another preferred dynamic curve data point updating device.
  • the structure of the device is as shown in FIG. 13, except for the first device 910, the second device 920, and the third device shown in FIG.
  • a sixth device 960 is further included.
  • the sixth device 960 includes a sixth module 961 and a sixth module 962, wherein the sixth module 961 saves the currently displayed dynamic curve as a historical dynamic curve, and clears the currently displayed After the dynamic curve, when the switching operation is acquired, the currently displayed dynamic curve is cleared according to the switching operation, and the historical dynamic curve is displayed; the sixth two module 962 suspends updating of the data point at the subsequent update time.
  • the switching operation includes, but is not limited to, a click or slide operation of the operation point at a specific position, a text instruction input through the interactive interface, and the like.
  • a left arrow button can be set on the left side of the graph interface of the dynamic curve.
  • the switching operation is Slide to the left in the chart area of the dynamic curve, slide once to switch to the dynamic curve of the previous day or switch to different historical dynamic curves according to the sliding distance; for example, enter the number of the historical dynamic curve in the provided interactive interface. You can switch to the corresponding historical dynamic curve.
  • the current displayed dynamic curve is saved as a historical dynamic curve, including but not limited to the following manners: Only the information of each data point in the historical dynamic curve is saved, or the information of each data point and the connection between the data points is saved. If only the information of each data point in the historical dynamic curve is saved, the specific steps of displaying the historical dynamic curve are as follows: First, each data point is generated and displayed according to the saved information, and then a connection between the data points is generated and displayed according to the data point. To show the complete dynamic curve. Of course, in order to ensure that data points and connections can be displayed simultaneously, data points and their connections can be displayed simultaneously after data points and connections are generated based on the saved information.
  • the data points of the dynamic curve of the current time need not be updated after the update time is reached, so after the historical dynamic curve is displayed, the subsequent update time is suspended.
  • the update refers only to the update of the data point displayed in the dynamic curve, but the data record is not stopped in the data source.
  • the application scenario of the number of newly registered users in an hour is taken as an example. Assume that the data of the historical dynamic curve and the number of newly registered users in the data source are saved in the cloud server, and the dynamic curve is passed.
  • the browser on the update device displays that the information of the number of newly registered users is sent to the server by the mobile terminal on which the application is installed and saved in the data source.
  • the update device obtains the switching operation of the user input, the update device will clear the currently displayed dynamic curve, and according to the configured path information, the saved historical dynamic curve will be obtained by the server and browsed. This historical dynamic curve is displayed in the device.
  • the mobile terminal with the application installed will still send the server the information of the number of newly registered users. For example, in 13:00:01 to 13:15:15, there are already 5,000 newly registered users at 13:15. The number of newly registered users has increased by 20 during the period from 16 to 13:16:11. The data source will still receive this information and save it so that the update device can still get the latest data when it needs to be updated, but this time.
  • the displayed dynamic curve does not change.
  • the sixth device further includes a sixth three module 963 and a sixth fourth module 964, and the specific structure thereof is as shown in FIG. 14.
  • the sixth module 961 saves the currently displayed dynamic curve as a historical dynamic curve and clears the currently displayed dynamic curve, and when the switching operation is acquired, according to the switching operation
  • the currently displayed dynamic curve is saved as a first dynamic curve, and the currently displayed dynamic curve is cleared, and the historical dynamic curve is displayed.
  • the sixth dynamic module 963 clears the currently displayed historical dynamic curve according to the recovery operation, and displays the first dynamic curve, after the update of the data point is performed after the subsequent update is paused.
  • the sixth quad module 964 resumes updating the data points at subsequent update times.
  • the recovery operation includes, but is not limited to, a click or slide operation of the operation point at a specific position, a text instruction input through the interactive interface, and the like. For example, click the operation of the right arrow, swipe right in the chart area of the dynamic curve, or enter the number of the first dynamic curve.
  • the recovery operation input by the user is obtained, and the update device clears the currently displayed historical dynamic curve according to the recovery operation, and displays the first dynamic in the browser. The curve, while recovering the update of the data points at the time of subsequent update.
  • the embodiment of the present application further provides a more preferred dynamic curve data point updating device.
  • the structure of the device is as shown in FIG. 15, except for the first device 910, the second device 920, and the first device shown in FIG.
  • a seventh device 970 is also included. Specifically, the seventh device 970 generates and displays between the first data point and the second data point after displaying the second data point in a display position of a data period corresponding to the second data point. Connection.
  • the first device 910, the second device 920, the third device 930, and the fourth device 940 are respectively the same or substantially the same as the corresponding devices in the embodiment of FIG.
  • the device may further include the aforementioned fifth device and/or sixth device.
  • a new data point is inserted into the display position of the next data cycle of the dynamic curve (ie, at 15:00:00), and Generates and displays a line between the data point at 14:00:00 and the data point at 15:00:00.
  • the connection between the two data points will be updated in real time as the data points are updated. For example, at 14:00:01, the data points at 14:00:00 are not updated, assuming data point coordinates (14:00:00, 5350), data points at 15:00:00 The coordinates are (15:00:00, 5352).
  • the data point at the 15:00:00 data point at 14:00:00 is updated by (15:00:00,5352) after the update.
  • the connection between (14:00:00, 5350) and (15:00:00, 5352) will be updated in real time (14:00:00, 5350) Connection with (15:00:00, 5356).
  • the line between the two data points can only represent the trend of change between the data represented by the data points, without representing specific data, for example, the closer to the position of the two data points, the closer the tangent of the line is to the horizontal level, the more Near the center of two data points, the connection The closer the tangent is to the vertical.
  • the present application further provides another better dynamic curve data point updating device, the structure of which is shown in FIG. 16, except that the first device 910, the second device 920, and the third device 930 are as shown in FIG.
  • an eighth device 980 is included.
  • the fourth device 940 detects a location of a user operation point, and when the user operation point coincides with the data point, displays data corresponding to the data point at a location of the user operation point. Thereby, the user can accurately obtain the accurate value of the data in addition to the change trend of the data.
  • the first device 910, the second device 920, and the third device 930 are the same as or substantially the same as the corresponding devices in the embodiment of FIG.
  • the device may further include any one or more of the foregoing fourth device, fifth device, sixth device, and seventh device.
  • FIG. 17 shows that the embodiment of the present application further provides a dynamic curve data point updating device, which includes a ninth device 1710, a tenth device 1720, and an eleventh device 1730.
  • the ninth device 1710 acquires a real-time component for generating the dynamic curve;
  • the tenth device 1720 writes configuration information to the real-time component;
  • the eleventh device 1730 initializes the real-time component according to the real-time component
  • the configuration information controls the operation of the aforementioned device to complete the data point.
  • the real-time component includes a graphic display unit and a function calling unit.
  • the graphic display unit and the function calling unit may be pre-program code, for example, using HTML (Hyper Text Markup Language) and JavaScript (Java scripting language), since JavaScript can be inserted into an HTML page. It is executed by any browser and has good versatility.
  • HTML Hyper Text Markup Language
  • JavaScript Java scripting language
  • the Highcharts chart library written in JavaScript can easily and conveniently add interactive charts to HTML pages to facilitate the drawing of dynamic curves.
  • the configuration information includes display parameter information and call parameter information.
  • the display parameter information includes, but is not limited to, related parameters for adjusting the display style of the chart, such as the style of the data point, the color, the color of the line, the style, the position of the chart in the page, etc.
  • the calling parameter information includes However, it is not limited to parameters that need to be used when implementing function calls, such as information about data sources, control parameters of functions, and so on.
  • the eleventh device 1730 instructs the function invoking unit to acquire data for generating an initial data point according to the invoking parameter information, and generate a dynamic curve including the initial data point, indicating that the graphic display unit is Displaying parameter information to generate a display area and displaying the dynamic curve in the display area; and indicating
  • the graphic display unit and the function calling unit control any one of the foregoing devices to perform updating of data points in the dynamic curve.
  • the program code of the HTML part in this embodiment is mainly used to express the external style of the chart, including the position and size of the chart, and the program code of the JavaScript part is mainly used to implement the background function of the chart, such as acquiring data, generating Highcharts graphics, and calling Function, etc.
  • Figure 6 shows a schematic diagram of a dynamic curve chart, the program code of the dynamic component corresponding to the chart is as follows, wherein the HTML part is:
  • chart1 is an HTML DOM (HTML Document Object Model) node, which is presented as the entire area of FIG. 6, which is equivalent to the outermost container of FIG. 6, and other contents shown in the figure include In the area.
  • realTimeArrow is a class of internal elements in the figure, and is used to specify the partial display effect of the chart display area 6A and the left and right arrows 6B, 6C in FIG. 6; in addition, the left arrow 6B, the right arrow 6C, and the chart display area are separately defined separately.
  • the 6A class "wdm-left leftArrow-on arrow-icon”, “wdm-right rightArrow arrow-icon”, and “Chart_area”, respectively display the part of the chart display area 6A, the left arrow 6B, and the right arrow 6C.
  • the effects were individually specified.
  • "margin-right: 25px;” indicates that the right margin of the chart display area 6A is 25 pixels.
  • J_Chart_area is an HTML DOM node for presenting Highcharts graphics (ie, dynamic curve 6D), where the HTML DOM is used to provide an interface that enables programs to dynamically access and update the content, structure, and style of HTML pages.
  • the program code of the JavaScript call part is:
  • type represents a curve type, such as hour, min, etc., wherein hour and min respectively indicate that a data point is displayed for 1 hour or 5 minutes on the X coordinate axis, that is, the aforementioned data period is 1 hour or 5 minutes. .
  • lineParams represents the set of parameters that need to be passed to the background of the browser when the curve is acquired.
  • the parameters in the parameter set include date, version information, and so on.
  • pointParams represents a set of parameters that need to be passed to the background when the data point of the current update time is obtained.
  • the parameters in the parameter set include date, version information, and the like.
  • lineDS represents the data source for the acquisition curve.
  • pointDS represents the data source of the data point at the current update time.
  • clickLeftCallBack indicates that the callback function after clicking the left arrow to get the data, which points to the function leftOneCallBack, is valid when the arrow is true.
  • clickRightCallBack indicates the callback function after clicking the right arrow to get the data. This points to the function rightOneCallBack, which is valid when the arrow is true.
  • offLeftArrow indicates that the processing function is clicked when the left arrow is clicked. This points to the function leftOne, which is valid when the arrow is true.
  • offRightArrow represents the processing function when clicking the right arrow, which points to the function rightOne, which is valid when the arrow is true.
  • Arrow which can be true or false, when true, means that the aforementioned left or right arrow can be clicked and the related function is called.
  • the configuration information (config) written to the real-time component includes but is not limited to the curve type type, the color of the curve, the line width and the color and size of the data point, the aforementioned lineParams, pointParams, lineDS, pointDS, and JavaScript related processing functions. , color of the axis, point shape and other information.
  • FIG. 7 shows an initialization process of the real-time component, including the following steps:
  • Step S701 loading a corresponding curve type profile according to the type in the config of the real-time component, for example, the loaded type is hour.
  • Config is the configuration of the real-time component, specifying the relevant configuration information for use when initializing the real-time component.
  • the profile is a concrete instance of the real-time component, and the relevant attribute information in the config is written to the profile at each initialization.
  • Step S702 the corresponding attribute in the current profile is overwritten by the related attribute in the config, wherein the related attribute may include the color of the curve, the line width, and the color, size, and the like of the data point.
  • the initLine method is called to initialize the data.
  • the initLine method includes: if a chart already exists in the current HTML page (such as the first dynamic curve mentioned in the foregoing method, a historical dynamic curve, etc.), the chart is cleared, and then the related attributes (such as coordinates) of the current instance are used.
  • the axis configuration information including the color, point shape), initialize the chart object, and then asynchronously obtain the corresponding curve data according to lineDS and lineParams in the config, and then draw the curve according to the data.
  • Step S704 calling the current openTimer method to update the data point.
  • the trigger of the openTimer method is implemented by using a timer, and the trigger interval of the timer logic is set to 1 second. Each time the trigger is triggered, it is determined whether the timer is empty. If the timer is not empty, the timer is cleared, and the timer is newly created. The processing steps of the data point update shown in FIG. 1 or FIG. 4 are performed once.
  • step S705 it is determined whether the arrow is turned on, that is, whether the left and right arrows are clickable. If it is turned on, step S706 is performed, and if not, the initialization of the real-time component is completed.
  • Step S706 adding a listener to the arrow, so that the relevant processing logic can be triggered when the click is clicked.
  • Figure 8 shows the listening process of the arrow's listener, including the following steps:
  • Step S801 obtaining a click operation
  • Step S802 determining whether the arrow is in a non-clickable state, if yes, ending the listening process; if not, executing step S803;
  • step S803 the function clickLeftCallBack or clickRightCallBack is called to perform processing.
  • the clickLeftCallBack function can implement the function of the foregoing switching operation, that is, for turning the page forward and displaying the historical dynamic curve
  • clickRightCallBack can implement the function of the recovery operation, turning the page backward until returning to display the dynamic of the day. curve.
  • step S804 the function offLeftArrow or offRightArrow is called to perform processing. If the value of the current arrow is true, then the function of calling the above two functions is to click the left (or right) arrow and set it to be unclickable. If the value of arrow is false, click the left (or right) arrow. It is placed in a clickable state.
  • step S805 the initLine method is called to initialize the data. Since the curve needs to be cleared and displayed after using the clickLeftCallBack or clickRightCallBack function, the curve can be switched by the initLine method.
  • Step S806 if the left arrow is clicked, the closeTimer method is called. If the right arrow is clicked, it is necessary to determine whether the right arrow is clickable after the offRightArrow function is processed. If clickable, the closeTimer method is called, if not clickable, Then call the openTimer method.
  • the openTimer method is used to update the data points. It has been described in the initialization process of the real-time component. It will not be described here.
  • the closeTimer method is used to clear the timer, that is, stop updating the data points to reduce the data processing and reduce the processing load. .
  • the technical solution provided in the present application can acquire the data points of the latest update time on the curve, and then compare with the data points generated by the current update time. If they belong to the same data cycle, the newly generated data points will be generated. The original data point is replaced, so that the data point is continuously updated and displayed in one data cycle, and the information such as the accumulated amount of a certain data in a certain period can be more intuitively displayed.
  • only a small amount of code, such as customized configuration information needs to be written by the real-time component to implement the function of updating the data point, since most of the program code adopts a modular form. Improves the readability and maintainability of the code, reduces the developer's dependence on programming knowledge, and improves development efficiency.
  • the present application can be implemented in software and/or a combination of software and hardware, for example, using an application specific integrated circuit (ASIC), a general purpose computer, or any other similar hardware device.
  • the software program of the present application can be executed by a processor to implement the steps or functions described above.
  • the software programs (including related data structures) of the present application can be stored in a computer readable recording medium such as a RAM memory, a magnetic or optical drive or a floppy disk and the like.
  • some of the steps or functions of the present application may be implemented in hardware, for example, as a circuit that cooperates with a processor to perform various steps or functions.
  • a portion of the present application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide a method and/or technical solution in accordance with the present application.
  • the program instructions for invoking the method of the present application may be stored in a fixed or removable recording medium, and/or transmitted by a data stream in a broadcast or other signal bearing medium, and/or stored in a The working memory of the computer device in which the program instructions are run.
  • an embodiment in accordance with the present application includes a device including a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, triggering
  • the apparatus operates based on the aforementioned methods and/or technical solutions in accordance with various embodiments of the present application.

Abstract

The object of the present application is to provide a method and device for updating a data point of a dynamic curve. The method specifically comprises: at each update moment, if there is a data point on a currently displayed dynamic curve, acquiring a first data point of a previous update moment in the data point; generating a second data point according to data at a current update moment in a data source; and when the second data point and the first data point belong to the same data cycle, eliminating the first data point at a display location of the data cycle and displaying the second data point. Compared with the prior art, a data point of the latest recent update moment on a curve can be acquired and then is compared with a data point generated at a current update moment; if the two data points belong to the same data cycle, the newly generated data point is replaced with the original data point, thereby realizing the continuous updating and displaying of the data point in a data cycle, so that information such as an accumulated amount of a certain piece of data in a certain cycle, etc. can be displayed more intuitively.

Description

一种动态曲线的数据点更新方法和设备Method and device for updating data point of dynamic curve
本申请要求2015年06月01日递交的申请号为201510293409.1、发明名称为“一种动态曲线的数据点更新方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application No. 201510293409.1, the disclosure of which is incorporated herein by reference. .
技术领域Technical field
本申请涉及计算机领域,尤其涉及一种用于一种动态曲线的数据点更新技术。The present application relates to the field of computers, and in particular to a data point update technique for a dynamic curve.
背景技术Background technique
随着互联网的发展,越来越多的数据服务产品推向市场。这些产品经常需要开发实时报表,用户在通过网络浏览器对这些报表中的曲线图进行浏览时,就能够直观的查看各类数据。为了更好地体现数据的实时性,通常的做法是对曲线图进行动态地更新,使得用户能够及时了解数据的变化。目前常用的动态曲线的形式为:由各个表示某一时刻股价的数据点以及连接各个数据点之间的连线组成,每个数据点一经生成后就不再更新,例如股票行情曲线。由于其数据点一经生成就不再更新,不利于直观的展现某一数据周期内的累积量,例如用户如果需要查看某一数据在一个小时内的累积量,那么通过上述曲线则无法直观获得这一信息。With the development of the Internet, more and more data service products are being introduced to the market. These products often require the development of real-time reports, and users can visually view various types of data while browsing the graphs in these reports through a web browser. In order to better reflect the real-time nature of the data, it is common practice to dynamically update the graph so that users can keep abreast of changes in the data. At present, the commonly used dynamic curve is in the form of: data points representing stock prices at a certain moment and connecting lines connecting the data points, and each data point is not updated once generated, such as a stock market curve. Since the data points are not updated as soon as they are generated, it is not conducive to intuitively displaying the accumulated amount in a certain data period. For example, if the user needs to check the accumulated amount of a certain data within one hour, then the above curve cannot be obtained intuitively. a message.
发明内容Summary of the invention
本申请的一个目的是提供一种动态曲线的数据点更新方法和设备,使得用户可以直观得获取信息。It is an object of the present application to provide a method and apparatus for updating data points of a dynamic curve so that a user can intuitively obtain information.
为实现上述目的,本申请提供了一种动态曲线的数据点更新方法,所述方法包括:To achieve the above objective, the present application provides a data point update method for a dynamic curve, the method comprising:
在每一更新时刻,若当前显示的动态曲线存在数据点,则获取所述数据点中前一更新时刻的第一数据点;At each update time, if there is a data point in the currently displayed dynamic curve, the first data point of the previous update time in the data point is acquired;
根据数据源中当前更新时刻的数据生成第二数据点;Generating a second data point according to data of a current update time in the data source;
当所述第二数据点与所述第一数据点属于同一数据周期时,在该数据周期的显示位置清除所述第一数据点并显示所述第二数据点。When the second data point and the first data point belong to the same data period, the first data point is cleared and the second data point is displayed at a display position of the data period.
进一步地,根据数据源中当前更新时刻的数据生成第二数据点,包括:Further, generating the second data point according to the data of the current update time in the data source, including:
根据预先配置的路径由数据源中异步获取当前更新时刻的数据;Obtaining data of the current update time asynchronously from the data source according to the pre-configured path;
根据所述当前更新时刻的数据生成第二数据点。 Generating a second data point according to the data of the current update time.
进一步地,获取所述数据点中前一更新时刻的第一数据点之后,还包括:Further, after acquiring the first data point of the previous update time in the data point, the method further includes:
对所述第一数据点进行突出显示。The first data point is highlighted.
进一步地,根据数据源中当前更新时刻的数据生成第二数据点之后,还包括:Further, after generating the second data point according to the data of the current update time in the data source, the method further includes:
当所述第二数据点与所述第一数据点不属于同一数据周期时,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。When the second data point and the first data point do not belong to the same data period, the second data point is displayed at a display position of a data period corresponding to the second data point.
进一步地,根据数据源中当前更新时刻的数据生成第二数据点之后,还包括:Further, after generating the second data point according to the data of the current update time in the data source, the method further includes:
当所述第二数据点与所述第一数据点不属于同一数据周期时,取消对所述第一数据点的突出显示,并在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。When the second data point and the first data point do not belong to the same data period, the highlighting of the first data point is cancelled, and the display position of the data period corresponding to the second data point is displayed. The second data point is described.
进一步地,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之前,还包括:Further, before the displaying the second data point in the display position of the data period corresponding to the second data point, the method further includes:
判断是否满足清空条件,若满足清空条件,则将所述当前显示的动态曲线的起始位置作为所述第二数据点对应的数据周期的显示位置,并清除所述当前显示的动态曲线。Determining whether the emptying condition is satisfied. If the emptying condition is met, the starting position of the currently displayed dynamic curve is used as the display position of the data period corresponding to the second data point, and the currently displayed dynamic curve is cleared.
进一步地,所述清除所述当前显示的动态曲线,包括:Further, the clearing the currently displayed dynamic curve includes:
将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线;Saving the currently displayed dynamic curve as a historical dynamic curve, and clearing the currently displayed dynamic curve;
将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线之后,还包括:After saving the currently displayed dynamic curve as a historical dynamic curve and clearing the currently displayed dynamic curve, the method further includes:
当获取切换操作时,根据所述切换操作清除当前显示的动态曲线,显示所述历史动态曲线;When the switching operation is acquired, the currently displayed dynamic curve is cleared according to the switching operation, and the historical dynamic curve is displayed;
暂停后续更新时刻对所述数据点进行的更新。Suspending updates to the data points at subsequent update times.
进一步地,当获取切换操作时,根据所述切换操作清除当前显示的动态曲线,并显示所述历史动态曲线,包括:Further, when the switching operation is acquired, the currently displayed dynamic curve is cleared according to the switching operation, and the historical dynamic curve is displayed, including:
当获取到切换操作时,根据所述切换操作将所述当前显示的动态曲线保存为第一动态曲线,并清除所述当前显示的动态曲线,显示所述历史动态曲线;When the switching operation is acquired, the currently displayed dynamic curve is saved as a first dynamic curve according to the switching operation, and the currently displayed dynamic curve is cleared, and the historical dynamic curve is displayed;
暂停后续更新时刻对所述数据点进行的更新之后,还包括:After suspending the update of the data point at the time of subsequent update, the method further includes:
当获取到恢复操作时,根据所述恢复操作清除当前显示的所述历史动态曲线,显示所述第一动态曲线;When the recovery operation is acquired, the currently displayed historical dynamic curve is cleared according to the recovery operation, and the first dynamic curve is displayed;
恢复后续更新时刻对所述数据点进行的更新。The update of the data points is resumed at a subsequent update time.
进一步地,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之后,还包括:Further, after the displaying the second data point in the display position of the data period corresponding to the second data point, the method further includes:
生成并显示所述第一数据点与所述第二数据点之间的连线。 Generating and displaying a connection between the first data point and the second data point.
进一步地,所述方法还包括:Further, the method further includes:
检测用户操作点的位置,当所述用户操作点与所述数据点重合时,在所述用户操作点的位置显示所述数据点对应的数据。Detecting a location of a user operation point, and when the user operation point coincides with the data point, displaying data corresponding to the data point at a location of the user operation point.
本申请还提供了另一种动态曲线的数据点更新方法,该方法包括:The present application also provides another method for updating data points of a dynamic curve, the method comprising:
获取用于生成所述动态曲线的实时组件;Obtaining a real-time component for generating the dynamic curve;
向所述实时组件写入配置信息;Writing configuration information to the real-time component;
初始化所述实时组件,根据所述实时组件的配置信息执行上述方法。Initializing the real-time component, and performing the above method according to configuration information of the real-time component.
进一步地,所述实时组件包括图形展示单元以及功能调用单元;Further, the real-time component includes a graphic display unit and a function calling unit;
初始化所述实时组件,根据所述实时组件的配置信息执行前述的任意一种方法,包括:Initializing the real-time component, and performing any one of the foregoing methods according to the configuration information of the real-time component, including:
根据配置信息由功能调用单元获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,所述图形展示单元生成显示区域并在所述显示区域内显示所述动态曲线;Generating data of the initial data point by the function calling unit according to the configuration information, and generating a dynamic curve including the initial data point, the graphic display unit generating a display area and displaying the dynamic curve in the display area;
所述图形展示单元和功能调用单元执行前述的任意一种方法对所述动态曲线中数据点更新。The graphic display unit and the function invoking unit perform any of the foregoing methods to update data points in the dynamic curve.
进一步地,所述配置信息包括显示参数信息和调用参数信息;Further, the configuration information includes display parameter information and call parameter information;
根据配置信息由功能调用单元获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,由所述图形展示单元生成显示区域并在所述显示区域内显示所述动态曲线,包括:Generating data of the initial data point by the function calling unit according to the configuration information, and generating a dynamic curve including the initial data point, generating a display area by the graphic display unit and displaying the dynamic curve in the display area, including :
所述功能调用单元根据所述调用参数信息获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,所述图形展示单元根据所述显示参数信息生成显示区域并在所述显示区域内显示所述动态曲线。The function invoking unit acquires data for generating an initial data point according to the invoking parameter information, and generates a dynamic curve including the initial data point, and the graphic display unit generates a display area according to the display parameter information and displays the display area The dynamic curve is displayed in the area.
根据本申请的另一方面,还提供了一种动态曲线的数据点更新设备,其中,所述设备包括:According to another aspect of the present application, there is also provided a dynamic curve data point update device, wherein the device comprises:
第一装置,用于在每一更新时刻,若当前显示的动态曲线存在数据点,则获取所述数据点中前一更新时刻的第一数据点;a first device, configured to acquire, at each update time, a first data point of a previous update time in the data point if a data point exists in the currently displayed dynamic curve;
第二装置,用于根据数据源中当前更新时刻的数据生成第二数据点;a second device, configured to generate a second data point according to data of a current update time in the data source;
第三装置,用于当所述第二数据点与所述第一数据点属于同一数据周期时,在该数据周期的显示位置清除所述第一数据点并显示所述第二数据点。And a third device, configured to: when the second data point and the first data point belong to the same data period, clear the first data point and display the second data point at a display position of the data period.
进一步地,所述第二装置包括: Further, the second device includes:
第二一模块,用于根据预先配置的路径由数据源中异步获取当前更新时刻的数据;a second module, configured to asynchronously acquire data of a current update time from a data source according to a pre-configured path;
第二二模块,用于根据所述当前更新时刻的数据生成第二数据点。And a second module, configured to generate a second data point according to the data of the current update time.
进一步地,所述第一装置还用于:Further, the first device is further configured to:
在获取所述数据点中前一更新时刻的第一数据点之后,对所述第一数据点进行突出显示。After acquiring the first data point of the previous update time in the data point, the first data point is highlighted.
进一步地,该设备还包括:Further, the device further includes:
第四装置,用于当所述第二数据点与所述第一数据点不属于同一数据周期时,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。And a fourth device, configured to: when the second data point and the first data point do not belong to the same data period, display the second data point at a display position of a data period corresponding to the second data point.
进一步地,所述第四装置还用于:Further, the fourth device is further configured to:
当所述第二数据点与所述第一数据点不属于同一数据周期时,取消对所述第一数据点的突出显示,并在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。When the second data point and the first data point do not belong to the same data period, the highlighting of the first data point is cancelled, and the display position of the data period corresponding to the second data point is displayed. The second data point is described.
进一步地,该设备还包括:Further, the device further includes:
第五装置,用于在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之前,判断是否满足清空条件,若满足清空条件,则将所述当前显示的动态曲线的起始位置作为所述第二数据点对应的数据周期的显示位置,并清除所述当前显示的动态曲线。a fifth device, configured to determine whether the clearing condition is met before the second data point is displayed at a display position of the data period corresponding to the second data point, and if the clearing condition is met, the currently displayed dynamic curve is The starting position is used as a display position of the data period corresponding to the second data point, and the currently displayed dynamic curve is cleared.
进一步地,所述第五装置,用于将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线;Further, the fifth device is configured to save the currently displayed dynamic curve as a historical dynamic curve, and clear the currently displayed dynamic curve;
所述设备还包括第六装置,该第六装置包括:The device also includes a sixth device, the sixth device comprising:
第六一模块,用于在将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线之后,当获取切换操作时,根据所述切换操作清除当前显示的动态曲线,显示所述历史动态曲线;a sixth module, configured to: after saving the currently displayed dynamic curve as a historical dynamic curve, and clearing the currently displayed dynamic curve, when acquiring the switching operation, clearing the currently displayed dynamic curve according to the switching operation Displaying the historical dynamic curve;
第六二模块,用于暂停后续更新时刻对所述数据点进行的更新。The sixth module is configured to suspend updating the data point at a subsequent update time.
进一步地,所述第六一模块,用于:Further, the sixth module is configured to:
在将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线之后,当获取切换操作时,根据所述切换操作将所述当前显示的动态曲线保存为第一动态曲线,并清除所述当前显示的动态曲线,显示所述历史动态曲线;After saving the currently displayed dynamic curve as a historical dynamic curve and clearing the currently displayed dynamic curve, when the switching operation is acquired, the currently displayed dynamic curve is saved as the first dynamic according to the switching operation. Curve and clear the currently displayed dynamic curve to display the historical dynamic curve;
所述第六装置还包括:The sixth device further includes:
第六三模块,用于在暂停后续更新时刻对所述数据点进行的更新之后,当获取到恢复操作时,根据所述恢复操作清除当前显示的所述历史动态曲线,显示所述第一动态曲线; a sixth module, configured to: after the update of the data point is paused at a time of suspending the subsequent update, when the recovery operation is acquired, clear the currently displayed historical dynamic curve according to the recovery operation, and display the first dynamic Curve
第六四模块,用于恢复后续更新时刻对所述数据点进行的更新。The sixth four module is configured to restore the update of the data point at a subsequent update time.
进一步地,该设备还包括:Further, the device further includes:
第七装置,用于在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之后,生成并显示所述第一数据点与所述第二数据点之间的连线。a seventh device, configured to generate and display a connection between the first data point and the second data point after displaying the second data point at a display position of a data period corresponding to the second data point .
进一步地,该设备还包括:Further, the device further includes:
第八装置,用于检测用户操作点的位置,当所述用户操作点与所述数据点重合时,在所述用户操作点的位置显示所述数据点对应的数据。The eighth device is configured to detect a location of the user operation point, and when the user operation point coincides with the data point, display data corresponding to the data point at the location of the user operation point.
本申请还提供了另一种动态曲线的数据点更新设备,该设备包括:The present application also provides another dynamic curve data point updating device, the device comprising:
第九装置,用于获取用于生成所述动态曲线的实时组件;a ninth device, configured to acquire a real-time component for generating the dynamic curve;
第十装置,用于向所述实时组件写入配置信息;a tenth device, configured to write configuration information to the real-time component;
第十一装置,用于初始化所述实时组件,根据所述实时组件的配置信息控制前述任意一种设备的运行。The eleventh device is configured to initialize the real-time component, and control the operation of any one of the foregoing devices according to the configuration information of the real-time component.
进一步地,所述实时组件包括图形展示单元以及功能调用单元;Further, the real-time component includes a graphic display unit and a function calling unit;
所述第十一装置,用于:The eleventh device is configured to:
根据配置信息指示功能调用单元获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,指示所述图形展示单元生成显示区域并在所述显示区域内显示所述动态曲线;Determining, according to the configuration information, the function invoking unit to acquire data of the initial data point, and generating a dynamic curve including the initial data point, instructing the graphic display unit to generate a display area and displaying the dynamic curve in the display area;
指示所述图形展示单元和功能调用单元控制前述任意一种设备进行对所述动态曲线中数据点的更新。Instructing the graphic display unit and the function calling unit to control any one of the foregoing devices to perform updating of data points in the dynamic curve.
进一步地,所述配置信息包括显示参数信息和调用参数信息;Further, the configuration information includes display parameter information and call parameter information;
所述第十一装置,用于:The eleventh device is configured to:
指示所述功能调用单元根据所述调用参数信息获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,指示所述图形展示单元根据所述显示参数信息生成显示区域并在所述显示区域内显示所述动态曲线;Instructing the function invoking unit to acquire data for generating an initial data point according to the invoking parameter information, and generating a dynamic curve including the initial data point, instructing the graphic display unit to generate a display area according to the display parameter information and Displaying the dynamic curve in the display area;
指示所述图形展示单元和功能调用单元控制前述任意一种设备进行对所述动态曲线中数据点的更新。Instructing the graphic display unit and the function calling unit to control any one of the foregoing devices to perform updating of data points in the dynamic curve.
与现有技术相比,在本申请提供的技术方案能够获取曲线上最近一个更新时刻的数据点,然后与当前更新时刻生成的数据点进行比较,若属于同一数据周期,则会将新生成的数据点替换原来的数据点,从而实现数据点在一个数据周期内不断进行更新显示,可以更加直观的展现例如某一数据在一定周期内的累积量等信息。此外,本申请提供的 另一方案中,通过实时组件仅需要写入少量代码,例如自定义的一些配置信息等,即可实现数据点更新的功能,由于大部分程序代码采用了模块化的形式,提高了代码的可读性和可维护性,降低了开发人员对编程知识的依赖程度,提高了开发效率。Compared with the prior art, the technical solution provided by the present application can acquire the data points of the latest update time on the curve, and then compare with the data points generated by the current update time. If they belong to the same data cycle, the newly generated data will be newly generated. The data points replace the original data points, so that the data points are continuously updated and displayed in one data period, and the information such as the accumulated amount of a certain data in a certain period can be more intuitively displayed. In addition, the present application provides In another solution, the real-time component only needs to write a small amount of code, such as some custom configuration information, etc., to realize the function of updating the data point. Since most of the program code adopts a modular form, the code can be improved. Readability and maintainability reduce the developer's reliance on programming knowledge and improve development efficiency.
附图说明DRAWINGS
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other features, objects, and advantages of the present application will become more apparent from the detailed description of the accompanying drawings.
图1为本申请实施例提供的第一种动态曲线的数据点更新方法的流程图;1 is a flowchart of a method for updating a data point of a first dynamic curve according to an embodiment of the present application;
图2为第一种动态曲线的数据点更新方法中步骤S102的处理流程图;2 is a processing flowchart of step S102 in the data point updating method of the first dynamic curve;
图3(a)~3(b)为数据点更新时的显示效果示意图;3(a) to 3(b) are schematic diagrams showing display effects when data points are updated;
图4为本申请实施例提供的第二种动态曲线的数据点更新方法的流程图;4 is a flowchart of a method for updating a data point of a second dynamic curve according to an embodiment of the present application;
图5为本申请实施例提供的第三种动态曲线的数据点更新方法的流程图;FIG. 5 is a flowchart of a method for updating a data point of a third dynamic curve according to an embodiment of the present application;
图6为本申请实施例中涉及的一张动态曲线图表的示意图;6 is a schematic diagram of a dynamic curve chart involved in an embodiment of the present application;
图7为实时组件的初始化流程图;Figure 7 is a flowchart of initialization of a real-time component;
图8为实时组件初始化流程中箭头的监听程序的监听流程图;FIG. 8 is a flowchart of monitoring a listener of an arrow in a real-time component initialization process;
图9为本申请实施例提供的第一种动态曲线的数据点更新设备的结构示意图;FIG. 9 is a schematic structural diagram of a data point update device of a first dynamic curve according to an embodiment of the present disclosure;
图10为动态曲线的数据点更新设备中第二装置的结构示意图;10 is a schematic structural diagram of a second device in a data point updating device of a dynamic curve;
图11为本申请实施例提供的第二种动态曲线的数据点更新设备的结构示意图;FIG. 11 is a schematic structural diagram of a data point update device of a second dynamic curve according to an embodiment of the present disclosure;
图12为本申请实施例提供的第三种动态曲线的数据点更新设备的结构示意图;12 is a schematic structural diagram of a data point update device of a third dynamic curve according to an embodiment of the present application;
图13为本申请实施例提供的第四种动态曲线的数据点更新设备的结构示意图;FIG. 13 is a schematic structural diagram of a fourth dynamic curve data point updating device according to an embodiment of the present disclosure;
图14为本申请实施例提供的动态曲线的数据点更新设备中第六装置的优选结构示意图;FIG. 14 is a schematic diagram of a preferred structure of a sixth device in a data point updating device of a dynamic curve according to an embodiment of the present disclosure;
图15为本申请实施例提供的第五种动态曲线的数据点更新设备的结构示意图;15 is a schematic structural diagram of a fifth dynamic curve data point updating device according to an embodiment of the present application;
图16为本申请实施例提供的第六种动态曲线的数据点更新设备的结构示意图;16 is a schematic structural diagram of a sixth dynamic curve data point updating device according to an embodiment of the present disclosure;
图17为本申请实施例提供的第七种动态曲线的数据点更新设备的结构示意图;FIG. 17 is a schematic structural diagram of a data point update device of a seventh dynamic curve according to an embodiment of the present disclosure;
附图中相同或相似的附图标记代表相同或相似的部件。The same or similar reference numerals in the drawings denote the same or similar components.
具体实施方式detailed description
下面结合附图对本申请作进一步详细描述。The present application is further described in detail below with reference to the accompanying drawings.
在本申请一个典型的配置中,终端、服务网络的设备和可信方均包括一个或多个处 理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration of the present application, the terminal, the device of the service network, and the trusted party each include one or more Processor (CPU), input/output interface, network interface, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, A magnetic tape cartridge, magnetic tape storage or other magnetic storage device or any other non-transportable medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
图1示出了本申请实施例提供的一种动态曲线的数据点更新方法的流程图,该方法具体包括以下步骤:FIG. 1 is a flowchart of a method for updating a data point of a dynamic curve according to an embodiment of the present application, where the method specifically includes the following steps:
步骤S101,在每一更新时刻,若当前显示的动态曲线存在数据点,则获取所述数据点中前一更新时刻的第一数据点;Step S101, at each update time, if there is a data point in the currently displayed dynamic curve, acquiring a first data point of the previous update time in the data point;
步骤S102,根据数据源中当前更新时刻的数据生成第二数据点;Step S102, generating a second data point according to data of a current update time in the data source;
步骤S103,当所述第二数据点与所述第一数据点属于同一数据周期时,在该数据周期的显示位置清除所述第一数据点并显示所述第二数据点。Step S103, when the second data point and the first data point belong to the same data period, clear the first data point and display the second data point at a display position of the data period.
在此,本领域技术人员应能理解,所述第一数据点及第二数据点分别用来指代动态曲线更新过程中各阶段特定的数据点。例如,所述第一数据点为前一更新时刻更新显示的数据点,所述第二数据点为当前更新时刻生成、并即将更新显示的数据点。在下一更新时刻,本次更新时的第二数据点即成为下次更新时的第一数据点。Here, those skilled in the art should understand that the first data point and the second data point are respectively used to refer to specific data points of each stage in the dynamic curve updating process. For example, the first data point updates the displayed data point for the previous update time, and the second data point is the data point generated for the current update time and is about to be updated. At the next update time, the second data point at the time of this update becomes the first data point at the time of the next update.
在本申请提供的技术方案会获取曲线上最近一个更新时刻更新的数据点,然后将当前更新时刻生成的数据点进行比较,如果两个数据点属于同一数据周期,则会将新生成的数据点替换原来的数据点,从而实现数据点在一个数据周期内不断进行更新,由此提供一种区别于现有动态曲线的数据展现方式,可以更加直观的展现例如某一数据在一定周期内的累积量等信息。The technical solution provided by the present application acquires the data points updated at the latest update time on the curve, and then compares the data points generated at the current update time. If the two data points belong to the same data period, the newly generated data points will be generated. Replacing the original data points, so that the data points are continuously updated in one data cycle, thereby providing a data presentation manner different from the existing dynamic curves, which can more intuitively display, for example, the accumulation of a certain data in a certain period. Quantity and other information.
在本实施例中,所述数据周期可以根据实际的需求设置不同的时长,例如设置为一 个小时、十五分钟等。每个数据周期内存在多个更新时刻,每当处于更新时刻,就会执行上述步骤S101至步骤S103,以完成对数据点的更新,同样地更新时刻的间隔也可以根据实际需求设置,比如用户对数据的实时性要求较高,那么可以将更新时刻的间隔设置的较短,如1秒钟。在实际应用中,可以通过定时器来实现每一更新时刻的触发,将定时器逻辑的触发间隔设置为1秒,每次触发时:执行一次步骤S101至步骤S103的数据点更新。在此,本领域技术人员应能理解上述关于数据周期、更新时刻的间隔以及每一更新时刻的触发的描述仅为举例,其他现有的或今后可能出现的方式如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。In this embodiment, the data period may be set to different durations according to actual requirements, for example, set to one. Hours, fifteen minutes, etc. There are a plurality of update times in each data cycle. Each time the update time is performed, the above steps S101 to S103 are performed to complete the update of the data points. Similarly, the interval of the update time may also be set according to actual needs, such as a user. The real-time requirements of the data are high, so the interval of the update time can be set to be shorter, such as 1 second. In a practical application, the trigger of each update time can be implemented by using a timer, and the trigger interval of the timer logic is set to 1 second. Each time the trigger is performed: the data point update of step S101 to step S103 is performed once. Here, those skilled in the art should be able to understand that the above description about the data period, the interval of the update time, and the trigger of each update time are merely examples, and other existing or future possible manners may be applied to the present application as well. It is intended to be included within the scope of this application and is hereby incorporated by reference.
在此,动态曲线由数据点以及连接相邻两个数据点之间的连线构成,其中每个数据点(包括第一数据点和第二数据点)表示在对应的数据周期内的数据。例如在某一应用场景中,动态曲线上的数据点用于表示某一应用程序在每个小时内新注册的用户数量,每秒钟对数据点进行一次更新,那么每个小时即为一个数据周期,如12:00:01~13:00:00、13:00:01~14:00:00、14:00:01~15:00:00等,其中动态曲线的X坐标轴和Y坐标轴可以分别表示时间和新注册的用户数量。在本实施例中,定义12:00:01~13:00:00为数据周期A、13:00:01~14:00:00为数据周期B、14:00:01~15:00:00为数据周期C,其中所述数据周期的显示位置为动态曲线的X坐标轴上的特定位置,例如数据周期A~C的显示位置可以分别设定为X坐标轴上13:00:00、14:00:00、15:00:00的位置。若当前时间为13:15:16,那么13:00:00位置的数据点表示12:00:01~13:00:00内,新注册的用户数量,由于当前时间已经经过13:00:00,那么该数据点已经不做更新,而14:00:00位置的数据点表示13:00:01至前一更新时刻(即13:15:15)内的新增用户数量,该数据点即为前述的第一数据点。假设在13:00:01至13:15:15内,已经有5000个新注册的用户,在13:15:16这一秒内又有3个新注册的用户,那么第二数据点表示新注册的用户数量即为5003。由于13:15:15和13:15:16均属于数据周期B,数据周期B的显示位置处的第一数据点(14:00:00,5000)会被清除,同时显示所述第二数据点(14:00:00,5003),由此完成了数据点的更新。Here, the dynamic curve consists of data points and connections between adjacent two data points, wherein each data point (including the first data point and the second data point) represents data within a corresponding data period. For example, in an application scenario, the data points on the dynamic curve are used to indicate the number of newly registered users in an hour, and the data points are updated every second, so each hour is a data. Cycles, such as 12:00:01 to 13:00:00, 13:00:01 to 14:00:00, 14:00:01 to 15:00:00, etc., where the X and Y coordinates of the dynamic curve The axes can represent the time and the number of newly registered users, respectively. In this embodiment, the definition of 12:00:01 to 13:00:00 is data cycle A, 13:00:01 to 14:00:00 is data cycle B, 14:00:01 to 15:00:00 For the data period C, wherein the display position of the data period is a specific position on the X coordinate axis of the dynamic curve, for example, the display positions of the data periods A to C can be respectively set to 13:00:00, 14 on the X coordinate axis. : 00:00, 15:00:00 location. If the current time is 13:15:16, then the data point at 13:00:00 indicates 12:00:01~13:00:00, the number of newly registered users, since the current time has passed 13:00:00 , then the data point has not been updated, and the data point at 14:00:00 indicates the number of new users in the 13:00:01 to the previous update time (ie 13:15:15), the data point is Is the first data point mentioned above. Assume that there are already 5,000 newly registered users between 13:00:01 and 13:15:15, and there are 3 newly registered users in the 13:15:16 second, then the second data point indicates new The number of registered users is 5003. Since 13:15:15 and 13:15:16 belong to the data period B, the first data point (14:00:00, 5000) at the display position of the data period B is cleared, and the second data is displayed. Point (14:00:00, 5003), thus completing the update of the data points.
对于数据源中某一更新时刻的数据,在根据该数据生成数据点时,可以对数据进行一定程度的数据处理,例如进行筛选,以筛除一些可能不准确的数据。如在上例的应用场景中,可以对用户所用设备的物理地址进行过滤,例如用户使用同一物理地址的终端注册了5个账号,在生成数据点时,可以对根据物理地址对该五个注册信息进行过滤,仅记录一个作为新注册的用户,由此来保证数据点所表示的数据的准确性。在此,本领域技术人员应能理解上述关于数据处理的描述仅为举例,其他现有的或今后可能出现的 数据处理的方式如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。For data at an update time in the data source, when data points are generated according to the data, the data may be processed to a certain extent, for example, by filtering to screen out some potentially inaccurate data. For example, in the application scenario of the above example, the physical address of the device used by the user can be filtered. For example, the user registers five accounts with the terminal of the same physical address, and when the data point is generated, the five registrations can be performed according to the physical address. The information is filtered, and only one user is newly registered, thereby ensuring the accuracy of the data represented by the data points. Here, those skilled in the art should understand that the above description about data processing is merely an example, other existing or future may occur. The manner in which the data is processed, as applicable to the present application, is also included in the scope of the present application and is hereby incorporated by reference.
优选地,步骤S102中根据数据源中当前更新时刻的数据生成第二数据点的方法可以采用如图2所示的处理流程实现,具体步骤包括:Preferably, the method for generating the second data point according to the data of the current update time in the data source in step S102 can be implemented by using the processing flow shown in FIG. 2, and the specific steps include:
S201,根据预先配置的路径由数据源中异步获取当前更新时刻的数据;S201. Acquire, according to the pre-configured path, the data of the current update time by the data source asynchronously;
S202,根据所述当前更新时刻的数据生成第二数据点。S202. Generate a second data point according to the data of the current update time.
其中,在所述动态曲线的图表通过网页显示场景下,异步获取可以采用AJAX(Asynchronous Javascript And XML,异步Javascript和XML技术)。所述AJAX是一种用于创建快速动态网页的技术,其通过在浏览器后台与服务器进行少量数据交换,可以在不重新加载整个网页的情况下对网页的某部分(即需要更新的数据点)进行更新,从而加快数据点更新的速度。Wherein, in the graph of the dynamic curve through the webpage display scenario, the asynchronous acquisition may adopt AJAX (Asynchronous Javascript And XML, asynchronous Javascript and XML technology). The AJAX is a technology for creating a fast dynamic webpage, which can exchange certain parts of a webpage (ie, data points that need to be updated) without reloading the entire webpage by performing a small amount of data exchange with the server in the background of the browser. ) Updates to speed up data point updates.
为了使得用户能够更加直观查看数据点的更新情况,在步骤S101中获取所述数据点中前一更新时刻的第一数据点之后,还包括对所述第一数据点进行突出显示。在此,突出显示的方式包括但不限于:放大显示、改变数据点颜色、改变数据点透明度、增加边框等。以放大显示显示为例,在步骤S101中第一数据点3A的实际显示效果如图3(a)所示,当在数据周期的显示位置清除所述第一数据点3A并显示所述第二数据点3B后,由于并未对所述第二数据点3B进行突出显示,第二数据点3B显示为正常大小,如图3(b)所示,在整个过程中通过放大以及正常显示,数据点的变化过程呈现一闪烁的效果,使得数据点更新的动态效果更加直观,便于用户查看。在此,本领域技术人员应能理解上述关于突出显示的描述仅为举例,其他现有的或今后可能出现的突出显示的方式如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。In order to enable the user to view the update of the data point more intuitively, after acquiring the first data point of the previous update time in the data point in step S101, the method further includes highlighting the first data point. Here, the manner of highlighting includes, but is not limited to, zooming in, changing the color of the data point, changing the transparency of the data point, adding a border, and the like. Taking the enlarged display as an example, the actual display effect of the first data point 3A in step S101 is as shown in FIG. 3(a), when the first data point 3A is cleared and the second is displayed at the display position of the data cycle. After the data point 3B, since the second data point 3B is not highlighted, the second data point 3B is displayed as a normal size, as shown in FIG. 3(b), and the data is enlarged and displayed normally throughout the process. The change process of the point presents a flickering effect, which makes the dynamic effect of the data point update more intuitive and convenient for the user to view. Herein, those skilled in the art should understand that the above description about the highlighting is only an example, and other existing or future possible highlighting manners, as applicable to the present application, are also included in the protection scope of the present application. It is hereby incorporated by reference.
由于在实际场景中也会出现所述第二数据点与所述第一数据点不属于同一数据周期的情形,因此本申请实施例还提供了一种优选动态曲线的数据点更新方法,该方法的处理流程如图4所示,具体包括:The data point update method of the preferred dynamic curve is also provided in the embodiment of the present application, because the second data point and the first data point do not belong to the same data period. The processing flow is shown in Figure 4, specifically including:
步骤S101,在每一更新时刻,若当前显示的动态曲线存在数据点,则获取所述数据点中前一更新时刻的第一数据点;Step S101, at each update time, if there is a data point in the currently displayed dynamic curve, acquiring a first data point of the previous update time in the data point;
步骤S102,根据数据源中当前更新时刻的数据生成第二数据点;Step S102, generating a second data point according to data of a current update time in the data source;
步骤S103,当所述第二数据点与所述第一数据点属于同一数据周期时,在该数据周期的显示位置清除所述第一数据点并显示所述第二数据点;Step S103, when the second data point and the first data point belong to the same data period, clearing the first data point and displaying the second data point at a display position of the data period;
步骤S104,当所述第二数据点与所述第一数据点不属于同一数据周期时,在所述第 二数据点对应的数据周期的显示位置显示所述第二数据点。Step S104, when the second data point and the first data point do not belong to the same data period, in the The display position of the data period corresponding to the two data points displays the second data point.
结合图1可知,该方法在根据数据源中当前更新时刻的数据生成第二数据点之后,若确定所述第二数据点与所述第一数据点不属于同一数据周期,则会在所述第二数据点对应的数据周期的显示位置显示所述第二数据点,即不对第一数据点进行更新,而是在动态曲线中新插入一个数据点。例如,当前时间为14:00:01,在更新时刻获取生成的第二数据点属于数据周期C(14:00:01~15:00:00),而前一更新时刻生成的第一数据点则数据周期B(13:00:01~14:00:00),第二数据点对应的数据周期的显示位置为X坐标轴上的15:00:00的位置,由此在当前的更新时刻,14:00:00位置处的第一数据点不会被清除,而是直接在15:00:00位置处显示第二数据点。在后续的更新时刻14:00:02至15:00:00,由于其生成的数据点均属于同一数据周期C,则会执行步骤S103所述的步骤,不再插入显示新的数据点,而是对原有的数据点进行更新显示;As shown in FIG. 1, after the method generates the second data point according to the data of the current update time in the data source, if it is determined that the second data point and the first data point do not belong to the same data period, The display position of the data period corresponding to the second data point displays the second data point, that is, the first data point is not updated, but a new data point is newly inserted in the dynamic curve. For example, the current time is 14:00:01, and the generated second data point at the update time belongs to the data period C (14:00:01 to 15:00:00), and the first data point generated by the previous update time Then, in the data period B (13:00:01 to 14:00:00), the display position of the data period corresponding to the second data point is the position of 15:00:00 on the X coordinate axis, thereby the current update time. The first data point at the 14:00:00 position will not be cleared, but the second data point will be displayed directly at the 15:00:00 position. At the subsequent update time 14:00:02 to 15:00:00, since the data points generated by them all belong to the same data cycle C, the steps described in step S103 are performed, and the new data points are no longer inserted, but Is to update the original data points;
若在步骤S101中获取所述数据点中前一更新时刻的第一数据点之后,对所述第一数据点进行了突出显示,相应地,所述步骤S104可以具体包括:当所述第二数据点与所述第一数据点不属于同一数据周期时,取消对所述第一数据点的突出显示,并在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。仍以前述放大的突出显示方式为例,上一个数据周期的第一数据在放大后随即取消,形成闪烁效果,同时第二数据点在当前的数据周期的显示位置正常显示,使得用户能够明确获知已经进入下一数据周期,前一数据周期的数据不再更新。After the first data point of the previous update time in the data point is obtained in step S101, the first data point is highlighted. Accordingly, the step S104 may specifically include: when the second When the data point and the first data point do not belong to the same data period, the highlighting of the first data point is cancelled, and the second data point is displayed at a display position of the data period corresponding to the second data point. . Taking the above-mentioned enlarged highlighting method as an example, the first data of the previous data period is canceled immediately after being enlarged, forming a flickering effect, and the second data point is normally displayed at the display position of the current data period, so that the user can clearly know. The data has been entered for the next data cycle, and the data of the previous data cycle is no longer updated.
进一步地,本申请实施例还提供了一种更优选的动态曲线的数据点更新方法,该方法在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之前,还包括:判断是否满足清空条件,若满足清空条件,则将所述当前显示的动态曲线的起始位置作为所述第二数据点对应的数据周期的显示位置,并清除所述当前显示的动态曲线。Further, the embodiment of the present application further provides a data point update method of a more preferred dynamic curve, where the method further includes before the displaying the second data point in the display position of the data period corresponding to the second data point. And determining whether the clearing condition is met. If the clearing condition is met, the starting position of the currently displayed dynamic curve is used as the display position of the data period corresponding to the second data point, and the currently displayed dynamic curve is cleared.
其中,所述清空条件可以根据实际应用中的需求来设置,例如清空条件可以是当前时间达到第二天的00:00:01,所述当前显示的动态曲线的起始位置即为第一天的00:00:01的位置,即动态曲线仅显示一天的数据,第二天开始时自动清空曲线,重新开始绘制。清空的周期可以根据实际需求设置,除前述的24小时之外,也可以设置为4小时、12小时等等。The clearing condition may be set according to requirements in an actual application. For example, the clearing condition may be that the current time reaches 00:00:01 of the next day, and the starting position of the currently displayed dynamic curve is the first day. The position of 00:00:01, that is, the dynamic curve only shows the data of one day, and the curve is automatically cleared at the beginning of the next day, and the drawing is restarted. The emptying period can be set according to actual needs, and can be set to 4 hours, 12 hours, etc. in addition to the aforementioned 24 hours.
此外,清空条件还可以是用户输入的某些特定操作,例如查看历史曲线数据的切换操作。在此种情形下,由于需要获取历史曲线数据,前述的清除所述当前显示的动态曲线,具体包括:将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示 的动态曲线。此时,当获取到切换操作时,会根据所述切换操作清除当前显示的动态曲线,然后显示保存的历史动态曲线。所述切换操作包括但不限于:操作点在特定位置上的点击或滑动操作、通过交互界面输入的文本指令等。例如,可以在动态曲线的图表界面左侧设置一个左箭头的按钮,当用户的操作点点击该左箭头即为切换操作,点击一次即切换至前一日的动态曲线;再如,切换操作为在动态曲线的图表区域内向左滑动,滑动一次即切换至前一日的动态曲线或者根据滑动的距离切换至不同的历史动态曲线;还如,在提供的交互界面中输入历史动态曲线的编号,即可切换至对应的历史动态曲线。在此,本领域技术人员应能理解上述关于切换操作的描述仅为举例,其他现有的或今后可能出现的切换操作如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。In addition, the emptying condition may also be some specific operations input by the user, such as switching operation of viewing historical curve data. In this case, because the historical curve data needs to be acquired, the foregoing clearing the currently displayed dynamic curve specifically includes: saving the currently displayed dynamic curve as a historical dynamic curve, and clearing the current display. Dynamic curve. At this time, when the switching operation is acquired, the currently displayed dynamic curve is cleared according to the switching operation, and then the saved historical dynamic curve is displayed. The switching operations include, but are not limited to, a click or slide operation of the operating point at a specific location, a textual instruction input through the interactive interface, and the like. For example, a left arrow button can be set on the left side of the graph interface of the dynamic curve. When the user's operation point clicks the left arrow, it is a switching operation, and once clicked, it switches to the dynamic curve of the previous day; for example, the switching operation is Slide to the left in the chart area of the dynamic curve, slide once to switch to the dynamic curve of the previous day or switch to different historical dynamic curves according to the sliding distance; for example, enter the number of the historical dynamic curve in the provided interactive interface. You can switch to the corresponding historical dynamic curve. Herein, those skilled in the art should understand that the above description about the handover operation is only an example, and other existing or future possible handover operations, as applicable to the present application, are also included in the scope of protection of the present application, and This is hereby incorporated by reference.
其中,将所述当前显示的动态曲线保存为历史动态曲线,包括但不限于以下方式:仅保存历史动态曲线中各个数据点的信息,或者保存各个数据点以及数据点之间的连线的信息等。若仅保存历史动态曲线中各个数据点的信息,则显示历史动态曲线的具体步骤如下:首先,根据保存的信息生成各个数据点并显示,然后根据数据点生成并显示数据点之间的连线,以展示完整的动态曲线。当然,为了保证数据点与连线可以同步显示,可以在根据保存的信息生成数据点以及连线之后,再同时显示数据点及其连线。若同时保存各个数据点以及数据点之间的连线的信息等,则仅需要获取这些信息,并根据这些信息生成并显示即可。在此,本领域技术人员应能理解上述关于保存历史动态曲线的描述仅为举例,其他现有的或今后可能出现的保存方式如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。The current displayed dynamic curve is saved as a historical dynamic curve, including but not limited to the following manner: only information of each data point in the historical dynamic curve is saved, or information of each data point and the connection between the data points is saved. Wait. If only the information of each data point in the historical dynamic curve is saved, the specific steps of displaying the historical dynamic curve are as follows: First, each data point is generated and displayed according to the saved information, and then a connection between the data points is generated and displayed according to the data point. To show the complete dynamic curve. Of course, in order to ensure that data points and connections can be displayed simultaneously, data points and their connections can be displayed simultaneously after data points and connections are generated based on the saved information. If you save each data point and the information of the connection between the data points at the same time, you only need to obtain the information and generate and display it based on the information. Herein, those skilled in the art should understand that the above description about the preservation history dynamic curve is only an example, and other existing or future possible storage methods, as applicable to the present application, should also be included in the scope of protection of the present application. It is hereby incorporated by reference.
由于获取到切换操作后所显示的曲线为历史动态曲线,在达到更新时刻后无需再对当前时间的动态曲线的数据点进行更新,因此在显示所述历史动态曲线之后,暂停后续更新时刻对所述数据点进行的更新。在此,所述更新仅指对数据点在动态曲线中显示的更新,但是在数据源中不会停止数据记录。仍以前述表示某一应用程序在每个小时内新注册的用户数量的应用场景为例,假设历史动态曲线的数据以及数据源中新注册用户数量的数据保存于云端的服务器中,动态曲线通过更新设备上的浏览器显示,新注册用户数量的信息由安装有应用程序的移动终端的发送给服务器并保存于数据源中。在当前时间13:15:16时,若更新设备获取到用户输入的切换操作,更新设备会清除当前显示的动态曲线,同时根据配置的路径信息会由服务器获取保存的历史动态曲线,并在浏览器中显示该历史动态曲线。此时,安装有应用程序的移动终端仍然会向服务器发送新注册用 户数量的信息,例如在13:00:01至13:15:15内,已经有5000个新注册的用户,在13:15:16至13:16:11的时间段内新注册的用户又增加了20人,数据源仍然会接收这些信息并进行保存,使得更新设备在需要更新时仍能够得到最新的数据,但是此时显示的动态曲线不会发生变化。Since the curve displayed after the switching operation is a historical dynamic curve, the data points of the dynamic curve of the current time need not be updated after the update time is reached, so after the historical dynamic curve is displayed, the subsequent update time is suspended. The update of the data points. Here, the update refers only to the update of the data point displayed in the dynamic curve, but the data record is not stopped in the data source. For example, the application scenario of the number of newly registered users in an hour is taken as an example. Assume that the data of the historical dynamic curve and the number of newly registered users in the data source are saved in the cloud server, and the dynamic curve is passed. The browser on the update device displays that the information of the number of newly registered users is sent to the server by the mobile terminal on which the application is installed and saved in the data source. At the current time of 13:15:16, if the update device obtains the switching operation of the user input, the update device will clear the currently displayed dynamic curve, and according to the configured path information, the saved historical dynamic curve will be obtained by the server and browsed. This historical dynamic curve is displayed in the device. At this point, the mobile terminal with the application installed will still send a new registration to the server. The number of households, for example, between 13:00:01 and 13:15:15, there are already 5,000 newly registered users, and the newly registered users are in the period of 13:15:16 to 13:16:11. With an increase of 20 people, the data source will still receive this information and save it so that the update device can still get the latest data when it needs to be updated, but the dynamic curve displayed at this time will not change.
进一步地,当获取切换操作时,根据所述切换操作清除当前显示的动态曲线,并显示所述历史动态曲线,包括:当获取到切换操作时,根据所述切换操作将所述当前显示的动态曲线保存为第一动态曲线,并清除所述当前显示的动态曲线,显示所述历史动态曲线。而暂停后续更新时刻对所述数据点进行的更新之后,还包括:当获取到恢复操作时,根据所述恢复操作清除当前显示的所述历史动态曲线,显示所述第一动态曲线;以及恢复后续更新时刻对所述数据点进行的更新。Further, when the switching operation is acquired, the currently displayed dynamic curve is cleared according to the switching operation, and the historical dynamic curve is displayed, including: when the switching operation is acquired, the currently displayed dynamic according to the switching operation The curve is saved as a first dynamic curve, and the currently displayed dynamic curve is cleared, and the historical dynamic curve is displayed. After the update of the data point is performed, the method further includes: when the recovery operation is acquired, clearing the currently displayed historical dynamic curve according to the recovery operation, displaying the first dynamic curve; and recovering The update of the data points is performed at a subsequent update time.
通过上述方式,若用户在切换至历史动态曲线之后,想要继续查看当前时间的动态曲线,可以通过恢复操作便捷地实现。与所述切换操作对应地,所述恢复操作包括但不限于:操作点在特定位置上的点击或滑动操作、通过交互界面输入的文本指令等。例如,点击右箭头的操作、在动态曲线的图表区域内向右滑动或者输入第一动态曲线的编号等。接上例,在当前时间13:16:12时,获取到用户输入的恢复操作,更新设备根据所述恢复操作清除当前显示的所述历史动态曲线,并在浏览器中显示所述第一动态曲线,同时恢复后续更新时刻对所述数据点进行的更新。由于在切换至历史动态曲线时(即13:15:16),第一动态曲线显示的数据点为13:15:15更新的数据点(14:00:00,5000),13:16:12时恢复后续更新时刻对所述数据点进行的更新。若13:16:12内又有1个新注册的用户,则该数据周期内的数据点会更新为(14:00:00,5021)。In the above manner, if the user wants to continue to view the dynamic curve of the current time after switching to the historical dynamic curve, it can be conveniently implemented by the recovery operation. Corresponding to the switching operation, the recovery operation includes, but is not limited to, a click or slide operation of the operation point at a specific position, a text instruction input through the interactive interface, and the like. For example, click the operation of the right arrow, swipe right in the chart area of the dynamic curve, or enter the number of the first dynamic curve. In the above example, when the current time is 13:16:12, the recovery operation input by the user is obtained, and the update device clears the currently displayed historical dynamic curve according to the recovery operation, and displays the first dynamic in the browser. The curve, while recovering the update of the data points at the time of subsequent update. Since the data point displayed by the first dynamic curve is 13:15:15 updated data point (14:00:00,5000), 13:16:12 when switching to the historical dynamic curve (ie 13:15:16) The update of the data point is resumed at a subsequent update time. If there is another newly registered user in 13:16:12, the data points in the data cycle will be updated to (14:00:00, 5021).
优选地,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之后,还包括:生成并显示所述第一数据点与所述第二数据点之间的连线。在数据点更新的过程中,在达到另一个数据周期后会插入新的数据点,此时需要增加数据点之间的连线以形成完整的动态曲线。具体地,当时间达到14:00:01时,由于进入了下一个数据周期,有新的数据点插入到动态曲线下一数据周期的显示位置(即15:00:00处),此时会生成并显示14:00:00位置处的数据点与15:00:00位置处的数据点之间的连线。此外,为了保证动态曲线的实时性,两个数据点之间的连线也会随着数据点的更新而实时更新。例如,14:00:01时,14:00:00位置处的数据点已不做更新,假设其数据点坐标为(14:00:00,5350),15:00:00位置处的数据点坐标为(15:00:00,5352)。当时间又经过一秒达到14:00:02时,14:00:00位置处的数据点15:00:00位置处的数据点在该次更新后由(15:00:00,5352)更 新为(15:00:00,5356),那么,(14:00:00,5350)与(15:00:00,5352)之间的连线会实时更新为(14:00:00,5350)与(15:00:00,5356)之间的连线。两个数据点之间的连线可以仅表示数据点所表示的数据之间的变化趋势,而无需表示具体数据,例如越接近两个数据点的位置,该连线的切线越接近水平,越接近两个数据点的中央位置,该连线的切线越接近垂直。Preferably, after displaying the second data point in the display position of the data period corresponding to the second data point, the method further includes: generating and displaying a connection between the first data point and the second data point . During the data point update process, new data points are inserted after another data cycle is reached, and the connection between the data points needs to be increased to form a complete dynamic curve. Specifically, when the time reaches 14:00:01, since the next data cycle is entered, a new data point is inserted into the display position of the next data cycle of the dynamic curve (ie, at 15:00:00), and Generates and displays a line between the data point at 14:00:00 and the data point at 15:00:00. In addition, in order to ensure the real-time nature of the dynamic curve, the connection between the two data points will be updated in real time as the data points are updated. For example, at 14:00:01, the data points at 14:00:00 are not updated, assuming data point coordinates (14:00:00, 5350), data points at 15:00:00 The coordinates are (15:00:00, 5352). When the time passes one second to reach 14:00:02, the data point at the 15:00:00 data point at 15:00:00 is more (15:00:00,5352) after the update. New (15:00:00, 5356), then, the connection between (14:00:00, 5350) and (15:00:00, 5352) will be updated in real time (14:00:00, 5350) ) and the connection between (15:00:00, 5356). The line between the two data points can only represent the trend of change between the data represented by the data points, without representing specific data, for example, the closer to the position of the two data points, the closer the tangent of the line is to the horizontal level, the more Near the center of the two data points, the tangent to the line is closer to vertical.
进一步地,前述的动态曲线数据点更新方法还包括:检测用户操作点的位置,当所述用户操作点与所述数据点重合时,在所述用户操作点的位置显示所述数据点对应的数据。由此,使得用户除了获知数据的变化趋势之外,还能够准确的获取数据的准确值。Further, the foregoing dynamic curve data point updating method further includes: detecting a location of a user operation point, and displaying, when the user operation point coincides with the data point, displaying, at a position of the user operation point, the data point corresponding to the data point data. Thereby, the user can accurately obtain the accurate value of the data in addition to the change trend of the data.
图5示出了本申请实施例还提供了一种动态曲线的数据点更新方法,该方法包括:FIG. 5 shows a method for updating a data point of a dynamic curve according to an embodiment of the present application, the method includes:
步骤S501,获取用于生成所述动态曲线的实时组件;Step S501, acquiring a real-time component for generating the dynamic curve;
步骤S502,向所述实时组件写入配置信息;Step S502, writing configuration information to the real-time component;
步骤S503,初始化所述实时组件,根据所述实时组件的配置信息执行前述的方法,从而完成数据点。Step S503, initializing the real-time component, and performing the foregoing method according to the configuration information of the real-time component, thereby completing the data point.
通过实时组件,仅需要写入少量代码,例如自定义的一些配置信息等,即可实现数据点更新的功能,由于大部分程序代码采用了模块化的形式,提高了代码的可读性和可维护性,降低了开发人员对编程知识的依赖程度,提高了开发效率。With real-time components, only a small amount of code needs to be written, such as some custom configuration information, so that the data point update function can be realized. Since most of the program code adopts a modular form, the code is readable and can be improved. Maintainability reduces the developer's dependence on programming knowledge and improves development efficiency.
其中,所述实时组件包括图形展示单元以及功能调用单元。在实际应用中,所述图形展示单元以及功能调用单元可以是预先的程序代码,例如采用HTML(Hyper Text Markup Language,超文本标记语言)以及JavaScript(Java脚本语言),由于JavaScript可以插入到HTML页面中,并且由任意的浏览器执行,通用性较好,并且通过JavaScript编写的Highcharts图表库能够简单便捷的在HTML页面中添加交互性的图表,便于动态曲线的绘制。其中,所述配置信息包括显示参数信息和调用参数信息。在本实施例中,显示参数信息包括但不限于用于调整图表在显示样式的相关参数,例如数据点的样式、颜色、线条的颜色、样式,图表在页面中的位置等,调用参数信息包括但不限于实现功能调用时需要使用到的参数,例如数据源的相关信息、函数的控制参数等。The real-time component includes a graphic display unit and a function calling unit. In practical applications, the graphic display unit and the function calling unit may be pre-program code, for example, using HTML (Hyper Text Markup Language) and JavaScript (Java scripting language), since JavaScript can be inserted into an HTML page. It is executed by any browser and has good versatility. The Highcharts chart library written in JavaScript can easily and conveniently add interactive charts to HTML pages to facilitate the drawing of dynamic curves. The configuration information includes display parameter information and call parameter information. In this embodiment, the display parameter information includes, but is not limited to, related parameters for adjusting the display style of the chart, such as the style of the data point, the color, the color of the line, the style, the position of the chart in the page, etc., and the calling parameter information includes However, it is not limited to parameters that need to be used when implementing function calls, such as information about data sources, control parameters of functions, and so on.
具体地,步骤S503包括:所述功能调用单元根据所述调用参数信息获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,所述图形展示单元根据所述显示参数信息生成显示区域并在所述显示区域内显示所述动态曲线;以及所述图形展示单元和功能调用单元执行前述任意一种方法对所述动态曲线中数据点更新。Specifically, the step S503 includes: the function calling unit acquires data for generating an initial data point according to the calling parameter information, and generates a dynamic curve including the initial data point, where the graphic display unit generates according to the display parameter information. Displaying the area and displaying the dynamic curve in the display area; and the graphic display unit and the function invoking unit performing any of the foregoing methods to update the data points in the dynamic curve.
本实施例中,HTML部分的程序代码主要用于展现图表的外在样式,包括图表的位 置、大小等,JavaScript部分的程序代码主要用于实现图表的后台功能,例如获取数据、生成Highcharts图形、调用函数等,图6示出了一张动态曲线图表的示意图,该图表对应的动态组件的程序代码如下,其中HTML部分为:In this embodiment, the program code of the HTML part is mainly used to display the external style of the chart, including the bits of the chart. Set, size, etc., the JavaScript part of the program code is mainly used to implement the background function of the chart, such as acquiring data, generating Highcharts graphics, calling functions, etc. Figure 6 shows a schematic diagram of a dynamic curve chart, the corresponding dynamic components of the chart The program code is as follows, where the HTML part is:
Figure PCTCN2016083083-appb-000001
Figure PCTCN2016083083-appb-000001
在此,“chart1”为HTML DOM(HTML Document Object Model,HTML文档对象模型)节点,展现为图6的整个区域,相当于整个图6的最外层的容器,图6中展现的其它内容均包含在区域中。"realTimeArrow"为图中内部元素的类,用于指定图6中的图表显示区域6A以及左右箭头6B、6C的部分显示效果;此外还分别单独规定了左箭头6B、右箭头6C和图表显示区域6A的类,分别为"wdm-left leftArrow-on arrow-icon"、"wdm-right rightArrow arrow-icon"以及和"Chart_area",分别对图表显示区域6A、左箭头6B、右箭头6C的部分显示效果进行了单独指定。"margin-right:25px;"表示图表显示区域6A的右边距为25个像素。"J_Chart_area"为HTML DOM节点,用于展现Highcharts图形(即动态曲线6D),其中HTML DOM用于提供接口,使得程序能够动态地访问和更新HTML页面的内容、结构和样式。在实际应用中,"chart1"、"realTimeArrow"、"wdm-left leftArrow-on arrow-icon"、"wdm-right rightArrow arrow-icon"、"J_Chart_area"以及"chart-area"的无需在程序代码的其它部分单独定义,可以通过下述的JavaScript代码自动扫描并绑定。Here, "chart1" is an HTML DOM (HTML Document Object Model) node, which is presented as the entire area of FIG. 6, which is equivalent to the outermost container of FIG. 6, and the other contents shown in FIG. Included in the area. "realTimeArrow" is a class of internal elements in the figure, and is used to specify the partial display effect of the chart display area 6A and the left and right arrows 6B, 6C in FIG. 6; in addition, the left arrow 6B, the right arrow 6C, and the chart display area are separately defined separately. The 6A class, "wdm-left leftArrow-on arrow-icon", "wdm-right rightArrow arrow-icon", and "Chart_area", respectively display the part of the chart display area 6A, the left arrow 6B, and the right arrow 6C. The effects were individually specified. "margin-right: 25px;" indicates that the right margin of the chart display area 6A is 25 pixels. "J_Chart_area" is an HTML DOM node for presenting Highcharts graphics (ie, dynamic curve 6D), where the HTML DOM is used to provide an interface that enables programs to dynamically access and update the content, structure, and style of HTML pages. In practical applications, "chart1", "realTimeArrow", "wdm-left leftArrow-on arrow-icon", "wdm-right rightArrow arrow-icon", "J_Chart_area", and "chart-area" are not required in the program code. The other sections are defined separately and can be automatically scanned and bound by the JavaScript code below.
而JavaScript调用部分的程序代码为:The program code of the JavaScript call part is:
Figure PCTCN2016083083-appb-000002
Figure PCTCN2016083083-appb-000002
Figure PCTCN2016083083-appb-000003
Figure PCTCN2016083083-appb-000003
在此,在变量rtConfig中,type表示曲线类型,例如hour、min等,其中hour、min分别表示X坐标轴上1小时或者5分钟显示一数据点,即前述的数据周期为1小时或者5分钟。Here, in the variable rtConfig, type represents a curve type, such as hour, min, etc., wherein hour and min respectively indicate that a data point is displayed for 1 hour or 5 minutes on the X coordinate axis, that is, the aforementioned data period is 1 hour or 5 minutes. .
lineParams表示获取曲线时需要传递到浏览器后台的参数集合,其中参数集合内的参数包括日期、版本信息等等。lineParams represents the set of parameters that need to be passed to the background of the browser when the curve is acquired. The parameters in the parameter set include date, version information, and so on.
pointParams表示获取当前更新时刻的数据点时需要传递到后台的参数集合,其中参数集合内的参数包括日期、版本信息等等。pointParams represents a set of parameters that need to be passed to the background when the data point of the current update time is obtained. The parameters in the parameter set include date, version information, and the like.
lineDS表示获取曲线的数据源。lineDS represents the data source for the acquisition curve.
pointDS表示当前更新时刻的数据点的数据源。pointDS represents the data source of the data point at the current update time.
clickLeftCallBack表示点击左箭头获取数据后的回调函数,这里指向函数leftOneCallBack,当arrow为true时有效。clickLeftCallBack indicates that the callback function after clicking the left arrow to get the data, which points to the function leftOneCallBack, is valid when the arrow is true.
clickRightCallBack表示点击右箭头获取数据后的回调函数,这里指向函数rightOneCallBack,当arrow为true时有效。clickRightCallBack indicates the callback function after clicking the right arrow to get the data. This points to the function rightOneCallBack, which is valid when the arrow is true.
offLeftArrow表示点击左箭头时处理函数,这里指向函数leftOne,当arrow为true时有效。offLeftArrow indicates that the processing function is clicked when the left arrow is clicked. This points to the function leftOne, which is valid when the arrow is true.
offRightArrow表示点击右箭头时处理函数,这里指向函数rightOne,当arrow为true时有效。offRightArrow represents the processing function when clicking the right arrow, which points to the function rightOne, which is valid when the arrow is true.
arrow,可以是true或者false时,当true时表示前述左箭头或右箭头可以点击,并调用相关函数。Arrow, which can be true or false, when true, means that the aforementioned left or right arrow can be clicked and the related function is called.
向所述实时组件写入的配置信息(config)包括但不限于曲线类型type、曲线的颜色、 线宽和数据点的颜色、大小、前述的lineParams、pointParams、lineDS、pointDS、JavaScript的相关处理函数、坐标轴的颜色、点形状等信息。The configuration information (config) written to the real-time component includes but is not limited to the curve type type, the color of the curve, Line width and data point color, size, the aforementioned lineParams, pointParams, lineDS, pointDS, JavaScript related processing functions, axis color, point shape and other information.
图7示出了所述实时组件的初始化流程,包括以下步骤:FIG. 7 shows an initialization process of the real-time component, including the following steps:
步骤S701,根据实时组件的config中的type加载对应的曲线类型配置(profile),例如加载的type为hour。config是实时组件的配置,指定了相关的配置信息,用于在初始化实时组件时使用。profile是实时组件的具体实例,在每次初始化时将config中的相关属性信息写入profile。Step S701, loading a corresponding curve type profile according to the type in the config of the real-time component, for example, the loaded type is hour. Config is the configuration of the real-time component, specifying the relevant configuration information for use when initializing the real-time component. The profile is a concrete instance of the real-time component, and the relevant attribute information in the config is written to the profile at each initialization.
步骤S702,用config中的相关属性覆盖当前profile中的对应属性,其中相关属性可以包括曲线的颜色、线宽和数据点的颜色、大小等。In step S702, the corresponding attribute in the current profile is overwritten by the related attribute in the config, where the related attribute may include the color of the curve, the line width, and the color, size, and the like of the data point.
步骤S703,调用initLine方法初始化数据。其中,所述initLine方法包括:如果当前的HTML页面中已经存在图表(例如前述方法提及的第一动态曲线、历史动态曲线等),则会清空图表,然后根据当前实例的相关属性(如坐标轴的配置信息,包括颜色、点形状),初始化图表对象,再根据config中的lineDS、lineParams异步获取对应的曲线数据,然后根据数据绘制曲线。在实际应用中,当用户点击左箭头获取前一天的历史动态曲线时,由于目前所显示的时当日的动态曲线,此时会清空当日的动态曲线,获取历史动态曲线的数据并显示所述历史动态曲线。In step S703, the initLine method is called to initialize the data. The initLine method includes: if a chart already exists in the current HTML page (such as the first dynamic curve mentioned in the foregoing method, a historical dynamic curve, etc.), the chart is cleared, and then the related attributes (such as coordinates) of the current instance are used. The axis configuration information, including the color, point shape), initialize the chart object, and then asynchronously obtain the corresponding curve data according to lineDS and lineParams in the config, and then draw the curve according to the data. In practical applications, when the user clicks the left arrow to obtain the historical dynamic curve of the previous day, due to the current dynamic curve of the current day, the dynamic curve of the current day is cleared, the data of the historical dynamic curve is acquired, and the history is displayed. Dynamic curve.
步骤S704,调用当前openTimer方法更新数据点。所述openTimer方法的触发通过定时器实现,将定时器逻辑的触发间隔设置为1秒,每次触发时:判断定时器是否为空,如果定时器不为空,则清空定时器,同时新建定时器,执行一次图1或图4所示的数据点更新的处理步骤。Step S704, calling the current openTimer method to update the data point. The trigger of the openTimer method is implemented by using a timer, and the trigger interval of the timer logic is set to 1 second. Each time the trigger is triggered, it is determined whether the timer is empty. If the timer is not empty, the timer is cleared, and the timer is newly created. The processing steps of the data point update shown in FIG. 1 or FIG. 4 are performed once.
步骤S705,确定是否开启箭头,即使得左右箭头是否可点击,如果开启,则执行步骤S706,如果不开启,则完成实时组件的初始化。In step S705, it is determined whether the arrow is turned on, that is, whether the left and right arrows are clickable. If it is turned on, step S706 is performed, and if not, the initialization of the real-time component is completed.
步骤S706,为箭头添加监听程序,使得点击点头时能够触发相关处理逻辑。Step S706, adding a listener to the arrow, so that the relevant processing logic can be triggered when the click is clicked.
图8示出了箭头的监听程序的监听流程,包括以下步骤:Figure 8 shows the listening process of the arrow's listener, including the following steps:
步骤S801,获取到点击操作;Step S801, obtaining a click operation;
步骤S802,判断箭头是否处于不可点击的状态,若为是,则结束监听流程;若为否,执行步骤S803;Step S802, determining whether the arrow is in a non-clickable state, if yes, ending the listening process; if not, executing step S803;
步骤S803,调用函数clickLeftCallBack或者clickRightCallBack,进行处理。在本申请实施例中,clickLeftCallBack函数可以实现前述切换操作的功能,即用于向前翻页,显示历史动态曲线,而clickRightCallBack则可以实现恢复操作的功能,向后翻页直至返回 显示当日的动态曲线。In step S803, the function clickLeftCallBack or clickRightCallBack is called to perform processing. In the embodiment of the present application, the clickLeftCallBack function can implement the foregoing switching operation function, that is, for turning the page forward and displaying the historical dynamic curve, and clickRightCallBack can implement the function of the recovery operation, turning the page backwards until returning Shows the dynamic curve of the day.
步骤S804,调用函数offLeftArrow或者offRightArrow,进行处理。若当前arrow的值为true,则调用上述两个函数的作用为点击左(或右)箭头后将其置为不可点击的状态,若arrow的值为false,点击左(或右)箭头后将其置为可点击的状态。In step S804, the function offLeftArrow or offRightArrow is called to perform processing. If the value of the current arrow is true, then the function of calling the above two functions is to click the left (or right) arrow and set it to be unclickable. If the value of arrow is false, click the left (or right) arrow. It is placed in a clickable state.
步骤S805,调用initLine方法初始化数据。由于在使用clickLeftCallBack或者clickRightCallBack函数后,需要清除并显示曲线,通过initLine方法即可实现曲线的切换。In step S805, the initLine method is called to initialize the data. Since the curve needs to be cleared and displayed after using the clickLeftCallBack or clickRightCallBack function, the curve can be switched by the initLine method.
步骤S806,若点击的是左箭头,则调用closeTimer方法,若点击的是右箭头,则需要判断offRightArrow函数处理后,右箭头还是否可点击,若可点击,则调用closeTimer方法,若不可点击,则调用openTimer方法。其中,openTimer方法用于更新数据点,在实时组件的初始化流程中已经说明,此处不再赘述,closeTimer方法则用于清除定时器,即停止更新数据点,以减少数据处理量,降低处理负荷。Step S806, if the left arrow is clicked, the closeTimer method is called. If the right arrow is clicked, it is necessary to determine whether the right arrow is clickable after the offRightArrow function is processed. If clickable, the closeTimer method is called, if not clickable, Then call the openTimer method. The openTimer method is used to update the data points. It has been described in the initialization process of the real-time component. It will not be described here. The closeTimer method is used to clear the timer, that is, stop updating the data points to reduce the data processing and reduce the processing load. .
图9示出了本申请实施例提供的一种动态曲线的数据点更新设备1的结构示意图,该设备1具体包括第一装置910、第二装置920和第三装置930。具体地,第一装置910在每一更新时刻,若当前显示的动态曲线存在数据点,则获取所述数据点中前一更新时刻的第一数据点;第二装置920根据数据源中当前更新时刻的数据生成第二数据点;第三装置930在所述第二数据点与所述第一数据点属于同一数据周期时,在该数据周期的显示位置清除所述第一数据点并显示所述第二数据点。FIG. 9 is a schematic structural diagram of a data point updating device 1 of a dynamic curve provided by an embodiment of the present application. The device 1 specifically includes a first device 910, a second device 920, and a third device 930. Specifically, the first device 910 acquires a first data point of the previous update time in the data point if the currently displayed dynamic curve has a data point at each update time; the second device 920 is updated according to the current data source. The data of the time generates a second data point; when the second data point belongs to the same data cycle as the first data point, the third device 930 clears the first data point and displays the display position at the display position of the data cycle The second data point is described.
在此,本领域技术人员应能理解,所述第一数据点及第二数据点分别用来指代动态曲线更新过程中各阶段特定的数据点。例如,所述第一数据点为前一更新时刻更新显示的数据点,所述第二数据点为当前更新时刻生成、并即将更新显示的数据点。在下一更新时刻,本次更新时的第二数据点即成为下次更新时的第一数据点。Here, those skilled in the art should understand that the first data point and the second data point are respectively used to refer to specific data points of each stage in the dynamic curve updating process. For example, the first data point updates the displayed data point for the previous update time, and the second data point is the data point generated for the current update time and is about to be updated. At the next update time, the second data point at the time of this update becomes the first data point at the time of the next update.
在此,设备1包括但不限于网络设备、触控终端或网络设备与触控终端通过网络相集成所构成的设备。在此,所述网络设备包括但不限于如网络主机、单个网络服务器、多个网络服务器集或基于云计算的计算机集合等实现;或者由用户设备实现。在此,云由基于云计算(Cloud Computing)的大量主机或网络服务器构成,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。优选地,设备1还可以是运行于网络设备或触控终端上的软件程序。在此,所述触控终端是一种任何可通过触屏进行人机交互的电子产品,如智能手机、PDA、便携式游戏机、掌上电脑PPC、便携式设备或平板电脑等;其中,触屏(Touch Screen),包括电容式触摸屏。本领域技 术人员应能理解上述设备1和触控终端仅为举例,其他现有的或今后可能出现的设备1或触控终端如可适用于本发明,也应包含在本发明保护范围以内,并在此以引用方式包含于此。Here, the device 1 includes, but is not limited to, a device formed by a network device, a touch terminal, or a network device integrated with a touch terminal through a network. Here, the network device includes, but is not limited to, an implementation such as a network host, a single network server, a plurality of network server sets, or a cloud computing-based computer collection; or is implemented by a user equipment. Here, the cloud is composed of a large number of host or network servers based on Cloud Computing, which is a kind of distributed computing, a super virtual computer composed of a group of loosely coupled computers. Preferably, the device 1 can also be a software program running on a network device or a touch terminal. Here, the touch terminal is any electronic product that can perform human-computer interaction through a touch screen, such as a smart phone, a PDA, a portable game machine, a handheld computer PPC, a portable device, or a tablet computer; among them, a touch screen ( Touch Screen), including capacitive touch screen. Technology in the field The operator should be able to understand that the above-mentioned device 1 and the touch terminal are only examples, and other existing or future devices 1 or touch terminals may be applicable to the present invention, and should also be included in the scope of protection of the present invention. This is hereby incorporated by reference.
在本申请提供的技术方案会获取曲线上最近一个更新时刻更新的数据点,然后将当前更新时刻生成的数据点进行比较,如果两个数据点属于同一数据周期,则会将新生成的数据点替换原来的数据点,从而实现数据点在一个数据周期内不断进行更新,由此提供一种区别于现有动态曲线的数据展现方式,可以更加直观的展现例如某一数据在一定周期内的累积量等信息。The technical solution provided by the present application acquires the data points updated at the latest update time on the curve, and then compares the data points generated at the current update time. If the two data points belong to the same data period, the newly generated data points will be generated. Replacing the original data points, so that the data points are continuously updated in one data cycle, thereby providing a data presentation manner different from the existing dynamic curves, which can more intuitively display, for example, the accumulation of a certain data in a certain period. Quantity and other information.
在本实施例中,所述数据周期可以根据实际的需求设置不同的时长,例如设置为一个小时、十五分钟等。每个数据周期内存在多个更新时刻,每当处于更新时刻,第一装置910、第二装置920和第三装置930均会进行一次处理,以完成对数据点的更新,同样地更新时刻的间隔也可以根据实际需求设置,比如用户对数据的实时性要求较高,那么可以将更新时刻的间隔设置的较短,如1秒钟。在实际应用中,可以通过定时器来实现每一更新时刻的触发,将定时器逻辑的触发间隔设置为1秒,每次触发时:判断定时器是否为空,如果定时器不为空,则清空定时器,同时新建定时器,由第一装置910、第二装置920和第三装置930执行一次数据点更新。在此,本领域技术人员应能理解上述关于数据周期、更新时刻的间隔以及每一更新时刻的触发的描述仅为举例,其他现有的或今后可能出现的方式如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。In this embodiment, the data period may be set to different durations according to actual requirements, for example, set to one hour, fifteen minutes, and the like. There are a plurality of update moments in each data period. Whenever the update time is met, the first device 910, the second device 920, and the third device 930 perform processing once to complete the update of the data points, and similarly update the time. The interval can also be set according to actual needs. For example, if the user has high requirements on the real-time performance of the data, the interval of the update time can be set to be shorter, such as 1 second. In an actual application, the trigger of each update time can be implemented by using a timer, and the trigger interval of the timer logic is set to 1 second. Each time the trigger is: whether the timer is empty or not, if the timer is not empty, The timer is cleared, and a new timer is created, and the data point update is performed by the first device 910, the second device 920, and the third device 930. Here, those skilled in the art should be able to understand that the above description about the data period, the interval of the update time, and the trigger of each update time are merely examples, and other existing or future possible manners may be applied to the present application as well. It is intended to be included within the scope of this application and is hereby incorporated by reference.
在此,动态曲线由数据点以及连接相邻两个数据点之间的连线构成,其中每个数据点(包括第一数据点和第二数据点)表示在对应的数据周期内的数据。例如在某一应用场景中,动态曲线上的数据点用于表示某一应用程序在每个小时内新注册的用户数量,每秒钟对数据点进行一次更新,那么每个小时即为一个数据周期,如12:00:01~13:00:00、13:00:01~14:00:00、14:00:01~15:00:00等,其中动态曲线的X坐标轴和Y坐标轴可以分别表示时间和新注册的用户数量。在本实施例中,定义12:00:01~13:00:00为数据周期A、13:00:01~14:00:00为数据周期B、14:00:01~15:00:00为数据周期C,其中所述数据周期的显示位置为动态曲线的X坐标轴上的特定位置,例如数据周期A~C的显示位置可以分别设定为X坐标轴上13:00:00、14:00:00、15:00:00的位置。若当前时间为13:15:16,那么13:00:00位置的数据点表示12:00:01~13:00:00内,新注册的用户数量,由于当前时间已经经过13:00:00,那么该数据点已经不做更新,而14:00:00位置的数据点表示13:00:01 至前一更新时刻(即13:15:15)内的新增用户数量,该数据点即为前述的第一数据点。假设在13:00:01至13:15:15内,已经有5000个新注册的用户,在13:15:16这一秒内又有3个新注册的用户,那么第二数据点表示新注册的用户数量即为5003。由于13:15:15和13:15:16均属于数据周期B,数据周期B的显示位置处的第一数据点(14:00:00,5000)会被清除,同时显示所述第二数据点(14:00:00,5003),由此完成了数据点的更新。Here, the dynamic curve consists of data points and connections between adjacent two data points, wherein each data point (including the first data point and the second data point) represents data within a corresponding data period. For example, in an application scenario, the data points on the dynamic curve are used to indicate the number of newly registered users in an hour, and the data points are updated every second, so each hour is a data. Cycles, such as 12:00:01 to 13:00:00, 13:00:01 to 14:00:00, 14:00:01 to 15:00:00, etc., where the X and Y coordinates of the dynamic curve The axes can represent the time and the number of newly registered users, respectively. In this embodiment, the definition of 12:00:01 to 13:00:00 is data cycle A, 13:00:01 to 14:00:00 is data cycle B, 14:00:01 to 15:00:00 For the data period C, wherein the display position of the data period is a specific position on the X coordinate axis of the dynamic curve, for example, the display positions of the data periods A to C can be respectively set to 13:00:00, 14 on the X coordinate axis. : 00:00, 15:00:00 location. If the current time is 13:15:16, then the data point at 13:00:00 indicates 12:00:01~13:00:00, the number of newly registered users, since the current time has passed 13:00:00 , then the data point has not been updated, and the data point at 14:00:00 indicates 13:00:01 The number of new users in the previous update time (ie, 13:15:15) is the first data point mentioned above. Assume that there are already 5,000 newly registered users between 13:00:01 and 13:15:15, and there are 3 newly registered users in the 13:15:16 second, then the second data point indicates new The number of registered users is 5003. Since 13:15:15 and 13:15:16 belong to the data period B, the first data point (14:00:00, 5000) at the display position of the data period B is cleared, and the second data is displayed. Point (14:00:00, 5003), thus completing the update of the data points.
对于数据源中某一更新时刻的数据,在根据该数据生成数据点时,可以对数据进行一定程度的数据处理,例如进行筛选,以筛除一些可能不准确的数据。如在上例的应用场景中,可以对用户所用设备的物理地址进行过滤,例如用户使用同一物理地址的终端注册了5个账号,在生成数据点时,可以对根据物理地址对该五个注册信息进行过滤,仅记录一个作为新注册的用户,由此来保证数据点所表示的数据的准确性。在此,本领域技术人员应能理解上述关于数据处理的描述仅为举例,其他现有的或今后可能出现的数据处理的方式如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。For data at an update time in the data source, when data points are generated according to the data, the data may be processed to a certain extent, for example, by filtering to screen out some potentially inaccurate data. For example, in the application scenario of the above example, the physical address of the device used by the user can be filtered. For example, the user registers five accounts with the terminal of the same physical address, and when the data point is generated, the five registrations can be performed according to the physical address. The information is filtered, and only one user is newly registered, thereby ensuring the accuracy of the data represented by the data points. Herein, those skilled in the art should understand that the above description about the data processing is only an example, and other existing or future data processing methods may be applicable to the present application, and should also be included in the scope of the present application. It is hereby incorporated by reference.
优选地,所述第二装置920的具体结构如图10所示,包括第二一模块921和第二二模块922。具体地,第二一模块921根据预先配置的路径由数据源中异步获取当前更新时刻的数据;第二二模块922根据所述当前更新时刻的数据生成第二数据点。Preferably, the specific structure of the second device 920 is as shown in FIG. 10, and includes a second module 921 and a second module 922. Specifically, the second module 921 acquires the data of the current update time asynchronously from the data source according to the pre-configured path; the second module 922 generates the second data point according to the data of the current update time.
其中,在所述动态曲线的图表通过网页显示场景下,异步获取可以采用AJAX(Asynchronous Javascript And XML,异步Javascript和XML技术)。所述AJAX是一种用于创建快速动态网页的技术,其通过在浏览器后台与服务器进行少量数据交换,可以在不重新加载整个网页的情况下对网页的某部分(即需要更新的数据点)进行更新,从而加快数据点更新的速度。Wherein, in the graph of the dynamic curve through the webpage display scenario, the asynchronous acquisition may adopt AJAX (Asynchronous Javascript And XML, asynchronous Javascript and XML technology). The AJAX is a technology for creating a fast dynamic webpage, which can exchange certain parts of a webpage (ie, data points that need to be updated) without reloading the entire webpage by performing a small amount of data exchange with the server in the background of the browser. ) Updates to speed up data point updates.
为了使得用户能够更加直观查看数据点的更新情况,所述第一装置910还用于:在获取所述数据点中前一更新时刻的第一数据点之后,对所述第一数据点进行突出显示。在此,突出显示的方式包括但不限于:放大显示、改变数据点颜色、改变数据点透明度、增加边框等。以放大显示显示为例,第一装置处理获得的第一数据点3A的实际显示效果如图3(a)所示,当在数据周期的显示位置清除所述第一数据点3A并显示所述第二数据点3B后,由于并未对所述第二数据点3B进行突出显示,第二数据点3B显示为正常大小,如图3(b)所示,在整个过程中通过放大以及正常显示,数据点的变化过程呈现一闪烁的效果,使得数据点更新的动态效果更加直观,便于用户查看。在此,本领域技术人员应能理解上述关于突出显示的描述仅为举例,其他现有的或今后可能出现的突 出显示的方式如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。In order to enable the user to view the update of the data point more intuitively, the first device 910 is further configured to: after acquiring the first data point of the previous update time in the data point, highlight the first data point display. Here, the manner of highlighting includes, but is not limited to, zooming in, changing the color of the data point, changing the transparency of the data point, adding a border, and the like. Taking the enlarged display as an example, the actual display effect of the first data point 3A obtained by the first device processing is as shown in FIG. 3(a), when the first data point 3A is cleared and displayed in the display position of the data period. After the second data point 3B, since the second data point 3B is not highlighted, the second data point 3B is displayed as a normal size, as shown in FIG. 3(b), by zooming in and displaying normally throughout the process. The change process of the data points presents a flickering effect, which makes the dynamic effect of the data point update more intuitive and convenient for the user to view. Here, those skilled in the art should understand that the above description about the highlighting is only an example, other existing or future possible protrusions. The manner in which the display is made is applicable to the present application and is also intended to be included within the scope of the present application and is hereby incorporated by reference.
由于在实际场景中也会出现所述第二数据点与所述第一数据点不属于同一数据周期的情形,因此本申请实施例还提供了一种优选动态曲线的数据点更新设备,该设备的结构如图11所示,除如图9所示第一装置910、第二装置920和第三装置930之外,还包括第四装置940。具体地,所述第四装置940在所述第二数据点与所述第一数据点不属于同一数据周期时,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。在此,本领域技术人员应当理解,第一装置910、第二装置920和第三装置930分别与图9实施例中对应装置的内容相同或基本相同,为简明起见,故在此不再赘述,并以引用的方式包含于此。The data point update device of the preferred dynamic curve is also provided in the embodiment of the present application, because the second data point and the first data point do not belong to the same data period. The structure is as shown in FIG. 11, and includes a fourth device 940 in addition to the first device 910, the second device 920, and the third device 930 as shown in FIG. Specifically, the fourth device 940 displays the second data at a display position of a data period corresponding to the second data point when the second data point and the first data point do not belong to the same data period. point. Here, it should be understood by those skilled in the art that the first device 910, the second device 920, and the third device 930 are the same as or substantially the same as the corresponding devices in the embodiment of FIG. 9, for brevity, and therefore will not be described herein. And is included here by reference.
该方法在根据数据源中当前更新时刻的数据生成第二数据点之后,若确定所述第二数据点与所述第一数据点不属于同一数据周期,则会在所述第二数据点对应的数据周期的显示位置显示所述第二数据点,即不对第一数据点进行更新,而是在动态曲线中新插入一个数据点。例如,当前时间为14:00:01,在更新时刻获取生成的第二数据点属于数据周期C(14:00:01~15:00:00),而前一更新时刻生成的第一数据点则数据周期B(13:00:01~14:00:00),第二数据点对应的数据周期的显示位置为X坐标轴上的15:00:00的位置,由此在当前的更新时刻,14:00:00位置处的第一数据点不会被清除,而是直接在15:00:00位置处显示第二数据点。在后续的更新时刻14:00:02至15:00:00,由于其生成的数据点均属于同一数据周期C,则会执行步骤S103所述的步骤,不再插入显示新的数据点,而是对原有的数据点进行更新显示;After the method generates the second data point according to the data of the current update time in the data source, if it is determined that the second data point and the first data point do not belong to the same data period, the method corresponds to the second data point. The display position of the data period displays the second data point, ie, the first data point is not updated, but a new data point is inserted in the dynamic curve. For example, the current time is 14:00:01, and the generated second data point at the update time belongs to the data period C (14:00:01 to 15:00:00), and the first data point generated by the previous update time Then, in the data period B (13:00:01 to 14:00:00), the display position of the data period corresponding to the second data point is the position of 15:00:00 on the X coordinate axis, thereby the current update time. The first data point at the 14:00:00 position will not be cleared, but the second data point will be displayed directly at the 15:00:00 position. At the subsequent update time 14:00:02 to 15:00:00, since the data points generated by them all belong to the same data cycle C, the steps described in step S103 are performed, and the new data points are no longer inserted, but Is to update the original data points;
若第一装置910获取所述数据点中前一更新时刻的第一数据点之后,对所述第一数据点进行了突出显示,相应地,所述第四装置940具体用于:当所述第二数据点与所述第一数据点不属于同一数据周期时,取消对所述第一数据点的突出显示,并在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。仍以前述放大的突出显示方式为例,上一个数据周期的第一数据在放大后随即取消,形成闪烁效果,同时第二数据点在当前的数据周期的显示位置正常显示,使得用户能够明确获知已经进入下一数据周期,前一数据周期的数据不再更新。After the first device 910 obtains the first data point of the previous update time in the data point, the first data point is highlighted, and correspondingly, the fourth device 940 is specifically configured to: when When the second data point and the first data point do not belong to the same data period, canceling the highlighting of the first data point, and displaying the second at the display position of the data period corresponding to the second data point data point. Taking the above-mentioned enlarged highlighting method as an example, the first data of the previous data period is canceled immediately after being enlarged, forming a flickering effect, and the second data point is normally displayed at the display position of the current data period, so that the user can clearly know. The data has been entered for the next data cycle, and the data of the previous data cycle is no longer updated.
进一步地,本申请实施例还提供了一种更优选的动态曲线的数据点更新设备,该设备的结构如图12所示,除图11示出的第一装置910、第二装置920、第三装置930和第四装置940之外,还包括第五装置950。具体地,所述第五装置950在所述第二数据点 对应的数据周期的显示位置显示所述第二数据点之前,判断是否满足清空条件,若满足清空条件,则将所述当前显示的动态曲线的起始位置作为所述第二数据点对应的数据周期的显示位置,并清除所述当前显示的动态曲线。在此,本领域技术人员应当理解,第一装置910、第二装置920、第三装置930和第四装置940分别与图11实施例中对应装置的内容相同或基本相同,为简明起见,故在此不再赘述,并以引用的方式包含于此。Further, the embodiment of the present application further provides a more preferred dynamic curve data point updating device. The structure of the device is as shown in FIG. 12, except for the first device 910, the second device 920, and the first device shown in FIG. In addition to the third device 930 and the fourth device 940, a fifth device 950 is also included. Specifically, the fifth device 950 is at the second data point Determining whether the clearing condition is satisfied before displaying the second data point in the display position of the corresponding data period, and if the clearing condition is satisfied, using the starting position of the currently displayed dynamic curve as the data corresponding to the second data point The position of the cycle is displayed and the currently displayed dynamic curve is cleared. Here, those skilled in the art should understand that the first device 910, the second device 920, the third device 930, and the fourth device 940 are respectively the same or substantially the same as the corresponding devices in the embodiment of FIG. 11, for the sake of brevity, It is not described here, and is hereby incorporated by reference.
其中,所述清空条件可以根据实际应用中的需求来设置,例如清空条件可以是当前时间达到第二天的00:00:01,所述当前显示的动态曲线的起始位置即为第一天的00:00:01的位置,即动态曲线仅显示一天的数据,第二天开始时自动清空曲线,重新开始绘制。清空的周期可以根据实际需求设置,除前述的24小时之外,也可以设置为4小时、12小时等等。The clearing condition may be set according to requirements in an actual application. For example, the clearing condition may be that the current time reaches 00:00:01 of the next day, and the starting position of the currently displayed dynamic curve is the first day. The position of 00:00:01, that is, the dynamic curve only shows the data of one day, and the curve is automatically cleared at the beginning of the next day, and the drawing is restarted. The emptying period can be set according to actual needs, and can be set to 4 hours, 12 hours, etc. in addition to the aforementioned 24 hours.
此外,清空条件还可以是用户输入的某些特定操作,例如查看历史曲线数据的切换操作。在此种情形下,由于需要获取历史曲线数据,前述的清除所述当前显示的动态曲线,具体包括:将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线。In addition, the emptying condition may also be some specific operations input by the user, such as switching operation of viewing historical curve data. In this case, because the historical curve data needs to be acquired, the foregoing clearing the currently displayed dynamic curve specifically includes: saving the currently displayed dynamic curve as a historical dynamic curve, and clearing the currently displayed dynamic curve. .
由此,申请实施例还提供了另一种优选的动态曲线的数据点更新设备,该设备的结构如图13所示,除图12示出的第一装置910、第二装置920、第三装置930、第四装置940和第五装置950之外,还包括第六装置960。具体地,所述第六装置960包括第六一模块961和第六二模块962,其中第六一模块961在将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线之后,当获取切换操作时,根据所述切换操作清除当前显示的动态曲线,显示所述历史动态曲线;第六二模块962暂停后续更新时刻对所述数据点进行的更新。Therefore, the application embodiment further provides another preferred dynamic curve data point updating device. The structure of the device is as shown in FIG. 13, except for the first device 910, the second device 920, and the third device shown in FIG. In addition to the device 930, the fourth device 940, and the fifth device 950, a sixth device 960 is further included. Specifically, the sixth device 960 includes a sixth module 961 and a sixth module 962, wherein the sixth module 961 saves the currently displayed dynamic curve as a historical dynamic curve, and clears the currently displayed After the dynamic curve, when the switching operation is acquired, the currently displayed dynamic curve is cleared according to the switching operation, and the historical dynamic curve is displayed; the sixth two module 962 suspends updating of the data point at the subsequent update time.
在此,所述切换操作包括但不限于:操作点在特定位置上的点击或滑动操作、通过交互界面输入的文本指令等。例如,可以在动态曲线的图表界面左侧设置一个左箭头的按钮,当用户的操作点点击该左箭头即为切换操作,点击一次即切换至前一日的动态曲线;再如,切换操作为在动态曲线的图表区域内向左滑动,滑动一次即切换至前一日的动态曲线或者根据滑动的距离切换至不同的历史动态曲线;还如,在提供的交互界面中输入历史动态曲线的编号,即可切换至对应的历史动态曲线。在此,本领域技术人员应能理解上述关于切换操作的描述仅为举例,其他现有的或今后可能出现的切换操作如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。Here, the switching operation includes, but is not limited to, a click or slide operation of the operation point at a specific position, a text instruction input through the interactive interface, and the like. For example, a left arrow button can be set on the left side of the graph interface of the dynamic curve. When the user's operation point clicks the left arrow, it is a switching operation, and once clicked, it switches to the dynamic curve of the previous day; for example, the switching operation is Slide to the left in the chart area of the dynamic curve, slide once to switch to the dynamic curve of the previous day or switch to different historical dynamic curves according to the sliding distance; for example, enter the number of the historical dynamic curve in the provided interactive interface. You can switch to the corresponding historical dynamic curve. Herein, those skilled in the art should understand that the above description about the handover operation is only an example, and other existing or future possible handover operations, as applicable to the present application, are also included in the scope of protection of the present application, and This is hereby incorporated by reference.
其中,将所述当前显示的动态曲线保存为历史动态曲线,包括但不限于以下方式: 仅保存历史动态曲线中各个数据点的信息,或者保存各个数据点以及数据点之间的连线的信息等。若仅保存历史动态曲线中各个数据点的信息,则显示历史动态曲线的具体步骤如下:首先,根据保存的信息生成各个数据点并显示,然后根据数据点生成并显示数据点之间的连线,以展示完整的动态曲线。当然,为了保证数据点与连线可以同步显示,可以在根据保存的信息生成数据点以及连线之后,再同时显示数据点及其连线。若同时保存各个数据点以及数据点之间的连线的信息等,则仅需要获取这些信息,并根据这些信息生成并显示即可。在此,本领域技术人员应能理解上述关于保存历史动态曲线的描述仅为举例,其他现有的或今后可能出现的保存方式如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。The current displayed dynamic curve is saved as a historical dynamic curve, including but not limited to the following manners: Only the information of each data point in the historical dynamic curve is saved, or the information of each data point and the connection between the data points is saved. If only the information of each data point in the historical dynamic curve is saved, the specific steps of displaying the historical dynamic curve are as follows: First, each data point is generated and displayed according to the saved information, and then a connection between the data points is generated and displayed according to the data point. To show the complete dynamic curve. Of course, in order to ensure that data points and connections can be displayed simultaneously, data points and their connections can be displayed simultaneously after data points and connections are generated based on the saved information. If you save each data point and the information of the connection between the data points at the same time, you only need to obtain the information and generate and display it based on the information. Herein, those skilled in the art should understand that the above description about the preservation history dynamic curve is only an example, and other existing or future possible storage methods, as applicable to the present application, should also be included in the scope of protection of the present application. It is hereby incorporated by reference.
由于获取到切换操作后所显示的曲线为历史动态曲线,在达到更新时刻后无需再对当前时间的动态曲线的数据点进行更新,因此在显示所述历史动态曲线之后,暂停后续更新时刻对所述数据点进行的更新。在此,所述更新仅指对数据点在动态曲线中显示的更新,但是在数据源中不会停止数据记录。仍以前述表示某一应用程序在每个小时内新注册的用户数量的应用场景为例,假设历史动态曲线的数据以及数据源中新注册用户数量的数据保存于云端的服务器中,动态曲线通过更新设备上的浏览器显示,新注册用户数量的信息由安装有应用程序的移动终端的发送给服务器并保存于数据源中。在当前时间13:15:16时,若更新设备获取到用户输入的切换操作,更新设备会清除当前显示的动态曲线,同时根据配置的路径信息会由服务器获取保存的历史动态曲线,并在浏览器中显示该历史动态曲线。此时,安装有应用程序的移动终端仍然会向服务器发送新注册用户数量的信息,例如在13:00:01至13:15:15内,已经有5000个新注册的用户,在13:15:16至13:16:11的时间段内新注册的用户又增加了20人,数据源仍然会接收这些信息并进行保存,使得更新设备在需要更新时仍能够得到最新的数据,但是此时显示的动态曲线不会发生变化。Since the curve displayed after the switching operation is a historical dynamic curve, the data points of the dynamic curve of the current time need not be updated after the update time is reached, so after the historical dynamic curve is displayed, the subsequent update time is suspended. The update of the data points. Here, the update refers only to the update of the data point displayed in the dynamic curve, but the data record is not stopped in the data source. For example, the application scenario of the number of newly registered users in an hour is taken as an example. Assume that the data of the historical dynamic curve and the number of newly registered users in the data source are saved in the cloud server, and the dynamic curve is passed. The browser on the update device displays that the information of the number of newly registered users is sent to the server by the mobile terminal on which the application is installed and saved in the data source. At the current time of 13:15:16, if the update device obtains the switching operation of the user input, the update device will clear the currently displayed dynamic curve, and according to the configured path information, the saved historical dynamic curve will be obtained by the server and browsed. This historical dynamic curve is displayed in the device. At this point, the mobile terminal with the application installed will still send the server the information of the number of newly registered users. For example, in 13:00:01 to 13:15:15, there are already 5,000 newly registered users at 13:15. The number of newly registered users has increased by 20 during the period from 16 to 13:16:11. The data source will still receive this information and save it so that the update device can still get the latest data when it needs to be updated, but this time. The displayed dynamic curve does not change.
优选地,所述第六装置还包括第六三模块963和第六四模块964,其具体结构如图14所示。结合图13,所述第六一模块961在将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线之后,当获取切换操作时,根据所述切换操作将所述当前显示的动态曲线保存为第一动态曲线,并清除所述当前显示的动态曲线,显示所述历史动态曲线。而第六三模块963在暂停后续更新时刻对所述数据点进行的更新之后,当获取到恢复操作时,根据所述恢复操作清除当前显示的所述历史动态曲线,显示所述第一动态曲线;第六四模块964恢复后续更新时刻对所述数据点进行的更新。 Preferably, the sixth device further includes a sixth three module 963 and a sixth fourth module 964, and the specific structure thereof is as shown in FIG. 14. With reference to FIG. 13, the sixth module 961 saves the currently displayed dynamic curve as a historical dynamic curve and clears the currently displayed dynamic curve, and when the switching operation is acquired, according to the switching operation The currently displayed dynamic curve is saved as a first dynamic curve, and the currently displayed dynamic curve is cleared, and the historical dynamic curve is displayed. And the sixth dynamic module 963 clears the currently displayed historical dynamic curve according to the recovery operation, and displays the first dynamic curve, after the update of the data point is performed after the subsequent update is paused. The sixth quad module 964 resumes updating the data points at subsequent update times.
通过上述方式,若用户在切换至历史动态曲线之后,想要继续查看当前时间的动态曲线,可以通过恢复操作便捷地实现。与所述切换操作对应地,所述恢复操作包括但不限于:操作点在特定位置上的点击或滑动操作、通过交互界面输入的文本指令等。例如,点击右箭头的操作、在动态曲线的图表区域内向右滑动或者输入第一动态曲线的编号等。接上例,在当前时间13:16:12时,获取到用户输入的恢复操作,更新设备根据所述恢复操作清除当前显示的所述历史动态曲线,并在浏览器中显示所述第一动态曲线,同时恢复后续更新时刻对所述数据点进行的更新。由于在切换至历史动态曲线时(即13:15:16),第一动态曲线显示的数据点为13:15:15更新的数据点(14:00:00,5000),13:16:12时恢复后续更新时刻对所述数据点进行的更新。若13:16:12内又有1个新注册的用户,则该数据周期内的数据点会更新为(14:00:00,5021)。In the above manner, if the user wants to continue to view the dynamic curve of the current time after switching to the historical dynamic curve, it can be conveniently implemented by the recovery operation. Corresponding to the switching operation, the recovery operation includes, but is not limited to, a click or slide operation of the operation point at a specific position, a text instruction input through the interactive interface, and the like. For example, click the operation of the right arrow, swipe right in the chart area of the dynamic curve, or enter the number of the first dynamic curve. In the above example, when the current time is 13:16:12, the recovery operation input by the user is obtained, and the update device clears the currently displayed historical dynamic curve according to the recovery operation, and displays the first dynamic in the browser. The curve, while recovering the update of the data points at the time of subsequent update. Since the data point displayed by the first dynamic curve is 13:15:15 updated data point (14:00:00,5000), 13:16:12 when switching to the historical dynamic curve (ie 13:15:16) The update of the data point is resumed at a subsequent update time. If there is another newly registered user in 13:16:12, the data points in the data cycle will be updated to (14:00:00, 5021).
优选地,本申请实施例还提供了一种更优选的动态曲线的数据点更新设备,该设备的结构如图15所示,除图11示出的第一装置910、第二装置920、第三装置930和第四装置940之外,还包括第七装置970。具体地,所述第七装置970在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之后,生成并显示所述第一数据点与所述第二数据点之间的连线。在此,本领域技术人员应当理解,第一装置910、第二装置920、第三装置930和第四装置940分别与图10实施例中对应装置的内容相同或基本相同,为简明起见,故在此不再赘述,并以引用的方式包含于此。当然,除第一装置910、第二装置920、第三装置930和第四装置940之外,该设备还可以包含前述的第五装置和/或第六装置。Preferably, the embodiment of the present application further provides a more preferred dynamic curve data point updating device. The structure of the device is as shown in FIG. 15, except for the first device 910, the second device 920, and the first device shown in FIG. In addition to the third device 930 and the fourth device 940, a seventh device 970 is also included. Specifically, the seventh device 970 generates and displays between the first data point and the second data point after displaying the second data point in a display position of a data period corresponding to the second data point. Connection. Here, those skilled in the art should understand that the first device 910, the second device 920, the third device 930, and the fourth device 940 are respectively the same or substantially the same as the corresponding devices in the embodiment of FIG. 10, and for the sake of brevity, It is not described here, and is hereby incorporated by reference. Of course, in addition to the first device 910, the second device 920, the third device 930, and the fourth device 940, the device may further include the aforementioned fifth device and/or sixth device.
具体地,当时间达到14:00:01时,由于进入了下一个数据周期,有新的数据点插入到动态曲线下一数据周期的显示位置(即15:00:00处),此时会生成并显示14:00:00位置处的数据点与15:00:00位置处的数据点之间的连线。此外,为了保证动态曲线的实时性,两个数据点之间的连线也会随着数据点的更新而实时更新。例如,14:00:01时,14:00:00位置处的数据点已不做更新,假设其数据点坐标为(14:00:00,5350),15:00:00位置处的数据点坐标为(15:00:00,5352)。当时间又经过一秒达到14:00:02时,14:00:00位置处的数据点15:00:00位置处的数据点在该次更新后由(15:00:00,5352)更新为(15:00:00,5356),那么,(14:00:00,5350)与(15:00:00,5352)之间的连线会实时更新为(14:00:00,5350)与(15:00:00,5356)之间的连线。两个数据点之间的连线可以仅表示数据点所表示的数据之间的变化趋势,而无需表示具体数据,例如越接近两个数据点的位置,该连线的切线越接近水平,越接近两个数据点的中央位置,该连线的 切线越接近垂直。Specifically, when the time reaches 14:00:01, since the next data cycle is entered, a new data point is inserted into the display position of the next data cycle of the dynamic curve (ie, at 15:00:00), and Generates and displays a line between the data point at 14:00:00 and the data point at 15:00:00. In addition, in order to ensure the real-time nature of the dynamic curve, the connection between the two data points will be updated in real time as the data points are updated. For example, at 14:00:01, the data points at 14:00:00 are not updated, assuming data point coordinates (14:00:00, 5350), data points at 15:00:00 The coordinates are (15:00:00, 5352). When the time reaches 14:00:02 in one second, the data point at the 15:00:00 data point at 14:00:00 is updated by (15:00:00,5352) after the update. For (15:00:00, 5356), then the connection between (14:00:00, 5350) and (15:00:00, 5352) will be updated in real time (14:00:00, 5350) Connection with (15:00:00, 5356). The line between the two data points can only represent the trend of change between the data represented by the data points, without representing specific data, for example, the closer to the position of the two data points, the closer the tangent of the line is to the horizontal level, the more Near the center of two data points, the connection The closer the tangent is to the vertical.
进一步地,本申请还提供了另一种更优动态曲线数据点更新设备,该设备的结构如图16所示,除如图9所示第一装置910、第二装置920和第三装置930之外,还包括第八装置980。具体地,所述第四装置940检测用户操作点的位置,当所述用户操作点与所述数据点重合时,在所述用户操作点的位置显示所述数据点对应的数据。由此,使得用户除了获知数据的变化趋势之外,还能够准确的获取数据的准确值。在此,本领域技术人员应当理解,第一装置910、第二装置920和第三装置930分别与图9实施例中对应装置的内容相同或基本相同,为简明起见,故在此不再赘述,并以引用的方式包含于此。当然,除第一装置910、第二装置920和第三装置930之外,该设备还可以包含前述的第四装置、第五装置、第六装置和第七装置中的任意一个或多个。Further, the present application further provides another better dynamic curve data point updating device, the structure of which is shown in FIG. 16, except that the first device 910, the second device 920, and the third device 930 are as shown in FIG. In addition, an eighth device 980 is included. Specifically, the fourth device 940 detects a location of a user operation point, and when the user operation point coincides with the data point, displays data corresponding to the data point at a location of the user operation point. Thereby, the user can accurately obtain the accurate value of the data in addition to the change trend of the data. Here, it should be understood by those skilled in the art that the first device 910, the second device 920, and the third device 930 are the same as or substantially the same as the corresponding devices in the embodiment of FIG. 9, for brevity, and therefore will not be described herein. And is included here by reference. Of course, in addition to the first device 910, the second device 920, and the third device 930, the device may further include any one or more of the foregoing fourth device, fifth device, sixth device, and seventh device.
图17示出了本申请实施例还提供了一种动态曲线的数据点更新设备,该设备包括第九装置1710、第十装置1720和第十一装置1730。具体地,第九装置1710获取用于生成所述动态曲线的实时组件;第十装置1720向所述实时组件写入配置信息;第十一装置1730初始化所述实时组件,根据所述实时组件的配置信息控制前述的设备的运行,从而完成数据点。FIG. 17 shows that the embodiment of the present application further provides a dynamic curve data point updating device, which includes a ninth device 1710, a tenth device 1720, and an eleventh device 1730. Specifically, the ninth device 1710 acquires a real-time component for generating the dynamic curve; the tenth device 1720 writes configuration information to the real-time component; the eleventh device 1730 initializes the real-time component according to the real-time component The configuration information controls the operation of the aforementioned device to complete the data point.
通过实时组件,仅需要写入少量代码,例如自定义的一些配置信息等,即可实现数据点更新的功能,由于大部分程序代码采用了模块化的形式,提高了代码的可读性和可维护性,降低了开发人员对编程知识的依赖程度,提高了开发效率。With real-time components, only a small amount of code needs to be written, such as some custom configuration information, so that the data point update function can be realized. Since most of the program code adopts a modular form, the code is readable and can be improved. Maintainability reduces the developer's dependence on programming knowledge and improves development efficiency.
其中,所述实时组件包括图形展示单元以及功能调用单元。在实际应用中,所述图形展示单元以及功能调用单元可以是预先的程序代码,例如采用HTML(Hyper Text Markup Language,超文本标记语言)以及JavaScript(Java脚本语言),由于JavaScript可以插入到HTML页面中,并且由任意的浏览器执行,通用性较好,并且通过JavaScript编写的Highcharts图表库能够简单便捷的在HTML页面中添加交互性的图表,便于动态曲线的绘制。其中,所述配置信息包括显示参数信息和调用参数信息。在本实施例中,显示参数信息包括但不限于用于调整图表在显示样式的相关参数,例如数据点的样式、颜色、线条的颜色、样式,图表在页面中的位置等,调用参数信息包括但不限于实现功能调用时需要使用到的参数,例如数据源的相关信息、函数的控制参数等。The real-time component includes a graphic display unit and a function calling unit. In practical applications, the graphic display unit and the function calling unit may be pre-program code, for example, using HTML (Hyper Text Markup Language) and JavaScript (Java scripting language), since JavaScript can be inserted into an HTML page. It is executed by any browser and has good versatility. The Highcharts chart library written in JavaScript can easily and conveniently add interactive charts to HTML pages to facilitate the drawing of dynamic curves. The configuration information includes display parameter information and call parameter information. In this embodiment, the display parameter information includes, but is not limited to, related parameters for adjusting the display style of the chart, such as the style of the data point, the color, the color of the line, the style, the position of the chart in the page, etc., and the calling parameter information includes However, it is not limited to parameters that need to be used when implementing function calls, such as information about data sources, control parameters of functions, and so on.
具体地,所述第十一装置1730指示所述功能调用单元根据所述调用参数信息获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,指示所述图形展示单元根据所述显示参数信息生成显示区域并在所述显示区域内显示所述动态曲线;并且指示 所述图形展示单元和功能调用单元控制前述任意一种设备进行对所述动态曲线中数据点的更新。Specifically, the eleventh device 1730 instructs the function invoking unit to acquire data for generating an initial data point according to the invoking parameter information, and generate a dynamic curve including the initial data point, indicating that the graphic display unit is Displaying parameter information to generate a display area and displaying the dynamic curve in the display area; and indicating The graphic display unit and the function calling unit control any one of the foregoing devices to perform updating of data points in the dynamic curve.
本实施例中HTML部分的程序代码主要用于展现图表的外在样式,包括图表的位置、大小等,JavaScript部分的程序代码主要用于实现图表的后台功能,例如获取数据、生成Highcharts图形、调用函数等,图6示出了一张动态曲线图表的示意图,该图表对应的动态组件的程序代码如下,其中HTML部分为:The program code of the HTML part in this embodiment is mainly used to express the external style of the chart, including the position and size of the chart, and the program code of the JavaScript part is mainly used to implement the background function of the chart, such as acquiring data, generating Highcharts graphics, and calling Function, etc., Figure 6 shows a schematic diagram of a dynamic curve chart, the program code of the dynamic component corresponding to the chart is as follows, wherein the HTML part is:
Figure PCTCN2016083083-appb-000004
Figure PCTCN2016083083-appb-000004
在此,“chart1”为HTML DOM(HTML Document Object Model,HTML文档对象模型)节点,展现为图6的整个区域,相当于整个图6的最外层的容器,图中展现的其它内容均包含在区域中。"realTimeArrow"为图中内部元素的类,用于指定图6中的图表显示区域6A以及左右箭头6B、6C的部分显示效果;此外还分别单独规定了左箭头6B、右箭头6C和图表显示区域6A的类,分别为"wdm-left leftArrow-on arrow-icon"、"wdm-right rightArrow arrow-icon"以及和"Chart_area",分别对图表显示区域6A、左箭头6B、右箭头6C的部分显示效果进行了单独指定。"margin-right:25px;"表示图表显示区域6A的右边距为25个像素。"J_Chart_area"为HTML DOM节点,用于展现Highcharts图形(即动态曲线6D),其中HTML DOM用于提供接口,使得程序能够动态地访问和更新HTML页面的内容、结构和样式。在实际应用中,"chart1"、"realTimeArrow"、"wdm-left leftArrow-on arrow-icon"、"wdm-right rightArrow arrow-icon"、"J_Chart_area"以及"chart-area"的无需在程序代码的其它部分单独定义,可以通过下述的JavaScript代码自动扫描并绑定。Here, "chart1" is an HTML DOM (HTML Document Object Model) node, which is presented as the entire area of FIG. 6, which is equivalent to the outermost container of FIG. 6, and other contents shown in the figure include In the area. "realTimeArrow" is a class of internal elements in the figure, and is used to specify the partial display effect of the chart display area 6A and the left and right arrows 6B, 6C in FIG. 6; in addition, the left arrow 6B, the right arrow 6C, and the chart display area are separately defined separately. The 6A class, "wdm-left leftArrow-on arrow-icon", "wdm-right rightArrow arrow-icon", and "Chart_area", respectively display the part of the chart display area 6A, the left arrow 6B, and the right arrow 6C. The effects were individually specified. "margin-right: 25px;" indicates that the right margin of the chart display area 6A is 25 pixels. "J_Chart_area" is an HTML DOM node for presenting Highcharts graphics (ie, dynamic curve 6D), where the HTML DOM is used to provide an interface that enables programs to dynamically access and update the content, structure, and style of HTML pages. In practical applications, "chart1", "realTimeArrow", "wdm-left leftArrow-on arrow-icon", "wdm-right rightArrow arrow-icon", "J_Chart_area", and "chart-area" are not required in the program code. The other sections are defined separately and can be automatically scanned and bound by the JavaScript code below.
而JavaScript调用部分的程序代码为:The program code of the JavaScript call part is:
Figure PCTCN2016083083-appb-000005
Figure PCTCN2016083083-appb-000005
Figure PCTCN2016083083-appb-000006
Figure PCTCN2016083083-appb-000006
在此,在变量rtConfig中,type表示曲线类型,例如hour、min等,其中hour、min分别表示X坐标轴上1小时或者5分钟显示一数据点,即前述的数据周期为1小时或者5分钟。Here, in the variable rtConfig, type represents a curve type, such as hour, min, etc., wherein hour and min respectively indicate that a data point is displayed for 1 hour or 5 minutes on the X coordinate axis, that is, the aforementioned data period is 1 hour or 5 minutes. .
lineParams表示获取曲线时需要传递到浏览器后台的参数集合,其中参数集合内的参数包括日期、版本信息等等。lineParams represents the set of parameters that need to be passed to the background of the browser when the curve is acquired. The parameters in the parameter set include date, version information, and so on.
pointParams表示获取当前更新时刻的数据点时需要传递到后台的参数集合,其中参数集合内的参数包括日期、版本信息等等。pointParams represents a set of parameters that need to be passed to the background when the data point of the current update time is obtained. The parameters in the parameter set include date, version information, and the like.
lineDS表示获取曲线的数据源。lineDS represents the data source for the acquisition curve.
pointDS表示当前更新时刻的数据点的数据源。pointDS represents the data source of the data point at the current update time.
clickLeftCallBack表示点击左箭头获取数据后的回调函数,这里指向函数leftOneCallBack,当arrow为true时有效。clickLeftCallBack indicates that the callback function after clicking the left arrow to get the data, which points to the function leftOneCallBack, is valid when the arrow is true.
clickRightCallBack表示点击右箭头获取数据后的回调函数,这里指向函数rightOneCallBack,当arrow为true时有效。clickRightCallBack indicates the callback function after clicking the right arrow to get the data. This points to the function rightOneCallBack, which is valid when the arrow is true.
offLeftArrow表示点击左箭头时处理函数,这里指向函数leftOne,当arrow为true时有效。offLeftArrow indicates that the processing function is clicked when the left arrow is clicked. This points to the function leftOne, which is valid when the arrow is true.
offRightArrow表示点击右箭头时处理函数,这里指向函数rightOne,当arrow为true时有效。 offRightArrow represents the processing function when clicking the right arrow, which points to the function rightOne, which is valid when the arrow is true.
arrow,可以是true或者false时,当true时表示前述左箭头或右箭头可以点击,并调用相关函数。Arrow, which can be true or false, when true, means that the aforementioned left or right arrow can be clicked and the related function is called.
向所述实时组件写入的配置信息(config)包括但不限于曲线类型type、曲线的颜色、线宽和数据点的颜色、大小、前述的lineParams、pointParams、lineDS、pointDS、JavaScript的相关处理函数、坐标轴的颜色、点形状等信息。The configuration information (config) written to the real-time component includes but is not limited to the curve type type, the color of the curve, the line width and the color and size of the data point, the aforementioned lineParams, pointParams, lineDS, pointDS, and JavaScript related processing functions. , color of the axis, point shape and other information.
图7示出了所述实时组件的初始化流程,包括以下步骤:FIG. 7 shows an initialization process of the real-time component, including the following steps:
步骤S701,根据实时组件的config中的type加载对应的曲线类型配置(profile),例如加载的type为hour。config是实时组件的配置,指定了相关的配置信息,用于在初始化实时组件时使用。profile是实时组件的具体实例,在每次初始化时将config中的相关属性信息写入profile。Step S701, loading a corresponding curve type profile according to the type in the config of the real-time component, for example, the loaded type is hour. Config is the configuration of the real-time component, specifying the relevant configuration information for use when initializing the real-time component. The profile is a concrete instance of the real-time component, and the relevant attribute information in the config is written to the profile at each initialization.
步骤S702,用config中的相关属性覆盖当前profile中的对应属性,其中相关属性可以包括曲线的颜色、线宽和数据点的颜色、大小、等。Step S702, the corresponding attribute in the current profile is overwritten by the related attribute in the config, wherein the related attribute may include the color of the curve, the line width, and the color, size, and the like of the data point.
步骤S703,调用initLine方法初始化数据。其中,所述initLine方法包括:如果当前的HTML页面中已经存在图表(例如前述方法提及的第一动态曲线、历史动态曲线等),则会清空图表,然后根据当前实例的相关属性(如坐标轴的配置信息,包括颜色、点形状),初始化图表对象,再根据config中的lineDS、lineParams异步获取对应的曲线数据,然后根据数据绘制曲线。在实际应用中,当用户点击左箭头获取前一天的历史动态曲线时,由于目前所显示的时当日的动态曲线,此时会清空当日的动态曲线,获取历史动态曲线的数据并显示所述历史动态曲线。In step S703, the initLine method is called to initialize the data. The initLine method includes: if a chart already exists in the current HTML page (such as the first dynamic curve mentioned in the foregoing method, a historical dynamic curve, etc.), the chart is cleared, and then the related attributes (such as coordinates) of the current instance are used. The axis configuration information, including the color, point shape), initialize the chart object, and then asynchronously obtain the corresponding curve data according to lineDS and lineParams in the config, and then draw the curve according to the data. In practical applications, when the user clicks the left arrow to obtain the historical dynamic curve of the previous day, due to the current dynamic curve of the current day, the dynamic curve of the current day is cleared, the data of the historical dynamic curve is acquired, and the history is displayed. Dynamic curve.
步骤S704,调用当前openTimer方法更新数据点。所述openTimer方法的触发通过定时器实现,将定时器逻辑的触发间隔设置为1秒,每次触发时:判断定时器是否为空,如果定时器不为空,则清空定时器,同时新建定时器,执行一次图1或图4所示的数据点更新的处理步骤。Step S704, calling the current openTimer method to update the data point. The trigger of the openTimer method is implemented by using a timer, and the trigger interval of the timer logic is set to 1 second. Each time the trigger is triggered, it is determined whether the timer is empty. If the timer is not empty, the timer is cleared, and the timer is newly created. The processing steps of the data point update shown in FIG. 1 or FIG. 4 are performed once.
步骤S705,确定是否开启箭头,即使得左右箭头是否可点击,如果开启,则执行步骤S706,如果不开启,则完成实时组件的初始化。In step S705, it is determined whether the arrow is turned on, that is, whether the left and right arrows are clickable. If it is turned on, step S706 is performed, and if not, the initialization of the real-time component is completed.
步骤S706,为箭头添加监听程序,使得点击点头时能够触发相关处理逻辑。Step S706, adding a listener to the arrow, so that the relevant processing logic can be triggered when the click is clicked.
图8示出了箭头的监听程序的监听流程,包括以下步骤:Figure 8 shows the listening process of the arrow's listener, including the following steps:
步骤S801,获取到点击操作;Step S801, obtaining a click operation;
步骤S802,判断箭头是否处于不可点击的状态,若为是,则结束监听流程;若为否,执行步骤S803; Step S802, determining whether the arrow is in a non-clickable state, if yes, ending the listening process; if not, executing step S803;
步骤S803,调用函数clickLeftCallBack或者clickRightCallBack,进行处理。在本申请实施例中,clickLeftCallBack函数可以实现前述切换操作的功能,即用于向前翻页,显示历史动态曲线,而clickRightCallBack则可以实现恢复操作的功能,向后翻页直至返回显示当日的动态曲线。In step S803, the function clickLeftCallBack or clickRightCallBack is called to perform processing. In the embodiment of the present application, the clickLeftCallBack function can implement the function of the foregoing switching operation, that is, for turning the page forward and displaying the historical dynamic curve, and clickRightCallBack can implement the function of the recovery operation, turning the page backward until returning to display the dynamic of the day. curve.
步骤S804,调用函数offLeftArrow或者offRightArrow,进行处理。若当前arrow的值为true,则调用上述两个函数的作用为点击左(或右)箭头后将其置为不可点击的状态,若arrow的值为false,点击左(或右)箭头后将其置为可点击的状态。In step S804, the function offLeftArrow or offRightArrow is called to perform processing. If the value of the current arrow is true, then the function of calling the above two functions is to click the left (or right) arrow and set it to be unclickable. If the value of arrow is false, click the left (or right) arrow. It is placed in a clickable state.
步骤S805,调用initLine方法初始化数据。由于在使用clickLeftCallBack或者clickRightCallBack函数后,需要清除并显示曲线,通过initLine方法即可实现曲线的切换。In step S805, the initLine method is called to initialize the data. Since the curve needs to be cleared and displayed after using the clickLeftCallBack or clickRightCallBack function, the curve can be switched by the initLine method.
步骤S806,若点击的是左箭头,则调用closeTimer方法,若点击的是右箭头,则需要判断offRightArrow函数处理后,右箭头还是否可点击,若可点击,则调用closeTimer方法,若不可点击,则调用openTimer方法。其中,openTimer方法用于更新数据点,在实时组件的初始化流程中已经说明,此处不再赘述,closeTimer方法则用于清除定时器,即停止更新数据点,以减少数据处理量,降低处理负荷。Step S806, if the left arrow is clicked, the closeTimer method is called. If the right arrow is clicked, it is necessary to determine whether the right arrow is clickable after the offRightArrow function is processed. If clickable, the closeTimer method is called, if not clickable, Then call the openTimer method. The openTimer method is used to update the data points. It has been described in the initialization process of the real-time component. It will not be described here. The closeTimer method is used to clear the timer, that is, stop updating the data points to reduce the data processing and reduce the processing load. .
综上所述,在本申请提供的技术方案能够获取曲线上最近一个更新时刻的数据点,然后与当前更新时刻生成的数据点进行比较,若属于同一数据周期,则会将新生成的数据点替换原来的数据点,从而实现数据点在一个数据周期内不断进行更新显示,可以更加直观的展现例如某一数据在一定周期内的累积量等信息。此外,本申请提供的另一方案中,通过实时组件仅需要写入少量代码,例如自定义的一些配置信息等,即可实现数据点更新的功能,由于大部分程序代码采用了模块化的形式,提高了代码的可读性和可维护性,降低了开发人员对编程知识的依赖程度,提高了开发效率。In summary, the technical solution provided in the present application can acquire the data points of the latest update time on the curve, and then compare with the data points generated by the current update time. If they belong to the same data cycle, the newly generated data points will be generated. The original data point is replaced, so that the data point is continuously updated and displayed in one data cycle, and the information such as the accumulated amount of a certain data in a certain period can be more intuitively displayed. In addition, in another solution provided by the present application, only a small amount of code, such as customized configuration information, needs to be written by the real-time component to implement the function of updating the data point, since most of the program code adopts a modular form. Improves the readability and maintainability of the code, reduces the developer's dependence on programming knowledge, and improves development efficiency.
需要注意的是,本申请可在软件和/或软件与硬件的组合体中被实施,例如,可采用专用集成电路(ASIC)、通用目的计算机或任何其他类似硬件设备来实现。在一个实施例中,本申请的软件程序可以通过处理器执行以实现上文所述步骤或功能。同样地,本申请的软件程序(包括相关的数据结构)可以被存储到计算机可读记录介质中,例如,RAM存储器,磁或光驱动器或软磁盘及类似设备。另外,本申请的一些步骤或功能可采用硬件来实现,例如,作为与处理器配合从而执行各个步骤或功能的电路。It should be noted that the present application can be implemented in software and/or a combination of software and hardware, for example, using an application specific integrated circuit (ASIC), a general purpose computer, or any other similar hardware device. In one embodiment, the software program of the present application can be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including related data structures) of the present application can be stored in a computer readable recording medium such as a RAM memory, a magnetic or optical drive or a floppy disk and the like. In addition, some of the steps or functions of the present application may be implemented in hardware, for example, as a circuit that cooperates with a processor to perform various steps or functions.
另外,本申请的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本申请的方法和/或技术方案。 而调用本申请的方法的程序指令,可能被存储在固定的或可移动的记录介质中,和/或通过广播或其他信号承载媒体中的数据流而被传输,和/或被存储在根据所述程序指令运行的计算机设备的工作存储器中。在此,根据本申请的一个实施例包括一个装置,该装置包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发该装置运行基于前述根据本申请的多个实施例的方法和/或技术方案。In addition, a portion of the present application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide a method and/or technical solution in accordance with the present application. The program instructions for invoking the method of the present application may be stored in a fixed or removable recording medium, and/or transmitted by a data stream in a broadcast or other signal bearing medium, and/or stored in a The working memory of the computer device in which the program instructions are run. Herein, an embodiment in accordance with the present application includes a device including a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, triggering The apparatus operates based on the aforementioned methods and/or technical solutions in accordance with various embodiments of the present application.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。装置权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。 It is obvious to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the invention is defined by the appended claims instead All changes in the meaning and scope of equivalent elements are included in this application. Any reference signs in the claims should not be construed as limiting the claim. In addition, it is to be understood that the word "comprising" does not exclude other elements or steps. A plurality of units or devices recited in the device claims may also be implemented by a unit or device by software or hardware. The first, second, etc. words are used to denote names and do not denote any particular order.

Claims (26)

  1. 一种动态曲线的数据点更新方法,其中,所述方法包括:A method for updating a data point of a dynamic curve, wherein the method comprises:
    在每一更新时刻,若当前显示的动态曲线存在数据点,则获取所述数据点中前一更新时刻的第一数据点;At each update time, if there is a data point in the currently displayed dynamic curve, the first data point of the previous update time in the data point is acquired;
    根据数据源中当前更新时刻的数据生成第二数据点;Generating a second data point according to data of a current update time in the data source;
    当所述第二数据点与所述第一数据点属于同一数据周期时,在该数据周期的显示位置清除所述第一数据点并显示所述第二数据点。When the second data point and the first data point belong to the same data period, the first data point is cleared and the second data point is displayed at a display position of the data period.
  2. 根据权利要求1所述的方法,其中,根据数据源中当前更新时刻的数据生成第二数据点,包括:The method of claim 1, wherein generating the second data point based on the data of the current update time in the data source comprises:
    根据预先配置的路径由数据源中异步获取当前更新时刻的数据;Obtaining data of the current update time asynchronously from the data source according to the pre-configured path;
    根据所述当前更新时刻的数据生成第二数据点。Generating a second data point according to the data of the current update time.
  3. 根据权利要求1或2所述的方法,其中,获取所述数据点中前一更新时刻的第一数据点之后,还包括:The method according to claim 1 or 2, wherein after acquiring the first data point of the previous update time in the data point, the method further comprises:
    对所述第一数据点进行突出显示。The first data point is highlighted.
  4. 根据权利要求1或2所述的方法,其中,根据数据源中当前更新时刻的数据生成第二数据点之后,还包括:The method according to claim 1 or 2, wherein after generating the second data point according to the data of the current update time in the data source, the method further includes:
    当所述第二数据点与所述第一数据点不属于同一数据周期时,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。When the second data point and the first data point do not belong to the same data period, the second data point is displayed at a display position of a data period corresponding to the second data point.
  5. 根据权利要求3所述的方法,其中,根据数据源中当前更新时刻的数据生成第二数据点之后,还包括:The method of claim 3, wherein after generating the second data point according to the data of the current update time in the data source, the method further comprises:
    当所述第二数据点与所述第一数据点不属于同一数据周期时,取消对所述第一数据点的突出显示,并在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。When the second data point and the first data point do not belong to the same data period, the highlighting of the first data point is cancelled, and the display position of the data period corresponding to the second data point is displayed. The second data point is described.
  6. 根据权利要求4或5所述的方法,其中,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之前,还包括:The method according to claim 4 or 5, wherein before the displaying the second data point in the display position of the data period corresponding to the second data point, the method further comprises:
    判断是否满足清空条件,若满足清空条件,则将所述当前显示的动态曲线的起始位置作为所述第二数据点对应的数据周期的显示位置,并清除所述当前显示的动态曲线。Determining whether the emptying condition is satisfied. If the emptying condition is met, the starting position of the currently displayed dynamic curve is used as the display position of the data period corresponding to the second data point, and the currently displayed dynamic curve is cleared.
  7. 根据权利要求6所述的方法,其中,所述清除所述当前显示的动态曲线,包括:The method of claim 6 wherein said clearing said currently displayed dynamic profile comprises:
    将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线;Saving the currently displayed dynamic curve as a historical dynamic curve, and clearing the currently displayed dynamic curve;
    将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线 之后,还包括:Saving the currently displayed dynamic curve as a historical dynamic curve and clearing the currently displayed dynamic curve After that, it also includes:
    当获取切换操作时,根据所述切换操作清除当前显示的动态曲线,显示所述历史动态曲线;When the switching operation is acquired, the currently displayed dynamic curve is cleared according to the switching operation, and the historical dynamic curve is displayed;
    暂停后续更新时刻对所述数据点进行的更新。Suspending updates to the data points at subsequent update times.
  8. 根据权利要求7所述的方法,其中,当获取切换操作时,根据所述切换操作清除当前显示的动态曲线,并显示所述历史动态曲线,包括:The method according to claim 7, wherein when the switching operation is acquired, the currently displayed dynamic curve is cleared according to the switching operation, and the historical dynamic curve is displayed, including:
    当获取到切换操作时,根据所述切换操作将所述当前显示的动态曲线保存为第一动态曲线,并清除所述当前显示的动态曲线,显示所述历史动态曲线;When the switching operation is acquired, the currently displayed dynamic curve is saved as a first dynamic curve according to the switching operation, and the currently displayed dynamic curve is cleared, and the historical dynamic curve is displayed;
    暂停后续更新时刻对所述数据点进行的更新之后,还包括:After suspending the update of the data point at the time of subsequent update, the method further includes:
    当获取到恢复操作时,根据所述恢复操作清除当前显示的所述历史动态曲线,显示所述第一动态曲线;When the recovery operation is acquired, the currently displayed historical dynamic curve is cleared according to the recovery operation, and the first dynamic curve is displayed;
    恢复后续更新时刻对所述数据点进行的更新。The update of the data points is resumed at a subsequent update time.
  9. 根据权利要求4至8中任一项所述的方法,其中,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之后,还包括:The method according to any one of claims 4 to 8, wherein after the displaying the second data point in the display position of the data period corresponding to the second data point, the method further comprises:
    生成并显示所述第一数据点与所述第二数据点之间的连线。Generating and displaying a connection between the first data point and the second data point.
  10. 根据权利要求1至9中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 9, wherein the method further comprises:
    检测用户操作点的位置,当所述用户操作点与所述数据点重合时,在所述用户操作点的位置显示所述数据点对应的数据。Detecting a location of a user operation point, and when the user operation point coincides with the data point, displaying data corresponding to the data point at a location of the user operation point.
  11. 一种动态曲线的数据点更新方法,其中,该方法包括:A method for updating a data point of a dynamic curve, wherein the method comprises:
    获取用于生成所述动态曲线的实时组件;Obtaining a real-time component for generating the dynamic curve;
    向所述实时组件写入配置信息;Writing configuration information to the real-time component;
    初始化所述实时组件,根据所述实时组件的配置信息执行如权利要求1至10中任一项所述的方法。The real-time component is initialized, and the method according to any one of claims 1 to 10 is performed according to configuration information of the real-time component.
  12. 根据权利要求11所述的方法,其中,所述实时组件包括图形展示单元以及功能调用单元;The method of claim 11 wherein said real time component comprises a graphical presentation unit and a function call unit;
    初始化所述实时组件,根据所述实时组件的配置信息执行如权利要求1至10中任一项所述的方法,包括:Initializing the real-time component, performing the method according to any one of claims 1 to 10 according to the configuration information of the real-time component, comprising:
    根据配置信息由功能调用单元获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,所述图形展示单元生成显示区域并在所述显示区域内显示所述动态曲线; Generating data of the initial data point by the function calling unit according to the configuration information, and generating a dynamic curve including the initial data point, the graphic display unit generating a display area and displaying the dynamic curve in the display area;
    所述图形展示单元和功能调用单元执行如权利要求1至10中任一项所述的方法对所述动态曲线中数据点更新。The graphical display unit and the function invoking unit perform a method according to any one of claims 1 to 10 to update a data point in the dynamic curve.
  13. 根据权利要求12所述的方法,其中,所述配置信息包括显示参数信息和调用参数信息;The method of claim 12, wherein the configuration information comprises display parameter information and call parameter information;
    根据配置信息由功能调用单元获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,由所述图形展示单元生成显示区域并在所述显示区域内显示所述动态曲线包括:Generating data of the initial data point by the function calling unit according to the configuration information, and generating a dynamic curve including the initial data point, generating the display area by the graphic display unit and displaying the dynamic curve in the display area includes:
    所述功能调用单元根据所述调用参数信息获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,所述图形展示单元根据所述显示参数信息生成显示区域并在所述显示区域内显示所述动态曲线。The function invoking unit acquires data for generating an initial data point according to the invoking parameter information, and generates a dynamic curve including the initial data point, and the graphic display unit generates a display area according to the display parameter information and displays the display area The dynamic curve is displayed in the area.
  14. 一种动态曲线的数据点更新设备,其中,所述设备包括:A dynamic curve data point updating device, wherein the device comprises:
    第一装置,用于在每一更新时刻,若当前显示的动态曲线存在数据点,则获取所述数据点中前一更新时刻的第一数据点;a first device, configured to acquire, at each update time, a first data point of a previous update time in the data point if a data point exists in the currently displayed dynamic curve;
    第二装置,用于根据数据源中当前更新时刻的数据生成第二数据点;a second device, configured to generate a second data point according to data of a current update time in the data source;
    第三装置,用于当所述第二数据点与所述第一数据点属于同一数据周期时,在该数据周期的显示位置清除所述第一数据点并显示所述第二数据点。And a third device, configured to: when the second data point and the first data point belong to the same data period, clear the first data point and display the second data point at a display position of the data period.
  15. 根据权利要求14所述的设备,其中,所述第二装置包括:The apparatus of claim 14 wherein said second means comprises:
    第二一模块,用于根据预先配置的路径由数据源中异步获取当前更新时刻的数据;a second module, configured to asynchronously acquire data of a current update time from a data source according to a pre-configured path;
    第二二模块,用于根据所述当前更新时刻的数据生成第二数据点。And a second module, configured to generate a second data point according to the data of the current update time.
  16. 根据权利要求14或15所述的设备,其中,所述第一装置还用于:The device according to claim 14 or 15, wherein the first device is further configured to:
    在获取所述数据点中前一更新时刻的第一数据点之后,对所述第一数据点进行突出显示。After acquiring the first data point of the previous update time in the data point, the first data point is highlighted.
  17. 根据权利要求14或15所述的设备,其中,该设备还包括:The device according to claim 14 or 15, wherein the device further comprises:
    第四装置,用于当所述第二数据点与所述第一数据点不属于同一数据周期时,在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。And a fourth device, configured to: when the second data point and the first data point do not belong to the same data period, display the second data point at a display position of a data period corresponding to the second data point.
  18. 根据权利要求16所述的设备,其中,所述第四装置还用于:The apparatus of claim 16 wherein said fourth means is further for:
    当所述第二数据点与所述第一数据点不属于同一数据周期时,取消对所述第一数据点的突出显示,并在所述第二数据点对应的数据周期的显示位置显示所述第二数据点。When the second data point and the first data point do not belong to the same data period, the highlighting of the first data point is cancelled, and the display position of the data period corresponding to the second data point is displayed. The second data point is described.
  19. 根据权利要求17或18所述的设备,其中,该设备还包括:The device according to claim 17 or 18, wherein the device further comprises:
    第五装置,用于在所述第二数据点对应的数据周期的显示位置显示所述第二数据点 之前,判断是否满足清空条件,若满足清空条件,则将所述当前显示的动态曲线的起始位置作为所述第二数据点对应的数据周期的显示位置,并清除所述当前显示的动态曲线。a fifth device, configured to display the second data point at a display position of a data period corresponding to the second data point Before determining whether the emptying condition is satisfied, if the emptying condition is met, the starting position of the currently displayed dynamic curve is used as the display position of the data period corresponding to the second data point, and the currently displayed dynamic curve is cleared. .
  20. 根据权利要求19所述的设备,其中,所述第五装置,用于将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线;The apparatus according to claim 19, wherein said fifth means is configured to save said currently displayed dynamic curve as a historical dynamic curve and clear said currently displayed dynamic curve;
    所述设备还包括第六装置,该第六装置包括:The device also includes a sixth device, the sixth device comprising:
    第六一模块,用于在将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线之后,当获取切换操作时,根据所述切换操作清除当前显示的动态曲线,显示所述历史动态曲线;a sixth module, configured to: after saving the currently displayed dynamic curve as a historical dynamic curve, and clearing the currently displayed dynamic curve, when acquiring the switching operation, clearing the currently displayed dynamic curve according to the switching operation Displaying the historical dynamic curve;
    第六二模块,用于暂停后续更新时刻对所述数据点进行的更新。The sixth module is configured to suspend updating the data point at a subsequent update time.
  21. 根据权利要求20所述的设备,其中,所述第六一模块,用于:The apparatus according to claim 20, wherein said sixth module is for:
    在将所述当前显示的动态曲线保存为历史动态曲线,并清除所述当前显示的动态曲线之后,当获取切换操作时,根据所述切换操作将所述当前显示的动态曲线保存为第一动态曲线,并清除所述当前显示的动态曲线,显示所述历史动态曲线;After saving the currently displayed dynamic curve as a historical dynamic curve and clearing the currently displayed dynamic curve, when the switching operation is acquired, the currently displayed dynamic curve is saved as the first dynamic according to the switching operation. Curve and clear the currently displayed dynamic curve to display the historical dynamic curve;
    所述第六装置还包括:The sixth device further includes:
    第六三模块,用于在暂停后续更新时刻对所述数据点进行的更新之后,当获取到恢复操作时,根据所述恢复操作清除当前显示的所述历史动态曲线,显示所述第一动态曲线;a sixth module, configured to: after the update of the data point is paused at a time of suspending the subsequent update, when the recovery operation is acquired, clear the currently displayed historical dynamic curve according to the recovery operation, and display the first dynamic curve;
    第六四模块,用于恢复后续更新时刻对所述数据点进行的更新。The sixth four module is configured to restore the update of the data point at a subsequent update time.
  22. 根据权利要求17至21中任一项所述的设备,其中,该设备还包括:The device according to any one of claims 17 to 21, wherein the device further comprises:
    第七装置,用于在所述第二数据点对应的数据周期的显示位置显示所述第二数据点之后,生成并显示所述第一数据点与所述第二数据点之间的连线。a seventh device, configured to generate and display a connection between the first data point and the second data point after displaying the second data point at a display position of a data period corresponding to the second data point .
  23. 根据权利要求14至22中任一项所述的设备,其中,该设备还包括:The device according to any one of claims 14 to 22, wherein the device further comprises:
    第八装置,用于检测用户操作点的位置,当所述用户操作点与所述数据点重合时,在所述用户操作点的位置显示所述数据点对应的数据。The eighth device is configured to detect a location of the user operation point, and when the user operation point coincides with the data point, display data corresponding to the data point at the location of the user operation point.
  24. 一种动态曲线的数据点更新设备,其中,该设备包括:A dynamic curve data point updating device, wherein the device comprises:
    第九装置,用于获取用于生成所述动态曲线的实时组件;a ninth device, configured to acquire a real-time component for generating the dynamic curve;
    第十装置,用于向所述实时组件写入配置信息;a tenth device, configured to write configuration information to the real-time component;
    第十一装置,用于初始化所述实时组件,根据所述实时组件的配置信息控制如权利要求14至23中任一项所述的设备的运行。 An eleventh device for initializing the real-time component, and controlling operation of the device according to any one of claims 14 to 23 according to configuration information of the real-time component.
  25. 根据权利要求24所述的设备,其中,所述实时组件包括图形展示单元以及功能调用单元;The device of claim 24, wherein the real-time component comprises a graphical display unit and a function call unit;
    所述第十一装置,用于:The eleventh device is configured to:
    根据配置信息指示功能调用单元获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,指示所述图形展示单元生成显示区域并在所述显示区域内显示所述动态曲线;Determining, according to the configuration information, the function invoking unit to acquire data of the initial data point, and generating a dynamic curve including the initial data point, instructing the graphic display unit to generate a display area and displaying the dynamic curve in the display area;
    指示所述图形展示单元和功能调用单元控制如权利要求14至23中任一项所述的设备进行对所述动态曲线中数据点的更新。The graphical display unit and the function invoking unit are instructed to control the device of any one of claims 14 to 23 to perform an update of the data points in the dynamic curve.
  26. 根据权利要求25所述的设备,其中,所述配置信息包括显示参数信息和调用参数信息;The device according to claim 25, wherein said configuration information comprises display parameter information and call parameter information;
    所述第十一装置,用于:The eleventh device is configured to:
    指示所述功能调用单元根据所述调用参数信息获取生成初始数据点的数据,并生成包含所述初始数据点的动态曲线,指示所述图形展示单元根据所述显示参数信息生成显示区域并在所述显示区域内显示所述动态曲线;Instructing the function invoking unit to acquire data for generating an initial data point according to the invoking parameter information, and generating a dynamic curve including the initial data point, instructing the graphic display unit to generate a display area according to the display parameter information and Displaying the dynamic curve in the display area;
    指示所述图形展示单元和功能调用单元控制如权利要求14至23中任一项所述的设备进行对所述动态曲线中数据点的更新。 The graphical display unit and the function invoking unit are instructed to control the device of any one of claims 14 to 23 to perform an update of the data points in the dynamic curve.
PCT/CN2016/083083 2015-06-01 2016-05-24 Method and device for updating data point of dynamic curve WO2016192546A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510293409.1 2015-06-01
CN201510293409.1A CN106294463B (en) 2015-06-01 2015-06-01 Data point updating method and equipment for dynamic curve

Publications (1)

Publication Number Publication Date
WO2016192546A1 true WO2016192546A1 (en) 2016-12-08

Family

ID=57440141

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/083083 WO2016192546A1 (en) 2015-06-01 2016-05-24 Method and device for updating data point of dynamic curve

Country Status (2)

Country Link
CN (1) CN106294463B (en)
WO (1) WO2016192546A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220383590A1 (en) * 2019-10-30 2022-12-01 Elpro Gmbh Method for the automated determination of characteristic curves and/or characteristic maps

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590739A (en) * 2017-08-28 2018-01-16 阿里巴巴集团控股有限公司 A kind of method and device of information displaying
CN107679143B (en) * 2017-09-25 2020-12-01 天津同阳科技发展有限公司 Baidu map based dynamic step-by-step loading device and method and readable storage medium
CN112380220A (en) * 2020-11-18 2021-02-19 深圳市极致科技股份有限公司 Data display method, device and equipment
CN112948407B (en) * 2021-03-02 2024-01-23 无锡车联天下信息技术有限公司 Data updating method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110022509A1 (en) * 2005-11-13 2011-01-27 Rosenthal Collins Group, L.L.C. Method and system for electronic trading via a yield curve on plural network devices
CN104918067A (en) * 2014-03-12 2015-09-16 乐视网信息技术(北京)股份有限公司 Method and system for performing curve processing on video hot degree

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877720A (en) * 2010-05-25 2010-11-03 中电投远达环保工程有限公司 B/S structure-based discrete data point curve structural system and structural method thereof
CN102360287B (en) * 2011-09-28 2013-11-13 中国航天科工集团第四研究院第四总体设计部 Curve plotting method used for high-speed real-time emulation
CN104035785B (en) * 2014-07-01 2018-02-06 浪潮(北京)电子信息产业有限公司 Twin shaft curve drawing drawing method and device
CN104394195B (en) * 2014-10-31 2018-05-11 杭州华为企业通信技术有限公司 Data-updating method and device
CN104484376B (en) * 2014-12-05 2018-11-09 北京国双科技有限公司 The method and device of displaying data in real-time
CN108073558A (en) * 2016-11-09 2018-05-25 北京国双科技有限公司 data display method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110022509A1 (en) * 2005-11-13 2011-01-27 Rosenthal Collins Group, L.L.C. Method and system for electronic trading via a yield curve on plural network devices
CN104918067A (en) * 2014-03-12 2015-09-16 乐视网信息技术(北京)股份有限公司 Method and system for performing curve processing on video hot degree

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DUAN, HONGBIN ET AL.: "Synchronized Updates of Word Data with the Use of Excel Statistic Tables and Curves", JOURNAL OF YANG LING VOCATIONAL & TECHNICAL COLLEGE, vol. 4, no. 1, 16 March 2005 (2005-03-16), pages 21, 22 and 29, ISSN: 1671-9131 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220383590A1 (en) * 2019-10-30 2022-12-01 Elpro Gmbh Method for the automated determination of characteristic curves and/or characteristic maps

Also Published As

Publication number Publication date
CN106294463B (en) 2020-02-21
CN106294463A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
US11461536B2 (en) Content manipulation using swipe gesture recognition technology
WO2016192546A1 (en) Method and device for updating data point of dynamic curve
KR101790190B1 (en) Application scenario identification method, power consumption management method, apparatus, and terminal device
US9575652B2 (en) Instantiable gesture objects
US8949739B2 (en) Creating and maintaining images of browsed documents
US8881055B1 (en) HTML pop-up control
US9026992B2 (en) Folded views in development environment
CN106293352B (en) Page construction method, terminal and server
GB2536354A (en) Method for intelligent web reference preloading based on user behavior prediction
WO2016107325A1 (en) Page resource loading method and device based on mobile terminal
US11455075B2 (en) Display method when application is exited and terminal
CN109408162A (en) A kind of method and terminal showing the page
EP3489845A1 (en) Voice broadcast method and apparatus
CN111667199A (en) Workflow construction method and device, computer equipment and storage medium
CN110647704B (en) Page updating method, device and equipment
CN110262749B (en) Webpage operation method, device, container, equipment and medium
WO2017162031A1 (en) Method and device for collecting information, and intelligent terminal
US10402210B2 (en) Optimizing user interface requests for backend processing
CN109948084B (en) Webpage information display method, device, medium and computing equipment
CN114510308B (en) Method, device, equipment and medium for storing application page by mobile terminal
CN108268298B (en) Desktop icon generation method and device, storage medium and electronic equipment
CN106873866B (en) Content amplification display method and device
CN111880889B (en) Interface display method and device, electronic equipment and storage medium
CN113901033A (en) Data migration method, device, equipment and medium
CN113515210A (en) Display method, display device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16802469

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16802469

Country of ref document: EP

Kind code of ref document: A1