A DCS trend data processing method, device, storage medium and electronic equipment

By caching and processing real-time trend data of DCS system on the client side, the problem of increased server performance load under the BS architecture is solved, and efficient data processing and accurate real-time monitoring are achieved.

CN119782648APending Publication Date: 2025-04-08SUPCON TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510028103.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Under the BS architecture, the separation of the front-end and the back-end leads to frequent data interface calls that may increase the performance load of the server, affecting the stability of data synchronization and trend drawing.

Method used

Reduce server pressure by cache real-time data on the client and processing sampling. Specific methods include: in the real-time mode of the trend view, subscribe to real-time trend data to the server and extract corresponding historical data from the local historical data cache; store real-time trend data in the first layer cache pool, process it based on the current trend step size and store it in the second layer cache pool; extract and splice real-time and historical data according to the trend refresh cycle for trend drawing.

Benefits of technology

It effectively reduces the pressure on the server, makes full use of the performance of the client, optimizes the data acquisition frequency, ensures the accuracy of real-time monitoring, and significantly improves the overall data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782648A_ABST
    Figure CN119782648A_ABST
Patent Text Reader

Abstract

The present invention provides a DCS trend data processing method, device, storage medium and electronic device, which are applied to the field of data processing technology. The present invention significantly reduces the pressure on the server side and gives full play to the performance of the client side by processing historical trend data by the server side and real-time trend data by the client side, thereby more effectively managing the data acquisition frequency under the BS architecture, ensuring the accuracy of real-time monitoring, and improving the overall data processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a DCS trend data processing method, device, storage medium and electronic equipment. Background Art

[0002] In modern control systems, real-time monitoring is an important means to ensure efficient and safe operation of the production process. As a visualization tool, trend charts can dynamically display the data of various key parameters in the production process to operators, so as to achieve timely grasp of the system status. In this process, real-time data feedback and precision adjustment are particularly important to meet the operator's different needs for monitoring details.

[0003] The traditional software architecture with non-separated front-end and back-end allows the rendering layer to directly access the shared memory of the data processing layer, so it can smoothly respond to operator needs in high-precision trend monitoring without causing significant burden on system performance. However, with the popularization of BS (Browser-Server) architecture, the separation of front-end and back-end leads to frequent data interface calls, which may increase the performance load of the server and affect the stability of data synchronization and trend drawing.

[0004] Therefore, how to effectively manage the frequency of data acquisition and ensure the accuracy of real-time monitoring under the BS architecture has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the above problems, the present invention provides a DCS trend data processing method, device, storage medium and electronic device that overcome the above problems or at least partially solve the above problems. The technical solution is as follows:

[0006] A DCS trend data processing method, applied to a client, comprising:

[0007] Open the trend view of the DCS system;

[0008] In the case where the trend mode of the trend view is the real-time mode, subscribing to the real-time trend data generated by the DCS system from the server, and extracting the local historical trend data corresponding to the current page of the trend view from the local historical data cache;

[0009] After obtaining the real-time trend data pushed by the server, storing the real-time trend data in a first-layer cache pool;

[0010] Processing the real-time trend data in the first-layer buffer pool based on the trend time scale calculated by the current trend step, and storing the processed real-time trend data in the second-layer buffer pool;

[0011] According to the trend refresh cycle, extract the real-time trend data corresponding to the current page of the trend view from the second-layer cache pool, and obtain current trend data based on the extracted real-time trend data and the local historical trend data;

[0012] The current trend data is used to perform trend drawing in the current page of the trend view, and the current trend drawing result of the DCS system is displayed.

[0013] Optionally, after the extracted real-time trend data is combined with the local historical trend data to obtain current trend data, the method further includes:

[0014] The current trend data is stored as the local historical trend data in the local historical data cache.

[0015] Optionally, the method further includes:

[0016] When the trend mode of the trend view is the real-time mode, requesting the server for first previous and next page turning historical trend data related to the current page of the trend view;

[0017] After obtaining the first forward and backward page turning historical trend data sent by the server, the first forward and backward page turning historical trend data is stored as the local historical trend data in the local historical data cache, so that when the user performs a forward and backward page turning operation based on the current page, the first forward and backward page turning historical trend data is loaded from the local historical data cache for trend drawing, and the first historical trend drawing result of the DCS system is displayed.

[0018] Optionally, the method further includes:

[0019] When the trend mode of the trend view is the real-time mode, in response to a page turning operation input by a user, the trend mode of the trend view is switched from the real-time mode to the history mode, and the trend view is jumped from the current page to a target page corresponding to the page turning operation;

[0020] Requesting the server for second page turning history trend data related to the target page;

[0021] After obtaining the second forward and backward page turning historical trend data sent by the server, the second forward and backward page turning historical trend data is stored as the local historical trend data in the local historical data cache, so that when the user performs a forward and backward page turning operation based on the target page, the first forward and backward page turning historical trend data is loaded from the local historical data cache for trend drawing, and the second historical trend drawing result of the DCS system is displayed.

[0022] Optionally, the method further includes:

[0023] When the current trend step changes, the real-time trend data in the first-layer buffer pool is processed based on the trend time scale recalculated based on the changed current trend step, and the processed real-time trend data is stored in the second-layer buffer pool.

[0024] Optionally, the current trend step is the result of rounding up the time span after conversion to minutes, and then multiplying it by a preset time constant.

