Trend chart drawing method and device applied to industrial production system

By applying trend chart drawing methods and devices in industrial production systems, and using a variety of data preprocessing methods to clean tag data, the problem of traditional chart controls being unable to generate accurate charts is solved, and more accurate trend chart drawing and control are achieved. The accuracy of the model.

CN119359857AInactive Publication Date: 2025-01-24SUPCON TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411898195.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, traditional chart controls cannot effectively preprocess the imported bit number data, resulting in inaccurate charts.

Method used

By obtaining the trend chart drawing instructions carrying the specified time period, find and preprocess the tag data within the specified time period, and use a variety of data preprocessing methods (such as removing outliers, first-order filtering, moving average filtering, bandpass filtering ) until the volatility is less than the preset threshold, and then draw the trend chart within the grid drawing area.

Benefits of technology

Through data preprocessing and cleaning of tag data, the generated trend graph is more accurate and reliable, improving the accuracy of the control model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119359857A_ABST
    Figure CN119359857A_ABST
Patent Text Reader

Abstract

The invention relates to a trend chart drawing method and device applied to an industrial production system. The method comprises the following steps: acquiring a trend chart drawing instruction carrying a specified time period; searching a plurality of pieces of preprocessed bit number data in a specified time period from all the preprocessed bit number data; wherein each piece of pre-processed bit number data in the plurality of pieces of pre-processed bit number data is obtained by pre-processing original bit number data of which the volatility is greater than or equal to a preset volatility threshold value through at least one data pre-processing method; determining a grid drawing area of the trend chart, drawing grid lines in the grid drawing area, setting a coordinate axis at the edge of the grid drawing area, and according to the coordinate axis and the sequence of the acquisition time of the plurality of preprocessed bit number data in a specified time period, acquiring the bit number data according to the sequence of the acquisition time of the plurality of preprocessed bit number data; and drawing the plurality of preprocessed bit number data in the specified time period into the grid drawing area to form the trend chart, so that the accurate and reliable trend chart can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial production, and in particular to a method and device for drawing a trend graph applied to an industrial production system. Background Art

[0002] Currently, the existing chart drawing method is to draw a chart on the imported original position number data through traditional chart controls (for example, line chart, bar chart and EXCEL, etc.).

[0003] However, since the original position number data of the production equipment is complicated (that is, it contains dirty data), and the traditional chart controls cannot pre-process the imported position number data, the generated charts are inaccurate. Summary of the invention

[0004] 1. Technical issues to be resolved In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a method and device for drawing a trend chart applied to an industrial production system, which solves the technical problem of inaccurate charts generated in the prior art.

[0005] (II) Technical solution In order to achieve the above object, the main technical solutions adopted by the present invention include: In a first aspect, an embodiment of the present invention provides a method for drawing a trend graph applied to an industrial production system, comprising: obtaining a trend graph drawing instruction carrying a specified time period; searching for multiple preprocessed position number data within the specified time period from all preprocessed position number data; wherein each of the multiple preprocessed position number data is obtained by preprocessing original position number data having a volatility greater than or equal to a preset volatility threshold by at least one data preprocessing method; determining a grid drawing area for the trend graph, drawing grid lines within the grid drawing area, setting a coordinate axis at the edge of the grid drawing area, and drawing the multiple preprocessed position number data within the specified time period into the grid drawing area according to the order of the coordinate axis and the collection time of the multiple preprocessed position number data within the specified time period to form a trend graph.

[0006] In one possible embodiment, the preprocessing process of the original position number data is as follows: obtaining the original position number data within a preset time period; calculating the volatility of the original position number data within the preset time period; when the volatility of the original position number data within the preset time period is greater than or equal to a preset volatility threshold, performing multiple preprocessing on the original position number data within the preset time period until the volatility of the final preprocessed position number data is less than the preset volatility threshold, then stopping the preprocessing process of the original position number data within the preset time period; wherein the data preprocessing method used for each preprocessing in the multiple preprocessing is different.

[0007] In a possible embodiment, the multiple data preprocessing methods include but are not limited to a method for eliminating outliers, a first-order filtering method, a sliding average filtering method, and a bandpass filtering method.

