Real-time acquisition and storage method and system for transient data of analog machine

By collecting and storing transient data in real time in the simulator, the problem of inability to effectively collect and store transient data in the prior art is solved, detailed analysis and state backtracking of the simulator training process are realized, the simulation accuracy of the simulator is improved, and the accident analysis efficiency is improved.

CN119537453APending Publication Date: 2025-02-28CHINA NUCLEAR POWER OPERATION TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411396710.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Existing simulator products cannot effectively collect and store transient data, resulting in the inability to accurately locate and discover problems during simulator training, which in turn affects the simulation accuracy of the simulator.

Method used

A method and system for real-time acquisition and storage of transient data by simulators is provided, and multiple transient data in the real-time library of the simulator are collected based on preset periods and stored in a preset storage format to a transient database.

Benefits of technology

Real-time, high-precision, and comprehensive collection and storage of transient data during the simulator training process is realized, data reference is provided to improve the simulation accuracy of the simulator, and can assist in analyzing the causes of nuclear power plant accidents and improving the efficiency of accident analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537453A_ABST
    Figure CN119537453A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of nuclear power station analog machines, discloses an analog machine transient data real-time acquisition and storage method and system, and solves the problem that in the prior art, transient data of an analog machine cannot be effectively acquired and stored, so that accurate positioning and finding in the analog machine training process cannot be realized. And the simulation precision of the simulator cannot be improved. According to the method, multiple pieces of transient data in a real-time library of an analog machine are collected based on a preset period, each piece of transient data comprises data of multiple collection points, and the multiple pieces of transient data are stored in a transient database in a preset storage format. According to the invention, real-time, high-precision and omnibearing acquisition and storage of transient data in the analog machine training process are realized, and reference is provided for improvement of the analog machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of nuclear power plant simulators, and in particular to a method and system for real-time acquisition and storage of simulator transient data. Background Art

[0002] The nuclear power plant simulator product is an important tool for training nuclear power plant operators and managers, which is manufactured using simulation technology. This product uses mathematical modeling methods to simulate the operating logic of the nuclear power plant, and constructs a process control system that acts as a coach by building a hardware and software simulation system with the same control principle as the nuclear power plant's Distributed Control System (DCS).

[0003] However, existing simulator products lack the means to efficiently store simulator transient data, resulting in an inability to conduct detailed analysis and status backtracking of the training process, and an inability to accurately locate and discover deficiencies in the simulator's simulation model. As a result, problems in the simulator training process cannot be discovered, that is, the simulation accuracy of the simulator cannot be improved. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for real-time collection and storage of simulator transient data, so as to solve the technical problem that the existing technology cannot effectively collect and store the transient data of the simulator, resulting in the inability to accurately locate and discover problems in the simulator training process, and further resulting in the inability to improve the simulation accuracy of the simulator.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] In a first aspect, the present invention provides a method for real-time acquisition and storage of transient data of a simulator, comprising:

[0007] S101, collecting multiple transient data in the simulator real-time library based on a preset period, each transient data includes data of multiple collection points;

[0008] S102: storing a plurality of transient data in a transient database in a preset storage format.

[0009] In some embodiments, a preset period is read from a configuration file by setting a timer, and transient data is read according to the preset period.

[0010] In some embodiments, S101 includes:

[0011] S201, determining the collection point information based on the configuration table information of the simulator real-time library;

[0012] S202, collecting a plurality of transient data in a real-time library of a simulator based on the collection point information and a preset period.

[0013] In some embodiments, S102 includes:

[0014] S301, writing a plurality of transient data into a constructed message sending queue, and writing a plurality of transient data into a message receiving queue based on the message sending queue;

[0015] S302: consuming multiple transient data in a message receiving queue based on multiple threads in a thread pool, and storing the multiple transient data in a database.

[0016] In some embodiments, a plurality of transient data are packaged in a preset format, and after generating a data packet, the data packet is written into a message sending queue.

[0017] In some embodiments, a data packet is parsed to obtain a plurality of transient data, and the plurality of transient data are consumed.