[0025] Optionally, the trend refresh cycle is related to the current trend step. When the current trend step exceeds a preset time threshold, when real-time trend refresh is performed according to the trend refresh cycle, the real-time trend data is directly requested from the server, and the real-time trend data is no longer processed by the client.

[0026] A DCS trend data processing device is applied to a client, and comprises: a trend view opening unit, a real-time mode response unit, a real-time trend data storage unit, a real-time trend data processing unit, a trend data splicing unit and a current trend drawing result obtaining unit.

[0027] The trend view opening unit is used to open the trend view of the DCS system;

[0028] The real-time mode response unit is used to subscribe to the real-time trend data generated by the DCS system from the server when the trend mode of the trend view is the real-time mode, and extract the local historical trend data corresponding to the current page of the trend view from the local historical data cache;

[0029] The real-time trend data storage unit is used to store the real-time trend data in the first-layer cache pool after obtaining the real-time trend data pushed by the server;

[0030] The real-time trend data processing unit is used to process the real-time trend data in the first-layer buffer pool based on the trend time scale calculated by the current trend step length, and store the processed real-time trend data in the second-layer buffer pool;

[0031] The trend data splicing unit is used to extract the real-time trend data corresponding to the current page of the trend view from the second-layer cache pool according to the trend refresh cycle, and obtain the current trend data based on the extracted real-time trend data and the local historical trend data by splicing;

[0032] The current trend drawing result obtaining unit is used to use the current trend data to perform trend drawing in the current page of the trend view to display the current trend drawing result of the DCS system.

[0033] A computer-readable storage medium stores a program, and when the program is executed by a processor, the DCS trend data processing method is implemented.

[0034] An electronic device comprises at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute the DCS trend data processing method.

[0035] By means of the above technical scheme, a DCS trend data processing method, device, storage medium and electronic device provided by the present invention are applied to a client, and the method comprises: opening a trend view of a DCS system; when the trend mode of the trend view is a real-time mode, subscribing to the real-time trend data generated by the DCS system from a server, and extracting the local historical trend data corresponding to the current page of the trend view from the local historical data cache; after obtaining the real-time trend data pushed by the server, storing the real-time trend data in a first-layer cache pool; processing the real-time trend data in the first-layer cache pool based on the trend time scale calculated by the current trend step, and storing the processed real-time trend data in a second-layer cache pool; extracting the real-time trend data corresponding to the current page of the trend view from the second-layer cache pool according to the trend refresh cycle, splicing the extracted real-time trend data with the local historical trend data to obtain the current trend data; using the current trend data to draw a trend in the current page of the trend view, and displaying the current trend drawing result of the DCS system. The present invention effectively reduces the pressure on the server by processing historical trend data by the server and real-time trend data by the client, and makes full use of the performance of the client, so as to more effectively manage the data acquisition frequency and ensure the accuracy of real-time monitoring under the BS architecture, thereby improving the overall data processing efficiency.

[0036] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0038] Figure 1 A schematic flow chart showing an implementation of a DCS trend data processing method provided by an embodiment of the present invention;

[0039] Figure 2 A schematic diagram of the system architecture of a DCS trend data processing system provided by an embodiment of the present invention is shown;

[0040] Figure 3 A logic block diagram of trend data processing of a DCS trend data processing system provided by an embodiment of the present invention is shown;

[0041] Figure 4 A schematic diagram showing the structure of a DCS trend data processing device provided by an embodiment of the present invention is shown;

[0042] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0043] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the 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 set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0044] Traditional software architectures usually adopt a design that does not separate the front-end and back-end, allowing the rendering layer to directly access the shared memory of the data processing layer. This architecture performs well in scenarios with high-precision trend monitoring because high-frequency data acquisition operations do not significantly burden system performance. This direct data access method allows the system to respond to operator needs with low latency, thereby achieving smooth trend display.

[0045] However, with the development of Internet technology, the BS (Browser-Server) architecture is becoming increasingly popular. This architecture separates the front-end from the back-end, and the front-end needs to interact with the server through an interface. Under this architecture, frequent calls to the server interface to obtain real-time data may increase the performance load of the server. In addition, the client needs to continuously perform data docking and synchronization processing, which not only affects the efficiency of data transmission, but also may lead to a decrease in the stability of trend drawing.

[0046] Based on this, in an embodiment of the present invention, a DCS trend data processing method is provided, which can realize client caching of real-time data under the BS architecture, and process sampling to display high-precision trends. The method mainly supports the following functions: First, the trend historical data is processed by the server, and the real-time data is processed by the client, thereby reducing the pressure on the server. Secondly, based on the user configuration, the client splices the historical data request and the real-time data sampling through the dependency algorithm between the fixed time span and the trend accuracy, and supports the display of the highest accuracy of 50ms. Finally, in the historical mode, the client will request to cache the trend historical data of the previous and next pages in advance, so that it can respond quickly to the drawing when the user turns the trend page, significantly improving the user experience.

[0047] The DCS trend data processing method provided in the embodiment of the present invention can be applied to the client. Figure 1 As shown, a flow chart of an implementation of a DCS trend data processing method provided by an embodiment of the present invention is provided, and the method may include:

[0048] S100. Open the trend view of the DCS system.

[0049] Among them, the DCS system (Distributed Control System) is a control system used in industrial automation, mainly used to monitor and control various equipment and process parameters in the production process. The DCS system is usually composed of multiple control units, sensors, actuators and user interfaces, and can realize data collection, processing and control in a distributed network to ensure the safety and efficiency of the production process.