[0008] In a possible embodiment, according to the order of the acquisition time of the plurality of preprocessed bit number data within the specified time period and the coordinate axis, the plurality of preprocessed bit number data within the specified time period are drawn into the grid drawing area to form a trend graph, including: constructing trend graph point information corresponding to each preprocessed bit number data in sequence according to the total number of data points of the plurality of preprocessed bit number data within the specified time period; wherein the trend graph point information includes an initial X-axis value, an initial Y-axis value, a quality code, a trend line to which the trend point belongs, and a starting point type; based on the trend graph point information, updating the start time and end time of the X-axis of the coordinate axis; based on the acquisition time, start time and end time of each preprocessed bit number data, calculating the X-axis coordinate scale coefficient, and based on the X-axis coordinate scale coefficient, Calculate the position of each preprocessed bit number data on the X-axis; calculate the Y-axis coordinate scale coefficient based on the data value of each preprocessed bit number data, the data value of the largest bit number data among the multiple preprocessed bit number data within the specified time period, and the data value of the smallest bit number data among the multiple preprocessed bit number data within the specified time period, and calculate the position of each preprocessed bit number data on the Y-axis based on the Y-axis coordinate scale coefficient; draw a trend chart according to the sequence of acquisition time of the multiple preprocessed bit number data within the specified time period, the position of each preprocessed bit number data on the X-axis, and the position of each preprocessed bit number data on the Y-axis, and during the drawing process, if it is determined that the quality code corresponding to the current preprocessed bit number data is 0, the drawn area is marked with a color.

[0009] In a possible embodiment, the calculation expression of the position of the current preprocessed bit number data on the X-axis is: X d =X k ×b+X 左 ; Where, X dIndicates the position of the current preprocessed bit number data on the X axis; X k represents the X-axis coordinate scale factor; b represents the width of the trend graph grid drawing area; X 左 Indicates the X coordinate of the left edge of the trend graph grid drawing area.

[0010] In a possible embodiment, the calculation expression of the position of the current preprocessed bit number data on the Y axis is: Y d =DY k ×h; Where Y d Indicates the position of the current pre-processed bit number data on the Y axis; D indicates the bottom position of the trend graph grid drawing area; Y k Indicates the Y-axis coordinate scale factor; h indicates the height of the trend chart grid drawing area.

[0011] In a possible embodiment, when displaying the trend chart through a single coordinate system, the drawing method further includes: obtaining a dual-coordinate display instruction carrying the selected data in the chart; wherein the selected data in the chart is the data selected by the user from the trend chart when the trend chart is displayed through a single coordinate system; based on the dual-coordinate display instruction, deleting the data corresponding to the selected data in the chart in the trend chart, establishing another coordinate system in the trend chart, and displaying the data corresponding to the selected data in the chart in the other coordinate system.

[0012] In a second aspect, an embodiment of the present application provides a trend chart drawing device for use in an industrial production system, comprising: an acquisition module for acquiring a trend chart drawing instruction carrying a specified time period; a search module for searching for multiple preprocessed position number data within a specified time period from all preprocessed position number data; wherein each of the multiple preprocessed position number data is obtained by preprocessing original position number data having a volatility greater than or equal to a preset volatility threshold by at least one data preprocessing method; a drawing module for determining a grid drawing area for the trend chart, drawing grid lines within the grid drawing area, setting a coordinate axis at the edge of the grid drawing area, and drawing the multiple preprocessed position number data within the specified time period into the grid drawing area according to the order of the acquisition time of the coordinate axis and the multiple preprocessed position number data within the specified time period to form a trend chart.

[0013] In one possible embodiment, the drawing device includes: a preprocessing module for original position number data, which is used to obtain the original position number data within a preset time period; calculate the volatility of the original position number data within the preset time period; when the volatility of the original position number data within the preset time period is greater than or equal to a preset volatility threshold, perform multiple preprocessing on the original position number data within the preset time period until the volatility of the final preprocessed position number data is less than the preset volatility threshold, then stop the preprocessing process of the original position number data within the preset time period; wherein the data preprocessing method used for each preprocessing in the multiple preprocessing is different.

[0014] In a possible embodiment, the multiple data preprocessing methods include but are not limited to a method for eliminating outliers, a first-order filtering method, a sliding average filtering method, and a bandpass filtering method.

[0015] In a third aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, and the computer program is executed by a processor to execute the method described in the first aspect or any optional implementation of the first aspect.

