High-speed interaction system and method for data in container

By implementing high-speed real-time data caching and real-time data synchronization services in the container, the problem of performance bottlenecks and insufficient expansion capabilities caused by the dependence of data interaction systems on the cloud or real-time libraries in the prior art is solved, and efficient data interaction and dynamics are achieved Extended to ensure data consistency and stability.

CN119248731AActive Publication Date: 2025-01-03STATE GRID ZHEJIANG ELECTRIC POWER CO LTD QUZHOU POWER SUPPLY CO +3
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
CN202411773759.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-01-03
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

Existing data interaction systems rely too much on cloud or real-time libraries, resulting in insufficient performance bottlenecks and dynamic scaling capabilities, and are unable to effectively process massive multivariate heterogeneous data.

Method used

Implement a high-speed data interaction system in the container, and reduce direct access to the real-time library through the high-speed real-time data cache service subsystem and the real-time data synchronization service subsystem. It adopts read-write separation design and file mapping memory technology to support dynamic scaling and caching mechanisms , optimize memory and storage resource usage.

Benefits of technology

It improves data interaction speed and dynamic scaling capabilities, reduces database load, avoids performance bottlenecks, ensures data consistency and stability, and realizes efficient data sharing and synchronization between containers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248731A_ABST
    Figure CN119248731A_ABST
Patent Text Reader

Abstract

The invention discloses a high-speed interaction system and method for data in a container, and solves the problems that the data interaction speed is limited and the dynamic expansion capability is insufficient due to the fact that the data interaction system and method in the prior art excessively depend on a cloud or a real-time library. Accessing the high-speed real-time data cache service subsystem, and reading and writing the measurement cache data of the dispatching power grid; the high-speed real-time data caching service subsystem is positioned in the container and is used for realizing high-speed real-time data caching and performing time mark verification and source verification on cached data; the real-time data snapshot service subsystem is used for storing, rolling back and checking snapshot data; and the real-time data synchronization service subsystem is positioned in the host machine and used for writing the received real-time data into the real-time library. According to the method, the access to the real-time library is reduced, and the data interaction speed and the dynamic expansion capability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric power dispatching automation, and specifically provides a system and method for high-speed data interaction in a container. Background Art

[0002] As electricity load continues to grow, new factors such as adjustable loads, electric vehicles, distributed photovoltaics, new energy storage, microgrids, and resource aggregators have entered a stage of large-scale development. Data types and access methods are showing a trend of heterogeneity and complexity, and the scale of data is growing exponentially.

[0003] Existing data interaction systems and methods use multiple databases to store data feature information and rely too much on the cloud or real-time database. The high database load causes potential performance bottlenecks, affecting the overall performance and response time of the system, and thus limiting the speed of data interaction. In addition, the complexity of the system and the complexity of operation and maintenance deployment make it difficult to meet the online dynamic expansion of data processing capabilities. There are certain limitations in coping with the flexible access and high-reliability data processing capabilities of massive, diverse and heterogeneous new business entities, and the dynamic expansion capabilities of diverse and heterogeneous data processing are insufficient. Summary of the invention

[0004] In order to solve the problem that the data interaction systems and methods in the prior art are too dependent on the cloud or real-time library, which limits the data interaction speed and insufficient dynamic expansion capability, the present invention provides a high-speed data interaction system and method within a container, which reduces the access to the real-time library and improves the data interaction speed and dynamic expansion capability.

[0005] The specific scheme of the present invention is as follows.

[0006] In a first aspect, the present invention provides a system for high-speed data interaction in a container, comprising: The data processing service subsystem is located in the container and accesses the high-speed real-time data cache service subsystem to read and write the cache data of the dispatching power grid measurement; The high-speed real-time data cache service subsystem is located in the container, realizes high-speed real-time data cache, and performs time stamp verification and source verification on the cached data; A real-time data snapshot service subsystem is connected to the high-speed real-time data cache service subsystem through a snapshot data update channel to store, roll back and view snapshot data; And the real-time data synchronization service subsystem is located in the host machine, connected with the high-speed real-time data cache service subsystem through the real-time data update channel, and writes the received real-time data into the real-time library.