[0018] In some embodiments, S302 includes:

[0019] S401, start multiple caches corresponding to multiple data receiving threads, and determine whether there are empty caches and full caches in the multiple caches;

[0020] S402, when there is an empty cache in the multiple caches, write the multiple transient data into the empty cache;

[0021] S403: When a cache among the multiple caches is full, write the transient data in the full cache into the transient database to clear the full cache.

[0022] In some embodiments, before S101, the method further includes S100: obtaining a current state of the simulator and determining whether the current state is a running state;

[0023] Then S101 is: if the current state is the running state, a plurality of transient data in the simulator real-time library are collected based on a preset period.

[0024] In some embodiments, the current state also includes a reset state, a frozen state, and a saved state;

[0025] If the current state is frozen, no transient data collection is performed;

[0026] When the current state is reset, clear the cache;

[0027] When the current state is the saving state, the incomplete cache is processed, saved to the transient database, and the transient database is named.

[0028] In some embodiments, S102 includes:

[0029] S501, obtaining the current write performance and current network status of the transient database;

[0030] S502: If the current writing performance and / or the current network status do not meet the requirements, discard the plurality of transient data.

[0031] In a second aspect, the present invention provides a simulator transient data real-time acquisition and storage system, comprising:

[0032] The simulator data server is used to collect multiple transient data in the simulator real-time library based on a preset period, each transient data includes collection point data of multiple collection points;

[0033] The transient data server is used to store multiple transient data in a transient database in a preset storage format.

[0034] Compared with the prior art, the method and system for real-time acquisition and storage of transient data of a simulator provided by the present invention has the following beneficial effects:

[0035] The present invention realizes the real-time, high-precision and all-round collection and storage of transient data in the simulator training process, and provides a reference for the improvement of the simulator.

[0036] The present invention can realize the collection of transient data at multiple collection moments based on a preset period by setting a plurality of transient data in the real-time library of the simulator to be collected based on a preset period. Moreover, by setting a plurality of transient data to be stored in a transient database in a preset storage format, the storage of a plurality of transient data is realized. Based on this, a plurality of transient data can be retrieved from the transient database later, and the playback and tracing of the simulator training process can be realized based on the sequence of sampling moments, and the data can be compared with the real data of the real nuclear power plant to find out the problem of the simulator, and provide data reference for improving the simulation accuracy of the simulator.

[0037] Furthermore, the present invention can also assist in analyzing the causes of nuclear power plant accidents based on transient data, thereby improving the efficiency of accident analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for the technical description.

[0039] Figure 1 A flowchart of a method for real-time acquisition and storage of transient data of a simulator provided by an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of a flow chart of step S101 provided for one embodiment of the present invention;

[0041] Figure 3A schematic flow chart of step S102 provided for one embodiment of the present invention;

[0042] Figure 4 A schematic diagram of the process of step S302 provided for one embodiment of the present invention;

[0043] Figure 5 A schematic flow chart of step S102 provided for another embodiment of the present invention;

[0044] Figure 6 A schematic diagram of the structure of a simulator transient data real-time acquisition and storage system provided in accordance with an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following is further explained in detail through specific implementation methods.

[0046] On the one hand, if Figure 1 As shown, the present invention provides a method for real-time acquisition and storage of transient data of a simulator, comprising:

[0047] S101, collecting multiple transient data in the simulator real-time library based on a preset period, each transient data includes data of multiple collection points;

[0048] S102: storing a plurality of transient data in a transient database in a preset storage format.

[0049] Among them, the preset period can be 1S, 5S, etc., which can be set or adjusted according to actual application scenarios and needs.

[0050] In some embodiments, a timer may be set, the timer reads a preset period from a configuration file, and reads transient data according to the preset period.

[0051] The collection of transient data in the simulator real-time library can be realized through the collection interface of the simulator real-time library.

[0052] To improve the efficiency of collecting multiple transient data from the simulator real-time library, in some embodiments, Figure 2 As shown, step S101 specifically includes:

[0053] S201, determining the collection point information based on the configuration table information of the simulator real-time library;

[0054] S202, collecting a plurality of transient data in a real-time library of a simulator based on the collection point information and a preset period.

[0055] The present invention determines the acquisition point information based on the configuration table information of the simulator real-time library, thereby ensuring that the corresponding acquisition point data can be quickly found from the simulator real-time library based on the acquisition point information, thereby improving the acquisition efficiency of transient data.

[0056] In some embodiments, the configuration table information of the simulator real-time library is shown in Table 1:

[0057] Table 1 Configuration table information

[0058] Field Name describe id Sampling point name type Data Types len Data length objectinvalidity The name of the quality point associated with the sampling point xxx_name Point names stored in the transient database

[0059] As can be seen from Table 1, only based on the above multiple field names can the unique corresponding transient data be found in the simulator real-time library.

[0060] Since nuclear power plant data is numerous, the amount of transient data in the corresponding simulator is huge. To ensure low latency in transient data storage, in some embodiments, Figure 3 As shown, step S102 specifically includes:

[0061] S301, writing a plurality of transient data into a constructed message sending queue, and writing a plurality of transient data into a message receiving queue based on the message sending queue;

[0062] S302: consuming multiple transient data in a message receiving queue based on multiple threads in a thread pool, and storing the multiple transient data in a database.

[0063] It should be noted that in order to improve the transmission reliability of multiple transient data, in some embodiments, step S301 is specifically: packing multiple transient data in a preset format, generating a data packet and writing it into a message sending queue, and step S302 is specifically: parsing the data packet, obtaining multiple transient data, and consuming the multiple transient data.

[0064] In step S302, a plurality of transient data may be written into the database based on a write interface of the transient database.

[0065] The embodiment of the present invention realizes the transmission and storage of transient data by adopting high-performance message sending queues and message receiving queues. On the one hand, it can realize the processing of large amounts of data and reduce the delay in the process of transient data transmission. On the other hand, it ensures the reliability of data. Furthermore, in the embodiment of the present invention, based on multiple threads in the thread pool consuming multiple transient data, a one-to-many "producer-consumer" mode of data is realized. On the one hand, asynchronous storage of transient data can be realized. On the other hand, thread resources can be uniformly managed to reduce competition between threads, prevent excessive occupation of resources from causing low storage efficiency, and improve the storage efficiency of transient data.

[0066] When no transient data is received in the message receiving queue, the message receiving queue remains in a waiting state.

[0067] In some embodiments, Figure 4 As shown, step S302 specifically includes:

[0068] S401, start multiple caches corresponding to multiple data receiving threads, and determine whether there are empty caches and full caches in the multiple caches;

[0069] S402, when there is an empty cache in the multiple caches, write the multiple transient data into the empty cache;

[0070] S403: When a cache among the multiple caches is full, write the transient data in the full cache into the transient database to clear the full cache.

[0071] The embodiment of the present invention can eliminate the technical problem of mismatch in read and write efficiency between the thread and the transient database by setting a cache between the thread and the transient database, thereby improving the data writing performance of the transient database.

[0072] It should be noted that a consumer is bound to a thread and a cache. After the message receiving thread receives a message from the message receiving queue, it polls the cache collection. When an empty cache is found, the received transient data is written into the empty cache in sequence. Once the cache is full, the consumer thread related to the full cache is awakened to start consuming transient data. The message receiving thread finds another empty cache to write to. At the same time, once the consumer has processed the corresponding cache data, it enters a dormant state and waits to be awakened next time.

[0073] Since in actual applications, the focus is on transient data of the simulator during operation, rather than transient data of the simulator in a non-operating state, in some embodiments, before step S101, the following steps are further included:

[0074] S100, obtaining the current state of the simulator, and determining whether the current state is a running state;

[0075] Then step S101 is specifically as follows:

[0076] If the current state is the running state, multiple transient data in the simulator real-time library are collected based on a preset period.

[0077] That is, the embodiment of the present invention only obtains transient data when the current state of the simulator is the operating state, thereby reducing unnecessary acquisition of transient data in the non-operating state.