[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the method described in the first aspect or any optional implementation method of the first aspect is performed.

[0017] In a fifth aspect, the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.

[0018] (III) Beneficial effects The beneficial effects of the present invention are: The embodiment of the present application provides a method and device for drawing a trend graph in a system, by obtaining a trend graph drawing instruction carrying a specified time period, and searching for multiple preprocessed position number data within the specified time period from all preprocessed position number data, wherein each of the multiple preprocessed position number data is obtained by preprocessing original position number data with a volatility greater than or equal to a preset volatility threshold by at least one data preprocessing method, and determining a grid drawing area for the trend graph, drawing grid lines in the grid drawing area, setting a coordinate axis at the edge of the grid drawing area, and drawing the multiple preprocessed position number data within the specified time period into the grid drawing area according to the sequence of the acquisition time of the coordinate axis and the multiple preprocessed position number data within the specified time period to form a trend graph, so that the position number data can be cleaned by preprocessing, and then reasonable position number data can be obtained for identification, and an accurate and reliable trend graph can be obtained, thereby improving the accuracy of the control model.

[0019] In order to make the above-mentioned objectives, features and advantages to be achieved by the embodiments of the present application more obvious and understandable, the following specifically cites preferred embodiments and describes them in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A flow chart of a method for drawing a trend chart applied to an industrial production system provided by an embodiment of the present application is shown; Figure 2 A structural block diagram of a trend graph drawing device applied to an industrial production system provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0022] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.

[0023] In addition to the problem of inaccuracy, the existing chart drawing methods also have the following problems: traditional chart controls have poor visualization and readability of position number data, cannot allow users to quickly capture key information and changes in the data, and cannot meet the user's business scenarios.

[0024] Based on this, an embodiment of the present application provides a method and device for drawing a trend graph in a system, by obtaining a trend graph drawing instruction carrying a specified time period, and searching for multiple preprocessed position number data within the specified time period from all preprocessed position number data, wherein each of the multiple preprocessed position number data is obtained by preprocessing the original position number data with a volatility greater than or equal to a preset volatility threshold by at least one data preprocessing method, and determining a grid drawing area for the trend graph, drawing grid lines in the grid drawing area, setting a coordinate axis at the edge of the grid drawing area, and drawing the multiple preprocessed position number data within the specified time period into the grid drawing area according to the sequence of the acquisition time of the coordinate axis and the multiple preprocessed position number data within the specified time period to form a trend graph, so that the position number data can be cleaned by preprocessing, and then reasonable position number data can be obtained for identification, and an accurate and reliable trend graph can be obtained, thereby improving the accuracy of the control model.

[0025] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0026] See also Figure 1 , Figure 1 A flow chart of a method for drawing a trend chart applied to an industrial production system provided by an embodiment of the present application is shown. It should be understood that the drawing method can be executed by a drawing device for a trend chart applied to an industrial production system, and the specific device of the drawing device can be set according to actual needs, and the embodiment of the present application is not limited thereto. For example, the drawing device can be a computer, or a server, etc. Specifically, the drawing method includes: Step S110, obtaining a trend graph drawing instruction carrying a specified time period.

[0027] It should be understood that the specific time period of the designated time period can be set according to actual needs, and the embodiments of the present application are not limited to this.

[0028] For example, users can select data within any specified time period for visualization based on business needs.

[0029] Step S120, searching for multiple preprocessed bit number data within a specified time period from all preprocessed bit number data, wherein each of the multiple preprocessed bit number data is obtained by preprocessing original bit number data having a volatility greater than or equal to a preset volatility threshold using at least one data preprocessing method.

[0030] That is to say, for the original position number data of the present application, all the original position number data are preprocessed first, and then the preprocessed position number data are used to draw a trend graph.

[0031] It should be understood that the preprocessing process of the original bit number data can be set according to actual needs, and the embodiments of the present application are not limited to this.

[0032] Optionally, the original position number data within a preset time period is obtained; the volatility of the original position number data within the preset time period is calculated; when the volatility of the original position number data within the preset time period is greater than or equal to a preset volatility threshold, the original position number data within the preset time period is preprocessed multiple times until the volatility of the final preprocessed position number data is less than the preset volatility threshold, and then the preprocessing process of the original position number data within the preset time period is stopped; wherein the data preprocessing method used for each preprocessing in the multiple preprocessings is different. Among them, the multiple data preprocessing methods include but are not limited to methods for eliminating wild values ​​(or bad values), first-order filtering methods, sliding average filtering methods, and bandpass filtering methods.