[0007] The data processing service subsystem is connected to the high-speed real-time data cache service subsystem. The real-time data snapshot service subsystem, the real-time data synchronization service subsystem and the real-time library are integrated in the host machine. The real-time data snapshot service subsystem and the real-time data synchronization service subsystem are respectively connected to the real-time library.

[0008] The high-speed real-time data caching service subsystem is directly integrated into the data processing container. It can capture and respond to frequent data access requests, reducing the number of direct accesses to the underlying real-time library, thereby reducing the database load and avoiding potential performance bottlenecks. The real-time data synchronization service subsystem is integrated into the host machine. This read-write separation design allows the system to efficiently process data writing without affecting data reading performance, further improving overall performance.

[0009] Furthermore, it also includes: a scheduling real-time library service subsystem, which is connected to the high-speed real-time data cache service subsystem, and when the device type and measurement type accessed by the data processing service subsystem are not in the cache, the power grid model data is constructed for the missing page data; a model change monitoring service subsystem, which is connected to the high-speed real-time data cache service subsystem through a model data update channel, and when the real-time library is downloaded or the power grid model changes, the high-speed real-time data cache model reconstruction is triggered.

[0010] The scheduling real-time library service subsystem and the model change monitoring service subsystem are integrated in the host machine, and the scheduling real-time library service subsystem is connected to the real-time library. The high-speed real-time data cache service subsystem in the container listens to the model data update channel. When receiving the model update message, it checks whether the model cache is in the cache. If so, the model is reconstructed with delay.

[0011] Furthermore, the high-speed real-time data cache service subsystem includes: The data access interface exposed to the data processing service subsystem includes a data reading interface, a data updating interface, and a data adding and deleting interface; Data storage module, data reading and data updating are realized by directly accessing the data storage module. Data updating needs to verify whether the time stamp of the updated data is the latest; A data update uplink module listens to the real-time data update channel and updates the real-time data processed by other containers to the data storage module of the current container; A data update downstream module, which updates the real-time data of the container data storage module to the real-time data update channel or the snapshot data update channel; And a model synchronization module, which listens to the model data update channel and provides an interface for model data update.

[0012] The data reading interface and data updating interface determine whether there is a page missing in the high-speed real-time data cache. If so, the model synchronization module is called to build the cache and write the data to the data storage module; the data adding and deleting interface directly implements the cache model update through the model synchronization module.

[0013] Furthermore, the high-speed real-time data cache supports dynamic scaling: when the power grid model adds measurement types, it triggers the horizontal scaling of the high-speed real-time data cache in the container; when a device is put into operation or decommissioned, it triggers the vertical scaling of the high-speed real-time data cache in the container.

[0014] High-speed real-time data cache is implemented using file-mapped memory technology (mmap). The power grid model breaks the idea of ​​modeling by application and realizes dynamic scaling of high-speed real-time data cache by modeling by device measurement type. The power grid measurement type can be timely tailored according to the data processing service subsystem to increase the memory resource usage in the container. The cache mechanism supports dynamic data management and can dynamically adjust the cache size and content according to the access frequency and timeliness of the data to optimize the use of memory and storage resources.

[0015] Furthermore, the real-time data snapshot service subsystem listens to the snapshot data update channel, and after receiving the snapshot data, it rolls back and stores the snapshot data and deletes expired snapshot data; the real-time data snapshot service subsystem provides a snapshot viewing function, and the snapshot data of the specified measurement point can be accessed through a standardized interface; the real-time data snapshot service subsystem also provides a snapshot rollback function, and the measurement information of the specified measurement point at a specified time can be rolled back through a standardized interface.

[0016] The real-time data snapshot service subsystem stores the historical change data of several frames of real-time scheduling data, facilitates the rollback of historical data and improves the means of detecting problems after scheduling accidents, provides heterogeneous data query and data recovery functions at the time of power grid accidents, and the snapshot storage structure occupies small resources, takes a short time to view data and rolls back data quickly.

[0017] In a second aspect, the present invention provides a method for high-speed data interaction in a container, which relies on a high-speed data interaction system in a container, including: The high-speed real-time data cache service subsystem in the container reads the power grid measurement data. If the cache has been established, the measurement data in the cache is directly returned. If the cache has not been established, the missing page data is used to build the power grid model data. Perform time stamp verification and source verification on cached data, send the data that passes the time stamp verification to the real-time data update channel, and perform snapshot storage on heterogeneous source data; The high-speed real-time data cache service subsystem in other containers reads the real-time data in the real-time data update channel.