[0078] In some embodiments, the non-operating state includes a reset state, a freeze state, a save state, and the like.

[0079] If the current state is frozen, no transient data collection is performed;

[0080] If the current state is reset, clear the cache;

[0081] If the current state is the saving state, the unfull cache in the cache is processed, the data in the unfull cache is saved to the transient database, and the transient database is named.

[0082] The embodiment of the present invention can control the transient data collection and storage process according to the collected state information, and realize the operation control in the running state and different non-running states. In other words, the real-time collection and storage method of the simulator transient data needs to obtain the state information first, and control the collection and storage process of the transient data based on the state information.

[0083] Since transient data is data that is strongly time-dependent, in some embodiments, the transient data includes a transient data value and a transient data timestamp.

[0084] The embodiment of the present invention sets the transient data to include a transient data timestamp, so that when replaying the transient data, the transient data can be replayed based on the chronological order, and the change process of the transient data can be analyzed, thereby improving the reliability and accuracy of the analysis.

[0085] In some embodiments, the preset storage format in step S403 is as shown in Table 2:

[0086] Table 2 Preset storage format

[0087] Field Name describe id Record Identification timestamp Record generation time Data The information of each sampling point is stored in the form of {point name: value}

[0088] In some embodiments, the configuration table information of the simulator real-time library is a relational database, and the transient database is a non-relational database.

[0089] The embodiment of the present invention can make the database structure simple, flexible and rich by setting the database as a non-relational database, so that it has very high read and write performance, and can create indexes for any attribute in the database to improve query efficiency and sorting performance. By setting the simulator real-time library as a relational database, the accuracy and standardization of transient data can be improved.

[0090] In some embodiments, the configuration table information of the simulator real-time library is MySQL, and the transient database is MongoDB.

[0091] To improve the reliability and security of transient data in the database, in some embodiments, Figure 5 As shown, step S102 specifically includes:

[0092] S501, obtaining the current write performance and current network status of the transient database;

[0093] S502: If the current writing performance and / or the current network status do not meet the requirements, discard the plurality of transient data.

[0094] It should be noted that Figure 3 The specific steps refer to processing a large amount of transient data based on message queues and multi-threaded parallel consumption. The specific content of step S102 here is the problem of the impact on existing data caused by poor network status and write performance when transient data is written. The two are to improve the storage efficiency and reliability of transient data from two different dimensions.

[0095] The embodiment of the present invention discards multiple transient data when the current write performance and / or the current network status do not meet the requirements, avoiding the transient data that does not meet the requirements from being stored in the database, which has an adverse impact on the original transient data in the database, and ensuring the security and reliability of the transient data in the database.

[0096] Among them, if the performance value of the current write performance is lower than the preset performance value, the current write performance does not meet the requirements; if the transmission force of the current network state is lower than the preset transmission force, the current network state does not meet the requirements.

[0097] On the other hand, in order to better implement the simulator transient data real-time acquisition and storage method in the embodiment of the present invention, based on the simulator transient data real-time acquisition and storage method, the present invention also provides a simulator transient data real-time acquisition and storage system 600, such as Figure 6 As shown, the system includes: a simulator data server 601 and a transient data server 602 .

[0098] The simulator data server 601 is used to collect multiple transient data in the simulator real-time library based on a preset period, each transient data includes collection point data of multiple collection points;

[0099] The transient data server 602 is used to store a plurality of transient data in a transient database in a preset storage format.

[0100] The simulator transient data real-time acquisition and storage system 600 provided in the embodiment of the present invention can acquire multiple transient data in the simulator real-time library based on a preset period by setting a simulator data server 601, and can realize the acquisition of transient data at multiple acquisition moments based on a preset period. In addition, by setting a transient data server 602, multiple transient data are stored in a transient database in a preset storage format, thereby realizing the storage of multiple transient data. Based on this, multiple transient data can be retrieved from the transient database in the future, and the simulator training process can be replayed and traced based on the sequence of sampling moments, and compared with the real data of the real nuclear power plant, the problem of the simulator can be found, and data reference can be provided for improving the simulation accuracy of the simulator. Furthermore, transient data can also be used to assist in analyzing the cause of the accident in the nuclear power plant and improve the efficiency of accident analysis.