[0033] For example, for the preprocessing process of the original bit number data, it is processed according to the preset time period. And, when the original bit number data within the preset time period is obtained, the first volatility of the original bit number data within the preset time period can be calculated, and it is determined whether the first volatility is greater than or equal to the preset volatility threshold. If the first volatility is less than the preset volatility threshold, it ends; if the first volatility is greater than or equal to the preset volatility threshold, the bit number data within the preset time period is automatically processed by removing wild values, and the second volatility of the bit number data within the preset time period after the first preprocessing is calculated, and it is determined whether the second volatility is greater than or equal to the preset volatility threshold. If the second volatility is less than the preset volatility threshold, it ends; if the second volatility is greater than or equal to the preset volatility threshold, the first-order filtering processing method is automatically used again to process the bit number data within the preset time period after the first preprocessing, and the third volatility of the bit number data within the preset time period after the second preprocessing is calculated, and it is determined whether the third volatility is greater than or equal to the preset volatility threshold. If the third volatility is less than the preset volatility threshold, the process ends; if the third volatility is greater than or equal to the preset volatility threshold, the sliding average filter is automatically used again to process the bit number data within the preset time period after the second preprocessing, and the fourth volatility of the bit number data within the preset time period after the third preprocessing is calculated, and it is determined whether the fourth volatility is greater than or equal to the preset volatility threshold. If the fourth volatility is less than the preset volatility threshold, the process ends; if the second volatility is greater than or equal to the preset volatility threshold, the bandpass filter is automatically used again to process the bit number data within the preset time period after the third preprocessing, and the fifth volatility of the bit number data within the preset time period after the fourth preprocessing is calculated, and it is determined whether the fifth volatility is greater than or equal to the preset volatility threshold. If the fifth volatility is less than the preset volatility threshold, the process ends; if the fifth volatility is still greater than or equal to the preset volatility threshold, the entire segment of the original bit number data within the preset time period is set to a bad value.

[0034] It should be noted here that although the above preprocessing order is described in the order of eliminating outliers, first-order filtering, sliding average filtering and bandpass filtering, technicians in this field can adjust the preprocessing order, and the embodiments of the present application are not limited to this.

[0035] It should be understood that the specific time period of the preset time period and the specific value of the preset volatility threshold can be set according to actual needs, and the embodiments of the present application are not limited thereto.

[0036] For example, the preset volatility threshold may be 30%.

[0037] It should also be understood that the volatility calculation process can also be set according to actual needs, and the embodiments of the present application are not limited to this.

[0038] For example, for the first volatility, the average value of all original position number data within a preset time period can be calculated, and each original position number data can be compared with the average value to determine the number of fluctuation data in all original position number data, and the quotient of the number of fluctuation data and the total number of original position number data can be calculated, and the quotient can be used as the first volatility.

[0039] Correspondingly, the calculation process of other volatility is similar and will not be described one by one later. For details, please refer to the relevant description of the first volatility.

[0040] Step S130, determine the grid drawing area of ​​the trend graph, draw grid lines in the grid drawing area, set coordinate axes at the edges of the grid drawing area, and draw multiple preprocessed bit number data within the specified time period into the grid drawing area according to the coordinate axes and the sequence of acquisition time of multiple preprocessed bit number data within the specified time period to form a trend graph.

[0041] It should be understood that the grid drawing area may refer to an area covered by grid lines, and the bottom of the grid drawing area may be the X-axis, while the left side of the grid drawing area may be the Y-axis.

[0042] It should also be understood that the specific steps of step S130 can be set according to actual needs, and the embodiments of the present application are not limited to this.

