Nuclear power station DCS data acquisition system, method, device, equipment and medium
By introducing data point configuration subsystem, thread management subsystem, data point allocation subsystem and data management subsystem in the DCS data acquisition system of nuclear power plant, the problems of inconvenient data configuration and low data acquisition efficiency in the existing technology are solved, and a more efficient and flexible data acquisition process is achieved.
Patent Information
- Application Number
- CN202311709097.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-13
- Publication Date
- 2025-06-13
AI Technical Summary
In the prior art, the DCS data configuration process of nuclear power plants is poor user-friendly, and the data acquisition process has problems such as wasting resources, low real-time, heavy system burden, and difficulty in effectively managing and processing data acquisition requests.
Provide a DCS data acquisition system for nuclear power plants, including a data point configuration subsystem, a thread management subsystem, a data point allocation subsystem and a data management subsystem. Configure data points through data point configuration files, use publish subscription mode to exchange data, and optimize data acquisition performance through multi-threading.
It improves the convenience and flexibility of data point configuration, reduces resource waste and system burden, improves the real-time data update and the response speed of the data acquisition system.
Smart Images

Figure CN120148922A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of nuclear power technology, and in particular, to a DCS data acquisition system, method, device, equipment and medium for a nuclear power plant. Background Art
[0002] The digital instrument and control (DCS) system of a nuclear power plant often needs to use the parameter configuration interface provided by the software to manage and configure a large number of data points with different acquisition intervals, and adopts a polling method to acquire the DCS data of the nuclear power plant, and updates and pushes the DCS data of all devices in the DCS system of the nuclear power plant at a specific frequency. This parameter configuration interface provided by the software is usually relatively complex, with a high learning cost, poor convenience and flexibility. Moreover, when using the polling method to acquire the DCS data of the nuclear power plant, there are often problems such as resource waste, low real-time performance, heavy system burden, and difficulty in effectively managing and processing the DCS data acquisition requests of the nuclear power plant. Summary of the Invention
[0003] This application provides a DCS data acquisition system, method, device, equipment and medium for a nuclear power plant, which is used to solve the problem of poor user-friendliness in the process of configuring DCS data of a nuclear power plant in the prior art, and the problems of resource waste, poor real-time performance, heavy system burden, and difficulty in effectively managing and processing the DCS data acquisition requests in the process of acquiring DCS data of a nuclear power plant. Among them, the technical solutions provided by this application are as follows:
[0004] On the one hand, this application provides a DCS data acquisition system for a nuclear power plant, including a data point configuration subsystem, a data point allocation subsystem, a thread management subsystem and a data management subsystem;
[0005] The data point configuration subsystem is used to receive the data point configuration file corresponding to the imported target data acquisition task, and parse the data point configuration file to obtain the data point configuration data corresponding to the target data acquisition task; wherein, the data point configuration data at least includes the data point name, data type and data point acquisition frequency of each data point;
[0006] The thread management subsystem is used to determine the optimal number of threads based on the current task complexity corresponding to the target data acquisition task, the current device performance value and the current system load of the DCS data acquisition system for the nuclear power plant; create data acquisition threads according to the optimal number of threads, and put each created data acquisition thread into the data acquisition thread pool;
[0007] A data point allocation subsystem, which is used to divide each data point with the same data point collection frequency into the same data point group based on the data point collection frequencies of each data point to obtain at least one data point group; based on the number of data points and the data point collection frequencies of each data point group, evenly allocate each data point group to each data collection thread in the data collection thread pool; for each data collection thread, based on the number of data points and the data point collection frequencies of the data points corresponding to the various topic tasks of the data collection thread, evenly allocate the data points in the data point group corresponding to the data collection thread to the various topic tasks corresponding to the data collection thread.
[0008] A data management subsystem, which is used to start each data collection thread in the data collection thread pool, and receive and save the nuclear power plant DCS data of the data points in the target topic task published when the nuclear power plant DCS data of the data points in the target topic task subscribed by each data collection thread changes through the publish-subscribe mode adopted by each data collection thread; wherein, the target topic task subscribed by each data collection thread is the topic task among the various topic tasks corresponding to the data collection thread.
[0009] On the other hand, the present application provides a method for collecting nuclear power plant DCS data, including:
[0010] Obtain a data point configuration file corresponding to the target data collection task;
[0011] Parse the data point configuration file to obtain the data point configuration data corresponding to the target data collection task; wherein, the data point configuration data at least includes the data point name, data type and data point collection frequency of each data point.
[0012] Based on the current task complexity corresponding to the target data collection task, the current device performance value and the current system load of the nuclear power plant DCS data collection system, determine the optimal number of threads;
[0013] Create data collection threads according to the optimal number of threads, and put the created data collection threads into the data collection thread pool;
[0014] Based on the data point collection frequencies of each data point, divide each data point with the same data point collection frequency into the same data point group to obtain at least one data point group;
[0015] Based on the number of data points and the data point collection frequencies of each data point group, evenly allocate each data point group to each data collection thread in the data collection thread pool;
[0016] For each data acquisition thread, based on the number of data points and the data point acquisition frequency of each topic task corresponding to the data acquisition thread, evenly distribute the data points in the data point group corresponding to the data acquisition thread to each topic task corresponding to the data acquisition thread;
[0017] Start each data acquisition thread in the data acquisition thread pool. Through the publish-subscribe mode adopted by each data acquisition thread, receive the nuclear power plant DCS data of the data points in the target topic task subscribed by each data acquisition thread in the nuclear power plant DCS system when the nuclear power plant DCS data of the data points in the target topic task changes and save it; wherein, the target topic task subscribed by each data acquisition thread is the topic task in each topic task corresponding to the data acquisition thread.
[0018] On the other hand, the present application provides a nuclear power plant DCS data acquisition device, including:
[0019] A file acquisition unit, configured to acquire a data point configuration file corresponding to a target data acquisition task;
[0020] A file parsing unit, configured to parse the data point configuration file to obtain data point configuration data corresponding to the target data acquisition task; wherein, the data point configuration data at least includes the data point name, data type, and data point acquisition frequency of each data point;
[0021] A quantity determination unit, configured to determine the optimal number of threads based on the current task complexity corresponding to the target data acquisition task, the current device performance value, and the current system load of the nuclear power plant DCS data acquisition system;
[0022] A thread creation unit, configured to create data acquisition threads according to the optimal number of threads and put the created data acquisition threads into a data acquisition thread pool;
[0023] A data point grouping unit, configured to divide each data point with the same data point acquisition frequency into the same data point group based on the data point acquisition frequency of each data point to obtain at least one data point group;
[0024] A first allocation unit, configured to evenly distribute each data point group to each data acquisition thread in the data acquisition thread pool based on the number of data points and the data point acquisition frequency of each data point group;
[0025] A second allocation unit, configured to, for each data acquisition thread, evenly distribute the data points in the data point group corresponding to the data acquisition thread to each topic task corresponding to the data acquisition thread based on the number of data points and the data point acquisition frequency of each topic task corresponding to the data acquisition thread;
[0026] The data acquisition unit is used to start each data acquisition thread in the data acquisition thread pool, and through the publish-subscribe mode adopted by each data acquisition thread, receive the nuclear power plant DCS data of the data points in the target topic task subscribed by each data acquisition thread in the nuclear power plant DCS system when the nuclear power plant DCS data of the data points in the target topic task changes and save it; wherein, the target topic task subscribed by each data acquisition thread is the topic task among the respective topic tasks corresponding to the data acquisition thread.
[0027] On the other hand, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned nuclear power plant DCS data acquisition method is implemented.
[0028] On the other hand, the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the above-mentioned nuclear power plant DCS data acquisition method is implemented.
[0029] The beneficial effects of the present application are as follows:
[0030] In the present application, by using a data point configuration file to configure data point configuration data such as the data point name, data type, and data point acquisition frequency of each data point corresponding to the target data acquisition task, on the one hand, it is convenient for users to fill in and edit the data point configuration data, reducing the user learning curve and complexity and reducing the risk of data point configuration errors. On the other hand, it is convenient for users to process a large number of data points with different acquisition frequencies at one time, improving the flexibility and convenience of data point configuration and meeting the personalized configuration needs of specific application scenarios. Moreover, in the present application, by adopting the publish-subscribe mode for data exchange between the nuclear power plant DCS data acquisition system and the nuclear power plant DCS system, on the one hand, it is possible to select and subscribe to the data points of interest according to actual needs without having to obtain the nuclear power plant DCS data of all devices in the nuclear power plant DCS system, thereby improving the flexibility of the nuclear power plant DCS data acquisition system. On the other hand, only when the nuclear power plant DCS data of the subscribed data points changes, the devices in the nuclear power plant DCS system will publish updates to the nuclear power plant DCS data acquisition system, thereby eliminating unnecessary data polling, improving the real-time performance of data update, and reducing the waste of network bandwidth and processing resources. In addition, in the present application, by adopting a multi-threaded method for data publishing and subscribing, the nuclear power plant DCS data acquisition system can process multiple subscription and publishing operations simultaneously, thereby optimizing the performance of the nuclear power plant DCS data acquisition system and improving the response speed of the nuclear power plant DCS data acquisition system.
[0031] Other features and advantages of the present application will be set forth in the following description, and in part will be obvious from the description, or may be learned by practice of the present application. The objectives and other advantages of the present application may be realized and attained by the structure particularly pointed out in the written description, claims, as well as the drawings. Description of the Drawings
[0032] The drawings described herein are provided to further understand the present application and form a part of the present application. The schematic diagrams and descriptions thereof are used to explain the present application and shall not unduly limit the present application. In the drawings:
[0033] Figure 1 It is a schematic diagram of the system framework of the DCS data acquisition system in a nuclear power plant in an embodiment of the present application;
[0034] Figure 2 It is a schematic flowchart of a method for DCS data acquisition in a nuclear power plant in an embodiment of the present application;
[0035] Figure 3 It is another schematic flowchart of a method for DCS data acquisition in a nuclear power plant in an embodiment of the present application;
[0036] Figure 4 It is a schematic diagram of the functional structure of a DCS data acquisition device in a nuclear power plant in an embodiment of the present application;
[0037] Figure 5 It is a schematic diagram of the hardware structure of an electronic device in an embodiment of the present application. Detailed Embodiments
[0038] In order to make the objectives, technical solutions and beneficial effects of the present application clearer and more understandable, the technical solutions of the present application will be clearly and completely described below in conjunction with the embodiments and the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0039] For the convenience of those skilled in the art to better understand the present application, the technical terms involved in the present application will be briefly introduced below.
[0040] The DCS system of a nuclear power plant is a distributed control system based on computers and network communication. Its main foundation is the 4C technology, namely computer (Computer), control (Control), communication (Communication), and cathode ray tube (CRT) display. The DCS system of a nuclear power plant connects the field control stations, operator stations, and engineer stations distributed near the nuclear power plant through a communication network based on protocols such as the MODBUS serial communication protocol and the Ethernet / IP communication protocol to complete the decentralized control and centralized operation management of various nuclear power equipment such as nuclear reactors and actuators in the nuclear power plant.
[0041] Object Linking and Embedding for Process Control Unified Architecture (OPC UA) for process control is an open communication protocol for securely and reliably exchanging DCS data of a nuclear power plant between the DCS system of a nuclear power plant and the DCS data acquisition system of a nuclear power plant.
[0042] A data point is a monitoring node configured on the nuclear power equipment in the DCS system of a nuclear power plant. The DCS data of this data point is the monitoring data of this data point. For example, assuming the data point is the voltage of a nuclear reactor, then the DCS data of this data point is the current voltage value of the nuclear reactor. Another example, assuming the data point is the temperature of a nuclear reactor, then the DCS data of this data point is the current temperature value of the nuclear reactor.
[0043] A topic task is a data acquisition task divided by shunting each data point responsible for by a data acquisition thread. In this application, the topic task can also be referred to as a publish / subscribe task.
[0044] After introducing the technical terms involved in this application, next, the technical solution provided by this application will be described in detail.
[0045] An embodiment of this application provides a DCS data acquisition system for a nuclear power plant. Refer to Figure 1 As shown, the DCS data acquisition system 100 provided by the embodiment of this application at least includes a data point configuration subsystem 101, a thread management subsystem 102, a data point allocation subsystem 103, and a data management subsystem 104;
[0046] The data point configuration subsystem 101 is used to receive the data point configuration file corresponding to the imported target data acquisition task and parse the data point configuration file to obtain the data point configuration data corresponding to the target data acquisition task; wherein, the data point configuration data at least includes the data point name, data type, and data point acquisition frequency of each data point;
[0047] A thread management subsystem 102 is configured to determine an optimal number of threads based on the current task complexity corresponding to the target data collection task, the current device performance value, and the current system load of the nuclear power plant DCS data collection system; create data collection threads according to the optimal number of threads, and put each created data collection thread into a data collection thread pool;
[0048] A data point allocation subsystem 103 is configured to divide data points with the same collection frequency into the same data point group to obtain at least one data point group based on the data point collection frequency of each data point; evenly allocate each data point group to each data collection thread in the data collection thread pool based on the number of data points and the data point collection frequency of each data point group; evenly allocate the data points in the data point group corresponding to each data collection thread to each subject task based on the number of data points and the data point collection frequency of each subject task corresponding to the target data collection task;
[0049] A data management subsystem 104 is configured to start each data collection thread, and receive and save the nuclear power plant DCS data of the data points in the target subject task published when the nuclear power plant DCS data of the data points in the target subject task subscribed by each data collection thread changes through the publish-subscribe mode adopted by each data collection thread; wherein, the target subject task subscribed by each data collection thread is the subject task in each subject task corresponding to the data collection thread.
[0050] In a possible implementation manner, when receiving a data point configuration instruction for a target data collection task, a data point configuration subsystem 101 is further configured to generate a data point configuration template based on each data point corresponding to the pre-configured target data collection task, and encrypt the data point configuration template based on a pre-configured file password; when receiving an edit instruction for the data point configuration template, display a password input interface, obtain the file password input on the password input interface, and verify the input file password based on the pre-configured file password. When it is determined that the input file password verification is successful, configure the data point configuration template to an editable mode; obtain the data point name, data type, and data point collection frequency input for each data point in the data point configuration template, and generate a data point configuration file corresponding to the target data collection task based on the data point name, data type, and data point collection frequency of each data point.
[0051] In a possible implementation, the data point configuration subsystem 101 is further configured to perform validity and compliance verification on the data point names, data types, and data point collection frequencies of the data points input in the data point configuration template; among them, the data type is verified for validity and compliance in the form of a drop-down box option; the data point name and the data point collection frequency are verified for validity and compliance in the form of a regular expression.
[0052] In a possible implementation, the thread management subsystem 102 is specifically configured to determine the optimal number of threads based on the ratio between the current device performance value and the product of the current task complexity and the current system load.
[0053] In a possible implementation, the data point allocation subsystem 103 is specifically configured to repeatedly perform data point allocation operations for each data collection thread until the data points in the data point group corresponding to the data collection thread are all allocated; among them, the data point allocation operation includes: determining the data points to be allocated from the data point group corresponding to the data collection thread; determining the current weight values of the respective theme tasks corresponding to the data collection thread; allocating the data points to be allocated to the theme task with the smallest current weight value among the respective theme tasks; and adding the set value to the current weight value of the theme task with the smallest current weight value; where, at the first allocation, the current weight values of the respective theme tasks corresponding to the data collection thread are the initial weight values.
[0054] In a possible implementation, the data point allocation subsystem 103 is further configured to determine the initial weight values of the respective theme tasks based on the number of data points and the data point collection frequencies of the respective theme tasks.
[0055] Based on the above embodiments, an embodiment of the present application provides a method for collecting nuclear power plant DCS data. Refer to Figure 2 As shown, the flow of the method for collecting nuclear power plant DCS data provided by the embodiment of the present application is as follows:
[0056] Step 201: Receive the data point configuration file corresponding to the imported target data collection task.
[0057] In the embodiments of the present application, the data point configuration file may be, but is not limited to, an Excel file, a Word file, etc. The user enters the data point editing interface by clicking virtual buttons such as "Edit" on the user interface of the data point configuration subsystem in the nuclear power plant DCS data acquisition system. In the data point editing interface, the data point configuration subsystem provides a data point configuration template. In this data point configuration template, each data point of the target data acquisition task is predefined according to the actual requirements of the target data acquisition task. For example, each data point of the target data acquisition task is predefined in the columns of the table in the data point configuration template. The user can fill in and edit data point configuration data such as the data point name, data type, and data point acquisition frequency of each data point in the data point configuration template. After the user fills in and edits, the data point configuration subsystem generates a data point configuration file based on the data point configuration data such as the data point name, data type, and data point acquisition frequency of each data point corresponding to the target data acquisition task edited in the data point configuration template. In this way, on the one hand, it is convenient for the user to fill in and edit data point configuration data such as the data point name, data type, and data point acquisition frequency of each data point in the data point configuration template, reducing the user learning curve and complexity and reducing the risk of data point configuration errors; on the other hand, it is also convenient for the user to process a large number of data points with different acquisition frequencies at one time, improving the flexibility and convenience of data point configuration and meeting the personalized configuration requirements of specific application scenarios.
[0058] Further, after the user configures the data point configuration file of the target data acquisition task, the user can also import the data point configuration file of the target data acquisition task on the user interface of the data point configuration subsystem in the nuclear power plant DCS data acquisition system by clicking virtual buttons such as "Import".
[0059] Step 202: Parse the data point configuration file to obtain the data point configuration data corresponding to the target data acquisition task; wherein, the data point configuration data at least includes the data point name, data type, and data point acquisition frequency of each data point.
[0060] In the embodiment of the present application, when the data point configuration subsystem receives the data point configuration file of the target data acquisition task imported by the user, it can also verify the data point configuration file. Specifically, a password input interface can be displayed for the user to input the file password, which can be the login password when the user registers for the nuclear power plant DCS data acquisition system, or a custom password configured by the user after registering for the nuclear power plant DCS data acquisition system. After the user inputs the file password, after the data point configuration subsystem obtains the second file password input by the user on the password input interface, it verifies the second file password based on the saved first file password. When it is determined that the verification of the second file password is successful, the data point configuration file is parsed to obtain the data point configuration data corresponding to the target data acquisition task; each data point corresponding to the target data acquisition task is predefined in the data point configuration template corresponding to the target data acquisition task. According to the data point configuration template format corresponding to the target data acquisition task, parsing the data point configuration file corresponding to the target data acquisition task can obtain data point configuration data such as the data point name, data type, and data point acquisition frequency of each data point corresponding to the target data acquisition task.
[0061] Step 203: Determine the optimal number of threads based on the current task complexity corresponding to the target data acquisition task, the current device performance value, and the current system load of the nuclear power plant DCS data acquisition system.
[0062] In the embodiment of the present application, when determining the optimal number of threads based on the current task complexity corresponding to the target data acquisition task, the current device performance value, and the current system load of the nuclear power plant DCS data acquisition system, the optimal number of threads can be determined based on the ratio between the current device performance value and the product of the current task complexity and the current system load, that is, the following formula is used to determine the optimal number of threads:
[0063] Optimal number of threads = current device performance value / (current task complexity * current system load)
[0064] In the above formula, the current device performance value is used to measure the current performance of the electronic device running the nuclear power plant DCS data acquisition system, and can be evaluated based on indicators such as the processor speed, memory size, and bandwidth of the electronic device; the current task complexity is used to measure the complexity of the target data acquisition task, and can be evaluated based on indicators such as the computing requirements, data volume, and processing time of the target data acquisition task; the current system load is used to measure the current load of the nuclear power plant DCS data acquisition system, and can be evaluated based on indicators such as the task queue length, processor utilization, and memory utilization.
[0065] Step 204: Create data acquisition threads according to the optimal number of threads, and put each created data acquisition thread into the data acquisition thread pool.
[0066] In the embodiment of the present application, the data acquisition thread pool is a mechanism for managing and reusing data acquisition threads, which can improve the performance and resource management efficiency of the nuclear power plant DCS data acquisition system. The parameters of the data acquisition thread pool supported by the nuclear power plant DCS data acquisition system include the core number of threads, the maximum number of threads, the thread survival time, the waiting queue, the rejection policy, and so on. By managing the created data acquisition threads through the data acquisition thread pool in the embodiment of the present application, effective resource management can be realized, the overhead of frequently creating and destroying data acquisition threads can be reduced, and the resource utilization rate of the nuclear power plant DCS data acquisition system can be improved. The data acquisition thread pool can reuse the created data acquisition threads, reduce the time consumption of creating and destroying data acquisition threads, and improve the utilization rate of data acquisition threads; by setting the core number of threads, the maximum number of threads, and the size of the waiting queue in the data acquisition thread pool, the number of publish / subscribe tasks executed concurrently can be precisely controlled to prevent over-occupation of resources; the data acquisition thread pool can queue the publish / subscribe tasks to ensure execution in the order of first in first out, thereby improving the orderliness of the publish / subscribe tasks; when the load of the nuclear power plant DCS data acquisition system is too high, the data acquisition thread pool can control the reception of new publish / subscribe tasks according to the configured rejection policy to avoid the collapse or performance degradation of the nuclear power plant DCS data acquisition system; the data acquisition threads in the data acquisition thread pool have been created and are in the ready state, and can execute tasks immediately, thereby improving the response speed of the nuclear power plant DCS data acquisition system.
[0067] Step 205: Based on the data point acquisition frequencies of each data point, divide the data points with the same acquisition frequency into the same data point group to obtain at least one data point group.
[0068] In the embodiment of the present application, according to the data point acquisition frequencies of each data point, each data point is divided into different data point groups, and the data points in each data point group have the same data point acquisition frequency. For example, assume there are n data points, and the n data points are divided into k data point groups, where k represents the number of different data point acquisition frequencies, and different data point acquisition frequencies can be represented by F 1 , F 2 ,..., F k to represent.
[0069] Step 206: Based on the number of data points and the data point acquisition frequencies of each data point group, evenly distribute each data point group to each data acquisition thread in the data acquisition thread pool.
[0070] In the embodiments of the present application, based on the number of data points and the data point collection frequency of each data point group, each data point group is assigned to each data collection thread in the data collection thread pool to ensure load balancing among the data collection threads. Specifically, based on the number of data points and the data point collection frequency of each data point group, the load of each data point group is determined. For example, the sum of the product of the number of data points in the data point group and the first weight value and the product of the data point collection frequency and the second weight value is determined as the load of the data point group. Based on the load of each data point group, each data point group is assigned to each data collection thread in the data collection thread pool to ensure load balancing among the data collection threads.
[0071] Step 207: Based on the number of data points and the data point collection frequency of each subject task corresponding to the target data collection task, the data points in the data point group corresponding to each data collection thread are evenly assigned to each subject task.
[0072] In the embodiments of the present application, when evenly assigning the data points in the data point group corresponding to each data collection thread to each subject task based on the number of data points and the data point collection frequency of each subject task corresponding to the target data collection task, the following data point assignment operations can be specifically performed in a loop for each data collection thread until it is determined that the data points in the data point group corresponding to the data collection thread are all assigned:
[0073] Step 1: Determine the data points to be assigned from the data point group corresponding to the data collection thread. Specifically, each data point in the data point group corresponding to the data collection thread can be sequentially determined as the data point to be assigned.
[0074] Step 2: Determine the current weight values of each subject task corresponding to the data collection thread. Among them, when the data point assignment operation is performed for the first time, the current weight values of each subject task corresponding to the data collection thread are the initial weight values. When the data point assignment operation is not performed for the first time, the current weight values of each subject task corresponding to the data collection thread are the target weight values obtained when the data point assignment operation was performed last time. Specifically, the initial weight values of each subject task can be determined based on the number of data points and the data point collection frequency of each subject task corresponding to the data collection thread.
[0075] Step 3: Assign the data points to be assigned to the subject task with the smallest current weight value among each subject task.
[0076] Step 4: Add the set value to the current weight value of the subject task with the smallest current weight value to obtain the target weight value. For example, assume that the subject task with the smallest current weight value is Subject Task A, and its current weight value is 0.2. Then, the set value 0.1 can be added to the current weight value 0.2 of Subject Task A to obtain the target weight value, that is, the target weight value of Subject Task A is 0.2 + 0.1 = 0.3.
[0077] Step 5: When it is determined that the data points in the data point group corresponding to the data collection thread are not all allocated, return to Step 1.
[0078] Step 208: Start each data collection thread. Through the publish-subscribe mode adopted by each data collection thread, receive the nuclear power plant DCS data of the data points in the target subject task subscribed by each data collection thread when the nuclear power plant DCS data of the data points in the target subject task subscribed by the nuclear power plant DCS system changes and save it; where the target subject task subscribed by each data collection thread is the subject task in each subject task corresponding to the data collection thread.
[0079] In the embodiment of the present application, based on the management of the data collection thread pool, multiple data collection threads are started, and the publish-subscribe mode based on the OPC UA protocol is adopted to process multiple subscription and publish operations simultaneously, which can effectively improve the data collection efficiency and reduce resource waste. In practical applications, the data management subsystem is built with a publish-subscribe system. Specifically, first, the topic tasks corresponding to each data collection thread are obtained, and the messages are classified based on the topic tasks corresponding to each data collection thread; in the second step, a publisher is created. The publisher is a component responsible for publishing messages. The publisher publishes the messages to the subscribers, and the messages are transmitted in JSON format. In the embodiment of the present application, the publisher is the nuclear power plant DCS system; in the third step, a subscriber is created. The subscriber is a component responsible for receiving and processing messages. The subscriber can choose to subscribe to one or more target topic tasks to receive the messages published by the publisher for the target topic tasks subscribed by the subscriber. In the embodiment of the present application, the subscriber is the data collection thread; in the fourth step, the subscriber subscribes to the publish-subscribe system, and the publish-subscribe system associates the subscriber with the selected target topic task; in the fifth step, when the nuclear power plant DCS data of the data points in the target topic task subscribed by the subscriber changes, a message is generated for the nuclear power plant DCS data of the data points in the target topic task and published to the publish-subscribe system; in the sixth step, when the publish-subscribe system receives the message published by the publisher, the message is passed to all subscribers who have subscribed to the target topic task in the message, and asynchronous operations are used to allow the subscribers to independently process the message; in the seventh step, after receiving the message, the subscriber performs business processing operations on the nuclear power plant DCS data of the data points corresponding to the target topic task in the message through a callback function, such as monitoring the device status based on the nuclear power plant DCS data of the data points corresponding to the target topic task in the message. Further, the business processing result and the nuclear power plant DCS data of the data points corresponding to the target topic task in the message can also be displayed on the user interface.
[0080] The following further details the data point configuration file configuration process provided by the embodiment of the present application. Refer to Figure 3 As shown, the data point configuration file configuration process provided by the embodiment of the present application is as follows:
[0081] Step 301: When a data point configuration instruction for a target data collection task is received, a data point configuration template is generated based on each data point corresponding to the pre-configured target data collection task.
[0082] In the embodiments of the present application, a user can locally edit each data point corresponding to a target data collection task by using software such as Excel and Word on a computer. For example, the user can use Excel software to edit data point configuration data such as the data point name, data type, and data point collection frequency of each data point corresponding to the target data collection task. After the user finishes editing, the user can initiate a data point configuration instruction in the data point configuration subsystem and upload the local data point configuration file corresponding to the target data collection task. When the data point configuration subsystem receives the local data point configuration file uploaded by the user for the target data collection task, it generates a data point configuration template by parsing the local data point configuration file format and combining the data point configuration data such as the data point name, data type, and data point collection frequency of each data point corresponding to the target data collection task pre-configured by the user.
[0083] Step 302: Encrypt the data point configuration template based on a pre-configured file password.
[0084] In the embodiments of the present application, after the data point configuration subsystem generates the data point configuration template, it can encrypt the data point configuration template by using a pre-configured file password. Specifically, the file password method can be used for encryption. Among them, the file password can be the login password when the user registers for the nuclear power plant DCS data collection system, or a custom password configured by the user after registering for the nuclear power plant DCS data collection system, and can be flexibly set according to user requirements.
[0085] Step 303: When receiving an edit instruction for the data point configuration template, display a password input interface, and after obtaining the file password entered in the password input interface, verify the entered file password based on the pre-configured file password.
[0086] In the embodiments of the present application, when the user edits the data point configuration template, a file password needs to be entered for verification. Specifically, the user can enter the file password in the password input interface. After the data point configuration subsystem obtains the file password entered by the user in the password input interface, it verifies the entered file password based on the pre-configured file password.
[0087] Step 304: When it is determined that the entered file password is successfully verified, configure the data point configuration template to an allowable editing mode.
[0088] In the embodiments of the present application, when the data point configuration subsystem determines that the entered file password is consistent with the pre-configured file password, it determines that the entered file password is successfully verified and configures the data point configuration template to an allowable editing mode. At this time, the user can edit the data point configuration template. For example, perform editing operations such as adding, modifying, and deleting data point configuration data on the data point configuration template.
[0089] Step 305: Obtain the data point names, data types, and data point collection frequencies input for each data point in the data point configuration template, and generate a data point configuration file corresponding to the target data collection task based on the data point names, data types, and data point collection frequencies of each data point.
[0090] In the embodiment of the present application, during the process of the user editing the data point configuration template, the data point configuration subsystem can also obtain data point configuration data such as the data point names, data types, and data point collection frequencies input by the user for each data point in the data point configuration template, and perform validity and compliance verification on the data point names, data types, and data point collection frequencies input for each data point in the data point configuration template; among them, the data type can be verified for validity and compliance in the form of dropdown options, and the data point name and data point collection frequency can be verified for validity and compliance using regular expressions, so as to ensure the validity and compliance of the data input by the user, and then generate a data point configuration file corresponding to the target data collection task based on the data point configuration data such as the data point names, data types, and data point collection frequencies input for each data point that passes the validity and compliance verification.
[0091] Based on the above embodiments, the embodiment of the present application provides a nuclear power plant DCS data collection device. Refer to Figure 4 As shown, the nuclear power plant DCS data collection device 400 provided by the embodiment of the present application at least includes:
[0092] A file acquisition unit 401, configured to receive a data point configuration file corresponding to the imported target data collection task;
[0093] A file parsing unit 402, configured to parse the data point configuration file to obtain data point configuration data corresponding to the target data collection task; where the data point configuration data at least includes the data point names, data types, and data point collection frequencies of each data point;
[0094] A quantity determination unit 403, configured to determine the optimal number of threads based on the current task complexity corresponding to the target data collection task, the current device performance value, and the current system load of the nuclear power plant DCS data collection system;
[0095] A thread creation unit 404, configured to create data collection threads according to the optimal number of threads and put the created data collection threads into a data collection thread pool;
[0096] A data point grouping unit 405, configured to divide each data point with the same data point collection frequency into the same data point group based on the data point collection frequencies of each data point to obtain at least one data point group;
[0097] The first distribution unit 406 is configured to evenly distribute each data point group to each data collection thread in the data collection thread pool based on the number of data points and the data point collection frequency in each data point group;
[0098] The second distribution unit 407 is configured to, for each data collection thread, evenly distribute the data points in the data point group corresponding to the data collection thread to each subject task corresponding to the data collection thread based on the number of data points and the data point collection frequency of each subject task corresponding to the data collection thread;
[0099] The data collection unit 408 is configured to start each data collection thread in the data collection thread pool, and receive and save the nuclear power plant DCS data of the data points in the target subject task published when the nuclear power plant DCS data of the data points in the target subject task subscribed by each data collection thread changes through the publish-subscribe mode adopted by each data collection thread; wherein, the target subject task subscribed by each data collection thread is the subject task in each subject task corresponding to the data collection thread.
[0100] In a possible implementation manner, referring to Figure 4 as shown, the nuclear power plant DCS data collection device 400 provided by the embodiment of the present application further includes:
[0101] The file configuration unit 409 is configured to, when receiving a data point configuration instruction for a target data collection task, generate a data point configuration template based on each data point corresponding to the pre-configured target data collection task, and encrypt the data point configuration template based on the pre-configured file password;
[0102] The encryption verification unit 410 is configured to, when receiving an edit instruction for the data point configuration template, display a password input interface, obtain the file password input on the password input interface, and verify the input file password based on the pre-configured file password. When it is determined that the input file password verification is successful, configure the data point configuration template to an editable mode;
[0103] The file generation unit 411 is configured to obtain the data point name, data type, and data point collection frequency input for each data point in the data point configuration template, and generate a data point configuration file corresponding to the target data collection task based on the data point name, data type, and data point collection frequency of each data point.
[0104] In a possible implementation manner, referring to Figure 4 as shown, the nuclear power plant DCS data collection device 400 provided by the embodiment of the present application further includes:
[0105] An input verification unit 412 is configured to perform validity and compliance verification on the data point name, data type, and data point collection frequency of each data point input in the data point configuration template. Among them, the data type is verified for validity and compliance by using a drop-down box option; the data point name and data point collection frequency are verified for validity and compliance by using a regular expression.
[0106] In a possible implementation manner, the quantity determination unit 403 is specifically configured to determine the optimal number of threads based on the ratio between the current device performance value and the product of the current task complexity and the current system load.
[0107] In a possible implementation manner, the second allocation unit 407 is specifically configured to perform a data point allocation operation for each data collection thread in a loop until the data points in the data point group corresponding to the data collection thread are all allocated. Among them, the data point allocation operation includes: determining the data point to be allocated from the data point group corresponding to the data collection thread; determining the current weight value of each subject task corresponding to the data collection thread; allocating the data point to be allocated to the subject task with the smallest current weight value among each subject task; and adding the set value to the current weight value of the subject task with the smallest current weight value. When the data point allocation operation is first executed, the current weight value of each subject task corresponding to the data collection thread is the initial weight value.
[0108] In a possible implementation manner, the second allocation unit 407 is further configured to determine the initial weight value of each subject task based on the number of data points and the data point collection frequency of each subject task corresponding to the data collection thread.
[0109] It should be noted that the principle of the nuclear power plant DCS data acquisition device 400 provided in the embodiments of the present application for solving technical problems is similar to that of the nuclear power plant DCS data acquisition method provided in the embodiments of the present application. Therefore, the implementation of the nuclear power plant DCS data acquisition device 400 provided in the embodiments of the present application can refer to the implementation of the nuclear power plant DCS data acquisition method provided in the embodiments of the present application, and the repeated parts will not be described again.
[0110] After introducing the nuclear power plant DCS data acquisition system, method, and device provided in the embodiments of the present application, the electronic device provided in the embodiments of the present application will be briefly introduced below.
[0111] Refer to Figure 5 As shown, the electronic device 500 provided in the embodiments of the present application at least includes a processor 501, a memory 502, and a computer program stored on the memory 502 and executable on the processor 501. When the processor 501 executes the computer program, it implements the above-mentioned nuclear power plant DCS data acquisition method provided in the embodiments of the present application.
[0112] The electronic device 500 provided by the embodiments of the present application may further include a bus 503 that connects different components (including the processor 501 and the memory 502). Among them, the bus 503 represents one or more of several types of bus structures, including memory buses, peripheral buses, local area buses, etc.
[0113] The memory 502 may include a readable storage medium in the form of volatile memory, such as a random access memory (RAM) 5021 and / or a cache memory 5022, and may further include a read-only memory (ROM) 5023. The memory 502 may also include a program tool 5025 having a set (at least one) of program modules 5024. The program modules 5024 include, but are not limited to, an operating subsystem, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0114] The processor 501 may be a processing element or a collective term for multiple processing elements. For example, the processor 501 may be a central processing unit (CPU), or one or more integrated circuits configured to implement the nuclear power plant DCS data acquisition method provided by the embodiments of the present application. Specifically, the processor 501 may be a general-purpose processor, including but not limited to a CPU, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0115] The electronic device 500 may communicate with one or more external devices 504 (such as a keyboard, a remote control, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500 (such as a mobile phone, a computer, etc.), and / or communicate with a device that enables the electronic device 500 to communicate with one or more other electronic devices (such as a router, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 505. And, the electronic device 500 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 506. As Figure 5As shown, network adapter 506 communicates with other modules of electronic device 500 via bus 503. It should be understood that although Figure 5 not shown in Figure 5 , other hardware and / or software modules may be used in conjunction with electronic device 500, including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, redundant arrays of independent disks (RAID) subsystems, tape drives, and data backup storage subsystems, etc.
[0116] It should be noted that Figure 5 the electronic device 500 shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0117] Next, a brief introduction to the computer-readable storage medium provided by the embodiments of the present application will be given.
[0118] The computer-readable storage medium provided by the embodiments of the present application stores computer instructions, and when these computer instructions are executed by a processor, the nuclear power plant DCS data acquisition method provided by the embodiments of the present application is implemented. Specifically, these computer instructions may be built-in or installed in the processor, so that the processor can implement the nuclear power plant DCS data acquisition method provided by the embodiments of the present application by executing the built-in or installed computer instructions.
[0119] In addition, the nuclear power plant DCS data acquisition method provided by the embodiments of the present application may also be implemented as a computer program product, which includes program code, and when the program code runs on a processor, the nuclear power plant DCS data acquisition method provided by the embodiments of the present application is implemented.
[0120] The computer program product provided by the embodiments of the present application may employ one or more computer-readable storage media, and the computer-readable storage media may be, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any suitable combination of the above. Specifically, more specific examples (non-exhaustive list) of the computer-readable storage medium include electrical connections with one or more wires, portable disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0121] The computer program product provided by the embodiments of the present application may be in the form of a CD-ROM and include program code, and may also run on an electronic device such as a computer. However, the computer program product provided by the embodiments of the present application is not limited thereto. In the embodiments of the present application, the computer-readable storage medium may be any tangible medium that contains or stores program code, and the program code may be used by or in combination with an instruction execution system, apparatus, or device.
[0122] It should be noted that although several units or subunits of the apparatus are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of the two or more units described above may be embodied in one unit. Conversely, the features and functions of one unit described above may be further divided and embodied by multiple units.
[0123] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the shown operations must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.
[0124] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the present application.
[0125] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.
Claims
1. A nuclear power plant DCS data acquisition system, characterized in that, it includes a data point configuration subsystem, a data point allocation subsystem, a thread management subsystem, and a data management subsystem; the data point configuration subsystem is used to receive the data point configuration file corresponding to the imported target data acquisition task, and parse the data point configuration file to obtain the data point configuration data corresponding to the target data acquisition task; wherein, the data point configuration data at least includes the data point name, data type, and data point acquisition frequency of each data point; the thread management subsystem is used to determine the optimal number of threads based on the current task complexity corresponding to the target data acquisition task, the current device performance value and the current system load of the nuclear power plant DCS data acquisition system; create data acquisition threads according to the optimal number of threads, and put each created data acquisition thread into the data acquisition thread pool; the data point allocation subsystem is used to divide each data point with the same data point acquisition frequency into the same data point group to obtain at least one data point group based on the data point acquisition frequency of each data point; based on the number of data points and the data point acquisition frequency of each data point group, evenly distribute each data point group to each data acquisition thread in the data acquisition thread pool; for each data acquisition thread, based on the number of data points and the data point acquisition frequency of each topic task corresponding to the data acquisition thread, evenly distribute the data points in the data point group corresponding to the data acquisition thread to each topic task corresponding to the data acquisition thread; the data management subsystem is used to start each data acquisition thread in the data acquisition thread pool, and receive and save the nuclear power plant DCS data of the data points in the target topic task published when the nuclear power plant DCS data of the data points in the target topic task subscribed by each data acquisition thread changes through the publish-subscribe mode adopted by each data acquisition thread; wherein, the target topic task subscribed by each data acquisition thread is the topic task in each topic task corresponding to the data acquisition thread.
2. The nuclear power plant DCS data acquisition system according to claim 1, characterized in that, when the data point configuration subsystem receives a data point configuration instruction for the target data acquisition task, it is further used to generate a data point configuration template based on each data point corresponding to the pre-configured target data acquisition task, and encrypt the data point configuration template based on the pre-configured file password; When an edit instruction for the data point configuration template is received, a password input interface is displayed. After obtaining the file password entered in the password input interface, the entered file password is verified based on the pre-configured file password. When it is determined that the entered file password is successfully verified, the data point configuration template is configured to an allowable edit mode; the data point names, data types, and data point collection frequencies entered for each data point in the data point configuration template are obtained, and a data point configuration file corresponding to the target data collection task is generated based on the data point names, data types, and data point collection frequencies of each data point.
3. The nuclear power plant DCS data collection system according to claim 2, wherein, the data point configuration subsystem is further configured to perform validity and compliance verification on the data point names, data types, and data point collection frequencies entered for each data point in the data point configuration template; wherein, the validity and compliance verification of the data type is performed in a drop-down box option manner; the validity and compliance verification of the data point name and the data point collection frequency is performed in a regular expression manner.
4. The nuclear power plant DCS data collection system according to claim 1, wherein, the thread management subsystem is specifically configured to determine the optimal number of threads based on the ratio between the current device performance value and the product of the current task complexity and the current system load.
5. The nuclear power plant DCS data collection system according to any one of claims 1-4, wherein, the data point allocation subsystem is specifically configured to perform data point allocation operations in a loop for each data collection thread until the data points in the data point group corresponding to the data collection thread are all allocated; wherein, the data point allocation operation includes: determining the data point to be allocated from the data point group corresponding to the data collection thread; determining the current weight values of each of the subject tasks corresponding to the data collection thread; allocating the data point to be allocated to the subject task with the smallest current weight value among each of the subject tasks; adding the set value to the current weight value of the subject task with the smallest current weight value; wherein, when the data point allocation operation is first executed, the current weight values of each of the subject tasks corresponding to the data collection thread are initial weight values.
6. The nuclear power plant DCS data collection system according to claim 5, wherein, the data point allocation subsystem is further configured to determine the initial weight values of each of the subject tasks based on the number of data points and the data point collection frequencies of each of the subject tasks corresponding to the data collection thread.
7. A nuclear power plant DCS data collection method, wherein, comprises: obtaining a data point configuration file corresponding to a target data collection task; parsing the data point configuration file to obtain data point configuration data corresponding to the target data collection task; wherein, the data point configuration data at least includes the data point names, data types, and data point collection frequencies of each data point. Determine the optimal number of threads based on the current task complexity corresponding to the target data acquisition task, the current device performance value and the current system load of the nuclear power plant DCS data acquisition system; Create data acquisition threads according to the optimal number of threads, and put each created data acquisition thread into the data acquisition thread pool; Based on the data point acquisition frequencies of each of the data points, divide the data points with the same data point acquisition frequency into the same data point group to obtain at least one data point group; Based on the number of data points and the data point acquisition frequencies of each of the data point groups, evenly distribute each of the data point groups to each of the data acquisition threads in the data acquisition thread pool; For each of the data acquisition threads, based on the number of data points and the data point acquisition frequencies of the respective topic tasks corresponding to the data acquisition thread, evenly distribute the data points in the data point group corresponding to the data acquisition thread to the respective topic tasks corresponding to the data acquisition thread; Start each of the data acquisition threads in the data acquisition thread pool. When the nuclear power plant DCS data of the data points in the target topic tasks subscribed to by each of the data acquisition threads changes, receive and save the nuclear power plant DCS data of the data points in the target topic tasks published by the publish-subscribe mode adopted by each of the data acquisition threads; wherein, the target topic task subscribed to by each of the data acquisition threads is the topic task among the respective topic tasks corresponding to the data acquisition thread.
8. A nuclear power plant DCS data acquisition device Characterized in that It includes: A file acquisition unit for acquiring a data point configuration file corresponding to the target data acquisition task; A file parsing unit for parsing the data point configuration file to obtain the data point configuration data corresponding to the target data acquisition task; wherein, the data point configuration data at least includes the data point name, data type and data point acquisition frequency of each data point; A quantity determination unit for determining the optimal number of threads based on the current task complexity corresponding to the target data acquisition task, the current device performance value and the current system load of the nuclear power plant DCS data acquisition system; A thread creation unit for creating data acquisition threads according to the optimal number of threads, and putting each created data acquisition thread into the data acquisition thread pool; A data point grouping unit for dividing the data points with the same data point acquisition frequency into the same data point group to obtain at least one data point group based on the data point acquisition frequencies of each of the data points; A first allocation unit for evenly distributing each of the data point groups to each of the data acquisition threads in the data acquisition thread pool based on the number of data points and the data point acquisition frequencies of each of the data point groups; A second allocation unit for, for each of the data acquisition threads, evenly distributing the data points in the data point group corresponding to the data acquisition thread to the respective topic tasks corresponding to the data acquisition thread based on the number of data points and the data point acquisition frequencies of the respective topic tasks corresponding to the data acquisition thread; A data acquisition unit is used to start each of the data acquisition threads in the data acquisition thread pool, and receive and save the nuclear power plant DCS data of the data points in the target topic tasks subscribed by each of the data acquisition threads through the publish-subscribe mode adopted by each of the data acquisition threads when the nuclear power plant DCS data of the data points in the target topic tasks subscribed by each of the data acquisition threads in the nuclear power plant DCS system changes; wherein, the target topic task subscribed by each data acquisition thread is the topic task among the respective topic tasks corresponding to the data acquisition thread.
9. An electronic device, characterized in that it includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, it implements the nuclear power plant DCS data acquisition method as described in claim 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, they implement the nuclear power plant DCS data acquisition method as described in claim 7.
Citation Information
Cited By
Communication method and device of DCS (Distributed Control System)
CN122179473A