[0050] Among them, the trend view is a visual interface in the DCS system, which is used to display and monitor the changing trend of real-time process data. Through the trend view, users can intuitively see the changes of various parameters (such as temperature, pressure, flow, etc.) over time, which helps operators quickly identify abnormal situations, analyze the performance of the production process, and make effective decisions. The trend view is usually presented in the form of a chart or curve to make the data changes clearer and easier to understand.

[0051] Specifically, the embodiment of the present invention can display the trend view of the DCS system in response to the user's triggering operation on the function button of the trend view of the DCS system.

[0052] S110 . When the trend mode of the trend view is the real-time mode, subscribe to the real-time trend data generated by the DCS system from the server, and extract the local historical trend data corresponding to the current page of the trend view from the local historical data cache.

[0053] Among them, real-time mode means that in the trend view, data is presented in real-time update mode. When the user selects real-time mode, the latest data of the DCS system will be continuously obtained from the server, and these data will be automatically updated on the trend chart, so that the user can monitor the status of the DCS system and the changes of process variables in real time.

[0054] Among them, real-time trend data refers to the latest data obtained instantly from the DCS system. Real-time trend data includes real-time status information of the DCS system, such as temperature, pressure, and flow. Real-time trend data is dynamic and usually reflects the specific value at the current time point, which can help operators quickly identify the operation status and potential problems of the DCS system.

[0055] In the trend view, the current page refers to the data range currently viewed by the user or the specific time period displayed. For example, when the user selects to view a specific time period in the chart of the trend view, the time period is the current page. The data on the current page may affect the historical data that the user needs to display in the trend view.

[0056] The local historical trend data refers to the past data in the local cache of the client. The local historical trend data is the historical record corresponding to the real-time trend data obtained through the request of the server. The embodiment of the present invention can provide richer trend analysis in real-time mode by using the local historical trend data, helping users understand the relationship between the current state of the DCS system and the historical performance.

[0057] Specifically, the embodiment of the present invention can generate a related subscription request in response to the user's triggering operation on the subscription function button, thereby establishing a connection between the client and the server, and starting to receive the real-time trend data promoted by the server.

[0058] Specifically, the embodiment of the present invention can detect the time range of the data displayed on the current page in the trend view, and extract the local historical trend data falling within the specified time range from the local historical data cache.

[0059] S120: After obtaining the real-time trend data pushed by the server, the real-time trend data is stored in the first-layer cache pool.

[0060] The first-tier buffer pool is also called the raw data buffer pool, which is used to quickly receive and store the latest real-time trend data pushed from the server. These data are generally unprocessed raw data points that can provide real-time status information of equipment or processes.

[0061] Optionally, the cache capacity of the first-tier cache pool is limited to four times the time span, and data points outside this time range will be discarded. In addition, when the step length of trend data exceeds 9 seconds, the client will stop caching real-time data. This mechanism ensures that the data in the cache pool always remains within a reasonable range for efficient data processing and access.

[0062] S130 , processing the real-time trend data in the first-layer buffer pool based on the trend time scale calculated by the current trend step, and storing the processed real-time trend data in the second-layer buffer pool.

[0063] Among them, the current trend step is the scale span of the real-time trend.

[0064] The trend time scale is the X-axis time scale calculated based on the current trend step.

[0065] Among them, the second-layer buffer pool is also called the time scale data buffer pool, which is used to store processed real-time trend data. These data are based on the original real-time trend data in the first-layer buffer pool and are processed according to the time scale calculated according to the current trend step.

[0066] Specifically, when processing the real-time trend data in the first-layer cache pool, the embodiment of the present invention uses the time scale as a key to organize and store it in the second-layer cache pool, thereby ensuring that the data is arranged along the time axis to facilitate subsequent query and analysis.

[0067] Optionally, when the current trend step changes, the embodiment of the present invention can also process the real-time trend data in the first-layer cache pool based on the trend time scale recalculated after the change of the current trend step, and store the processed real-time trend data in the second-layer cache pool.

[0068] Specifically, when the current trend step changes, the embodiment of the present invention will recalculate the trend time scale based on the new trend step. At this moment, the real-time trend data in the first-layer cache pool will be reprocessed to adapt to the updated time scale. After the processing is completed, the adjusted real-time trend data will be stored in the second-layer cache pool. This mechanism ensures that the data in the second-layer cache pool is always consistent with the latest trend step, thereby improving the accuracy of the data and the effectiveness of the analysis. On this basis, when the current trend step changes, the embodiment of the present invention can first clear the data in the second-layer cache pool, and then recalculate the trend time scale based on the new trend step.

[0069] The embodiment of the present invention can ensure that the processed data reflects the current real-time trend more accurately by recalculating the time scale according to the new trend step size, and help eliminate data deviation caused by the step size change.

[0070] S140. According to the trend refresh cycle, extract the real-time trend data corresponding to the current page of the trend view from the second-layer cache pool, and obtain the current trend data based on the extracted real-time trend data and the local historical trend data.

[0071] The trend refresh cycle refers to the frequency at which the system regularly updates and extracts real-time trend data within a certain time interval. During this cycle, the real-time trend data corresponding to the current page of the trend view will be extracted from the second-tier cache pool. Subsequently, these real-time trend data will be spliced ​​with the historical trend data stored locally to form complete current trend data.