[0043] Optionally, according to the total number of data points of multiple preprocessed position number data within a specified time period, the trend chart point information corresponding to each preprocessed position number data is constructed in sequence; wherein the trend chart point information includes an initial X-axis value, an initial Y-axis value, a quality code, a trend line to which the trend point belongs, and a starting point type; based on the trend chart point information, the start time and the end time of the X-axis of the coordinate axis are updated; based on the acquisition time, start time and end time of each preprocessed position number data, the X-axis coordinate scale coefficient is calculated, and based on the X-axis coordinate scale coefficient, the position of each preprocessed position number data on the X-axis is calculated; based on the data value of each preprocessed position number data, the specified time The Y-axis coordinate scale coefficient is calculated based on the data value of the largest bit number data among the multiple preprocessed bit number data within the specified time period and the data value of the smallest bit number data among the multiple preprocessed bit number data within the specified time period, and the position of each preprocessed bit number data on the Y-axis is calculated based on the Y-axis coordinate scale coefficient; a trend graph is drawn according to the sequence of acquisition time of the multiple preprocessed bit number data within the specified time period, the position of each preprocessed bit number data on the X-axis, and the position of each preprocessed bit number data on the Y-axis, and during the drawing process, if it is determined that the quality code corresponding to the current preprocessed bit number data is 0, the drawn area is marked with color.

[0044] For example, the grid drawing area is calculated dynamically. The drawing of the grid drawing area mainly includes a series of drawing strategies such as optimizing the upper and lower limits of the trend chart and automatically increasing and decreasing the number of grids in the trend chart. Then, after calculating the grid drawing area, the color of the grid lines, the number of grids on the vertical axis and the number of grids on the horizontal axis are drawn. The grid scales of the horizontal and vertical axes are drawn, the coordinates of the horizontal axis scale are calculated, the corresponding time is drawn, the coordinates of the vertical axis scale are calculated, and the corresponding values ​​are drawn. Users can draw titles on any side of the trend chart, including the top, bottom, left, or right, according to business needs. The default title is displayed at the top.

[0045] Subsequently, according to the total number of data points of the plurality of preprocessed bit number data within the specified time period (i.e., the total number of bit number data), the trend chart point information corresponding to each preprocessed bit number data is sequentially constructed. The trend chart point information includes, but is not limited to, the initial X-axis value (i.e., the acquisition time of the preprocessed bit number data), the initial Y-axis value (i.e., the specific value of the preprocessed bit number data), the quality code (i.e., whether the preprocessed bit number data is credible), the trend line to which the trend point belongs (i.e., the trend chart may include multiple trend lines, and the trend line to which the trend point corresponding to each preprocessed bit number data belongs) and the starting point type (i.e., the trend chart may include multiple trend lines, and the starting point of each trend line can indicate the type of the corresponding trend chart. For example, the starting point type may be a process value PV type, a set target value SV type, a set target value SP type, etc.).

[0046] Then, after determining the trend graph point information corresponding to all pre-processed position number data, the start time and end time of the X axis of the coordinate axis can be updated. For example, after the update, it is determined that the start time of all pre-processed position number data is 14:59:23 on the 6th, and the end time of all pre-processed position number data can be 14:59:23 on the 21st, so the start time of the X axis can be 14:59:23 on the 6th, and the end time of the X axis can be 14:59:23 on the 21st.

[0047] Subsequently, based on the acquisition time, start time and end time of each preprocessed position number data, the X-axis coordinate proportional coefficient is calculated, and the calculation expression of the X-axis coordinate proportional coefficient is as follows: (curTime-minTime) / (maxTime-minTime); Where curTime represents the acquisition time of each preprocessed bit number data; minTime represents the start time of the X-axis; and maxTime represents the end time of the X-axis.

[0048] And, based on the X-axis coordinate scale coefficient, the position of each preprocessed bit number data on the X-axis is calculated, and the calculation expression of the position of the current preprocessed bit number data on the X-axis is: X d =X k ×b+X 左 ; Where, X d Indicates the position of the current preprocessed bit number data on the X axis; X k represents the X-axis coordinate scale factor; b represents the width of the trend graph grid drawing area; X 左 Indicates the X coordinate of the left edge of the trend graph grid drawing area.

[0049] It should be noted here that b represents the width of the drawing area, which is different from the width of the drawing trend chart. b includes Y, which is similar to adding a layer to the drawing trend chart area.

[0050] Subsequently, considering that the Y axis can be a proportional coefficient (for example, 0% to 100%, etc.), the Y axis coordinate proportional coefficient is calculated based on the data value of each preprocessed position number data, the data value of the largest position number data among the multiple preprocessed position number data within the specified time period, and the data value of the smallest position number data among the multiple preprocessed position number data within the specified time period, and the expression of the Y axis coordinate proportional coefficient is as follows: (curValue-minValue) / (maxValue-minValue); Wherein, curValue represents the data value of the current preprocessed bit number data; minValue represents the minimum value of all preprocessed bit number data; and maxValue represents the maximum value of all preprocessed bit number data.