[0018] The data processing service subsystem calls the read interface of the high-speed real-time data cache service subsystem to read the power grid measurement data, and calls the write interface of the high-speed real-time data cache service subsystem to update the power grid measurement data; when the power grid real-time data in this container is updated, the updated real-time data needs to be distributed to the real-time data update channel, the real-time data synchronization service subsystem listens to the real-time data update channel, and writes the updated real-time data into the real-time library of the dispatching monitoring panel.

[0019] Furthermore, after the missing page data is used to construct the power grid model data, the constructed cache data is returned to the data processing service subsystem in the container. The data processing service subsystem directly updates the high-speed real-time data cache in the container, and then compares the corresponding real-time library data time stamp in the cache, and saves the real-time data time stamp in the high-speed real-time data cache as the data with the latest time stamp. Checking the time stamp of the cache data means checking the cache data time stamp and the write time stamp to ensure that the measurement data in the cache is the latest time stamp data.

[0020] Furthermore, after updating the data of the data processing service subsystem in this container, the high-speed real-time data cache service subsystem distributes the latest time-stamped data to other containers through the real-time data update channel; the high-speed real-time data cache service subsystem distributes the latest time-stamped data to the real-time library through the real-time data synchronization service subsystem, providing a real-time data source for the dispatching and monitoring panel, ensuring that the real-time data monitored by the power grid is the latest time-stamped data. Source verification of cached data refers to verifying the source of the cached data and the source of the written time stamp. If the service names written by the two are inconsistent, that is, a heterogeneous site occurs, the cached data is heterogeneous data.

[0021] Furthermore, performing snapshot storage on heterogeneous data includes: converting the heterogeneous data into snapshot data, and sending the snapshot data to the real-time data snapshot service subsystem for storage through a snapshot data update channel.

[0022] Furthermore, after the high-speed real-time data cache service subsystem in other containers reads the real-time data in the real-time data update channel, it determines whether the cache of the read real-time data is established. If the cache is not established, it will not be processed. If the cache is established, the cache data will be time-stamped and the latest time-stamped data will be updated to the cache and real-time library. The display of the scheduling and monitoring data is monitored by obtaining the measurement data in the real-time library through the scheduling real-time library service subsystem, thereby ensuring the data consistency and stability of the entire system.

[0023] Therefore, the present invention has the following beneficial effects: (1) By introducing high-speed data interaction technology within the container, direct access to network real-time library services is reduced, latency is reduced, data access speed is increased, and data access performance is optimized; (2) The cache mechanism supports dynamic data management and can dynamically adjust the cache size and content according to the access frequency and timeliness of the data, optimizing the use of memory and storage resources; (3) The high-speed real-time data cache service subsystem is directly integrated into the data processing container, which can capture and respond to frequent data access requests, reducing the number of direct accesses to the underlying real-time library, thereby reducing the database load and avoiding potential performance bottlenecks; (4) The real-time data synchronization service subsystem is integrated into the host machine. This read-write separation design allows the system to efficiently process data writing without affecting data reading performance, further improving overall performance. (5) Based on the efficient data storage solution of containerization and the data access mechanism between containers, it supports the historical traceability of cache data changes, ensures the data consistency, efficiency and data storage stability of the interaction between containers, and solves the problem of efficient sharing and synchronization of real-time business data in scheduling between containers by decoupling the business layer and the data access layer, thus giving full play to the advantages of container technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work.

[0025] Figure 1 This is a diagram of the architecture of the high-speed data interaction system within a container of the present invention.

[0026] Figure 2 This is an architecture diagram of the high-speed real-time data caching service subsystem in the container of the present invention.

[0027] Figure 3 This is a design diagram of a high-speed data storage implementation scheme in a container of the present invention.

[0028] Figure 4 This is a diagram of the high-speed real-time data interactive access related module architecture of the present invention.

[0029] Figure 5 This is an implementation architecture diagram of the real-time data snapshot service subsystem of the present invention. DETAILED DESCRIPTION