[0072] The embodiment of the present invention combines the extracted real-time trend data with the local historical trend data to more comprehensively reflect the trend change. The combined current trend data includes continuity in the time dimension.

[0073] S150 . Use the current trend data to perform trend drawing in the current page of the trend view, and display the current trend drawing result of the DCS system.

[0074] Specifically, an embodiment of the present invention can use the current trend data obtained by splicing to visualize the current trend data through charts or other display methods, thereby displaying the current trend drawing results of the DCS system in the current page of the trend view, so that the user can intuitively observe the trend changes and data fluctuations of the DCS system through the current page.

[0075] Furthermore, in the process of drawing real-time trends, the embodiment of the present invention will use the newly added X-axis time point as the key, and directly obtain the trend data of the corresponding time period from the second-layer cache pool for drawing, so as to quickly draw new data. In addition, when the user opens the trend view for the first time and obtains historical trend data and real-time trend data, the embodiment of the present invention will fill these data into the X-axis time scale queue. For time scales without data filled in, they will be represented by parallel lines, and will be processed and displayed accordingly according to the data quality code. In real-time mode, the embodiment of the present invention will refresh the X-axis periodically according to the set current trend step size, and fill in the corresponding real-time trend data to ensure that the user can always obtain the latest trend information.

[0076] A DCS trend data processing method provided by the present invention is applied to a client, and the method comprises: opening a trend view of a DCS system; when the trend mode of the trend view is a real-time mode, subscribing to the real-time trend data generated by the DCS system from a server, and extracting the local historical trend data corresponding to the current page of the trend view from the local historical data cache; after obtaining the real-time trend data pushed by the server, storing the real-time trend data in a first-layer cache pool; processing the real-time trend data in the first-layer cache pool based on the trend time scale calculated by the current trend step, and storing the processed real-time trend data in a second-layer cache pool; extracting the real-time trend data corresponding to the current page of the trend view from the second-layer cache pool according to the trend refresh cycle, splicing the extracted real-time trend data with the local historical trend data to obtain the current trend data; using the current trend data to draw a trend in the current page of the trend view, and displaying the current trend drawing result of the DCS system. The present invention effectively reduces the pressure on the server by processing the historical trend data by the server and the real-time trend data by the client, and makes full use of the performance of the client, so as to more effectively manage the data acquisition frequency and ensure the accuracy of real-time monitoring under the BS architecture, and improve the overall data processing efficiency.

[0077] Optional, in the above Figure 1 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present invention, after obtaining the current trend data by splicing the extracted real-time trend data with the local historical trend data, the method may further include:

[0078] The current trend data is stored as local historical trend data in the local historical data cache.

[0079] Specifically, in the real-time mode, the embodiment of the present invention will refresh the X-axis according to the set current trend step length and fill in the corresponding real-time trend data. When the real-time trend data reaches a certain span, these data will be stored as local historical trend data and added to the local historical data cache queue. In this way, when the user turns the page to view the trend or reopens the trend view, these local historical trend data can be directly extracted from the local historical data cache queue, thereby improving the efficiency and response speed of data access.

[0080] The embodiment of the present invention effectively reduces the pressure on the server by regularly refreshing the real-time data and storing it as local historical trend data, avoiding the burden caused by frequent requests. At the same time, it makes full use of the computing and storage capabilities of the client to make data processing and access more efficient. Under the BS architecture, this method not only optimizes the frequency of data acquisition, but also ensures the accuracy of real-time monitoring, thereby significantly improving the overall data processing efficiency. When users turn pages or reopen views, they can quickly access historical data in the cache, further improving the response speed of trend display and user experience.

[0081] Optional, in the above Figure 1 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present invention, the method may further include:

[0082] When the trend mode of the trend view is the real-time mode, the server is requested to provide the first forward and backward page turning historical trend data related to the current page of the trend view. After obtaining the first forward and backward page turning historical trend data sent by the server, the first forward and backward page turning historical trend data is stored in the local historical data cache as local historical trend data, so that when the user performs a forward and backward page turning operation based on the current page, the first forward and backward page turning historical trend data is loaded from the local historical data cache for trend drawing, and the first historical trend drawing result of the DCS system is displayed.

[0083] The first page turning historical trend data includes the historical trend data before and after the current page. These data are requested and obtained from the server, ensuring that the user can obtain complete historical information for trend analysis.

[0084] Among them, the forward and backward page turning operation refers to the operation performed by the user when browsing data of different time periods in the trend view. When the user wants to view the previous or next page of the current trend, the system will quickly load the corresponding data based on the forward and backward page turning historical trend data stored in the local historical data cache, thereby achieving a smooth trend drawing experience. This design not only improves the efficiency of data access, but also enables users to easily compare and analyze historical data.

[0085] The first historical trend drawing result refers to a trend chart or data display result generated based on the first previous and next page turning historical trend data obtained on the current page when the trend view is in real-time mode.

[0086] Specifically, in the real-time mode of the trend view, the embodiment of the present invention allows the user to view dynamically changing trend data and request the first previous and next page turning historical trend data related to the current page from the server in advance. Once the server responds and sends back the first previous and next page turning historical trend data, it will be stored as local historical trend data and stored in the local historical data cache, so that when the user performs a previous and next page turning operation based on the current page, these stored first previous and next page turning historical trend data can be directly loaded from the local historical data cache. In this way, the user does not need to wait for the data transmission from the server again, and can quickly see the required trend drawing results, thereby improving the user experience and the efficiency of data analysis.