[0051] And, based on the Y-axis coordinate scale coefficient, the position of each preprocessed bit number data on the Y-axis is calculated, and the calculation expression of the position of the current preprocessed bit number data on the X-axis is: Y d =DY k ×h; Where Y d Indicates the position of the current pre-processed bit number data on the Y axis; D indicates the bottom position of the trend graph grid drawing area; Y k Indicates the Y-axis coordinate scale factor; h indicates the height of the trend chart grid drawing area.

[0052] Subsequently, the initial X-axis value in the trend graph point information may be replaced with the position of the corresponding preprocessed bit number data on the X-axis, and the initial Y-axis value in the trend graph point information may be replaced with the position of the corresponding preprocessed bit number data on the X-axis to obtain updated trend graph point information. Subsequently, a trend graph may be drawn based on the updated trend graph point information.

[0053] In addition, users can hold down the left mouse button on the trend chart to drag (select an area) according to the business scenario, and right-click the selected area to select the zoom-in or zoom-out function. In addition, users can select the right-click restore function to restore the trend chart to its initial state (for example, return to the non-zoomed state after zooming in).

[0054] In addition, in addition to the zooming function, the trend chart also has other functions. For example, in the case of displaying the trend chart through a single coordinate system, the drawing method further includes: obtaining a dual-coordinate display instruction carrying the selected data in the figure; wherein the selected data in the figure is the data selected by the user from the trend chart when the trend chart is displayed through a single coordinate system (for example, in the case of the trend chart including multiple trend lines, some of the multiple trend lines can be used as the selected data in the figure, and some trend point data in a trend line can also be used as the selected data in the figure); based on the dual-coordinate display instruction, deleting the data corresponding to the selected data in the figure in the trend chart (that is, deleting the relevant data in the current single coordinate system), and establishing another coordinate system in the trend chart (for example, in the case of the single coordinate being constructed with the left and bottom of the grid drawing area, the other coordinate system is constructed with the top and right of the grid drawing area), and displaying the data corresponding to the selected data in the figure in the other coordinate system, that is, the other coordinate system is the same as the previous single coordinate, so there is no need to process the selected data, and it can be directly drawn in the other coordinate system.

[0055] It should be noted here that this application can realize a multifunctional and highly visualized trend chart module based on the bit number data, automatically pre-process the bit number data, thereby obtaining reasonable data for identification, and finally obtaining a reasonable and reliable identification model. In addition, according to different business needs, the display style of the bit number data can be set in the trend chart page, making the data points more clearly visible, allowing users to capture key information and changes in the data more quickly, and greatly improving the work efficiency of operators.

[0056] Therefore, compared with traditional chart controls, when operators select multiple bit number data for trend charts, they cannot process the bit number data, cannot perform conventional functional operations on the trend chart, and cannot meet the business needs of operators. The present invention automatically filters the bit number data and removes wild values / bad values ​​according to the business scenarios of the operators, so as to obtain more reasonable bit number data. In the trend chart interface, the display style of the bit number data is set according to different business scenarios, allowing users to capture key information and changes in the data more quickly, thereby greatly improving work efficiency.

[0057] In addition, this application can realize trend chart viewing and bit number data comparison for multiple bit number data according to different application scenarios, and significantly improve the readability of data by using contrasting colors, vertical labels, and ensuring that the X-axis starts at time and other design techniques. The functional design principle of being able to zoom in, zoom out, and set graphics directly on the trend chart not only makes the data points more clearly visible, but also allows users to capture key information and changes in the data more quickly, greatly improving the work efficiency of operators.

[0058] It should be understood that the above-mentioned method for drawing a trend chart applied to an industrial production system is only exemplary, and those skilled in the art may make various modifications based on the above-mentioned method, and the modified scheme also falls within the protection scope of the present application.

