Visual processing method for SCD file of intelligent substation at mobile equipment side
By converting SCD files from XML to JSON and building a two-level hash table index, the problems of slow SCD file parsing speed and poor interactivity on mobile devices are solved, enabling fast and smooth virtual terminal connection query and display, adapting to diverse screen and interaction needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID FUJIAN ELECTRIC POWER CO LTD
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies for parsing SCD files of smart substations on mobile devices suffer from high memory consumption, slow parsing speed, delayed interactive response, and poor interactive experience, making it difficult to meet the on-site demand for instant viewing.
The XML data of the SCD file is converted into JSON format, and a two-level hash table index is built for the publisher and subscriber. Virtual terminal connection data can be quickly obtained by querying the index, and the data is visualized using adaptive interaction and lightweight rendering technology.
It enables fast and smooth querying and display of virtual terminal connections on mobile devices, supports touch zoom and drag interaction, adapts to different screen sizes, and meets the needs of on-site operation and maintenance for quick viewing.
Smart Images

Figure CN121939622A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for visualizing SCD files of intelligent substations on mobile devices, belonging to the field of power technology. Background Technology
[0002] With the increasing prevalence of smart substations, their core configuration description file (SCD file) has become a digital blueprint reflecting the logical connections of the entire substation's secondary systems. Parsing the SCD file and visualizing the secondary circuits is a key technical support for substation design, commissioning, operation and maintenance, and renovation and expansion. It helps engineers intuitively understand complex signal flows and equipment relationships, significantly improving work efficiency and system reliability.
[0003] Currently, visualization methods for secondary circuits in smart substations typically rely on specialized software running on personal computers (PCs). For example, Chinese invention patent application CN120691595A discloses a visualization method for secondary circuits in smart substations. Its core process includes: parsing the XML structure of an SCD file, extracting virtual terminal information by traversing and searching for ExtRef nodes under the Intelligent Electronic Device (IED) node, and finally generating a visualized connection diagram. These technical solutions generally employ XML parsing techniques based on the Document Object Model (DOM) or XPath, and maintain a complete hierarchical data structure in memory for querying and rendering. However, when attempting to migrate such technologies to mobile devices (such as tablets and smartphones used by field engineers), their inherent limitations become apparent: First, SCD files contain a massive amount of information, and under the limited memory and computing power of mobile devices, direct DOM parsing can easily lead to excessive memory consumption, slow parsing speed, or even application crashes; second, XPath-based retrieval methods still need to traverse or search the entire data structure when faced with massive virtual terminal connection queries, resulting in significant response latency and making it difficult to meet the interactive needs of on-site instant viewing; finally, the aforementioned technical solutions lack targeted design for the diverse screen sizes and touch operation methods of mobile devices, resulting in poor visualization effects and interactive experience. Their technical architecture fails to fully consider the special constraints of mobile devices in terms of resources, interaction, and portability.
[0004] In summary, there is an urgent need for a visualization processing method for SCD files of intelligent substations that is mobile-friendly, lightweight, and has efficient query and adaptive interaction capabilities, so as to support on-site operation and maintenance personnel in conveniently and efficiently grasping secondary circuit information. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention proposes a method for visualizing SCD files of intelligent substations on mobile devices.
[0006] The technical solution of the present invention is as follows: On one hand, the present invention provides a method for visualizing SCD files of intelligent substations on mobile devices, comprising the following steps: Obtain the SCD file of the intelligent substation and convert the XML format data of the SCD file into JSON format data; Based on the converted JSON format data, the virtual terminal connection relationship between each smart electronic device (IED) is parsed, and a publisher index and a subscriber index are constructed for the virtual terminal connection relationship. Both the publisher index and the subscriber index adopt a two-level hash table structure. In response to user actions on mobile devices, the corresponding virtual terminal connection data is obtained and visualized by querying the publisher index and / or the subscriber index.
[0007] Preferably, converting the XML format data of the SCD file into JSON format data includes: The hierarchical structure of the SCD file is mapped to nested JSON key-value pairs, wherein the communication nodes of the substation automation system include IED, access point, logical device, logical node, Inputs and ExtRef, and the properties of ExtRef are mapped to the property values of JSON objects.
[0008] Preferably, the construction of the publisher index includes: Construct a first-level hash table using the name of the publisher IED as the key, with the corresponding value being a list of subscriber IED names that subscribe to that publisher IED; For each subscriber IED in the subscriber IED name list, a second-level hash table is constructed using the combination of publisher IED name and subscriber IED name as the key. The corresponding value is a list of all virtual terminal pairs sent from the publisher IED to the subscriber IED, where each virtual terminal pair includes the publisher virtual terminal address and the subscriber virtual terminal address.
[0009] Preferably, the construction of the subscriber index includes: A first-level hash table is constructed using the name of the subscriber IED as the key, and the corresponding value is a list of publisher IED names that send data to that subscriber IED. For each publisher IED in the list of publisher IED names, a second-level hash table is constructed using the combination of subscriber IED name and publisher IED name as the key. The corresponding value is a list of all virtual terminal pairs sent from the publisher IED to the subscriber IED.
[0010] Preferably, obtaining the corresponding virtual terminal connection data in response to user operation includes: In response to a query operation targeting a target IED, a query is performed in the publisher index using the name of the target IED as the key to obtain all virtual terminal connections published by the target IED as a publisher; a query is performed in the subscriber index using the name of the target IED as the key to obtain all virtual terminal connections received by the target IED as a subscriber; the query results in the publisher index and the subscriber index are merged to obtain all virtual terminal connection data of the target IED.
[0011] Preferably, the visualization includes: In the view layer of the mobile device, the virtual terminal connection data is rendered using an adaptive layout based on device-independent pixels or percentages. The view layer allows the visualization to be scaled using a two-finger pinch operation and to be panned using a single-finger drag operation.
[0012] On the other hand, the present invention also provides a visualization processing system for SCD files of intelligent substations on mobile devices, the system comprising: The data conversion module is used to acquire the SCD file of the smart substation and convert the XML format data of the SCD file into JSON format data; The index building module is used to parse the virtual terminal connection relationship between various smart electronic devices (IEDs) based on the converted JSON format data, and to build a publisher index and a subscriber index for the virtual terminal connection relationship. Both the publisher index and the subscriber index adopt a two-level hash table structure. The query and display module is used to respond to user operations on mobile devices by querying the publisher index and / or the subscriber index to obtain the corresponding virtual terminal connection data and display it visually.
[0013] Preferably, the system further includes a data caching module for storing the converted JSON format data, as well as the constructed publisher index and subscriber index, locally on the mobile device.
[0014] In another aspect, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the present invention.
[0015] In another aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in the present invention.
[0016] The present invention has the following beneficial effects: This invention provides a method for visualizing SCD files of smart substations on mobile devices. By pre-converting the XML file of the SCD into JSON format to reduce parsing time and memory usage, and constructing a secondary hash table index dedicated to virtual terminal connections to achieve real-time query with O(1) time complexity, on-site maintenance personnel can immediately display all signal connections of any device when they select it on their mobile phone or tablet. It supports smooth touch zooming and dragging interaction on mobile devices and is compatible with different sizes and proportions of mobile devices to meet the needs of substation personnel to quickly view SCD files. Attached Figure Description
[0017] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is an example diagram of virtual terminal information in an embodiment of the present invention; Figure 3 This is an example of the publisher mapping representation in this embodiment of the invention; Figure 4 This is the intended representation of the subscriber mapping in this embodiment of the invention; Figure 5 This is a schematic diagram illustrating the search for all virtual terminals of IED_A in an embodiment of the present invention; Figure 6 This is a flowchart of the method based on the layered architecture of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.
[0020] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0022] The term “and / or” refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes these combinations.
[0023] Example 1: This embodiment provides a method for visualizing SCD files of intelligent substations on mobile devices, such as... Figure 6 As shown, the method described in this embodiment runs on a mobile terminal (such as a smartphone or tablet) that includes a processor and memory. It is implemented by constructing a three-layer interactive architecture consisting of a data layer, a business layer, and a view layer. The specific flow of the method is as follows: Figure 1 As shown, it includes the following steps: S1. Obtain the SCD file of the intelligent substation, and convert the XML format data of the SCD file into JSON format data. Specifically: The mobile terminal obtains the SCD file of the smart substation through file import, network download or Bluetooth transmission, and calls the JSON parsing library of the mobile terminal (such as fastjson2) to completely map the XML format data of the SCD file into JSON format data. The mapping rule is to map the XML node to the JSON object, the node attribute to the key-value pair of the JSON object, and the child node to the nested object or array. During the mapping process, this embodiment focuses on extracting and retaining the core nodes related to the visualization of the secondary loop, including but not limited to: intelligent electronic devices (IED), access points (AccessPoint), logical devices (LDevice), logical nodes (LN), and external references (Inputs and ExtRef), i.e., virtual terminal connection information; for descriptive and configurable information that does not directly affect the virtual terminal connection, selective filtering is performed after conversion to further reduce the data volume.
[0024] Preferably, during the XML to JSON conversion process in this embodiment, data pre-filtering based on XPath expressions is performed simultaneously. For example, only nodes containing key connection attributes such as / / ExtRef[@iedNameand @intAddr] and their necessary parent path nodes are extracted. At the same time, the extracted JSON string is subjected to lightweight in-memory compression using the GZIP algorithm, and the compressed data is temporarily stored in the form of a ByteArray. The resulting JSON data has a clear structure, and virtual terminal information can be quickly accessed through key paths (such as SCD.IED["IED_A"].AccessPoint["G1"].LDevice["Ld0"].Inputs.ExtRef[]).
[0025] S2. Based on the converted JSON format data, parse the virtual terminal connection relationships between each smart electronic device (IED), and construct a publisher index and a subscriber index for the virtual terminal connection relationships. Both the publisher index and the subscriber index adopt a two-level hash table structure. Specifically: Iterate through all ExtRef objects in the JSON data obtained in step S1. For each ExtRef object, parse out the publisher IED name, publisher virtual terminal address, and subscriber virtual terminal address, and add the IED name (i.e., subscriber IED name) from the key path to form a structure like this: Figure 2 The complete virtual terminal connection information is shown; It should be noted that IEDs in smart substations typically have bidirectional communication capabilities. The same IED can both send signals outwards as a transmitter and receive signals from other IEDs as a subscriber, such as... Figure 2 As shown in the link diagram, IED_A has both connections to send signals to IED_B and IED_C (in this case, it is the publisher) and connections to receive signals from IED_B and IED_C (in this case, it is the subscriber). Based on the data obtained from the above analysis, a two-level hash table structure is constructed, and further: Figure 3 In the publisher mapping table shown, the first-level hash table (such as HashMap_Pub_L1) uses the hash value Hash(IED_A) calculated by the hash function of the publisher IED name (in this case, IED_A is the publisher) as the key. The corresponding value is an ordered set that stores a list of all subscriber IED names that subscribe to the IED_A signal (such as [IED_B, IED_C], where IED_B and IED_C are subscribers). The second-level hash table (such as HashMap_Pub_L2) uses the hash value of the combined string of publisher IED name and subscriber IED name (such as IED_A-IED_B) as the key. The corresponding value is a list that stores all virtual terminal pairs sent from IED_A to IED_B. Each virtual terminal pair is a tuple (such as VT1-VR1), representing the publisher virtual terminal address and the subscriber virtual terminal address, respectively. Figure 4The subscriber mapping table and publisher mapping table shown are constructed in a symmetrical manner. The first-level hash table (such as HashMap_Sub_L1) uses the hash value of the subscriber IED name (in this case, IED_A is the subscriber) as the key, and the value is a list of publisher IED names that send signals to IED_A (such as [IED_B, IED_C], where IED_B and IED_C are publishers). The second-level hash table (such as HashMap_Sub_L2) uses the hash value of the combination of subscriber IED name and publisher IED name (such as IED_A-IED_B) as the key, and the value is a list of all virtual terminal pairs sent from IED_B to IED_A. Preferably, to address the issue that some IED names may be too long, this embodiment uses the MurmurHash 332-bit hash function, which has excellent performance and a low collision rate on mobile CPUs. For hash collisions, this embodiment uses a strategy that combines chaining with dynamic expansion. When the chain length of a bucket exceeds the preset chain length threshold (8 in this embodiment), the hash table is automatically expanded (the capacity is doubled and rehashed) to ensure that the average lookup time complexity remains stable at around O(1) in a typical SCD file scenario containing hundreds of IEDs. The two bidirectional mapping tables are serialized using the Protocol Buffers format and stored in the local database or file cache of the mobile device. When the same SCD file is opened again, the index can be loaded directly, skipping the time-consuming parsing and building process.
[0026] S3. In response to user operations on the mobile device, obtain the corresponding virtual terminal connection data by querying the publisher index and / or the subscriber index, and display it visually. Specifically: S31. When a user performs an operation in the view layer of the mobile terminal app (for example, selecting IED_A in the device list or entering IED_A in the search box), the business layer receives the request, takes IED_A as input, and executes the following... Figure 5 The query operation shown: Using IED_A as the key, query the first-level hash table HashMap_Pub_L1 in the publisher mapping table to obtain the list of all subscribers [IED_B, IED_C] corresponding to IED_A as the publisher; then query HashMap_Pub_L2 in turn using IED_A-IED_B and IED_A-IED_C as keys to obtain all virtual terminal connections sent by IED_A.
[0027] Using IED_A as the key, query HashMap_Sub_L1 to obtain a list of all publishers [IED_B, IED_C] that sent signals to IED_A. Then, query HashMap_Sub_L2 sequentially using IED_A-IED_B and IED_A-IED_C as keys to obtain all virtual terminal connections received by IED_A. By merging the query results from the two parts above, we obtain all the signal input and output connections of IED_A and return them to the business layer for logical processing. Furthermore, in this embodiment, the business layer performs LRU caching on the results of the most recent N (e.g., 10) queries. When a user repeatedly views a few IEDs, the results can be returned directly from the cache, achieving instant response. In addition, when there are minor changes to the SCD file (e.g., modifications to individual virtual terminals), the system can perform differential parsing only on the changed ExtRef nodes and locally update the corresponding hash table entries, rather than rebuilding the entire index. S32. The view layer receives the complete connection data of IED_A from the business layer and performs visualization drawing. In this embodiment, a mobile-optimized version of the force-guided algorithm is used. The currently focused IED (such as IED_A) is placed in the center of the screen, and the IEDs directly connected to it (first-degree relationship) are arranged on the surrounding circle. IEDs further away (second-degree relationship) are presented in a fade-out or shrinking manner. All calculations use single-precision floating-point numbers and utilize the hardware acceleration of graphics transformation using the mobile device's GPU. Furthermore, the coordinates, radius, and line thickness of all graphic elements are calculated as a percentage of the short side of the screen or device-independent pixels to ensure that the display ratio is coordinated on mobile phones or tablets of different sizes and resolutions. The font size of the text labels is linked to the system's accessibility font scaling ratio to ensure accessibility. The view layer of this embodiment supports two-finger pinch to zoom the canvas (based on the gesture recognizer to calculate the center point of the two fingers as the zoom anchor point) and single-finger drag to pan the canvas. In view of the inaccuracy of mobile touch, the hot area (touchable area) of the IED graphic elements is expanded and touch feedback (such as slight vibration) is added. Furthermore, for substations with extremely complex interconnections, rendering all lines at once can cause lag on mobile devices. Therefore, this embodiment adopts progressive rendering, first quickly drawing IEDs and main connecting lines, and then gradually drawing details such as virtual terminal labels in a background thread. At the same time, level of detail technology is applied, so when the canvas is zoomed to the global view, only the main connections between IEDs are displayed; when zooming in to view a local area, the detailed virtual terminal connection diagram of that area is dynamically loaded and drawn. By following the steps above, on-site maintenance personnel can quickly and smoothly view the complete secondary circuit connection diagram of any IED device on their mobile phones or tablets.
[0028] Example 2: This embodiment provides a visualization processing system for SCD files of intelligent substations on mobile devices. The system includes: The data conversion module is used to acquire the SCD file of the smart substation and convert the XML format data of the SCD file into JSON format data; The index building module is used to parse the virtual terminal connection relationship between various smart electronic devices (IEDs) based on the converted JSON format data, and to build a publisher index and a subscriber index for the virtual terminal connection relationship. Both the publisher index and the subscriber index adopt a two-level hash table structure. The query and display module is used to respond to user operations on mobile devices by querying the publisher index and / or the subscriber index to obtain the corresponding virtual terminal connection data and display it visually. The data caching module is used to store the converted JSON format data, as well as the built publisher and subscriber indexes, locally on the mobile device.
[0029] Example 3: This embodiment proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method described in any embodiment of the present invention.
[0030] Example 4: This embodiment proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in any embodiment of the present invention.
[0031] It is worth noting that the system, electronic device, and computer-readable storage medium described in this invention are all based on the same inventive concept as the method described in Embodiment 1, and will not be repeated here.
[0032] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0033] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0034] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0035] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0036] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for visualizing SCD files of intelligent substations on mobile devices, characterized in that, The method includes: Obtain the SCD file of the intelligent substation and convert the XML format data of the SCD file into JSON format data; Based on the converted JSON format data, the virtual terminal connection relationship between each smart electronic device (IED) is parsed, and a publisher index and a subscriber index are constructed for the virtual terminal connection relationship. Both the publisher index and the subscriber index adopt a two-level hash table structure. In response to user actions on mobile devices, the corresponding virtual terminal connection data is obtained and visualized by querying the publisher index and / or the subscriber index.
2. The method for visualizing SCD files of intelligent substations on mobile devices according to claim 1, characterized in that, Converting the XML format data of the SCD file to JSON format data includes: The hierarchical structure of the SCD file is mapped to nested JSON key-value pairs, wherein the communication nodes of the substation automation system include IED, access point, logical device, logical node, Inputs and ExtRef, and the properties of ExtRef are mapped to the property values of JSON objects.
3. The method for visualizing SCD files of intelligent substations on mobile devices according to claim 1, characterized in that, The construction of the publisher index includes: Construct a first-level hash table using the name of the publisher IED as the key, with the corresponding value being a list of subscriber IED names that subscribe to that publisher IED; For each subscriber IED in the subscriber IED name list, a second-level hash table is constructed using the combination of publisher IED name and subscriber IED name as the key. The corresponding value is a list of all virtual terminal pairs sent from the publisher IED to the subscriber IED, where each virtual terminal pair includes the publisher virtual terminal address and the subscriber virtual terminal address.
4. The method for visualizing SCD files of intelligent substations on mobile devices according to claim 1, characterized in that, The construction of the subscriber index includes: A first-level hash table is constructed using the name of the subscriber IED as the key, and the corresponding value is a list of publisher IED names that send data to that subscriber IED. For each publisher IED in the list of publisher IED names, a second-level hash table is constructed using the combination of subscriber IED name and publisher IED name as the key. The corresponding value is a list of all virtual terminal pairs sent from the publisher IED to the subscriber IED.
5. The method for visualizing SCD files of intelligent substations on mobile devices according to claim 1, characterized in that, In response to user actions, the data obtained for the corresponding virtual terminal connection includes: In response to a query operation targeting a target IED, a query is performed in the publisher index using the name of the target IED as the key to obtain all virtual terminal connections published by the target IED as a publisher; a query is performed in the subscriber index using the name of the target IED as the key to obtain all virtual terminal connections received by the target IED as a subscriber; the query results in the publisher index and the subscriber index are merged to obtain all virtual terminal connection data of the target IED.
6. The method for visualizing SCD files of intelligent substations on mobile devices according to claim 1, characterized in that, The visualization includes: In the view layer of the mobile device, the virtual terminal connection data is rendered using an adaptive layout based on device-independent pixels or percentages. The view layer allows the visualization to be scaled using a two-finger pinch operation and to be panned using a single-finger drag operation.
7. A visualization processing system for SCD files of intelligent substations on mobile devices, characterized in that, The system includes: The data conversion module is used to acquire the SCD file of the smart substation and convert the XML format data of the SCD file into JSON format data; The index building module is used to parse the virtual terminal connection relationship between various smart electronic devices (IEDs) based on the converted JSON format data, and to build a publisher index and a subscriber index for the virtual terminal connection relationship. Both the publisher index and the subscriber index adopt a two-level hash table structure. The query and display module is used to respond to user operations on mobile devices by querying the publisher index and / or the subscriber index to obtain the corresponding virtual terminal connection data and display it visually.
8. The visualization processing system for SCD files of intelligent substations on mobile devices according to claim 7, characterized in that, The system also includes a data caching module for storing the converted JSON format data, as well as the constructed publisher and subscriber indexes, locally on the mobile device.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Secondary circuit visualization method and device of intelligent substation and electronic equipment
CN120691595A