[0030] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0031] like Figure 1 The diagram shows the architecture of the high-speed data interaction system in the container of the present invention, which is suitable for flexible access by multiple new business entities. The high-speed data interaction system in the container includes a data processing service subsystem and a high-speed real-time data cache service subsystem integrated in the container and connected to each other, and also includes a real-time data snapshot service subsystem, a real-time data synchronization service subsystem, a scheduling real-time library service subsystem, a model change monitoring service subsystem and a real-time library integrated in the host machine. The real-time data snapshot service subsystem, the real-time data synchronization service subsystem and the scheduling real-time library service subsystem are respectively connected to the real-time library, and the scheduling real-time library service subsystem is connected to the high-speed real-time data cache service subsystem. The high-speed real-time data cache service subsystem is connected to the real-time data synchronization service subsystem through the real-time data update channel, is connected to the model change monitoring service subsystem through the model data update channel, and is connected to the real-time data snapshot service subsystem through the snapshot data update channel.

[0032] Embodiment 1.

[0033] The data processing service subsystem in the container used for real-time monitoring of the power grid accesses the high-speed real-time data cache service subsystem to make data read and write requests. The specific steps are as follows: Step 1: Call the read interface of the high-speed real-time data cache service subsystem to read the power grid measurement data; Step 2: If the high-speed real-time data cache has been established, the measurement data in the cache is directly returned; Step 3: If the high-speed real-time data cache is not established, that is, the power grid model data is "page missing", and the power grid model data is page missing data, the high-speed real-time data cache service subsystem calls the scheduling real-time library service subsystem to build the power grid model data, and returns the built cache data to the data processing service subsystem in the container; Step 4: Call the write interface of the high-speed real-time data cache service subsystem to update the power grid measurement data; Step 5: If the high-speed real-time data cache is not established, that is, the power grid model data is "page missing", and the power grid model data is page missing data, the high-speed real-time data cache service subsystem calls the scheduling real-time library service subsystem to build the power grid model data; Step 6: Check the cache data time stamp and the write time stamp to ensure that the measurement data in the cache is the latest time stamp data. After the verification is passed, update the measurement data to the cache and send it to the real-time data update channel; Step seven, verify the source of the cached data and the write timestamp source. If it is found that the service names written by the two are inconsistent, that is, a "heterogeneous source" scene occurs, the cached data is heterogeneous data, then the heterogeneous data is converted into snapshot data and sent to the snapshot data update channel.

[0034] After returning the constructed cache data to the data processing service subsystem in the container, the data processing service subsystem directly updates the high-speed real-time data cache in the container, and then compares the corresponding real-time library data timestamp in the cache, and saves the real-time data in the high-speed real-time data cache with the latest timestamp.

[0035] Embodiment 2.

[0036] Real-time data sharing and consistency guarantee between containers. The specific steps are as follows: Step 1: The high-speed real-time data cache service subsystem listens to the real-time data update channel message; Step 2: When the high-speed real-time data cache service subsystem receives the power grid measurement data updated by other sources, it determines whether the cache is established in the container, and does not process it if it is not established; Step 3: If the cache has been established in this container, the cache data timestamp and write timestamp need to be verified to ensure that the measurement data in the cache is the latest timestamp data. After the verification passes, the measurement data is updated to the cache; Step 4: The real-time data synchronization service subsystem listens to the real-time data update channel message; Step 5: After receiving the updated measurement data, the real-time data synchronization service subsystem needs to verify the cache data time stamp and the write time stamp to ensure that the measurement data in the cache is the latest time stamp data. After the verification passes, the measurement data is updated to the cache and updated to the real-time database; Step 6: The display of the dispatching monitoring data is obtained by the dispatching real-time library service subsystem to monitor the measurement data in the real-time library, thereby ensuring the data consistency and stability of the entire system.

[0037] Embodiment three.

[0038] The real-time data snapshot service subsystem is used to store, roll back and view snapshot data. The specific steps are as follows: Step 1: The real-time data snapshot service subsystem listens to the snapshot data update channel; Step 2: After receiving the snapshot data, the real-time data snapshot service subsystem rolls back the snapshot data and deletes the expired snapshot data; Step 3: The real-time data snapshot service subsystem provides a snapshot viewing function. Through a standardized interface, the snapshot data of a specified measurement point can be accessed. The data information includes: measurement ID, measurement name, measurement value, measurement quality code, timestamp, and write source information; Step 4: The real-time data snapshot service subsystem provides a snapshot rollback function, which can roll back the measurement information of a specified measurement point at a specified time through a standardized interface.