[0059] See also Figure 2 , Figure 2 The structural block diagram of a trend chart drawing device 200 for use in an industrial production system provided by an embodiment of the present application is shown. It should be understood that the drawing device 200 can perform each step in the above method embodiment. The specific functions of the drawing device 200 can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here. The drawing device 200 includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the drawing device 200. Specifically, the drawing device 200 includes: An acquisition module 210 is used to acquire a trend graph drawing instruction carrying a specified time period; A search module 220 is used to search for multiple preprocessed bit number data within a specified time period from all preprocessed bit number data; wherein each of the multiple preprocessed bit number data is obtained by preprocessing the original bit number data having a volatility greater than or equal to a preset volatility threshold value using at least one data preprocessing method; The drawing module 230 is used to determine the grid drawing area of ​​the trend graph, draw grid lines in the grid drawing area, set coordinate axes at the edges of the grid drawing area, and draw multiple pre-processed bit number data within the specified time period into the grid drawing area according to the coordinate axes and the sequence of the acquisition time of the multiple pre-processed bit number data within the specified time period to form a trend graph.

[0060] In a possible embodiment, the drawing device 200 includes: a preprocessing module (not shown) for raw position number data, which is used to obtain raw position number data within a preset time period; calculate the volatility of the raw position number data within the preset time period; when the volatility of the raw position number data within the preset time period is greater than or equal to a preset volatility threshold, perform multiple preprocessing on the raw position number data within the preset time period until the volatility of the final preprocessed position number data is less than the preset volatility threshold, and then stop the preprocessing process of the raw position number data within the preset time period; wherein the data preprocessing method used for each preprocessing in the multiple preprocessing is different.

[0061] In a possible embodiment, the multiple data preprocessing methods include but are not limited to a method for eliminating outliers, a first-order filtering method, a sliding average filtering method, and a bandpass filtering method.

[0062] Since the device described in the above embodiment of the present invention is a device used to implement the method of the above embodiment of the present invention, based on the method described in the above embodiment of the present invention, a person skilled in the art can understand the specific structure and deformation of the device, so it is not described here. All devices used in the method of the above embodiment of the present invention belong to the scope of protection of the present invention.

[0063] The present application provides a storage medium having a computer program stored thereon. The computer program is executed by a processor to execute the method described in the embodiment.

[0064] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the method embodiment.

[0065] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0066] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions.

[0067] It should be noted that the word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising a number of different components and by means of a suitably programmed computer. Among the several means listed, several of these means may be embodied by the same hardware. The use of the words first, second, third, etc., is for convenience only and does not indicate any order. These words may be understood as part of the name of the component.

[0068] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0069] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the technical solution should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.

[0070] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention belong to the scope of the technical solution of the present invention and its equivalent technology, the present invention should also include these modifications and variations.

Claims

1. A method for drawing a trend graph in an industrial production system, characterized in that: include: Get the trend chart drawing instruction with the specified time period; Searching for multiple preprocessed bit number data within the specified time period from all preprocessed bit number data; wherein each of the multiple preprocessed bit number data is obtained by preprocessing original bit number data having a volatility greater than or equal to a preset volatility threshold value using at least one data preprocessing method; Determine a grid drawing area for the trend graph, draw grid lines within the grid drawing area, set a coordinate axis at the edge of the grid drawing area, and draw multiple preprocessed bit number data within the specified time period into the grid drawing area according to the sequence of the acquisition time of the coordinate axis and the multiple preprocessed bit number data within the specified time period to form the trend graph.

2. The drawing method according to claim 1, characterized in that: The preprocessing process of the original bit number data: Get the original position number data within the preset time period; Calculating the fluctuation rate of the original bit number data within the preset time period; When the volatility of the original position number data within the preset time period is greater than or equal to the preset volatility threshold, the original position number data within the preset time period is preprocessed multiple times until the volatility of the final preprocessed position number data is less than the preset volatility threshold, and then the preprocessing process of the original position number data within the preset time period is stopped; wherein the data preprocessing method used for each of the multiple preprocessings is different.

3. The drawing method according to claim 2, characterized in that: The various data preprocessing methods include but are not limited to methods for eliminating outliers, first-order filtering methods, sliding average filtering methods, and bandpass filtering methods.

