Configuration software data structure upgrade method, device and computer equipment
By introducing the configuration software data structure upgrade method in the nuclear power instrument control system, the problem of difficult change in data structures in traditional systems is solved, and the automatic upgrade of data structures and the ease of use of database configuration is achieved.
Patent Information
- Application Number
- CN202011584983.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2040-12-28
AI Technical Summary
In traditional nuclear power instrumentation control systems, once the data structure is determined, it is difficult to change at any time during the project life cycle, resulting in poor ease of use of database configuration, cumbersome user operations and easily lead to loss of engineering information.
A method for upgrading the data structure of configuration software is proposed. By loading the configuration file, instantiating the data type information into a memory object, and determining whether the data type and data structure of the local data are consistent. If it is inconsistent, the data structure will be updated and upgraded according to the configuration file.
It realizes the automatic upgrade function of data structures, improves the ease of use of database configuration, facilitates users to change data structures at any time during the project life cycle, and enhances the scalability of database editing.
Smart Images

Figure CN114691162B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of nuclear power instrumentation and control systems, and in particular to a configuration software data structure upgrade method, device and computer equipment. Background Art
[0002] The data type is the core design of the configuration tool software in the nuclear power instrumentation and control system, and is the basis for the operation of the entire nuclear power instrumentation and control system. During the configuration, debugging, and operation of the nuclear power instrumentation and control system project, the data structure will be adjusted according to the actual operation requirements. The nuclear power instrumentation and control system must adapt to the changes in the data structure in the database configuration, so it is very important for the configuration tool software to provide a data structure automatic upgrade function.
[0003] In traditional nuclear power instrumentation and control systems, the configuration data in the project is generally serialized and stored as binary files. The serialized data does not support changes in the data structure. In order to solve the problem that the data structure cannot be changed, the following measures are generally taken: the configuration tool software exports the current data to the local disk, then modifies the data structure configuration file, creates a new project with the new configuration file, and then imports the exported file into the new project after data type conversion.
[0004] Data files are stored persistently in a serialized manner. Files stored in a serialized manner need to maintain the consistency of the data structure. Otherwise, once the data structure changes, the original data cannot be used directly. In order to adapt to the changes in the data structure during the configuration process, the configuration tool software needs to perform a series of operations to complete the upgrade of the data structure. However, the operation process is cumbersome and the user is prone to missing steps, which may cause the loss of project information. It is not safe and convenient. Summary of the invention
[0005] The purpose of this application is to solve one of the above-mentioned technical problems at least to a certain extent.
[0006] To this end, the first purpose of this application is to propose a configuration software data structure upgrade method, which can add an automatic data structure upgrade function, improve the usability of database configuration, facilitate users to change the data structure at any time according to project requirements during the life cycle of the engineering application, and improve the scalability of database editing.
[0007] The second objective of the present application is to provide a configuration software data structure upgrade device.
[0008] The third objective of the present application is to provide a computer device.
[0009] A fourth object of the present application is to provide a non-transitory computer-readable storage medium.
[0010] In order to achieve the above-mentioned purpose, the first embodiment of the present application proposes a configuration software data structure upgrade method, comprising:
[0011] Loading a configuration file of a configuration project, and obtaining data type information from the configuration file;
[0012] Instantiating the data type information into a memory object;
[0013] Determine whether the data type in the local data is consistent with the data type of the memory object, the local data being a data file pre-stored locally by the configuration project;
[0014] If the data type in the local data is consistent with the data type of the memory object, further determining whether the data structure under each data type is consistent with the data structure under the data type of the memory object;
[0015] If the data structure under each data type is inconsistent with the data structure under the data type of the memory object, the data structure is updated and upgraded according to the configuration file.
[0016] Optionally, the method further includes:
[0017] If the data structure under each data type is consistent with the data structure under the data type of the memory object, the data in the configuration file is saved into the local data through object-relational mapping (ORM).
[0018] Optionally, updating the data structure according to the configuration file includes:
[0019] Rename the data table in the local data and create a first data table;
[0020] The data in the data table is converted into a data structure in the first data table.
[0021] Optionally, the method further includes:
[0022] If the data type in the local data is inconsistent with the data type of the memory object, the data type is updated according to the configuration file.
[0023] Optionally, updating the data type according to the configuration file includes:
[0024] Creating a second data table according to the configuration file;
[0025] The data in the second data table is saved into the local data through object relation mapping (ORM).
[0026] Optionally, updating the data type according to the configuration file includes:
[0027] A new data type is added or a modified data type is modified in the local data according to the configuration file.
[0028] The configuration software data structure upgrade method of the embodiment of the present application adds an automatic data structure upgrade function, improves the usability of database configuration, and facilitates users to change the data structure according to engineering requirements at any time during the life cycle of the engineering application; generates a data structure memory object based on the information in the configuration file and maps it to the local data file, thereby improving the scalability of database editing.
[0029] In order to achieve the above-mentioned purpose, the second embodiment of the present application proposes a configuration software data structure upgrade device, comprising:
[0030] An acquisition module, used for loading a configuration file of a configuration project and acquiring data type information from the configuration file;
[0031] An instantiation module, used for instantiating the data type information into a memory object;
[0032] A first judgment module, used to judge whether the data type in the local data is consistent with the data type of the memory object, the local data is a data file pre-stored locally by the configuration project;
[0033] A second judgment module is used to further judge whether the data structure under each data type is consistent with the data structure under the data type of the memory object when the data type in the local data is consistent with the data type of the memory object;
[0034] An upgrade module is used to update and upgrade the data structure according to the configuration file when the data structure under each data type is inconsistent with the data structure under the data type of the memory object.
[0035] Optionally, the device further comprises:
[0036] The saving module is used to save the data in the configuration file into the local data through object-relational mapping (ORM) when the data structure under each data type is consistent with the data structure under the data type of the memory object.
[0037] Optionally, the upgrade module is used to:
[0038] Rename the data table in the local data and create a first data table;
[0039] The data in the data table is converted into a data structure in the first data table.
[0040] Optionally, the device further comprises:
[0041] An updating module is used to update the data type according to the configuration file when the data type in the local data is inconsistent with the data type of the memory object.
[0042] Optionally, the update module is used to:
[0043] Creating a second data table according to the configuration file;
[0044] The data in the second data table is saved into the local data through object relation mapping (ORM).
[0045] Optionally, the update module is used to:
[0046] A new data type is added or a modified data type is modified in the local data according to the configuration file.
[0047] The configuration software data structure upgrade device of the embodiment of the present application adds an automatic data structure upgrade function, improves the usability of database configuration, and facilitates users to change the data structure according to engineering requirements at any time during the life cycle of the engineering application; generates a data structure memory object according to the information in the configuration file and maps it to the local data file, thereby improving the scalability of database editing.
[0048] In order to achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, when the processor executes the computer program, it implements the configuration software data structure upgrade method as described in the first aspect embodiment.
[0049] In order to achieve the above-mentioned objectives, the fourth aspect embodiment of the present application also proposes a non-temporary computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the configuration software data structure upgrade method described in the first aspect embodiment is implemented.
[0050] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0052] Figure 1 It is a flow chart of a configuration software data structure upgrade method according to an embodiment of the present application;
[0053] Figure 2 is a flow chart of a configuration software data structure upgrade method according to another embodiment of the present application;
[0054] Figure 3 is a flow chart of a configuration software data structure upgrade method according to another embodiment of the present application;
[0055] Figure 4 This is a schematic diagram of automatic upgrade of data structure of a specific embodiment of the present application;
[0056] Figure 5 It is a flowchart of a configuration software data structure upgrade method of a specific embodiment of the present application;
[0057] Figure 6 It is a structural diagram of a configuration software data structure upgrade device according to an embodiment of the present application;
[0058] Figure 7 is a structural diagram of a configuration software data structure upgrade device according to another embodiment of the present application;
[0059] Figure 8 It is a structural diagram of a configuration software data structure upgrading device according to yet another embodiment of the present application. DETAILED DESCRIPTION
[0060] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0061] The present application is further described in detail below in conjunction with specific embodiments. These embodiments should not be construed as limiting the scope of protection claimed in the present application.
[0062] The configuration software data structure upgrade method, apparatus, and computer equipment of the embodiments of the present application are described below with reference to the accompanying drawings.
[0063] Figure 1 FIG. 1 is a flow chart of a configuration software data structure upgrade method according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0064] S1, load the configuration file of the configuration project and obtain data type information from the configuration file.
[0065] The configuration file describes all sub-item information in each data type. Each sub-item includes item name, type name, data type, data length, whether to enter the history library, whether it is an IO item, whether to transmit periodically, and other information.
[0066] Therefore, after loading the configuration file of the configuration project, the data type information can be obtained from the configuration file.
[0067] S2, instantiates the data type information into a memory object.
[0068] After obtaining the data type information, the data type information may be instantiated into a memory object.
[0069] S3, determine whether the data type in the local data is consistent with the data type of the memory object.
[0070] Among them, local data refers to the data files pre-stored locally by the configuration project.
[0071] In one embodiment of the present application, a mapping relationship can be established between the memory object and the local data based on ORM (Object Relational Mapping), data parsing can be performed according to the rules and T-SQL statements can be generated, and then the data set in the memory object can be automatically saved to a local data file. Afterwards, the description information (data type) of the memory object can be compared with the description information of the local data.
[0072] S4, if the data type in the local data is consistent with the data type of the memory object, further determine whether the data structure under each data type is consistent with the data structure under the data type of the memory object.
[0073] S5, if the data structure under each data type is inconsistent with the data structure under the data type of the memory object, the data structure is updated and upgraded according to the configuration file.
[0074] Specifically, the data table in the local data can be renamed, and a first data table can be created, and then the data in the data table can be converted into the data structure in the first data table. In other words, the data types of the two are the same, but the data structures are different, and only the data structure needs to be updated to the new one.
[0075] The configuration software data structure upgrade method of the embodiment of the present application adds an automatic data structure upgrade function, improves the usability of database configuration, and facilitates users to change the data structure according to engineering requirements at any time during the life cycle of the engineering application; generates a data structure memory object based on the information in the configuration file and maps it to the local data file, thereby improving the scalability of database editing.
[0076] In another embodiment of the present application, Figure 2 As shown, the configuration software data structure upgrade method also includes:
[0077] S6, if the data structure under each data type is consistent with the data structure under the data type of the memory object, the data in the configuration file is saved to the local data through the object-relational mapping (ORM).
[0078] In another embodiment of the present application, Figure 3 As shown, the configuration software data structure upgrade method also includes:
[0079] S7, if the data type in the local data is inconsistent with the data type of the memory object, the data type is updated according to the configuration file.
[0080] Specifically, a second data table can be created according to the configuration file, and then the data in the second data table can be saved to the local data through the object relational mapping (ORM). In other words, when the data type in the local data is inconsistent with the data type of the memory object, it is directly changed to the new data type.
[0081] Among them, updating data types includes two scenarios:
[0082] The first scenario: adding a new data type.
[0083] If the data type in the local data is less than the data type of the memory object, a new data type may be added to make the modified data type consistent with the data type of the memory object.
[0084] The second scenario: modify the data type.
[0085] If the data type in the local data is different from the data type of the memory object, the data type can be directly modified to make the modified data type consistent with the data type of the memory object.
[0086] A specific embodiment is described in detail below.
[0087] First, let me introduce the configuration tool software. It is an engineering configuration tool software that can perform offline data configuration. During runtime, data configuration is performed according to the defined data structure configuration information.
[0088] like Figure 4 As shown, after the configuration tool software opens the project, it loads the data structure information in the configuration file and instantiates it as a memory object, establishes a mapping relationship between the memory object and the local data file based on ORM, parses the data according to the rules and generates T-SQL statements, and then automatically saves the data information in the memory object to the local data file.
[0089] The specific steps can be as follows Figure 5 As shown,
[0090] S501, loading data type description information from a configuration file in a configuration project.
[0091] S502: Generate a data type object according to the data type definition in the configuration file.
[0092] S503, determining whether the data type exists in the current project.
[0093] S504: If the data type exists, determine whether the data type is consistent with the description in the configuration file.
[0094] S505: If the data types are inconsistent, back up the original data.
[0095] S506, creating a new data table, and then converting the original data into a new data structure to complete the data upgrade.
[0096] S507: If the data type does not exist in the current project, a new data table is created using the configuration file.
[0097] S508, saving all data files in the project into local data files through ORM.
[0098] The configuration software data structure upgrade method of the embodiment of the present application adds an automatic data structure upgrade function, improves the usability of database configuration, and facilitates users to change the data structure according to engineering requirements at any time during the life cycle of the engineering application; generates a data structure memory object based on the information in the configuration file and maps it to the local data file, thereby improving the scalability of database editing.
[0099] In order to implement the above embodiment, the present application also proposes a configuration software data structure upgrading device.
[0100] Figure 6 It is a structural diagram of a configuration software data structure upgrading device according to an embodiment of the present application.
[0101] like Figure 6 As shown, the device includes an acquisition module 61, an instantiation module 62, a first judgment module 63, a second judgment module 64 and an upgrade module 65.
[0102] The acquisition module 61 is used to load the configuration file of the configuration project and obtain data type information from the configuration file;
[0103] An instantiation module 62, used to instantiate the data type information into a memory object;
[0104] A first judgment module 63 is used to judge whether the data type in the local data is consistent with the data type of the memory object, and the local data is a data file pre-stored locally by the configuration project;
[0105] A second judgment module 64 is used to further judge whether the data structure under each data type is consistent with the data structure under the data type of the memory object when the data type in the local data is consistent with the data type of the memory object;
[0106] The upgrading module 65 is used to update the data structure according to the configuration file when the data structure under each data type is inconsistent with the data structure under the data type of the memory object.
[0107] The upgrade module 65 is used to rename the data table in the local data and create a first data table; and convert the data in the data table into the data structure in the first data table.
[0108] In another embodiment of the present application, Figure 7 As shown, the device also includes:
[0109] The saving module 66 is used to save the data in the configuration file into the local data through the object-relational mapping (ORM) when the data structure under each data type is consistent with the data structure under the data type of the memory object.
[0110] In another embodiment of the present application, Figure 8 As shown, the device also includes:
[0111] The updating module 67 is used to update the data type according to the configuration file when the data type in the local data is inconsistent with the data type of the memory object.
[0112] The updating module 67 is used to create a second data table according to the configuration file; and save the data in the second data table into local data through object relation mapping (ORM).
[0113] The updating module 67 is used to add new data types or modify data types in local data according to the configuration file.
[0114] It should be understood that the configuration software data structure upgrading device of this embodiment is consistent with the description of the configuration software data structure upgrading method of the first aspect embodiment, and will not be repeated here.
[0115] The configuration software data structure upgrade device of the embodiment of the present application adds an automatic data structure upgrade function, improves the usability of database configuration, and facilitates users to change the data structure according to engineering requirements at any time during the life cycle of the engineering application; generates a data structure memory object according to the information in the configuration file and maps it to the local data file, thereby improving the scalability of database editing.
[0116] In order to implement the above embodiments, the present application also proposes a computer device.
[0117] The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the configuration software data structure upgrade method of the first embodiment is implemented.
[0118] In order to implement the above embodiments, the present application also proposes a non-transitory computer-readable storage medium.
[0119] The non-temporary computer-readable storage medium stores a computer program, which, when executed by a processor, implements the configuration software data structure upgrade method of the first embodiment.
[0120] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0121] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0122] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0123] It should be noted that, in the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
Claims
1. A configuration software data structure upgrade method, characterized in that: include: Loading a configuration file of a configuration project, and obtaining data type information from the configuration file; Instantiating the data type information into a memory object; Determine whether the data type in the local data is consistent with the data type of the memory object, the local data being a data file pre-stored locally by the configuration project; If the data type in the local data is consistent with the data type of the memory object, further determining whether the data structure under each data type is consistent with the data structure under the data type of the memory object; If the data structure under each data type is inconsistent with the data structure under the data type of the memory object, updating and upgrading the data structure according to the configuration file; Wherein, the data table in the local data is renamed, and a first data table is created; The data in the data table is converted into a data structure in the first data table.
2. The method according to claim 1, characterized in that Also includes: If the data structure under each data type is consistent with the data structure under the data type of the memory object, the data in the configuration file is saved into the local data through object-relational mapping (ORM).
3. The method according to claim 1, characterized in that Also includes: If the data type in the local data is inconsistent with the data type of the memory object, the data type is updated according to the configuration file.
4. The method according to claim 3, characterized in that Updating the data type according to the configuration file includes: Creating a second data table according to the configuration file; The data in the second data table is saved into the local data through object relation mapping (ORM).
5. A configuration software data structure upgrade device, characterized in that: include: An acquisition module, used for loading a configuration file of a configuration project and acquiring data type information from the configuration file; An instantiation module, used for instantiating the data type information into a memory object; A first judgment module, used to judge whether the data type in the local data is consistent with the data type of the memory object, the local data is a data file pre-stored locally by the configuration project; A second judgment module is used to further judge whether the data structure under each data type is consistent with the data structure under the data type of the memory object when the data type in the local data is consistent with the data type of the memory object; An upgrading module, used for updating and upgrading the data structure according to the configuration file when the data structure under each data type is inconsistent with the data structure under the data type of the memory object; Wherein, the data table in the local data is renamed, and a first data table is created; The data in the data table is converted into a data structure in the first data table.
6. The device according to claim 5, characterized in that Also includes: The saving module is used to save the data in the configuration file into the local data through object-relational mapping (ORM) when the data structure under each data type is consistent with the data structure under the data type of the memory object.
7. The device according to claim 5, characterized in that Also includes: An updating module is used to update the data type according to the configuration file when the data type in the local data is inconsistent with the data type of the memory object.
8. The device according to claim 7, characterized in that The update module is used to: Creating a second data table according to the configuration file; The data in the second data table is saved into the local data through object relation mapping (ORM).
9. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the computer program, when executed by the processor, implements the configuration software data structure upgrading method as claimed in any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the configuration software data structure upgrade method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Soft PLC system data synchronizing method based on Petri net
CN107291933A
Method and system for construction, synchronization, presentation and analysis of nuclear power DCS offline database
CN110554675A