[0087] In the real-time mode of the trend view, the embodiment of the present invention effectively reduces the pressure on the server by pre-requesting the first page-turning historical trend data related to the current page from the server, and storing the data in the local historical data cache after receiving the data. This method reduces the frequent requests to the server, enables the client to fully utilize its computing and storage capabilities, and optimizes the frequency of data acquisition. This not only ensures the accuracy of real-time monitoring, but also improves the overall data processing efficiency, ensuring that users can quickly and smoothly access the required historical trend data when turning pages, thereby improving the user experience.

[0088] Optional, in the above Figure 1 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present invention, the method may further include:

[0089] When the trend mode of the trend view is the real-time mode, in response to a page turning operation input by the user, the trend mode of the trend view is switched from the real-time mode to the historical mode, and the trend view jumps from the current page to the target page corresponding to the page turning operation; a request is made to the server for second forward and backward page turning historical trend data related to the target page; after obtaining the second forward and backward page turning historical trend data sent by the server, the second forward and backward page turning historical trend data is stored in the local historical data cache as local historical trend data, so that when the user performs a forward and backward page turning operation based on the target page, the first forward and backward page turning historical trend data is loaded from the local historical data cache for trend drawing, and the second historical trend drawing result of the DCS system is displayed.

[0090] Among them, historical mode is a data display mode in trend view, which is opposite to real-time mode. In historical mode, users can view past trend data instead of real-time updated data. Switching to historical mode allows users to deeply analyze data for a specific time period for comparison and trend analysis.

[0091] The target page is a specific data page that the user wants to view when performing a page turning operation. When the user inputs a page turning operation, the system will jump to the target page corresponding to the operation according to the user's instruction so that the user can obtain the trend information contained in the page.

[0092] Among them, the second page turning historical trend data: this refers to the historical trend data related to the target page, including the historical trend data before and after the target page. When the server is requested and successfully obtained, this data will be stored as local historical trend data for quick loading and display in subsequent page turning operations, allowing users to smoothly view and analyze historical trends.

[0093] The second historical trend drawing result refers to a trend chart or data display result generated based on the second previous and next page turning historical trend data obtained from the target page after the user switches to the historical mode.

[0094] Specifically, when the user is in real-time mode in the trend view, the trend view will display the current data in real time. The user can request to view earlier or later data through a page turning operation. At this time, the mode of the trend view is switched from real-time mode to historical mode to allow the user to access the corresponding historical trend data. According to the user's page turning operation, the embodiment of the present invention will jump from the current page to the target page corresponding to the operation. The target page is a specific data page that the user wants to view, which usually contains the historical trend data of the time period. At the same time, after the mode of the trend view is switched from real-time mode to historical mode, the server is requested in advance for the second forward and backward page turning historical trend data related to the target page. Once the server responds and sends back the second forward and backward page turning historical trend data, it will be stored as local historical trend data and stored in the local historical data cache, so that when the user performs a forward and backward page turning operation based on the current page, these stored second forward and backward page turning historical trend data can be directly loaded from the local historical data cache. In this way, the user does not need to wait for the data transmission of the server again, and can quickly see the required trend drawing results, thereby improving the user experience and the efficiency of data analysis.

[0095] The embodiment of the present invention switches the mode from real-time mode to historical mode in the trend view, so that relevant historical trend data can be requested and cached in time when the user performs a page turning operation. This process effectively reduces the pressure on the server, because in subsequent page turning operations, data can be directly loaded from the local cache without initiating a request to the server each time. This not only fully utilizes the computing performance of the client, but also ensures reasonable control of the frequency of data acquisition.

[0096] Optionally, after jumping from the current page to the target page corresponding to the page turning operation in the trend view, the embodiment of the present invention can also extract local historical trend data corresponding to the target page from the local historical data cache, and use the extracted local historical trend data to draw a trend in the target page to display the third historical trend drawing result of the DCS system.

[0097] The third historical trend drawing result refers to a trend chart or data display result generated based on the historical trend data obtained from the target page when the trend view is in the historical mode.

[0098] Specifically, when a user performs a page turning operation in the trend view and jumps from the current page to the target page, the embodiment of the present invention automatically extracts the historical trend data related to the target page from the local historical data cache. After extracting these historical trend data, these data will be used to draw trends on the target page. Finally, a visualized third historical trend drawing result is generated.

[0099] In the trend view of the embodiment of the present invention, when the user jumps from the current page to the target page, the relevant historical trend data can be quickly extracted from the local historical data cache, and the trend can be drawn in the target page. This method reduces the demand for real-time requests on the server side, effectively reducing the pressure on the server side. At the same time, it fully utilizes the performance of the client, enabling it to efficiently process and display data. This process optimizes the frequency of data acquisition under the BS architecture, ensures the accuracy of real-time monitoring, thereby significantly improving the overall data processing efficiency and enhancing the user experience.

[0100] Optionally, when there is no local historical trend data corresponding to the target page in the local historical data cache, an embodiment of the present invention requests the target page historical trend data corresponding to the target page from the server; after obtaining the target page historical trend data sent by the server, the target page historical trend data is used to perform trend drawing in the target page to display the third historical trend drawing result of the DCS system.