[0039] The real-time data snapshot service subsystem stores the historical change data of several frames of real-time dispatching data, facilitates the rollback of historical data and improves the means of detecting problems after dispatching accidents, and provides heterogeneous data query and data recovery functions at the time of power grid accidents.

[0040] Embodiment 4.

[0041] The model change monitoring service subsystem monitors model change messages and triggers the construction of a high-speed real-time data cache model in the container. The specific steps are as follows: Step 1: The model change monitoring service subsystem monitors the power grid model change message. If there is a model change message, the model update message is sent to the model data update channel. The model update message includes: application number, table name and model update time; Step 2: The model change monitoring service subsystem monitors the host machine power grid real-time library download action. If the application host has the power grid real-time library host download, the model update message is sent to the model data update channel; Step 3: The high-speed real-time data cache service subsystem in the container listens to the model data update channel; Step 4: After receiving the model update message, the high-speed real-time data cache service subsystem verifies whether there is a cache of the model in the cache. If so, the model is reconstructed with delay.

[0042] The high-speed real-time data caching service subsystem is directly integrated into the data processing container. It can capture and respond to frequent data access requests, reducing the number of direct accesses to the underlying real-time library, thereby reducing the database load and avoiding potential performance bottlenecks. The real-time data synchronization service subsystem is integrated into the host machine. This read-write separation design allows the system to efficiently process data writing without affecting data reading performance, further improving the overall performance of the system.

[0043] like Figure 2 The diagram shows the architecture of the high-speed real-time data cache service subsystem in the container of the present invention. The high-speed real-time data cache service subsystem includes a data access interface, a data storage module, a data update upstream module, a data update downstream module, and a model synchronization module, etc., which are exposed to the data processing service subsystem in the container. The model synchronization module is connected to the scheduling real-time library service subsystem, the data addition and deletion interface is connected to the real-time data synchronization service subsystem and the real-time data snapshot service subsystem, the data update upstream module is connected to the real-time data update channel, and the data update downstream module is connected to the real-time data update channel and the snapshot data update channel.

[0044] Embodiment five.

[0045] The data access interface of the high-speed real-time data cache service subsystem includes: data reading interface, data update interface and data addition and deletion interface. The data reading interface and data update interface determine whether there is a "page missing" phenomenon in the high-speed real-time data cache. If so, the model synchronization module is called to build the cache and write the data to the data storage module; data reading and data updating are implemented by directly accessing the data storage module, where data updating needs to verify whether the time stamp of the updated data is the latest; the data addition and deletion interface directly implements the cache model update through the model synchronization module, and the data addition and deletion interface sends real-time library data addition and deletion requests to the real-time data synchronization service subsystem or the real-time data snapshot service subsystem.

[0046] Embodiment six.

[0047] When this container has real-time data updates for the power grid, the data update upstream module and the data update downstream module will share the updated data with other containers at high speed and synchronize it to the real-time library of the dispatching and monitoring panel to process heterogeneous data. The specific steps are as follows: Step 1: When the real-time data of the power grid is updated in this container, the data update downstream module distributes the updated real-time data to the real-time data update channel; the real-time data synchronization service listens to the real-time data update channel and writes the updated real-time data into the real-time library of the dispatch monitoring panel; Step 2: When the updated data has a "heterogeneous source" phenomenon, that is, when heterogeneous data exists in the updated data, the data update downstream module distributes the heterogeneous data to the snapshot data update channel, and the real-time data snapshot service subsystem listens to the snapshot data update channel and stores the updated snapshot data in snapshot storage; Step 3: The data update uplink module listens to the real-time data update channel and updates the real-time data processed by other containers to the data storage module of this container.

[0048] Embodiment seven.