[0101] In some application scenarios, it is necessary to call the transient data in the database and periodically transmit it to the simulator real-time library to realize the playback of the training process in the simulator, that is, it is necessary to realize full-duplex communication between the simulator data server 601 and the transient data server 602. Therefore, in some embodiments of the present invention, Figure 6 As shown, the simulator transient data real-time collection and storage system 600 also includes a switch 603 connecting the simulator data server 601 and the transient data server 602 .

[0102] The embodiment of the present invention realizes full-duplex communication between the simulator data server 601 and the transient data server 602 by setting the switch 603, so that it is applicable to multiple usage scenarios of the simulator.

[0103] The simulator transient data real-time collection and storage system 600 provided in the above embodiment can implement the technical solution described in the above simulator transient data real-time collection and storage method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above simulator transient data real-time collection and storage method embodiment, which will not be repeated here.

[0104] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for real-time acquisition and storage of transient data of a simulator, characterized in that: include: S101, collecting multiple transient data in the simulator real-time library based on a preset period, each transient data includes data of multiple collection points; S102: storing a plurality of transient data in a transient database in a preset storage format.

2. The method for real-time acquisition and storage of transient data of a simulator according to claim 1, characterized in that: S101 includes: S201, determining the collection point information based on the configuration table information of the simulator real-time library; S202, collecting a plurality of transient data in a real-time library of a simulator based on the collection point information and a preset period.

3. The method for real-time acquisition and storage of transient data of a simulator according to claim 1 or 2, characterized in that: S102 includes: S301, writing a plurality of transient data into a constructed message sending queue, and writing a plurality of transient data into a message receiving queue based on the message sending queue; S302: consuming multiple transient data in a message receiving queue based on multiple threads in a thread pool, and storing the multiple transient data in a database.

4. The method for real-time acquisition and storage of transient data of a simulator according to claim 3, characterized in that: In S301, a plurality of transient data are packaged in a preset format, and after generating a data packet, the data packet is written into a message sending queue.

5. The method for real-time acquisition and storage of transient data of a simulator according to claim 3, characterized in that: In S302, the data packet is parsed to obtain a plurality of transient data, and the plurality of transient data are consumed.

6. The method for real-time acquisition and storage of transient data of a simulator according to claim 3, characterized in that: S302 includes: S401, start multiple caches corresponding to multiple data receiving threads, and determine whether there are empty caches and full caches in the multiple caches; S402, when there is an empty cache in the multiple caches, write the multiple transient data into the empty cache; S403: When a cache among the multiple caches is full, write the transient data in the full cache into the transient database to clear the full cache.

7. The method for real-time acquisition and storage of transient data of a simulator according to claim 1, characterized in that: Before S101, the process further includes S100: obtaining the current state of the simulator and determining whether the current state is a running state; Then S101 is: if the current state is the running state, a plurality of transient data in the simulator real-time library are collected based on a preset period.

8. The method for real-time acquisition and storage of transient data of a simulator according to claim 7, characterized in that: The current state also includes a reset state, a frozen state, and a saved state; When the current state is frozen, transient data collection is not performed; When the current state is reset, clear the cache; When the current state is the saving state, the incomplete cache is processed, saved to the transient database, and the transient database is named.

9. The method for real-time acquisition and storage of transient data of a simulator according to claim 1, characterized in that: S102 includes: S501, obtaining the current write performance and current network status of the transient database; S502: If the current writing performance and / or the current network status do not meet the requirements, discard the plurality of transient data.

10. A simulator transient data real-time acquisition and storage system, characterized in that: include: The simulator data server is used to collect multiple transient data in the simulator real-time library based on a preset period, each transient data includes collection point data of multiple collection points; The transient data server is used to store multiple transient data in a transient database in a preset storage format.