[0101] Specifically, when the user jumps to the target page in the trend view, the embodiment of the present invention first checks the local cache to confirm whether there is historical trend data related to the target page. If the required data cannot be found in the local cache, a request will be sent to the server to request the historical trend data corresponding to the target page. Once the server responds and sends the requested historical trend data of the target page, the embodiment of the present invention will use the historical trend data of the target page for trend drawing on the target page. In this way, the user can see the third historical trend drawing result of the DCS system on the target page.

[0102] The embodiment of the present invention utilizes the resources of the server to supplement the deficiency of the local cache when necessary, thereby providing the user with a continuous and accurate real-time monitoring experience and ensuring the integrity and timeliness of trend data processing.

[0103] Optionally, the current trend step provided in the embodiment of the present invention is the result of rounding up the time span after conversion to minutes, and then multiplying it by a preset time constant.

[0104] The time span is the length of the time period for displaying trend data.

[0105] The calculation method of the current trend step length provided by the embodiment of the present invention is to convert the time span into minutes, round it up, and then multiply it by a preset time constant. Specifically, when the time span is 1 minute, the trend step length is 50 milliseconds; whenever the time span increases by 1 minute, the trend step length will also increase by 50 milliseconds accordingly. Therefore, the calculation formula of the trend step length can be expressed as: step length = Math.ceil(time span (in minutes))*50 milliseconds.

[0106] The embodiment of the present invention converts the time span into minutes and rounds up, and then multiplies it by a preset time constant to calculate the current trend step length, so that the frequency of data acquisition can be reasonably controlled, avoiding the pressure caused by frequent requests to the server, and giving full play to the processing capabilities of the client, so that historical trend data can be cached and quickly accessed locally, thereby more efficiently managing the acquisition frequency of trend data under the BS architecture. At the same time, this optimization ensures the accuracy of real-time monitoring, improves the overall data processing efficiency, and enables users to perform data analysis and decision-making more smoothly.

[0107] Optionally, the trend refresh cycle provided by the embodiment of the present invention is related to the current trend step length. When the current trend step length exceeds a preset time threshold, when real-time trend refresh is performed according to the trend refresh cycle, real-time trend data is directly requested from the server, and the real-time trend data is no longer processed by the client.

[0108] The trend refresh period provided by the embodiment of the present invention is closely related to the current trend step length. When the current trend step length is less than 1 second, the set trend refresh timer period can be 1 second; and when the current trend step length is greater than 1 second, the timer period will be equal to the current trend step length. Once the current trend step length exceeds 9 seconds, real-time trend data will be requested directly from the server instead of relying on the client to process the real-time trend data. This design ensures that the latest real-time trend data can be efficiently obtained when faced with a longer step length, thereby improving the timeliness and accuracy of trend data updates.

[0109] Although operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order.Multitasking and parallel processing may be advantageous under certain circumstances.

[0110] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0111] Corresponding to the above method embodiment, the embodiment of the present invention also provides a DCS trend data processing system. Figure 2 As shown, the system architecture diagram of the DCS trend data processing system provided by the embodiment of the present invention, the DCS trend data processing system includes a server and a client, and the client includes a historical data cache, a timer, and a raw data cache pool. A time scale data cache pool, a data processing layer, and a drawing layer. The client requests historical data from the server. When the client needs historical trend data, it will send a request to the server. The timer is used to update the data every 1000 milliseconds when the trend step is less than 1000 milliseconds, and when the trend step is greater than 1000 milliseconds, the trend drawing is triggered according to the trend step. The server will push new real-time trend data according to the real-time data changes of the DCS system. The raw data cache pool is used to store the unprocessed real-time trend data pushed by the service client, and the time scale data cache pool is used to store the real-time trend data processed with the time scale as the key. The data processing layer is responsible for processing the received data and preparing the required format for drawing. The drawing layer generates visual graphics based on the processed data and finally displays them to the user. Through this architectural design, the system can reduce the pressure on the server while ensuring the accuracy of real-time data monitoring, improve overall data processing efficiency, and thus enhance user experience.

[0112] Figure 3 The figure shows a logic block diagram of trend data processing of a DCS trend data processing system provided by an embodiment of the present invention. After the user opens the trend on the client, the next data processing flow is determined according to the trend mode selected by the user. When the user selects the real-time mode, the real-time trend data of the DCS system is subscribed to the server, and the historical trend data of the page turning is pre-requested to the server. After obtaining the real-time trend data and the historical trend data, data splicing is performed, and then trend drawing is performed based on the spliced ​​trend data. After the user selects the historical mode or the user enters the historical mode by turning the page, the historical trend data of the page turning is pre-requested to the server, and trend drawing is performed based on the historical trend data. In the historical mode, in response to each page turning operation of the user, the historical trend data of the page turning will be pre-requested to the server for trend drawing.

[0113] Corresponding to the above method embodiment, the embodiment of the present invention also provides a DCS trend data processing device, which is applied to the client. The structure of the device is as follows Figure 4 As shown, it may include: a trend view opening unit 10, a real-time mode response unit 20, a real-time trend data storage unit 30, a real-time trend data processing unit 40, a trend data splicing unit 50 and a current trend drawing result obtaining unit 60.

[0114] The trend view opening unit 10 is used to open the trend view of the DCS system.

[0115] The real-time mode response unit 20 is used to subscribe to the real-time trend data generated by the DCS system from the server when the trend mode of the trend view is the real-time mode, and extract the local historical trend data corresponding to the current page of the trend view from the local historical data cache.