4. The drawing method according to claim 1, characterized in that: The method of drawing the plurality of pre-processed position number data within the specified time period into the grid drawing area according to the order of the acquisition time of the plurality of pre-processed position number data within the specified time period to form the trend graph includes: According to the total number of data points of the plurality of preprocessed bit number data within the specified time period, sequentially construct the trend graph point information corresponding to each of the preprocessed bit number data; wherein the trend graph point information includes an initial X-axis value, an initial Y-axis value, a quality code, a trend line to which the trend point belongs, and a starting point type; Based on the trend graph point information, the start time and end time of the X axis of the coordinate axis are updated; Calculate an X-axis coordinate scale factor based on the acquisition time of each preprocessed bit number data, the start time and the end time, and calculate the position of each preprocessed bit number data on the X-axis based on the X-axis coordinate scale factor; Calculate the Y-axis coordinate scale coefficient based on the data value of each preprocessed position number data, the data value of the largest position number data among the multiple preprocessed position number data within the specified time period, and the data value of the smallest position number data among the multiple preprocessed position number data within the specified time period, and calculate the position of each preprocessed position number data on the Y-axis based on the Y-axis coordinate scale coefficient; The trend graph is drawn according to the sequence of collection time of multiple preprocessed bit number data within a specified time period, the position of each preprocessed bit number data on the X-axis, and the position of each preprocessed bit number data on the Y-axis. During the drawing process, if it is determined that the quality code corresponding to the current preprocessed bit number data is 0, the drawn area is marked with color.

5. The drawing method according to claim 4, characterized in that: The calculation expression of the position of the preprocessed position number data on the X-axis is: X d =X k ×b+X 左 ; Where, X d Indicates the position of the pre-processed bit number data on the X axis; k represents the X-axis coordinate scale factor; b represents the width of the trend graph grid drawing area; X 左 Indicates the X coordinate of the left edge of the trend graph grid drawing area.

6. The drawing method according to claim 4, characterized in that: The calculation expression of the position of the preprocessed bit number data on the Y axis is: Y d =D-Y k ×h; Where Y d represents the position of the pre-processed bit number data on the Y axis; D represents the bottom position of the trend graph grid drawing area; Y k represents the Y-axis coordinate scale coefficient; h represents the height of the trend chart grid drawing area.

7. The drawing method according to claim 1, characterized in that: In the case where the trend graph is displayed by a single coordinate system, the drawing method further comprises: Obtaining a dual-coordinate display instruction carrying selected data in a graph; wherein the selected data in the graph is data selected by a user from the trend graph when the trend graph is displayed through a single coordinate system; Based on the dual-coordinate display instruction, the data corresponding to the selected data in the trend graph is deleted, another coordinate system is established in the trend graph, and the data corresponding to the selected data in the graph is displayed in the another coordinate system.

8. A device for drawing a trend graph in an industrial production system, characterized in that: include: An acquisition module is used to acquire a trend chart drawing instruction carrying a specified time period; A search module, used to search for multiple preprocessed bit number data within the specified time period from all preprocessed bit number data; wherein each of the multiple preprocessed bit number data is obtained by preprocessing the original bit number data with a volatility greater than or equal to a preset volatility threshold by at least one data preprocessing method; A drawing module is used to determine a grid drawing area of ​​the trend graph, draw grid lines in the grid drawing area, set a coordinate axis at the edge of the grid drawing area, and draw multiple pre-processed position number data within the specified time period into the grid drawing area according to the sequence of the acquisition time of the coordinate axis and the multiple pre-processed position number data within the specified time period to form the trend graph.

9. The drawing device according to claim 8, characterized in that: The drawing device includes: a preprocessing module for the original position number data, which is used to obtain the original position number data within a preset time period; calculate the volatility of the original position number data within the preset time period; when the volatility of the original position number data within the preset time period is greater than or equal to the preset volatility threshold, preprocess the original position number data within the preset time period for multiple times until the volatility of the final preprocessed position number data is less than the preset volatility threshold, then stop the preprocessing process of the original position number data within the preset time period; wherein the data preprocessing method used for each preprocessing in the multiple preprocessings is different.

10. The drawing device according to claim 9, characterized in that: The various data preprocessing methods include but are not limited to methods for eliminating outliers, first-order filtering methods, sliding average filtering methods, and bandpass filtering methods.

Citation Information

Patent Citations

  • Automatic generation of trend charts

    CN103733191A

  • Trend chart drawing method and device applied to industrial monitoring system

    CN104200075A

  • Data drawing method and device, electronic equipment and storage medium

    CN112700511A

  • Working condition steady state detection method and process optimization method

    CN113535812A

  • Model drawing method and device, electronic equipment and storage medium

    CN114022604A