[0049] The model synchronization module is used to listen to the model data update channel and provide an interface for model update. The specific steps are as follows: Step 1: When the data processing service subsystem accesses the high-speed real-time data cache service subsystem, a data storage cache "page missing" occurs, and the model synchronization module calls the scheduling real-time library service subsystem to build the cache; Step 2: The model synchronization module monitors the model data update channel. When receiving a model change message, it verifies whether the changed model is cached in this container. If it is cached, it actively calls the scheduling real-time library service subsystem to reconstruct the cache.

[0050] Embodiment eight.

[0051] like Figure 3 The figure shows the design diagram of the high-speed implementation scheme of data storage in the container of the present invention. The high-speed real-time data cache is implemented using the file mapping memory technology (mmap), which maps a file to the address space of the process, and realizes the one-to-one mapping relationship between the file disk address and a virtual address in the process virtual address space. After the mapping relationship is realized, the process can read and write this memory segment in the form of a pointer, and the system will automatically write back the dirty page to the corresponding file disk, that is, the file operation is completed without calling the read / write system call function. On the contrary, the modification of this area by the kernel space is also directly reflected to the user space, thereby realizing file sharing between different processes.

[0052] The power grid model breaks the idea of ​​modeling by application. By synchronizing the model on demand, the power grid model can be tailored according to the data processing service subsystem in a timely manner to increase the usage of memory resources in the container, such as Figure 3 As shown, if only the AC line end meter and the bus meter are used in the data processing service subsystem, then the container will only synchronize the power grid models of the AC line end meter and the bus meter.

[0053] The power grid model breaks the idea of ​​modeling by application. By modeling by device measurement type, it realizes the dynamic scaling of high-speed real-time data cache. It can timely tailor the power grid measurement type according to the data processing service subsystem to improve the memory resource usage in the container. When the power grid model adds measurement types, it triggers the horizontal scaling of the high-speed real-time data cache in the container; when a device is put into operation or decommissioned, it triggers the vertical scaling of the high-speed real-time data cache in the container. Figure 3 As shown, if the data processing service subsystem only uses the active power, reactive power, and current of the AC line end, then the container only synchronizes the active power, reactive power, current, and other measurement type data of the AC line end meter.

[0054] The power grid model creates a memory mapping file according to the measurement type. First, an index file is created. When multiple measurement types are queried by keyword, the record row where the keyword is located can be quickly located through the index file. Then, the location of the relevant measurement type can be quickly located through the memory mapped by the relevant measurement file, and the real-time measurement records of the power grid of multiple measurement types can be quickly spliced ​​together.

[0055] For power grid measurement type files, it is necessary to store information such as the measured value, quality code, measurement source author, and measurement value update time stamp. The measurement update time stamp can ensure that the measurement data in the high-speed real-time data cache is the latest updated measurement data in the system; the measurement source author can trigger the storage mechanism of snapshot data.

[0056] The data storage module exposes the data update interface and the data reading interface, which supports the common interface of heterogeneous systems and can adapt to data reading and writing of different systems.

[0057] like Figure 4 The figure shows the high-speed real-time data interactive access related module architecture diagram of the present invention, which includes a real-time data synchronization service subsystem, a real-time data snapshot service subsystem, a model change monitoring service subsystem, and a snapshot data operation tool.

[0058] Embodiment 9.

[0059] The real-time data synchronization service subsystem includes a time-stamp data storage module, and the real-time data snapshot service subsystem includes a data snapshot storage module. The data of the real-time data update channel, snapshot data update channel, and model data update channel are stored in Figure 4 In the architecture shown, interactive access can be achieved through the following steps: Step 1: The real-time data synchronization service subsystem listens to the real-time data update channel, and when receiving the real-time power grid measurement data after data processing of each container, performs time stamp verification through the time stamp data storage module, and writes the data into the local host real-time library after passing the verification; Step 2: After receiving the heterogeneous data message determined by the high-speed real-time data cache service subsystem of each container, the snapshot data update channel stores the heterogeneous data into the data snapshot storage module; Step 3: The model change monitoring service subsystem monitors the model changes of the real-time library and the downloading actions of the real-time library. After monitoring, the relevant model change message is sent to the model data update channel.

[0060] Embodiment ten.