[0116] The real-time trend data storage unit 30 is used to store the real-time trend data in the first-layer cache pool after obtaining the real-time trend data pushed by the server.

[0117] The real-time trend data processing unit 40 is used to process the real-time trend data in the first-layer buffer pool based on the trend time scale calculated by the current trend step, and store the processed real-time trend data in the second-layer buffer pool.

[0118] The trend data splicing unit 50 is used to extract the real-time trend data corresponding to the current page of the trend view from the second-layer cache pool according to the trend refresh cycle, and obtain the current trend data by splicing the extracted real-time trend data with the local historical trend data.

[0119] The current trend drawing result obtaining unit 60 is used to perform trend drawing in the current page of the trend view using the current trend data, and to display the current trend drawing result of the DCS system.

[0120] Optionally, the DCS trend data processing device may further include: a current trend data storage unit.

[0121] The current trend data storage unit is used for the trend data splicing unit 50 to splice the extracted real-time trend data with the local historical trend data, and after obtaining the current trend data, the current trend data is stored as the local historical trend data in the local historical data cache.

[0122] Optionally, the DCS trend data processing device may further include: a first forward and backward page turning historical trend data requesting unit and a first historical trend drawing result obtaining unit.

[0123] The first page turning history trend data requesting unit is used to request the first page turning history trend data related to the current page of the trend view from the server when the trend mode of the trend view is the real-time mode.

[0124] The first historical trend drawing result obtaining unit is used to store the first previous and next page turning historical trend data as local historical trend data in the local historical data cache after obtaining the first previous and next page turning historical trend data sent by the server, so that when the user performs a previous and next page turning operation based on the current page, the first previous and next page turning historical trend data is loaded from the local historical data cache for trend drawing, thereby displaying the first historical trend drawing result of the DCS system.

[0125] Optionally, the DCS trend data processing device may further include: a mode switching unit, a second forward and backward page turning historical trend data requesting unit, and a second historical trend drawing result obtaining unit.

[0126] A mode switching unit is used to switch the trend mode of the trend view from the real-time mode to the historical mode in response to a page turning operation input by the user when the trend mode of the trend view is the real-time mode, and to jump from the current page to the target page corresponding to the page turning operation in the trend view.

[0127] The second page turning history trend data request unit is used to request the second page turning history trend data related to the target page from the server.

[0128] The second historical trend drawing result obtaining unit is used to store the second forward and backward page turning historical trend data as local historical trend data in the local historical data cache after obtaining the second forward and backward page turning historical trend data sent by the server, so that when the user performs a forward and backward page turning operation based on the target page, the first forward and backward page turning historical trend data is loaded from the local historical data cache for trend drawing, thereby displaying the second historical trend drawing result of the DCS system.

[0129] Optionally, the real-time trend data processing unit 40 can also be used to process the real-time trend data in the first-layer cache pool based on the trend time scale recalculated after the changed current trend step size when the current trend step size changes, and store the processed real-time trend data in the second-layer cache pool.

[0130] Optionally, the current trend step is the result of converting the time span to minutes, rounding up, and then multiplying it by a preset time constant.

[0131] Optionally, the trend refresh cycle is related to the current trend step. When the current trend step exceeds a preset time threshold, when real-time trend refresh is performed according to the trend refresh cycle, the real-time trend data is directly requested from the server, and the real-time trend data is no longer processed by the client.

[0132] A DCS trend data processing device provided by the present invention is applied to a client, and the device is used to: open a trend view of a DCS system; when the trend mode of the trend view is a real-time mode, subscribe to the real-time trend data generated by the DCS system from the server, and extract the local historical trend data corresponding to the current page of the trend view from the local historical data cache; after obtaining the real-time trend data pushed by the server, store the real-time trend data in the first-layer cache pool; process the real-time trend data in the first-layer cache pool based on the trend time scale calculated by the current trend step, and store the processed real-time trend data in the second-layer cache pool; extract the real-time trend data corresponding to the current page of the trend view from the second-layer cache pool according to the trend refresh cycle, splice the extracted real-time trend data with the local historical trend data to obtain the current trend data; use the current trend data to draw a trend in the current page of the trend view, and display the current trend drawing result of the DCS system. The present invention effectively reduces the pressure on the server by processing the historical trend data by the server and the real-time trend data by the client, and makes full use of the performance of the client, so as to more effectively manage the data acquisition frequency and ensure the accuracy of real-time monitoring under the BS architecture, and improve the overall data processing efficiency.

[0133] Regarding the device in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0134] The DCS trend data processing device includes a processor and a memory. The trend view opening unit 10, the real-time mode response unit 20, the real-time trend data storage unit 30, the real-time trend data processing unit 40, the trend data splicing unit 50 and the current trend drawing result obtaining unit 60 are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.

[0135] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set. By adjusting the kernel parameters, the historical trend data is processed by the server, while the real-time trend data is processed by the client, which significantly reduces the pressure on the server and gives full play to the performance of the client, so as to more effectively manage the frequency of data acquisition under the BS architecture, ensure the accuracy of real-time monitoring, and improve the overall data processing efficiency.

[0136] The embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the DCS trend data processing method is implemented.

[0137] An embodiment of the present invention provides a processor, which is used to run a program, wherein the DCS trend data processing method is executed when the program is running.

