A lightweight power secondary equipment data access method and system
By defining data type tables and unified data access interfaces, the problem of limited storage space in power secondary equipment is solved, the reuse of equipment software modules and the improvement of data processing speed are achieved, and the data access requirements of different versions and types are adapted.
Patent Information
- Application Number
- CN202411619793.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-13
AI Technical Summary
Due to limited storage space, power secondary equipment cannot use database technology for data storage and access, resulting in a large workload in the development and testing of equipment software and tool software for different products. In addition, the tool software is difficult to be compatible with different versions and types of equipment, affecting storage efficiency and maintenance complexity.
A lightweight data access method for power secondary equipment is adopted. By defining data type tables, structure headers, XML format configuration rules and a unified data access interface, flexible data storage and access are achieved. It is suitable for devices with limited storage space.
It achieves high reuse of common software modules of devices, adapts to data access of different versions and types, saves memory resources, improves data processing speed, and has good versatility and compatibility.
Smart Images

Figure CN119597334B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of power data storage, and particularly relates to a lightweight power secondary equipment data access method and system. BACKGROUND
[0002] Power secondary equipment includes relay protection equipment, measurement and control equipment, power distribution protection and control equipment. The data of the equipment includes different types such as input, output, remote signaling, remote measurement, remote control, remote adjustment, and parameters. The contents of various types of data are different. In addition, the data structure of the same type of equipment will also change due to different service objects and application scenarios. The data of the power secondary equipment needs to be stored in the memory of the equipment, and can be read, displayed and remotely transmitted through display software, communication software, etc. It can also be debugged and configured using tool software.
[0003] Due to the limited storage space, the protection and control CPU of the power secondary equipment cannot use database technology for data storage and access. Usually, when designing product software, according to the characteristics of service objects and application scenarios, the structure of various types of data is designed, and the variables of the structure are agreed to be used for display, communication and configuration, etc. The related software stores and reads and writes the data according to the agreement. Due to the different service objects and application scenarios of each product, the data structure definition needs to be adjusted accordingly, so that the device software and tool software of different products are different, and the development, testing and maintenance workload is huge.
[0004] For equipment that cannot use a database due to limited storage space, different data structures need to be designed for different types of data. When designing product software, according to the characteristics of service objects and application scenarios, the structure of various types of data is designed, and the corresponding variable attributes of the structure are agreed to be used for display, communication, and tool configuration. The related software stores and reads and writes the data according to the agreement, which makes the device software and tool software of different products cannot be effectively reused; when the product software is upgraded due to changes in product function requirements, the structure of the same type of data will also change, and some designs increase the memory overhead by adding spare attributes for compatibility, which affects the read and write efficiency of storage; the above factors result in large development and testing workload of product software. At the same time, due to the existence of different types of equipment in the service environment, as well as the software of the same type of product in different periods and different versions, the debugging and configuration tool software needs to start different branch programs according to the equipment category, and the branch tool software of the same type of equipment also needs to be compatible with the equipment in different periods through version information, so the development and maintenance of the tool software also become complex. SUMMARY
[0005] In order to solve the problems in the prior art, the application provides a lightweight power secondary equipment data access method and system to realize storage and access of lightweight structured data, save memory resources of equipment, and improve data processing speed.
[0006] To solve the above technical problems, the application adopts the following technical scheme.
[0007] The application first discloses a lightweight power secondary equipment data access method, which comprises the following steps:
[0008] All data types of power secondary equipment data are defined to form a data type table;
[0009] A structure header is defined according to an index number, a data name, a data type in the data type table, a data length, data quality and a data value of the power secondary equipment data;
[0010] A data table configuration rule is defined in an XML format, and the data table configuration rule comprises an ID, a key name, a column name, a table width, a display mode and a conversion rule;
[0011] Based on the data table configuration rule, display and configuration operations of the data table are performed in tool software;
[0012] Based on the data table configuration rule and the defined structure header, a structure and corresponding data are generated in the tool software;
[0013] A unified data access interface is defined to read values of data according to the index number, the data type or the data length in the structure;
[0014] Based on the data access interface, different data values are accessed according to data types by using communication software of the power secondary equipment, and the data values are used for communication between the equipment and a monitoring system or transmission to a debugging tool for dynamic display of numerical values;
[0015] Based on the data access interface, data names and data values are accessed according to data types by using display software of the power secondary equipment, and the data names and data values are used for local display of current equipment data.
[0016] The application further comprises the following preferred schemes:
[0017] The conversion rule corresponds to a tag field of the data type table.
[0018] The data types comprise a Boolean type, a small integer type, an unsigned small integer type, a short integer type, an unsigned short integer type, an integer type, an unsigned integer type, a long integer type, an unsigned long integer type, a single-precision floating point type, a double-precision floating point type, an eight-bit string type and a character string type.
[0019] The display and configuration operation of the data table in the tool software based on the data table configuration rule further comprises:
[0020] For the input configuration table of the power secondary equipment, the name, data type, data length, quality, value, board number and input number fields are defined; for the remote control configuration table of the power secondary equipment, the name, data type, data length, quality, value and control point number fields are defined.
[0021] The application also discloses a light power secondary equipment data access system using the light power secondary equipment data access method.
[0022] The data type table definition module is used for defining all data types of the power secondary equipment data to form a data type table.
[0023] The structure header definition module is used for defining the structure header according to the index number, data name, data type in the data type table, data length, data quality and data value of the power secondary equipment data.
[0024] The configuration rule definition module is used for defining the data table configuration rule in the XML format, and the data table configuration rule comprises an ID, key name, column name, table width, display mode and conversion rule.
[0025] The configuration module is used for performing the display and configuration operation of the data table in the tool software based on the data table configuration rule.
[0026] The generation module is used for generating the structure and corresponding data in the tool software based on the data table configuration rule and the defined structure header.
[0027] The data access interface definition module is used for defining a unified data access interface, and the data access interface is used for reading the value of the data according to the index number, data type or data length in the structure.
[0028] The communication module is used for accessing different data values according to the data type by using the communication software of the power secondary equipment based on the data access interface, and is used for the communication between the equipment and the monitoring system or the transmission of the numerical value to the debugging tool for dynamic display.
[0029] The display module is used for accessing the data name and data value according to the data type by using the display software of the power secondary equipment based on the data access interface, and is used for displaying the current equipment data locally.
[0030] Correspondingly, the application also discloses a terminal comprising a processor and a storage medium.
[0031] The storage medium is used for storing instructions.
[0032] The processor is configured to operate according to the instructions to execute the steps of the aforementioned lightweight power secondary device data access method.
[0033] Correspondingly, the present application also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the aforementioned lightweight power secondary device data access method are implemented.
[0034] The beneficial effects of the present invention are that, compared with the prior art, the present invention provides a lightweight method and system for accessing data of power secondary equipment, with a high degree of reuse of public software modules of the equipment; the public software modules such as communication and display of the equipment are of universal design and adaptable to configurations regardless of data type or version; the public software modules do not need to be modified due to different products, different service objects, or different application scenarios; the compact data structure is suitable for power secondary equipment with limited storage space; the lightweight structured data saves the memory resources of the equipment and has a higher data processing speed; various data tables automatically generate data structures and corresponding parameters in the equipment through conversion rules; the equipment directly uses the data converted by the tool according to the structure without the need for further processing; the designed tool software can simultaneously meet the flexible display, configuration, and conversion of multiple types of data, and a set of tool software can adapt to different equipment and different versions. The present invention solves the flexible configuration, storage, and access of different power secondary equipment data, and has good versatility, flexibility, and compatibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a flow chart of the lightweight method for accessing data of secondary power equipment in the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0037] The embodiments described in this application are only part of the embodiments of the present invention, not all of the embodiments. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without making creative work are all within the scope of protection of the present invention.
[0038] In view of the deficiencies of the prior art, the present application provides a lightweight power secondary equipment data access method and system, which establishes a data type table, unifies a data structure header, defines a data table configuration rule, and tool software displays and operates various data tables according to the data configuration rule, converts the data storage structure and data content according to the data configuration rule, defines a unified data access interface of the power secondary equipment software, realizes flexible access of various data variables, is used for public modules such as communication and display processing, and is compatible with the tool software through the data table configuration rule. The generalization configuration, display, operation and flexible access of various data variables are realized, the device public software module is highly reused, and the tool software is flexibly compatible. The device software module accesses various data through a unified interface, and the compact data structure is suitable for the power secondary equipment with limited storage space; the tool software simultaneously satisfies flexible display, configuration, conversion of various data, and a set of tool software is suitable for different devices and different versions.
[0039] Referring to Figure 1 The lightweight power secondary equipment data access method disclosed by the present application comprises the following steps:
[0040] Step 1: defining all data types of the power secondary equipment data to form a data type table.
[0041] In a specific embodiment, the data type table is defined as follows:
[0042]
[0043] XML format text of the data type table:
[0044] <TlvTable name="data type">
[0045] <Content ID="1" tag="1" key="Boolean" name="Boolean" size="1" / >
[0046] <Content ID="2" tag="43" key="Tiny" name="Tiny" size="1" / >
[0047] <Content ID="3" tag="32" key="UTiny" name="UTiny" size="1" / >
[0048] <Content ID="4" tag="33" key="Short" name="Short" size="2" / >
[0049] <Content ID="5" tag="45" key="UShort" name="Unsigned Short" size="2" / >
[0050] <Content ID="6" tag="2" key="Int" name="Int" size="4" / >
[0051] <Content ID="7" tag="35" key="Uint" name="Unsigned Int" size="4" / >
[0052] <Content ID="8" tag="36" key="Long" name="Long" size="8" / >
[0053] <Content ID="9" tag="37" key="Ulong" name="Unsigned Long" size="8" / >
[0054] <Content ID="10" tag="38" key="Float" name="Float" size="4" / >
[0055] <Content ID="11" tag="39" key="Double" name="Double" size="8" / >
[0056] <Content ID="12" tag="8" key="OcterString" name="Octet String" size="8" / >
[0057] <Content ID="13" tag="4" key="String" name="String" size="64" / >
[0058]
[0059] Step 2: Define the structure header according to the index number of the power secondary equipment data, the data name, the data type in the data type table, the data length, the data quality and the data value.
[0060] By defining the header of all data structures, all types of data are directly and uniformly processed simply. In a specific embodiment, the data table data structure header is defined as follows:
[0061]
[0062] The corresponding structure is:
[0063]
[0064]
[0065] Step 3: Use XML format to define data table configuration rules, which include ID, key name, column name, table width, display mode and conversion rule.
[0066] By implementing flexible definition of different data tables, the tool software uses a unified table processing module to adapt to different products and different types of data tables. The conversion rule transTlv corresponds to the tag field of TlvTable.
[0067] Example 1: Configuration of incoming table of power secondary equipment
[0068] <DIConfig Table="DITable" name="Incoming configuration">
[0069] <Content ID="1" key="index" title="Index number" width="5" display="number" transTlv="35" / >
[0070] <Content ID="2" key="name" title="Name" width="32" display="string" transTlv="4" / >
[0071] <Content ID="3" key="datatype" title="Data type" width="9" display="list" listtable="TlvTable" transTlv="43" / >
[0072] <Content ID="4" key="datalen" title="Data length" width="5" display="number" transTlv="43" / >
[0073] <Content ID="5" key="quality" title="Quality" width="5" display="hex" transTlv="32" / >
[0074] <Content ID="6" key="value" title="Value" width="5" display="number" transTlv="1" / >
[0075] <Content ID="7"key="board"title="板卡号"width="5"display="number"transTlv="32" / >
[0076] <Content ID="8"key="order"title="开入号"width="5"display="number"transTlv="32" / >
[0077]
[0078] Example 2: Remote control meter configuration for power secondary equipment:
[0079] <CtrlConfig Table="CtrlTable"name="遥控配置">
[0080] <Content ID="1"key="index"title="索引号"width="5"display="number"transTlv="35" / >
[0081] <Content ID="2"key="name"title="名称"width="32"display="string"transTlv="4" / >
[0082] <Content ID="3"key="datatype"title="数据类型"width="9"display="list"listtable="TlvTable"transTlv="43" / >
[0083] <Content ID="4"key="datalen"title="数据长度"width="5"display="number"transTlv="43" / >
[0084] <Content ID="5"key="quality"title="品质"width="5"display="hex"transTlv="32" / >
[0085] <Content ID="6"key="value"title="值"width="5"display="number"transTlv="1" / >
[0086] <Content ID="7" key="board" title="Control point number" width="5" display="number" transTlv="32" / >
[0087]
[0088] Step 4: Based on the data table configuration rules, display and configure the data table in the tool software.
[0089] In Example 1, the opening configuration table is displayed as:
[0090]
[0091] In Example 2, the remote control configuration table is displayed as:
[0092]
[0093] Step 5: Based on the data table configuration rules and the defined structure header, generate the structure and corresponding data in the tool software.
[0094] According to the conversion rule transTlv in the data table configuration rule, the corresponding structure is automatically formed, and the values in the table are converted to structure data, so that the tool is flexible and compatible with different products and different types of data, and is automatically converted to the data structure and its numerical value consistent with the device, without secondary processing in the device.
[0095] In Example 1, according to transTlv in DIConfig, the opening configuration data storage structure is converted to:
[0096]
[0097] In Example 1, the table is converted to the opening table structure data, which is downloaded to the corresponding opening table configuration data in the device:
[0098]
[0099] In Example 2, according to transTlv in CtrlConfig, the remote control configuration data storage structure is converted to:
[0100]
[0101]
[0102] In Example 2, the table is converted to the opening table structure data, which is downloaded to the corresponding opening table configuration data in the device:
[0103]
[0104] Step 6: Define a unified data access interface for reading the value of data according to the index number, data type or data length in the structure.
[0105] The first five attributes of the structure tTableHead of different tables are the same, and the sixth attribute value is corresponding to the data type according to datatype, and the storage space size is allocated according to datalen; therefore, the functions of communication and display in power secondary equipment can access the name and value of different types of data through the same interface;
[0106] The structure head of different products and different types of data is defined the same, and the common software modules of communication, display and the like correctly access the data through the data access interface, reuse the common module code, and do not need to modify the code. This step makes the communication, display and the like of the common software modules of the equipment be designed universally, adapt to the configuration of different types of data and different versions, and do not modify the common software modules due to different service objects and application scenarios of products.
[0107] Step 7: Based on the data access interface, the communication software of the power secondary equipment accesses different data values according to the data type, which is used for communication between the equipment and the monitoring system, or transmission to the debugging tool for dynamic display of numerical values.
[0108] Step 8: Based on the data access interface, the display software of the power secondary equipment accesses the data name and data value according to the data type, which is used for displaying the current equipment data locally.
[0109] In Example 1, the local display of the incoming table is as follows:
[0110]
[0111] In Example 2, the local display of the remote control table is as follows:
[0112]
[0113] The application has the advantages that, compared with the prior art, the application provides a lightweight power secondary equipment data access method and system, and device public software modules are highly reused; the communication, display and other public software modules of the device are designed universally, and are suitable for different data types, different versions, different products, different service objects and different application scenarios; the compact data structure is suitable for power secondary equipment with limited storage space; the lightweight structured data saves the memory resources of the device and has a high data processing speed; various data tables are automatically converted into data structure bodies and corresponding parameters in the device through conversion rules; the device directly uses the data converted by the tool according to the structure body, and does not need to be processed again; the designed tool software can simultaneously meet the flexible display, configuration and conversion of various data, and a set of tool software is suitable for different devices and different versions. The application solves the flexible configuration, storage and access of different power secondary equipment data, and has good universality, flexibility and compatibility.
[0114] The application can be a system, a method and / or a computer program product. The application also discloses a lightweight power secondary equipment data access system based on the lightweight power secondary equipment data access method.
[0115] A data type table definition module is configured to define all data types of power secondary equipment data to form a data type table.
[0116] A structure body header definition module is configured to define a structure body header according to an index number, a data name, a data type in the data type table, a data length, a data quality and a data value of power secondary equipment data.
[0117] A configuration rule definition module is configured to define a data table configuration rule in an XML format, and the data table configuration rule includes an ID, a key name, a column name, a table width, a display mode and a conversion rule.
[0118] A configuration module is configured to perform display and configuration operations of a data table in tool software based on the data table configuration rule.
[0119] A generation module is configured to generate a structure body and corresponding data in tool software based on the data table configuration rule and the defined structure body header.
[0120] A data access interface definition module is configured to define a unified data access interface, and the data access interface is configured to read the value of data according to an index number, a data type or a data length in the structure body.
[0121] A communication module is configured to access different data values based on the data access interface and the communication software of the power secondary device according to data types, and is configured to communicate with a monitoring system or transmit to a debugging tool for dynamic display of numerical values.
[0122] A display module is configured to access data names and data values based on the data access interface and the display software of the power secondary device according to data types, and is configured to display current device data locally.
[0123] Based on the spirit of the present application, those skilled in the art can easily think of a computer program product based on the foregoing lightweight power secondary device data access method. The computer program product can include a computer readable storage medium having computer readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure. That is, the present application also includes a terminal including a processor and a storage medium; the storage medium is configured to store instructions; and the processor is configured to operate according to the instructions to perform the steps of the foregoing lightweight power secondary device data access method.
[0124] The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium can be, for example but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a hole-in-punch structure having instructions stored thereon, and any suitable combination of the foregoing. The computer readable storage medium used herein is not to be interpreted as a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (for example, an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0125] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0126] Computer readable program instructions for carrying out operations of the present disclosure can be assembly instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, for example, through the Internet using an Internet Service Provider. In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
[0127] Finally, it should be noted that the above-mentioned embodiments are merely intended for describing and illustrating, not limiting the technical solutions of the present application. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the specific embodiments of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the present application, and any modification or equivalent replacement without departing from the spirit and scope of the present application should be covered within the protection scope of the claims of the present application.
Claims
1. A lightweight method for accessing data of secondary power equipment, characterized in that: The following steps are involved: Define all data types of power secondary equipment data and form a data type table; Define a structure header according to the index number, data name, data type in the data type table, data length, data quality and data value of the power secondary equipment data; Use XML format to define data table configuration rules, including ID, key name, column name, table width, display mode and conversion rules; Based on the data table configuration rules, the data table is displayed and configured in the tool software; wherein, for the input configuration table of the power secondary equipment, the data name, data type, data length, data quality, data value, board number and input number fields are defined; and for the remote control configuration table of the power secondary equipment, the data name, data type, data length, data quality, data value and control point number fields are defined; Based on the data table configuration rules and the defined structure header, a structure and corresponding data are generated in the tool software; Define a unified data access interface for reading data values based on the index number, data type or data length in the structure; Based on the data access interface, the communication software of the power secondary equipment accesses different data values according to the data type, which is used for communication between the equipment and the monitoring system, or is transmitted to the debugging tool for dynamic display of the value; Based on the data access interface, the display software of the power secondary device accesses the data name and data value according to the data type, so as to display the current device data locally.
2. The lightweight power secondary equipment data access method according to claim 1, characterized in that: The data types include Boolean, small integer, unsigned small integer, short integer, unsigned short integer, integer, unsigned integer, long integer, unsigned long integer, single-precision floating point, double-precision floating point, octet string type, and character string type.
3. A lightweight power secondary equipment data access system, characterized in that: include: The data type table definition module is used to define all data types of power secondary equipment data and form a data type table; A structure header definition module is used to define a structure header according to the index number, data name, data type in the data type table, data length, data quality and data value of the power secondary equipment data; A configuration rule definition module is used to define data table configuration rules in XML format, wherein the data table configuration rules include ID, key name, column name, table width, display mode and conversion rules; A configuration module is used to display and configure the data table in the tool software based on the data table configuration rules; wherein, for the input configuration table of the power secondary equipment, the data name, data type, data length, data quality, data value, board number and input number fields are defined; and for the remote control configuration table of the power secondary equipment, the data name, data type, data length, data quality, data value and control point number fields are defined; A generation module, configured to generate a structure and corresponding data in the tool software based on the data table configuration rules and the defined structure header; A data access interface definition module is used to define a unified data access interface for reading data values according to the index number, data type or data length in the structure; A communication module, which is used for the communication software of the power secondary equipment to access different data values according to data type based on the data access interface, and is used for the equipment to communicate with the monitoring system, or to transmit the data to the debugging tool for dynamic display of the value; The display module is used for accessing the data name and data value according to the data type based on the data access interface by the display software of the power secondary device, so as to display the current device data locally.
4. The lightweight power secondary equipment data access system according to claim 3, characterized in that: The data types include Boolean, small integer, unsigned small integer, short integer, unsigned short integer, integer, unsigned integer, long integer, unsigned long integer, single-precision floating point, double-precision floating point, octet string type, and character string type.
5. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instruction to execute the steps of the lightweight power secondary device data access method according to any one of claims 1-2.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the lightweight power secondary device data access method described in any one of claims 1-2 are implemented.
Citation Information
Patent Citations
Protocol dynamic adaptation method and device, electronic equipment and storage medium
CN117278648A
Efficient indexing of columns with inappropriate data types in relational databases
US11449487B1