[0061] like Figure 5 The embodiment of the present invention is shown in the diagram of the implementation architecture of the real-time data snapshot service subsystem. The real-time data snapshot service subsystem shown in the figure includes a data snapshot storage module and a standardized interface. The standardized interface includes a snapshot storage interface, a snapshot recovery interface, and a snapshot viewing interface. The snapshot storage structure of the real-time data snapshot service subsystem occupies little resources, the data viewing takes a short time, and the data rollback is fast. The real-time data snapshot service subsystem receives the message of the snapshot data update channel and stores the snapshot data in the data storage module.

[0062] There is a base class snapshot in the snapshot storage, which stores the most original real-time measurement data in the snapshot, that is, stores the full amount of "sector" data; snapshots are stored by frame at a time of 10 seconds. Snapshot data is stored when it changes, and "sectors" that have not changed no longer occupy storage resources. That is, the storage size occupied by each frame snapshot is different. Snapshots with more data changes occupy more "sector" storage resources, such as Figure 5 In each snapshot, the dotted “sectors” do not occupy actual storage space.

[0063] In addition to basic snapshots, ordinary snapshots merge snapshots in the order of snapshot time according to the storage "sector" resource limit, such as Figure 5 The image shows the storage usage of the "sector" after the snapshots at 01:01:10 and 01:01:00 are merged. The merged snapshot time is the snapshot at 01:01:00, and the "sector" size is the union of the snapshots at the two time points. The data in the overlapping part is based on the snapshot at the latest time.

[0064] like Figure 5 The snapshot viewing result is shown. When viewing a "sector" data, when viewing the specified snapshot data, the snapshot real-time data service will drill down from the starting point of the frame snapshot until a snapshot with data for the "sector" is found, and the data will be returned.

[0065] For the real-time measurement data of the power grid at a specified time, the storage location of the "sector" where the measurement data is located is found according to the real-time measurement data of the power grid, and the "frame position" of the snapshot is found according to the specified time. The "sector" data is searched for the snapshot. After obtaining the real-time measurement data of the power grid to be queried at that time, the measurement data is written into the real-time library in the form of a scheduling real-time library service request, and the scheduling monitoring panel can read the snapshot rollback data.

[0066] In a preferred embodiment, the system for high-speed data interaction in a container also includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, a method for high-speed data interaction in a container in real-time monitoring of a power grid is implemented. The system for high-speed data interaction in a container also includes a computer-readable storage medium storing the computer program. When the computer program is executed by the processor, a method for high-speed data interaction in a container in real-time monitoring of a power grid is implemented.

[0067] The present invention reduces direct access to network real-time library services, reduces latency, improves data access speed, and optimizes data access performance by introducing high-speed data interaction technology within the container. The cache mechanism supports dynamic data management, and can dynamically adjust the cache size and content according to the access frequency and timeliness of the data, thereby optimizing the use of memory and storage resources. The high-speed real-time data cache service subsystem is directly integrated in the data processing container, which can capture and respond to frequent data access requests, reduce the number of direct accesses to the underlying real-time library, thereby reducing the load on the database and avoiding potential performance bottlenecks. The real-time data synchronization service subsystem is integrated in the host machine, and this read-write separation design allows the system to efficiently process data writing without affecting data reading performance, further improving the overall performance. Based on the containerized efficient data storage solution and the data access mechanism between containers, it supports historical tracing of cache data changes, ensures data consistency, efficiency, and data storage stability in interactions between containers, and solves the problem of efficient sharing and synchronization of real-time business data scheduling between containers based on the decoupling of the business layer and the data access layer, giving full play to the advantages of container technology.

[0068] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any simple modification, change and equivalent structural transformation made to the above embodiment based on the technical essence of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A high-speed data interaction system in a container, characterized in that: include: The data processing service subsystem is located in the container and accesses the high-speed real-time data cache service subsystem to read and write the cache data of the dispatching power grid measurement; The high-speed real-time data cache service subsystem is located in the container, realizes high-speed real-time data cache, and performs time stamp verification and source verification on the cached data; A real-time data snapshot service subsystem is connected to the high-speed real-time data cache service subsystem through a snapshot data update channel to store, roll back and view snapshot data; And the real-time data synchronization service subsystem is located in the host machine, connected with the high-speed real-time data cache service subsystem through the real-time data update channel, and writes the received real-time data into the real-time library.