[0138] like Figure 5 As shown, an embodiment of the present invention provides an electronic device 1000, which includes at least one processor 1001, at least one memory 1002 connected to the processor 1001, and a bus 1003; wherein the processor 1001 and the memory 1002 communicate with each other through the bus 1003; the processor 1001 is used to call the program instructions in the memory 1002 to execute the above-mentioned DCS trend data processing method. The electronic device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0139] The present invention also provides a computer program product, which, when executed on an electronic device, is suitable for executing a program that initializes the steps of the DCS trend data processing method.

[0140] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, electronic devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processor of the computer or other programmable device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0141] In a typical configuration, an electronic device includes one or more processors (CPU), a memory, and a bus. The electronic device may also include an input / output interface, a network interface, and the like.

[0142] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0143] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0144] In the description of the present invention, it should be understood that the terms "up", "down", "front", "back", "left" and "right" etc. indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description. They do not indicate or imply that the positions or elements referred to must have specific directions, be constructed and operate in specific directions. Therefore, they should not be understood as limitations of the present invention.

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

[0146] It should be understood by those skilled in the art that the 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.

[0147] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims

1. A DCS trend data processing method, characterized in that: Applied to a client, the method comprises: Open the trend view of the DCS system; In the case where the trend mode of the trend view is the real-time mode, subscribing to the real-time trend data generated by the DCS system from the server, and extracting the local historical trend data corresponding to the current page of the trend view from the local historical data cache; After obtaining the real-time trend data pushed by the server, storing the real-time trend data in a first-layer cache pool; Processing the real-time trend data in the first-layer buffer pool based on the trend time scale calculated by the current trend step, and storing the processed real-time trend data in the second-layer buffer pool; According to the trend refresh cycle, extract the real-time trend data corresponding to the current page of the trend view from the second-layer cache pool, and obtain current trend data based on the extracted real-time trend data and the local historical trend data; The current trend data is used to perform trend drawing in the current page of the trend view, and the current trend drawing result of the DCS system is displayed.

2. The method according to claim 1, characterized in that After the extracted real-time trend data is spliced ​​with the local historical trend data to obtain current trend data, the method further includes: The current trend data is stored as the local historical trend data in the local historical data cache.

3. The method according to claim 1, characterized in that Also includes: When the trend mode of the trend view is the real-time mode, requesting the server for first previous and next page turning historical trend data related to the current page of the trend view; After obtaining the first forward and backward page turning historical trend data sent by the server, the first forward and backward page turning historical trend data is stored as the local historical trend data in the local historical data cache, so that when the user performs a forward and backward page turning operation based on the current page, the first forward and backward page turning historical trend data is loaded from the local historical data cache for trend drawing, and the first historical trend drawing result of the DCS system is displayed.

4. The method according to claim 3, characterized in that Also includes: When the trend mode of the trend view is the real-time mode, in response to a page turning operation input by a user, the trend mode of the trend view is switched from the real-time mode to the history mode, and the trend view is jumped from the current page to a target page corresponding to the page turning operation; Requesting the server for second page turning history trend data related to the target page; After obtaining the second forward and backward page turning historical trend data sent by the server, the second forward and backward page turning historical trend data is stored as the local historical trend data in the local historical data cache, so that when the user performs a forward and backward page turning operation based on the target page, the first forward and backward page turning historical trend data is loaded from the local historical data cache for trend drawing, and the second historical trend drawing result of the DCS system is displayed.

5. The method according to claim 1, characterized in that Also includes: When the current trend step changes, the real-time trend data in the first-layer buffer pool is processed based on the trend time scale recalculated based on the changed current trend step, and the processed real-time trend data is stored in the second-layer buffer pool.

6. The method according to claim 5, characterized in that The current trend step is the result of rounding up the time span converted to minutes and then multiplied by a preset time constant.

7. The method according to claim 6, characterized in that The trend refresh cycle is related to the current trend step length. When the current trend step length exceeds a preset time threshold, when real-time trend refresh is performed according to the trend refresh cycle, the real-time trend data is directly requested from the server, and the real-time trend data is no longer processed by the client.

8. A DCS trend data processing device, characterized in that: Applied to a client, the device comprises: a trend view opening unit, a real-time mode response unit, a real-time trend data storage unit, a real-time trend data processing unit, a trend data splicing unit and a current trend drawing result obtaining unit, The trend view opening unit is used to open the trend view of the DCS system; The real-time mode response unit is used to subscribe to the real-time trend data generated by the DCS system from the server when the trend mode of the trend view is the real-time mode, and extract the local historical trend data corresponding to the current page of the trend view from the local historical data cache; The real-time trend data storage unit is used to store the real-time trend data in the first-layer cache pool after obtaining the real-time trend data pushed by the server; The real-time trend data processing unit is used to process the real-time trend data in the first-layer buffer pool based on the trend time scale calculated by the current trend step length, and store the processed real-time trend data in the second-layer buffer pool; The trend data splicing unit is used to extract the real-time trend data corresponding to the current page of the trend view from the second-layer cache pool according to the trend refresh cycle, and obtain the current trend data based on the extracted real-time trend data and the local historical trend data by splicing; The current trend drawing result obtaining unit is used to use the current trend data to perform trend drawing in the current page of the trend view to display the current trend drawing result of the DCS system.

9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the DCS trend data processing method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the DCS trend data processing method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Method and device for generating small trend picture, computer storage medium and terminal

    CN121213716A