A method and device for constructing a sampling value message of a substation and a storage medium
By receiving test data from substation secondary equipment, querying and matching historical message samples, and updating protocol data units according to changes, the problem of high performance overhead in substation sampled value message construction is solved, achieving efficient construction and normal communication.
Patent Information
- Application Number
- CN202411652480.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-11-19
AI Technical Summary
In constructing sampled value messages for substations, existing technologies incur significant performance overhead, resulting in low construction efficiency.
By receiving test data generated by secondary equipment in the substation, the sample protocol data unit in the historical sampled value message is queried, and matched according to the changes and update conditions of the test data. If the match is successful, the sample protocol data unit is updated as the target protocol data unit; otherwise, the target protocol data unit is directly constructed based on the test data.
This effectively reduced the performance overhead of constructing sampled value messages, improved construction efficiency, and ensured the normal progress of communication testing.
Smart Images

Figure CN119402558B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power grid, and particularly relates to a substation sample value message construction method, device and storage medium. BACKGROUND
[0002] In testing secondary equipment of a substation, the digital quantity sent by an intelligent test terminal, an intelligent terminal and a test and intelligence integrated device using IEC61850 protocol is usually described by an SV (Sample Value, sample value) message.
[0003] The SV message follows the format of ASN.1, and its content is composed of TLV (Tag Len Val, tag length content) nodes, and it supports nesting, that is, the SV message is a network layer message, and all are a top TLV node, and multiple TLV child nodes are hung below.
[0004] In constructing the SV message, the content of each node is usually traversed, resulting in large performance overhead. SUMMARY
[0005] Therefore, the present application provides a substation sample value message construction method, device and storage medium, to reduce the performance overhead of constructing the SV message.
[0006] A first aspect of the present application provides a substation sample value message construction method, comprising:
[0007] receiving test data generated by secondary equipment in a substation;
[0008] querying sample protocol data units in a sample value message constructed for the secondary equipment in the substation;
[0009] matching changes of the sample protocol data units relative to the test data with update conditions;
[0010] if the matching is successful, updating the sample protocol data units according to the changes of the sample protocol data units relative to the test data, as target protocol data units of the sample value message constructed for the secondary equipment in the substation.
[0011] Optionally, the matching of the changes of the sample protocol data units relative to the test data with the update conditions comprises:
[0012] determining nodes in the sample protocol data units that have changed relative to the test data as change sources;
[0013] extracting a first parameter representing message layout from the change sources;
[0014] if the first parameter does not change relative to the test data, determining that the update condition matches successfully;
[0015] if the first parameter changes relative to the test data, determining that the update condition fails to match.
[0016] Optionally, the determining of the node in the sample protocol data unit that changes relative to the test data as the change source comprises:
[0017] if a sample counter node in the sample protocol data unit changes relative to the test data and other nodes in the sample protocol data unit except the sample counter node do not change relative to the test data, determining that the sample counter node is the change source.
[0018] Optionally, the extracting of the first parameter representing the message layout from the change source comprises:
[0019] extracting a length from the sample counter node as the first parameter representing the message layout.
[0020] Optionally, the updating of the sample protocol data unit according to the change of the sample protocol data unit relative to the test data as the target protocol data unit of the sample value message constructed by the secondary equipment in the substation comprises:
[0021] extracting a second parameter representing the change degree from the change source;
[0022] updating the sample protocol data unit according to the second parameter as the target protocol data unit of the sample value message constructed by the secondary equipment in the substation.
[0023] Optionally, the extracting of the second parameter representing the change degree from the change source comprises:
[0024] if the change source is a sample counter node, extracting an offset address from the sample counter node as the second parameter representing the change degree.
[0025] Optionally, the updating of the sample protocol data unit according to the second parameter as the target protocol data unit of the sample value message constructed by the secondary equipment in the substation comprises:
[0026] moving data in the sample protocol data unit according to the offset address to obtain the target protocol data unit of the sample value message constructed by the secondary equipment in the substation.
[0027] Optionally, the method further comprises:
[0028] If the matching fails, a sum of lengths of each sub-node in the mark node Apdu is calculated according to the test data, to obtain a first total length; the sub-nodes in the mark node Apdu include a number node, a data node and a mark node Asdu;
[0029] The first total length is filled into the mark node Apdu, and the data node and the mark node Asdu are filled according to the test data;
[0030] A sum of lengths of each sub-node in the mark node Asdu is calculated according to the test data, to obtain a second total length;
[0031] The second total length is filled into the mark node Asdu, and each sub-node in the mark node Asdu is filled according to the test data, to obtain a target protocol data unit of a sample value message constructed by the secondary equipment in the substation.
[0032] The second aspect of the present application provides a sampling value message construction device of a substation, comprising:
[0033] A test data receiving module is configured to receive test data generated by secondary equipment in a substation;
[0034] A protocol data unit querying module is configured to query a sample protocol data unit in a sampling value message constructed by the secondary equipment in the substation;
[0035] An update condition matching module is configured to match a change of the sample protocol data unit relative to the test data with an update condition;
[0036] A protocol data unit updating module is configured to, if the matching succeeds, update the sample protocol data unit according to the change of the sample protocol data unit relative to the test data, as a target protocol data unit of a sampling value message constructed by the secondary equipment in the substation.
[0037] In an embodiment of the present application, the update condition matching module comprises:
[0038] A change source determining module is configured to determine a node in the sample protocol data unit that has a change relative to the test data, as a change source;
[0039] A first parameter extracting module is configured to extract a first parameter representing a message layout from the change source;
[0040] A matching success determining module is configured to, if the first parameter has no change relative to the test data, determine that the matching with the update condition succeeds;
[0041] The matching failure determining module is configured to determine a matching failure with an update condition if the first parameter changes with respect to the test data.
[0042] Optionally, the change source determining module is further configured to:
[0043] If a sampling counter node in the sample protocol data unit changes with respect to the test data, and other nodes in the sample protocol data unit except the sampling counter node do not change with respect to the test data, the sampling counter node is determined as the change source.
[0044] Optionally, the first parameter extracting module is further configured to:
[0045] extract a length from the sampling counter node as the first parameter representing the message layout.
[0046] Optionally, the protocol data unit updating module comprises:
[0047] a second parameter extracting module configured to extract a second parameter representing a change degree from the change source;
[0048] a parameter updating module configured to update the sample protocol data unit according to the second parameter as a target protocol data unit of the sampling value message constructed by the secondary equipment in the transformer substation.
[0049] Optionally, the second parameter extracting module is further configured to:
[0050] If the change source is a sampling counter node, an offset address is extracted from the sampling counter node as the second parameter representing the change degree.
[0051] Optionally, the parameter updating module is further configured to:
[0052] move data in the sample protocol data unit according to the offset address to obtain the target protocol data unit of the sampling value message constructed by the secondary equipment in the transformer substation.
[0053] Optionally, the method further comprises:
[0054] a first total length calculating module configured to calculate a sum of lengths of each sub-node in a marker node Apdu to obtain a first total length if the matching fails, wherein the sub-nodes in the marker node Apdu include a number node, a data node, and a marker node Asdu;
[0055] a first marker node constructing module configured to fill the first total length to the marker node Apdu, and fill the data node and the marker node Asdu according to the test data.
[0056] a second total length calculation module, configured to calculate a sum of lengths of each sub-node in the mark node Asdu according to the test data, to obtain a second total length;
[0057] a second mark node construction module, configured to fill the second total length to the mark node Asdu, and fill each sub-node in the mark node Asdu according to the test data, to obtain a target protocol data unit of the sample value message constructed for the secondary equipment in the substation.
[0058] A third aspect of the present application provides an electronic device, comprising:
[0059] at least one processor; and
[0060] a memory connected with the at least one processor; wherein,
[0061] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the sample value message construction method of the substation as described in the first aspect.
[0062] A fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the sample value message construction method of the substation as described in the first aspect.
[0063] A fifth aspect of the present application provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the sample value message construction method of the substation as described in the first aspect.
[0064] In the embodiment, test data generated by the secondary equipment in the substation is received, sample protocol data units in the sample value message constructed for the secondary equipment in the substation are queried, changes of the sample protocol data units relative to the test data are matched with update conditions, and if the matching is successful, the sample protocol data units are updated according to the changes of the sample protocol data units relative to the test data, as the target protocol data unit of the sample value message constructed for the secondary equipment in the substation. In the embodiment, when the sample value message is constructed for the secondary equipment in the substation, if the update condition is met, the historical sample protocol data unit is taken as a template, and the target sample protocol data unit is obtained by updating on the basis of the structure of the historical sample protocol data unit, so that the nodes of the protocol data unit are not traversed in full, the operation of constructing the protocol data unit is effectively reduced, and the protocol data unit can be quickly constructed.
[0065] It is to be understood that the embodiments described herein are merely exemplary of the application and that a person skilled in the art can devise other embodiments without departing from the scope of the present application. It is also to be understood that not all of the features and / or benefits described and / or illustrated herein need be present in every embodiment of the application. The scope of the application should therefore not be limited to the features and / or benefits described and / or illustrated herein, but should be given the full scope that the claims afford based on the entirety of the specification. BRIEF DESCRIPTION OF DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort based on these drawings.
[0067] Figure 1 is a flow chart of a sampling value message construction method of a substation provided by Embodiment One of the present application.
[0068] Figure 2 is a schematic diagram of a protocol data unit provided by Embodiment One of the present application.
[0069] Figure 3 is a flow chart of a sampling value message construction method of a substation provided by Embodiment Two of the present application.
[0070] Figure 4 is a structural schematic diagram of a sampling value message construction device of a substation provided by Embodiment Three of the present application.
[0071] Figure 5 is a structural schematic diagram of an electronic device provided by Embodiment Four of the present application. DETAILED DESCRIPTION
[0072] In order to make the technical personnel in the art better understand the present application scheme, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort should be within the scope of protection of the present application.
[0073] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and the above-described accompanying drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can encompass the order of implementation other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0074] Embodiment one
[0075] Referring to Figure 1 , a flow chart of a method for constructing a sample value message of a substation is shown, which can be executed by a sample value message construction device of a substation, which can be realized in the form of hardware and / or software, and can be configured in an electronic device. As shown in Figure 1 , the method comprises:
[0076] Step 101, receiving test data generated by secondary equipment in a substation.
[0077] In practical applications, the substation includes primary equipment and secondary equipment, which are relative.
[0078] The primary equipment of the substation refers to electrical equipment directly used in the production, transmission and distribution of electrical energy, such as generators, transformers, transmission lines, power cable breakers, disconnectors, busbars, reactors, shunt compensation capacitors, current transformers, voltage transformers, etc.
[0079] The secondary equipment of the substation refers to low-voltage electrical equipment required for protection, monitoring, control, regulation of the work of primary equipment, and for operation and maintenance personnel to provide working conditions, accident alarm and production command signals, such as relay protection and monitoring devices, measurement and metering instruments, signal lights, switching and control switches, contactors, small low-voltage circuit breakers and fuses, etc.
[0080] Under microcomputer protection, the secondary equipment of the substation usually has strong online self-checking and communication functions. Under the unified specification of IEC61850 standard, considering the load and safety of the secondary equipment of the substation, the self-checking and communication functions integrated by the secondary equipment of the substation can be used to complete the embedded state test, at this time, the test data generated by the secondary equipment of the substation can be received.
[0081] Step 102: Query the sample protocol data units in the sampled value messages constructed by the secondary equipment in the substation in the history.
[0082] In this embodiment, multiple sample PDUs can be selected as templates from all sample Protocol Data Units (PDUs) of SV messages constructed for secondary equipment in substations in the past to match PDUs with different layouts.
[0083] At this point, sample PDUs can be sequentially queried from the database in the SV messages constructed for secondary equipment in the substation in the past.
[0084] Step 103: Match the changes of the sample protocol data units relative to the test data with the update conditions.
[0085] In practical applications, update conditions can be pre-defined. When the update conditions are met, the method provided in this embodiment can be used to quickly construct the target PDU of the SV message using the sample PDU as a template. When the update conditions are not met, the target PDU of the SV message can be directly constructed based on the test data.
[0086] At this point, the changes in sample PDUs relative to the test data can be analyzed, and the changes in sample PDUs relative to the test data can be matched with the update conditions to determine whether the update conditions are met.
[0087] In one embodiment of the present invention, step 103 may include the following steps:
[0088] Step 1031: Identify the nodes in the sample protocol data unit that have changed relative to the test data, and use them as the source of change.
[0089] like Figure 2 As shown, the SV PDU has three layers of nodes. The top layer node is the marker node Apdu. The second layer nodes include the count node Asdu Num, the data node Asdu Seq, and the marker node Asdu. The third layer nodes include the unique identifier node Svid, the sampling counter node Samp Count, the configuration version number Conf Rev, the synchronization node Sample Sync, and the data node Data.
[0090] The sampling counter node Samp Count is incremented by 1 after each new sample value is received, and reset to zero after receiving a synchronization signal.
[0091] In this embodiment, nodes in the sample PDU that have changed relative to the test data can be queried as sources of change.
[0092] In practical application, the length of TLV node is not fixed, which means that the offset address of each node in the whole data frame will change when the content size of any child node changes.
[0093] Then, if the sample counter node Samp Count in the sample protocol data unit PDU changes relative to the test data and other nodes in the sample protocol data unit PDU do not change relative to the test data, the sample counter node Samp Count is determined as the change source.
[0094] Step 1032, extracting the first parameter representing the message layout from the change source.
[0095] In the embodiment, an access window can be constructed for the change source to extract the first parameter representing the message layout from the change source.
[0096] For example, when the change source is the sample counter node Samp Count, the length Len of the sample counter node Samp Count can be extracted as the first parameter representing the message layout.
[0097] Step 1033, if the first parameter does not change relative to the test data, it is determined that the update condition is matched successfully.
[0098] If the first parameter (e.g. the length Len of the sample counter node Samp Count) does not change relative to the test data, the PDU layout of the SV message will not change, and it can be determined that the update condition is matched successfully.
[0099] Step 1034, if the first parameter changes relative to the test data, it is determined that the update condition is not matched.
[0100] If the first parameter (e.g. the length Len of the sample counter node Samp Count) changes relative to the test data, the PDU layout of the SV message changes, and it can be determined that the update condition is not matched.
[0101] Step 104, if the matching is successful, the sample protocol data unit is updated according to the change of the sample protocol data unit relative to the test data, as the target protocol data unit of the sample value message constructed by the secondary equipment in the substation.
[0102] When the matching of the update condition is successful, the sample PDU is taken as a template, and the sample PDU is updated according to the change of the sample PDU relative to the test data based on the structure of the sample PDU, so as to quickly obtain the target PDU of the SV message constructed by the secondary equipment in the substation.
[0103] In one embodiment of the present application, step 104 can comprise the following steps:
[0104] Step 1041, extracting a second parameter representing the degree of change from the change source.
[0105] In this embodiment, an access window can be configured for the change source, and the second parameter representing the degree of change is extracted from the change source.
[0106] For example, if the change source is a sample counter node Samp Count, the offset address Offset in the sample counter node Samp Count is extracted as the second parameter representing the degree of change.
[0107] Step 1042, updating the sample PDU according to the second parameter as the target PDU of the sample value message constructed by the secondary equipment in the substation.
[0108] In this embodiment, the sample PDU can be quickly updated according to the second parameter to obtain the target PDU of the SV message constructed by the secondary equipment in the substation.
[0109] For example, when the second parameter is the offset address Offset in the sample counter node Samp Count, the data in the sample PDU can be moved according to the offset address Offset to obtain the target PDU of the sample value message constructed by the secondary equipment in the substation.
[0110] In this embodiment, the test data generated by the secondary equipment in the substation is received, the sample PDU in the historical sample value message constructed by the secondary equipment in the substation is queried, the change of the sample PDU relative to the test data is matched with the update condition, and if the matching is successful, the sample PDU is updated according to the change of the sample PDU relative to the test data as the target PDU of the sample value message constructed by the secondary equipment in the substation. In this embodiment, when the sample value message is constructed by the secondary equipment in the substation, if the update condition is met, the historical sample PDU is used as a template, and the target sample PDU is obtained by updating on the basis of the structure of the historical sample PDU, thereby avoiding full traversal of the nodes of the PDU and effectively reducing the operation of constructing the PDU, and the PDU can be quickly constructed.
[0111] Embodiment Two
[0112] Reference Figure 3, a flow chart of a substation sampling value message construction method provided by the second embodiment of the present application is shown, and the present embodiment adds the operation of directly constructing the target PDU of the SV message according to the test data on the basis of the foregoing embodiment. As shown in Figure 3 the method comprises the following steps.
[0113] Step 301, receiving test data generated by secondary equipment in a substation.
[0114] Step 302, querying sample protocol data units in sampling value messages constructed by the secondary equipment in the substation.
[0115] Step 303, matching the changes of the sample protocol data units relative to the test data with update conditions.
[0116] Step 304, if the matching fails, calculating the sum of lengths of each sub-node in the marker node Apdu according to the test data to obtain a first total length.
[0117] When the matching with the update conditions fails, the operation of directly constructing the target PDU of the SV message according to the test data can be performed.
[0118] In this process, each sub-node in the marker node Apdu in the target PDU of the SV message can be traversed, the sum of lengths of each sub-node in the marker node Apdu in the target PDU is counted to obtain the first total length.
[0119] The sub-nodes in the marker node Apdu include a number node Asdu Num, a data node Asdu Seq and a marker node Asdu.
[0120] Step 305, filling the first total length to the marker node Apdu, and filling the data node and the marker node Asdu according to the test data.
[0121] The first total length is filled to the marker node Apdu as a node head, and the sizes of the data node Asdu Seq and the marker node Asdu are obtained according to the test data and filled to the data node Asdu Seq and the marker node Asdu.
[0122] Step 306, calculating the sum of lengths of each sub-node in the marker node Asdu according to the test data to obtain a second total length.
[0123] Further, each sub-node in the marker node Asdu can be traversed, the sum of lengths of each sub-node in the marker node Asdu is counted to obtain the second total length.
[0124] Wherein, each sub-node in the marker node Asdu includes a unique marker node Svid, a sample counter node Samp Count, a configuration version number Conf Rev, a synchronization node Sample Sync, and a data node Data
[0125] Step 307, filling the second total length to the marker node Asdu, and filling each sub-node in the marker node Asdu according to the test data, to obtain the target PDU of the sample value message constructed by the secondary equipment in the substation.
[0126] Filling the second total length to the marker node Asdu as a node header, and obtaining the content of each sub-node in the data node Asdu according to the test data, and filling each sub-node in the data node Asdu accordingly, so as to complete the target PDU of the SV message constructed by the secondary equipment in the substation.
[0127] In the embodiment, if the update condition is not met, the target PDU of the sample value message is directly constructed according to the test data when the sample value message is constructed by the secondary equipment in the substation, so as to ensure the normal construction of the PDU and the normal communication test.
[0128] Embodiment Three
[0129] Referring to Figure 4 , a structure schematic diagram of a sample value message construction device of a substation is shown. As Figure 4 shown, the device includes:
[0130] A test data receiving module 401 is configured to receive test data generated by a secondary equipment in a substation.
[0131] A PDU query module 402 is configured to query a sample PDU in a sample value message constructed by the secondary equipment in the substation.
[0132] An update condition matching module 403 is configured to match a change of the sample PDU relative to the test data with an update condition.
[0133] A PDU update module 404 is configured to, if the matching is successful, update the sample PDU according to the change of the sample PDU relative to the test data, as a target PDU of a sample value message constructed by the secondary equipment in the substation.
[0134] In an embodiment of the present application, the update condition matching module 403 includes:
[0135] a change source determination module configured to determine a node in the sample protocol data unit that has changed relative to the test data as a change source;
[0136] a first parameter extraction module configured to extract a first parameter representing a message layout from the change source;
[0137] a match success determination module configured to determine a match success with an update condition if the first parameter has not changed relative to the test data;
[0138] a match failure determination module configured to determine a match failure with the update condition if the first parameter has changed relative to the test data.
[0139] In an embodiment of the present application, the change source determination module is further configured to:
[0140] if a sampling counter node in the sample protocol data unit has changed relative to the test data and other nodes in the sample protocol data unit except the sampling counter node have not changed relative to the test data, then the sampling counter node is determined as the change source.
[0141] In an embodiment of the present application, the first parameter extraction module is further configured to:
[0142] extract a length from the sampling counter node as the first parameter representing the message layout.
[0143] In an embodiment of the present application, the protocol data unit update module 404 comprises:
[0144] a second parameter extraction module configured to extract a second parameter representing a change degree from the change source;
[0145] a parameter update module configured to update the sample protocol data unit according to the second parameter as a target protocol data unit of a sampling value message constructed by a secondary device in the substation.
[0146] In an embodiment of the present application, the second parameter extraction module is further configured to:
[0147] if the change source is a sampling counter node, then extract an offset address from the sampling counter node as the second parameter representing the change degree.
[0148] In an embodiment of the present application, the parameter update module is further configured to:
[0149] move data in the sample protocol data unit according to the offset address to obtain the target protocol data unit of the sampling value message constructed by the secondary device in the substation.
[0150] In one embodiment of the present application, further comprising:
[0151] a first total length calculation module, configured to calculate a sum of lengths of each sub-node in the marked node Apdu according to the test data if the matching fails, to obtain a first total length; the sub-nodes in the marked node Apdu include a number node, a data node and a marked node Asdu;
[0152] a first marked node construction module, configured to fill the first total length to the marked node Apdu, and fill the data node and the marked node Asdu according to the test data;
[0153] a second total length calculation module, configured to calculate a sum of lengths of each sub-node in the marked node Asdu according to the test data, to obtain a second total length;
[0154] a second marked node construction module, configured to fill the second total length to the marked node Asdu, and fill each sub-node in the marked node Asdu according to the test data, to obtain a target protocol data unit of a sample value message constructed for the secondary equipment in the substation.
[0155] The sampling value message construction device of the substation provided by the embodiment of the present application can execute the sampling value message construction method of the substation provided by any embodiment of the present application, and has the corresponding function modules and beneficial effects of executing the sampling value message construction method of the substation.
[0156] Embodiment four
[0157] Referring to Figure 5 , a structure schematic diagram of an electronic device provided by an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0158] As Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected to the at least one processor 11 in communication. The memory stores a computer program executable by the at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded into the random access memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0159] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0160] The processor 11 can be various general and / or special-purpose processing components having processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the substation sampled value message construction method.
[0161] In some embodiments, the substation sampled value message construction method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the substation sampled value message construction method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the substation sampled value message construction method by any other appropriate means, such as by means of firmware.
[0162] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0163] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, can cause instructions defined in the flow charts and / or block diagrams to be implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package and partially on a remote machine or entirely on a remote machine or server.
[0164] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0165] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0166] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain network, and the Internet.
[0167] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0168] Embodiment Five
[0169] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to realize the substation sampling value message construction method provided by any of the embodiments of the present application.
[0170] The computer program code can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce the computer implemented process such that the
[0171] It should be understood that the various forms of flow shown in the figures are illustrative examples of implementing the steps of the application. Several steps have been described as being performed by a single device. It will be understood that these steps can be performed by a single device or multiple devices. It will also be understood that the steps can be performed in a different order than that shown in the figures. It will also be understood that the steps can be performed concurrently or sequentially. It will also be understood that the steps can be performed by different entities. It will also be understood that the steps can be performed by a combination of hardware and software. It will also be understood that the steps can be performed by a combination of one or more devices and one or more computers.
[0172] The specific embodiments have been shown and described for the purposes of illustrating the physiological principles of the application. It will be understood that various modifications, combinations, sub-combinations, and alternatives can be made to the specific embodiments without departing from the spirit and principles of the application. Any modifications, equivalent substitutions, improvements, combinations or the like not described above are also encompassed within the scope of the application.
Claims
1. A method of constructing a sample value message of a substation, characterized by, The method comprises: receiving test data generated by secondary equipment in a substation; querying a sample protocol data unit in a sampled value message constructed by the secondary equipment in the substation; determining a node in the sample protocol data unit that has changed relative to the test data as a change source; extracting a first parameter representing message layout from the change source; if the first parameter has not changed relative to the test data, determining that the update condition is matched successfully; if the first parameter has changed relative to the test data, determining that the update condition is matched unsuccessfully; if the match is successful, extracting a second parameter representing the degree of change from the change source; updating the sample protocol data unit according to the second parameter as a target protocol data unit of the sampled value message constructed by the secondary equipment in the substation.
2. The method of claim 1, wherein, The determination of the node in the sample protocol data unit that has changed relative to the test data as the change source comprises: if a sample counter node in the sample protocol data unit has changed relative to the test data and other nodes in the sample protocol data unit except the sample counter node have not changed relative to the test data, determining that the sample counter node is the change source.
3. The method of claim 2, wherein, The extraction of the first parameter representing the message layout from the change source comprises: extracting a length from the sample counter node as the first parameter representing the message layout.
4. The method of claim 1, wherein, The extraction of the second parameter representing the degree of change from the change source comprises: if the change source is a sample counter node, extracting an offset address from the sample counter node as the second parameter representing the degree of change.
5. The method of claim 4, wherein, The update of the sample protocol data unit according to the second parameter as the target protocol data unit of the sampled value message constructed by the secondary equipment in the substation comprises: moving data in the sample protocol data unit according to the offset address to obtain the target protocol data unit of the sampled value message constructed by the secondary equipment in the substation.
6. The method according to any one of claims 1-5, characterized in that, The method further comprises: if the match is unsuccessful, calculating a sum of lengths of each sub-node in a marker node Apdu according to the test data to obtain a first total length; the sub-nodes in the marker node Apdu comprise a number node, a data node, and a marker node Asdu; filling the first total length to the marker node Apdu, and filling the data node and the marker node Asdu according to the test data; calculating a sum of lengths of each sub-node in the marker node Asdu according to the test data to obtain a second total length; filling the second total length to the marker node Asdu, and filling each sub-node in the marker node Asdu according to the test data to obtain the target protocol data unit of the sampled value message constructed by the secondary equipment in the substation.
7. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the method for constructing a sampled value message of a substation according to any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method for constructing a sampled value message of a substation according to any one of claims 1-6.
Citation Information
Patent Citations
R-SV power message implementation method
CN111031136A
Intelligent substation network message automatic collection and analysis method, equipment and medium
CN113079049A