2. A high-speed data interaction system in a container according to claim 1, characterized in that: Also includes: The dispatching real-time library service subsystem is connected to the high-speed real-time data cache service subsystem, and when the device type and measurement type accessed by the data processing service subsystem are not in the cache, the power grid model data is constructed for the missing page data; The model change monitoring service subsystem is connected to the high-speed real-time data cache service subsystem through a model data update channel, and triggers the reconstruction of the high-speed real-time data cache model when the real-time library is downloaded or the power grid model changes.

3. A high-speed data interaction system in a container according to claim 2, characterized in that: The high-speed real-time data cache service subsystem includes: The data access interface exposed to the data processing service subsystem includes a data reading interface, a data updating interface, and a data adding and deleting interface; Data storage module, data reading and data updating are realized by directly accessing the data storage module. Data updating needs to verify whether the time stamp of the updated data is the latest; A data update uplink module listens to the real-time data update channel and updates the real-time data processed by other containers to the data storage module of the current container; A data update downstream module, which updates the real-time data of the container data storage module to the real-time data update channel or the snapshot data update channel; And a model synchronization module, which listens to the model data update channel and provides an interface for model data update.

4. A high-speed data interaction system in a container according to claim 3, characterized in that: High-speed real-time data cache supports dynamic scaling: when the power grid model adds measurement types, it triggers the horizontal scaling of the high-speed real-time data cache in the container; when a device is put into operation or decommissioned, it triggers the vertical scaling of the high-speed real-time data cache in the container.

5. The high-speed data interaction system in a container according to claim 1, characterized in that: The real-time data snapshot service subsystem listens to the snapshot data update channel, and after receiving the snapshot data, rolls back and stores the snapshot data and deletes expired snapshot data; the real-time data snapshot service subsystem provides a snapshot viewing function, and the snapshot data of a specified measurement point can be accessed through a standardized interface; the real-time data snapshot service subsystem also provides a snapshot rollback function, and the measurement information of a specified measurement point at a specified time can be rolled back through a standardized interface.

6. A method for high-speed data interaction in a container, characterized in that: A high-speed data interaction system in a container according to any one of claims 2 to 5, comprising: The high-speed real-time data cache service subsystem in the container reads the power grid measurement data. If the cache has been established, the measurement data in the cache is directly returned. If the cache has not been established, the missing page data is used to build the power grid model data. Perform time stamp verification and source verification on cached data, send the data that passes the time stamp verification to the real-time data update channel, and perform snapshot storage on heterogeneous source data; The high-speed real-time data cache service subsystem in other containers reads the real-time data in the real-time data update channel.

7. A method for high-speed data interaction in a container according to claim 6, characterized in that: After constructing the power grid model data with the missing page data, the constructed cache data is returned to the data processing service subsystem in the container. The data processing service subsystem directly updates the high-speed real-time data cache in the container, and then compares the corresponding real-time library data timestamp in the cache, and saves the real-time data in the high-speed real-time data cache with the data with the latest timestamp.

8. A method for high-speed data interaction in a container according to claim 7, characterized in that: After updating the data of the data processing service subsystem in this container, the high-speed real-time data caching service subsystem distributes the latest time-stamped data to other containers through the real-time data update channel; the high-speed real-time data caching service subsystem distributes the latest time-stamped data to the real-time library through the real-time data synchronization service subsystem.

9. A method for high-speed data interaction in a container according to claim 6, characterized in that: Storing heterogeneous data in snapshot form includes: converting heterogeneous data into snapshot data, and sending the data to the real-time data snapshot service subsystem for storage through a snapshot data update channel.

10. A method for high-speed data interaction in a container according to claim 6 or 8, characterized in that: After the high-speed real-time data cache service subsystem in other containers reads the real-time data in the real-time data update channel, it determines whether the cache of the read real-time data is established. If the cache is not established, no processing is performed. If the cache is established, the cache data is timestamped and the latest timestamp data is updated to the cache and real-time library.

Citation Information

Patent Citations

  • Mobile terminal location data caching and real-time updating system and method

    CN102170634A

  • Elastic caching system based on Docker cloud platform

    CN105357296A

  • Method and system for quickly displaying big data virtual table

    CN109857742A

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

    CN111182017A

  • Multi-container-based asymmetric processing system suitable for ubiquitous power Internet of Things edge terminal

    CN111600936A